DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Validate A&AI Serivce Instance |
| 3 | ... |
| 4 | ... Validate A&AI Serivce Instance |
| 5 | |
| 6 | Resource aai_interface.robot |
| 7 | Library Collections |
| 8 | Library OperatingSystem |
| 9 | Library RequestsLibrary |
DR695H | 7aca1a4 | 2019-06-03 17:08:34 -0400 | [diff] [blame] | 10 | Library ONAPLibrary.JSON |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 11 | |
| 12 | Resource ../json_templater.robot |
| 13 | |
| 14 | *** Variables *** |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 15 | ${INDEX PATH} /aai/v11 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 16 | ${GENERIC_QUERY_PATH} /search/generic-query? |
| 17 | ${SYSTEM USER} robot-ete |
| 18 | ${CUSTOMER SPEC PATH} /business/customers/customer/ |
| 19 | ${SERVICE SUBSCRIPTIONS} /service-subscriptions/service-subscription/ |
| 20 | ${SERVICE INSTANCE} /service-instances?service-instance-name= |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 21 | ${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 22 | |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 23 | *** Keywords *** |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 24 | Validate Network |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 25 | [Documentation] Query and Validates A&AI Service Instance |
| 26 | [Arguments] ${service_instance_name} ${service_type} ${customer_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 27 | ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name} |
| 28 | Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 29 | |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 30 | |
| 31 | |
| 32 | *** Keywords *** |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 33 | Create Network |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 34 | [Documentation] Query and Validates A&AI Service Instance |
| 35 | [Arguments] ${CUSTOMER ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 36 | ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]} |
| 37 | ${put_resp}= Run A&AI Put Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}/VDNS ${json_string} |
| 38 | Should Be Equal As Strings ${put_resp.status_code} 201 |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 39 | [Return] ${put_resp.status_code} |
| 40 | |