DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Validate A&AI Serivce Instance |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 3 | |
| 4 | Resource aai_interface.robot |
| 5 | Library Collections |
DR695H | d979465 | 2019-07-19 18:20:40 -0400 | [diff] [blame] | 6 | Library ONAPLibrary.AAI WITH NAME AAI |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 7 | |
| 8 | *** Variables *** |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 9 | ${INDEX_PATH} /aai/v11 |
| 10 | ${CUSTOMER_SPEC_PATH} /business/customers/customer/ |
| 11 | ${SERVICE_SUBSCRIPTIONS} /service-subscriptions/service-subscription/ |
| 12 | ${SERVICE_INSTANCE} /service-instances?service-instance-name= |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 13 | |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 14 | *** Keywords *** |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 15 | Validate Network |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 16 | [Documentation] Query and Validates A&AI Service Instance |
| 17 | [Arguments] ${service_instance_name} ${service_type} ${customer_id} |
DR695H | c618427 | 2019-07-26 15:50:23 -0400 | [diff] [blame] | 18 | ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}${service_type}${SERVICE_INSTANCE}${service_instance_name} auth=${GLOBAL_AAI_AUTHENTICATION} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 19 | Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 20 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 21 | Create Network |
Jerry Flood | 8a6b0b5 | 2017-11-12 15:44:21 -0500 | [diff] [blame] | 22 | [Documentation] Query and Validates A&AI Service Instance |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 23 | [Arguments] ${customer_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 24 | ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]} |
DR695H | c618427 | 2019-07-26 15:50:23 -0400 | [diff] [blame] | 25 | ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}/VDNS ${json_string} auth=${GLOBAL_AAI_AUTHENTICATION} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 26 | Should Be Equal As Strings ${put_resp.status_code} 201 |
DR695H | d979465 | 2019-07-19 18:20:40 -0400 | [diff] [blame] | 27 | [Return] ${put_resp.status_code} |