- CPS-391Getting issue details... STATUS
Guiding Principles
- NCMP REST Interface will follow/be inspired by RESTConf interface for easy acceptance of and transition to this interface
- Will follow ONAP's RESTful API Design Specification
- The interface will include the concept of data-stores inspired by Network Management Datastore Architecture (NMDA) and as used in RESTConf
- The application should be able to easily switch between 'pass-through' and other datastores (also identical rest endpoint and responses)
References
Follow principles/patterns of RESTCONF RFC-8040 https://datatracker.ietf.org/doc/html/rfc8040
Follow principles/patterns of yang-patch RFC-8072 https://datatracker.ietf.org/doc/html/rfc8040
Follow principles/patterns of RESTCONF NMDA RFC-8527 https://datatracker.ietf.org/doc/html/rfc8527
Requirements
Please note this section was added long after the implementation and focuses on characteristic only.
Characteristics - WIP
It is proposed that reported characteristics will be used as a baseline for NCMP when agreed and sign-off.
Operation | Total CM-handles registered | Concurrent requests/parallel | DMI Delay | Rest response size | Performance | Observed Rate (rate not measured) | Expected duration | Sign-Off | |
---|---|---|---|---|---|---|---|---|---|
1 | Registration of 100 CM-handles | 20k Nodes | 1 (requests are sequential) | 100 ms to get module references | N/A | 1.6 ops/second | TBD | TDB | |
2 | De-registration of 100 CM-handles | 20k Nodes | 1 (requests are sequential) | N/A | N/A | ||||
3 | CM-handle search without filter | 20k Nodes | 5 | N/A | TBD e.g. 10MB | Within 15 sec | 5 ops/minute | 1 minute / operation | TDB |
4 | CM-handle ID search without filter | 20k Nodes | 5 | N/A | TBD e.g. 1MB | Within 2 sec | 7.1 ops/minute | 42 seconds / operation | TDB |
5 | Synchronous single CM-handle pass-through read | 20k Nodes | 20 | TDB e.g. 5 KB | 25 op/sec | 50 ops/second | TBD | TDB | |
6 | Synchronous single CM-handle response time read | 20k Nodes | 20 | N/A | within 1 sec | ||||
7 | Synchronous single CM-handle pass-through write | 20k Nodes | 20 | N/A | N/A | 13 ops/sec | 13 ops/second | TBD | TDB |
8 | Synchronous single CM-handle response time write | 20k Nodes | 20 | N/A | Within 2 sec |
Note
- This is for mixed TCs
- Single KPIs will be monitored in NCMP owned pipeline with our performance every day(2 hrs interval) - Performance
- New BATCH KPI - TBD
- Organise a call to walk through the code and TCs with //. Want to see the code of the Test Cases. Csaba Szabó to walkthrough TCs with CPS team
- Check Registration & de-reg agree with //
Open Questions
- Concurrent which number are we agreeing to test, 10 parallel op. according to the input load, the average response time as mentioned in comment is 20 parallel op
- DMI delay - We need feed back from ETH on this
- Better to have R, W use cases separated as in the FS for both throughput and response time or should we merge this on NCMP
- Check Registration - Kolawole Adebisi-Adeolokun Refer to Michelle's email
- Check DE-Registration if this was ever agreed
Ongoing Discussion
- Share Test cases per KPI with CPS. AP @Csaba Szabó X to walkthrough TCs with Toine & Daniel(CPS)
- Functional Specification document.
- Confluence: Configuration Handling Functional Specification.
i. Current content shows mixed testcases, all TCs happening in parallel. AP @Csaba Kocsis Clarify what is being run in parallel and update table accordingly. - Waiting for feedback
ii. AP @Csaba Kocsis update UseCase_0005_IdSearch_NoFilter & UseCase_0008_Search_NoFilter to merge the Input Load column to show total of 5 parallel requests. - Waiting for feedback
iii. AP @Csaba Kocsis Notify Product Engineering (Dagda) about the change. - Waiting for feedback
- AP , @Csaba Kocsis , @Toine Siebelink, @Kolawole Adeolokun: Review the FS and identify if additional information is required. ONGOING
i. FS reviewed and a few comments added by CPS - Waiting for feedback
- Question about FS and Stability test strategy – what is expected to be supported in parallel or what is expected to be tested in series? How is that decided? AP Michelle & @Csaba Kocsis - Waiting for feedback
- Can FS to be updated to define single / individual workload. Where can it be tested? AP @Kieran Mccarthy A, @Csaba Kocsis, @Toine Siebelink - Waiting for feedback
Synchronous single cm-handle pass-through (read) requests
Parameter | Expectation | Notes | Sign-Off |
---|---|---|---|
Average Response Size | 5KB | Shall not exceed 5KB | |
Concurrent request | 12 clients requests toward 1 NCMP simultaneously DMI also support 12 simultaneous requests | 40ms of overhead on top of DMI latency for each requests, at most for NCMP request. This shall remain within 40ms for 12 parallel requests. Given the DMI delay below; this means up to 240 request per second | |
DMI Delay | 10ms | This is not in control of CPS. Assume DMI is 1.25 seconds average DMI response time for high latency, low latency =10 ms, this should also work for DMI Plugin. I.e 40ms ontop of the DMI. 1.25seconds+40ms= 1.29seconds | |
Test Environment | |||
Security | Disable Basic Authentication in Springboot | If configurable from application yaml, then it’s acceptable. |
Open Issues & Decisions
RESTCONF/NETCONF relationship
NCMP URI
NCMP URI format to follow below pattern
<OP>/ncmp/<v{vNumber}>/ch/<cmHandle>/<data|operations|{ncmpAction}>/ds/{datastore}?[rp:]{resourcePath}&{options}
Below table shows the proposed interface, actual implementation might deviate from this but can be accessed from
- Gerrit Source
- Read-the-docs: https://docs.onap.org/projects/onap-cps/en/latest/design.html#offered-apis
URI | Mandatory or Optional | |
---|---|---|
<OP> | the HTTP method | Mandatory |
ncmp / | the ncmp root resource | Mandatory |
<v{vNumber}> | version of the ncmp interface <path> is the target resource URI <query> is the query parameter list | Mandatory |
ch/<cmHandle> | unique (string) identifier of a yang tree instance. | Mandatory |
<data|operations|{ncmpAction}> | request category - yang data, rpc operation or a (non-modelled) ncmp api action. this could be data, operations or ncmpAction (e.g. 'sync-data') | Mandatory |
ds/{datastore} | Mandatory | |
<resourceIdentifier> | the path expression identifying the resource that is being accessed by the operation. If this field is not present, then the target resource is the API itself. | Optional |
<options> | Parameters with the familiar form of "name=value" pairs. Query parameters are optional to implement by the server and optional to use by the client. Each optional query parameter is identified by a URI | Optional DMI should be able to support (/pass through) ANY parameter associated with the RESTCONF message; see Section 3.4 of [RFC3986]. |
Datastores
New datastores are defined for ncmp to access the CPS 'running' or 'operational' datastore.
Alternatively, the request can be sent directly to the 'device' itself (bypassing CPS datastores) using one of the 'passthrough-*' datastores options as below
The new ncmp datastores required for ONAP Release I include :
Datastore Mapping in ONAP DMI Plugin impl.
# | Incoming DS value (NCMP & DMI Rest interfaces) | Outgoing (non-NMDA RestConf controller) | Notes |
---|---|---|---|
1 | /ds /ncmp-datastores:operational |
| CT + CF, RO |
2 | /ds/ncmp-datastores:running |
| CT, RW |
3 | /ds/ncmp-datastores:passthrough-operational |
| CT + CF, RO |
4 | /ds/ncmp-datastores:passthrough-running |
| CT, RW |
5 | /ds/ <anything-else> | N/A | Not supported |
Datastore, Paths and Format Combinations for Read Operations
State | Input | Behavior | Data | Notes | |||||
---|---|---|---|---|---|---|---|---|---|
# | Data-Sync | Datastore parameter | Expected resourcePath format | Accept-Header | Fields (filter) | Data Source | Included DataNodes | ||
1 | On | Not Specified | cpsPath | application/yang-data+json | N/A | Not supported | N/A | N/A | |
2 | On | Not Specified | cpsPath | application/json | N/A | Not supported | N/A | N/A | |
3 | Off | Not Specified | cpsPath | application/yang-data+json | N/A | Not supported | N/A | N/A | |
4 | Off | Not Specified | cpsPath | N/A | N/A | Not supported | N/A | N/A | there are NO DataNode objects in CPS to output as JSON) |
5 | Off | Not Specified | other then cpsPath | N/A | N/A | Not supported | N/A | N/A | Not supported Since NCMP can only convert cpsPaths |
6 | On | Off | ncmp/passthrough-operational | NCMP does not parse | NCMP does not parse | depends on DMI-Plugin (supported in ONAP) | Resolve DMI plugin Forward request to plugin Output received response | DMI-Plugin | config + non-config | The DMI plugin may error if the RP or accept header are not supported. The DMI plugin may forward the request without processing too. |
7 | On | Off | ncmp/passthrough-running | NCMP does not parse | NCMP does not parse | depends on DMI-Plugin (supported in ONAP) | Resolve DMI plugin Forward request to plugin Output received response | DMI-Plugin | config-only | |
8 | On | ncmp/operational | cpsPath | application/yang-data+json |
| Read from cache output: application/yang-data+json | CPS-Core | config + non-config | NCMP/CPS-Core needs to remove DataNode wrapping |
9 | On | ncmp/operational | cpsPath | application/json |
| Read from cache output: application/json | CPS-Core | config + non-config | Output will use DataNode wrapping (as is from CPS-Core) For forwarding (cached config off) dmi-reposne need to be wrapped explicitly in 'DataNode' |
10 | Off | ncmp/operational | cpsPath | application/yang-data+json | to be determined in spike, see issue #28 | Resolve DMI plugin Convert cpsPath to RESTConfPath* Forward request to plugin | Read from DMI plugin Output application/yang-data+json | DMI-Plugin | config + | |
11 | On | Off | ncmp/running | cpsPath | application/yang-data+json | to be determined in spike, see issue #28 | Resolve DMI plugin Convert cpsPath to RESTConfPath* Forward request to plugin | Read from DMI plugin Output application/yang-data+json | DMI-Plugin | config-only |
*Note Convert cpsPath to RESTConfPath wil only support 'absolute' cpsPath for conversion no query-type paths
Read Example
Works Items for above.
# | Description | Component | Enables |
---|---|---|---|
1 | Forward request from NCMP to CPS-Core | NCMP | 8,9 |
2 | Forward request from NCMP to DMI-Plugin | NCMP | 6,7 |
3 | Convert json (dataNode) to yang-data+json | CPS-Core/NCMP | 8 |
4 | Convert cpsPath to RESTConf Path | NCMP | 10,11 |
5 | Enhance &fields parameter where needed | NCMP | 10,11+fields option |
6 | NOT Supported | N/A | 1,2,3,4,5 |
Datastore, Paths and Format Combinations for Write Operations
- Write operations are only supported on the ncmp-datastores:running and ncmp-datastores:passthrough-running datastores
- The Data Target for all write operation is DMI-Plugin
- Write operations are only supported for config=true data
- Fields and similar parameters are not supported for write operations
State | Input | Behavior | Notes | ||||
---|---|---|---|---|---|---|---|
# | Data-Sync | Operation | Datastore parameter | Expected resourcePath format | Content-Type | ||
1 | On | Off | Create | ncmp/passthrough-running | NCMP does not parse | NCMP only checks it is valid JSON, then embeds the data in a larger JSON structure (see CPS-390 page) | Resolve DMI plugin Forward request to plugin Output received response (success or failure) | The DMI plugin may error if the RP or content type are not supported. The DMI plugin may forward the request without processing too. |
2 | On | Off | Replace | ncmp/passthrough-running | NCMP does not parse | NCMP only checks it is valid JSON, then embeds the data in a larger JSON structure (see CPS-390 page) | Resolve DMI plugin Forward request to plugin Output received response (success or failure) | The DMI plugin may error if the RP or content type are not supported. The DMI plugin may forward the request without processing too. |
3 | On | Off | Delete | ncmp/passthrough-running | NCMP does not parse | NCMP doesn't expect any input data from application, will create request body to DMI plugin without embedded data. | Resolve DMI plugin Forward request to plugin Output received response (success or failure) | The DMI plugin may error if the RP or content type are not supported. The DMI plugin may forward the request without processing too. |
4 | On | Off | Patch | ncmp/passthrough-running | NCMP does not parse | NCMP only checks it is valid JSON, then embeds the data in a larger JSON structure (see CPS-390 page) | Resolve DMI plugin Forward request to plugin Output received response (success or failure) | The DMI plugin may error if the RP or content type are not supported. The DMI plugin may forward the request without processing too. |
5 | On | Off | Create | ncmp/running | cpsPath | application/yang-data+json | Resolve DMI plugin Convert cpsPath to RESTConfPath Forward request to plugin Output received response (success or failure) | |
6 | On | Off | Update | ncmp/running | cpsPath | application/yang-data+json | Resolve DMI plugin Convert cpsPath to RESTConfPath Forward request to plugin Output received response (success or failure) | |
7 | On | Off | Delete | ncmp/running | cpsPath | N/A | Resolve DMI plugin Convert cpsPath to RESTConfPath Forward request to plugin Output received response (success or failure) | |
8 | On | Off | Patch | ncmp/running | cpsPath | application/yang-data+json (*plain patch) | Resolve DMI plugin Convert cpsPath to RESTConfPath Forward request to plugin Output received response (success or failure) | |
9 | On | Off | Patch | ncmp/running | cpsPath | application/yang-patch+json | Resolve DMI plugin Convert cpsPath to RESTConfPath Forward request to plugin Output received response (success or failure) |