...
Jira | ||||||||
---|---|---|---|---|---|---|---|---|
|
Issues and Decisions
Issue | Notes | Decision | |
---|---|---|---|
1 | How will hostname and port be provided when DMI-Plugin register itself and its list of cmHandles with NCMP | The team thinks that the information should instead be provided in the form of a ‘host-name’ and a ‘port’ (there was some debate on service-name v. host-name but it was settled on host-name) e.g. "dmi-plugin" : { <host-name>, <port> } Where the host-name is unique. (the DB might assign an internal unique ID for each entry but that is just for indexing and x-referencing in a relation DB and this ID is not to be used/ exposed externally) |
DMI URI
DMI URI format to follow below pattern Sandeep Shah
...
Usecase | REST Method | URI | Example | |||||
---|---|---|---|---|---|---|---|---|
1 | Add a data resource for a cmHandle | POST | {dmi-root}/dmi/v1/data/ch/<cmhandle>/ds/ncmp-datastore:running/{parent-data-resource-identifier} { <new-yang-data-resource> } Content-Type: application/json "data" payload : yang-data+json | see example 4 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
2 | Delete a data resource for a cmHandle | PUT | {dmi-root}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:running/{resource-identifier} | see example 7 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
3 | Patch a data resource for a cmHandle | PATCH | {dmi-root}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:running/{resource-identifier} { Content-Type: application/json "data" payload : yang-data+json | see example 5 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
4 | Patch multiple child resources for a single cmHandle | PATCH | {dmi-root}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:running/{resource-identifier} Content-Type: application/json "data" payload : yang-patch+json | see example 6 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
5 | Execute a yang action on a cmhandle instance | POST | dmi-root}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:operational/{resource-identifier}/{action} input: { } Note : If the "action" statement has no "input" section, the request message MUST NOT include a message-body | see example 10 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
6 | Execute an rpc operation | POST | {dmi-root}/dmi/v1/operations/ch/<cm-handle>/ds/ncmp-datastore:operational/ {module-name}:{action} { Note: If there is no "input" section, the request MUST NOT include a message-body | see example 11 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
7 | Read a filtered set of data under a data resource for a cmHandle | PUT | {dmiroot}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:operational/{resource-identifier}?fields={fields-expression}
| |||||
8 | Read data resources with specified fields under a given data resource for a given cmHandle | PUT | {dmi-root}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:operational/{resource-identifier}?fields={fields-expression}
| see example 12 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
9 | Get data resource with 'fileds' for a cmhandle with a given scope condition | PUT | {dmi-root}/dmi/v1/data/ch/{cm-handle}/ds/ncmp-datastore:operational/{resourcepath}?fields={fields}&scope={scope} | see example 2 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
10 | Read descendant nodes to a given depth for a given cmHandle | PUT | {dmi-root}/dmi/v1/data/ch/{cm-handle}/ds/ncmp-datastore:operational/{resource-identifier}?depth={level}
| see example 12 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI | ||||
11 | Replace data for a CMHandle | PUT | {dmi-root}/dmi/v1/data/ch/<cm-handle>/ds/ncmp-datastore:running/{resource-identifier} { data : { .... the complete tree config to be replaced } } | see example 12 CPS-391Spike: Define and Agree NCMP REST Interface#RESTAPI |
DMI Inventory and Sync
Use Case | Rest Method | URI | Example | |
---|---|---|---|---|
1 | DMI registers a new data source with NCMP | POST | {ncmp-root}/ncmp/v1/dmi-plugin/ dmi-plugin-id should be resolvable service name ink8s DNS | Scenario : Register/Create a new dmi-plugin data source in NCMP Header : Body : Success Response :
An error will tell the DMI Plugin that this datasource has already been processed - no need to recover the cmhandles again. |
2 | Delete a data source from NCMP DMI Plugin NCMP | DELETE | {ncmp-root}/ncmp/v1/dmi-pluigin/ { dmi-plugin-id}/dmi-source/ { unique-data-source-id } | Scenario
Success Response : Error Response: |
3 | NCMP requests cmhandles for a datasource (may be refresh of existing NCMP DMI plugin | GET | {dmi-root}/v1/dmi-source/{unique-data-source-id}?topic={topic-id}
Note - the following will refresh ALL dmi data sources managed by a dmi plugin | Scenario : NCMP requests sync of cmhandles for a datasource Event Body : |
4 | Notify of change to CMHandle(s) | Topic : 'NCMP_INVENTORY' / sync request topic The topic name should come from Data Catalog OR should DMI registry store the topic from the initial NCMP sync request?) | Topic : NCMP_INVENTORY
|
...