Test Plans for A1 Adapter (Non RT RIC)
The below indicates high-level test cases for A1 Adapter in ONAP to interface with A1 Mediator in RT RIC. The test cases will be further detailed out before the testing cycle.
The current scope of A1 Adpater in Non-RT RIC is limited to supporting Policy Management A1 messages.
Please note that A1 Mediator (Developer version 1.0.1), is currently deployed in the Windriver Lab in a standalone VM (without full RIC deployment), and can be accessed at 10.12.7.38:10001.
# | Component(s) | Test Case | Status | Remarks |
---|---|---|---|---|
#1 | SDN-R/A1 Adapter and A1 Mediator | A1 Adapter in Non-RT RIC establishes connection with A1 Mediator in RT RIC | Complete | |
#2 | SDN-R/A1 Adapter and ONAP components | Upon receiving A1 Policy management DMAAP message from any ONAP components or micro-services, SDNR sends corresponding A1 message to A1 Mediator in Near Real TIme RIC. | Complete | Currently there are close to 10 A1 messages that will be supported in Frankfurt, and individual test cases will correspond to the respective A1 messages |
#3 | SDN-R/A1 Adapter and ONAP components | SDNR is able to receive A1 message on A1-P topic and invoke corresponding RPC to trigger respective DG | Complete | Currently there are close to 10 A1 messages that will be supported in Frankfurt, and individual test cases will correspond to the respective A1 messages |
#4 | SDN-R/A1 Adapter and ONAP components | RPC/DG execution: Verify if respective A1 Rest API is invoked against A1 Mediator, based on the received A1 Policy management DMAAP message | Complete | Currently there are close to 10 A1 messages that will be supported in Frankfurt, and individual test cases will correspond to the respective A1 messages |
#5 | SDN-R/A1 Adapter and ONAP components | RPC/DG execution: Verify if DMAAP message confirming success or failure of API transaction with A1 mediator is published on A1-P-RSP topic. This DMAAP message to be consumed by ONAP components, as confirmation of its requested action | Complete | Currently there are close to 10 A1 messages that will be supported in Frankfurt, and individual test cases will correspond to the respective A1 messages |
#6 | SDN-R/A1 Adapter and A1 Mediator | A1 Mediator in RT RIC to invoke Notification message against A1 Adapter | Complete | Would be tested using CURL, as the current A1 mediator does not implement notifications |
1. DMAAP Message
DMAAP Message Request (sent from ONAP or MS components):
Topic: A1-P { "body": { "input": { "CommonHeader": { "TimeStamp": "2018-11-30T09:13:37.368Z", "APIver": "1.0", "RequestID": "9d2d790e-a5f0-11e8-98d0-529269fb1459", "SubRequestID": "1", "RequestTrack": {}, "Flags": {} }, "Action": "getNearRT-RICs", "Payload": {"input": {"dummy": "dummy"}} }, "version": "1.0", "rpc-name": "getNearRT-RICs", "correlation-id": "9d2d790e-a5f0-11e8-98d0-529269fb1459-1", "type": "request" } } |
---|
DMAAP Message Response (sent from A1 Mediator with status response)
Topic: A1-P-RSP { "body": { "output": { "CommonHeader": { "TimeStamp": "2018-09-10T07:10:05.614Z", "APIver": "1.0", "RequestID": "9d2d790e-a5f0-11e8-98d0-529269fb1459", "SubRequestID": "1", "RequestTrack": [], "Flags": [] }, "Status": { "Code": 200, "Value": "SUCCESS" }, "Payload": "[ 10.12.7.38:10001 ]" } }, "version": "1.0", "rpc-name": "getNearRT-RICs", "correlation-id": "9d2d790e-a5f0-11e8-98d0-529269fb1459-1", "type": "response" } |
---|
DMAAP message payload is aligned with YANG RPC Input parameters and is exactly the same as, when YANG model RPC input is rendered as a JSON object. See the above example, where DMAAP message is related to RPC "getNearRT-RICs".
IMPORTANT: Please note that “input” key needs to be included in the payload. Escape characters ARE NOT to be INCLUDED.
2. DMAAP Message Request/Response Payloads and Test Verification Using CURL against A1 Mediator
RPC | DMAAP Message Request Payload | DMAAP Message Response Payload | Verification Using CURL against A1 Mediator | YANG/RPC Definition |
getNearRT-RICs | { | \"Payload\":\"10.12.7.38:10001\" | +---x getNearRT-RICs | |
getHealthCheck | { | \"Payload\":\"None\" | curl -X GET \ | +---x getHealthCheck |
getPolicyTypes | { | \"Payload\":\"[20505, 20525 ]\\n\" | Check using CURL if policy type has been created | +---x getPolicyTypes |
getPolicyType | { | "Payload":"{ \"create_schema\": { \"$schema\": \"http://json-schema.org/draft-07/schema#\", \"additionalProperties\": false, \"properties\": { \"blocking_rate\": { \"default\": 10, \"description\": \"% Connections to block\", \"maximum\": 100, \"minimum\": 1, \"type\": \"number\" }, \"enforce\": { \"default\": true, \"type\": \"boolean\" }, \"trigger_threshold\": { \"default\": 10, \"description\": \"Minimum number of events in window to trigger blocking\", \"minimum\": 1, \"type\": \"integer\" }, \"window_length\": { \"default\": 1, \"description\": \"Sliding window length (in minutes)\", \"maximum\": 30, \"minimum\": 1, \"type\": \"integer\" } }, \"type\": \"object\" }, \"description\": \"various parameters for controlpolicy2\", \"name\": \"controlPolicy2\", \"policy_type_id\": 20505}" | curl -X GET \ | +---x getPolicyType |
deletePolicyType | { | \"Payload\":\"Working On it\" | Check using CURL if policy type has been deleted | +---x deletePolicyType |
createPolicyType | { | \"Payload\":\"None\ | Check using CURL if policy type has been created | +---x createPolicyType |
getPolicyInstances | { | \"Payload\":\"[97a955e0-1965-11ea-836a-2e728ce8bb899, 97a955e0-1965-55ea-836a-2e728ce8bb899 ]\\n\" | Check using CURL against A1 Mediator | +---x getPolicyInstances |
getPolicyInstance | { | \"Payload\":\"{ \\\"blocking_rate\\\": 20, \\\"enforce\\\": true, \\\"trigger_threshold\\\": 10, \\\"window_length\\\": 10}\" | curl -X GET \ | +---x getPolicyInstance |
deletePolicyInstance | { | \"Payload\":\"Working On it\" | curl -X DELETE \ | +---x deletePolicyInstance |
createPolicyInstance | { | \"Payload\":\"Working On it\" | Confirm using CURL that policy instance was created | +---x createPolicyInstance |
getStatus | { | \"Payload\":\"Working On it\" | curl -X GET \ | +---x getStatus |
notifyPolicyEnforcementUpdate | { | \"Payload\":\"Policy Enforcement Update - Policies Applied\" | +---x notifyPolicyEnforcementUpdate |