blob: bb74d388c220906c2b4cfff0012544b2dae9aa98 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation Validate A&AI Serivce Instance
DR695Hccff30b2017-02-17 18:44:24 -05003
4Resource aai_interface.robot
5Library Collections
DR695Hd9794652019-07-19 18:20:40 -04006Library ONAPLibrary.AAI WITH NAME AAI
DR695Hccff30b2017-02-17 18:44:24 -05007
8*** Variables ***
DR695H3bb6cf42019-06-20 15:04:04 -04009${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=
DR695Hccff30b2017-02-17 18:44:24 -050013
Jerry Flood8a6b0b52017-11-12 15:44:21 -050014*** Keywords ***
DR695Hccff30b2017-02-17 18:44:24 -050015Validate Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050016 [Documentation] Query and Validates A&AI Service Instance
17 [Arguments] ${service_instance_name} ${service_type} ${customer_id}
DR695Hd9794652019-07-19 18:20:40 -040018 ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
19 ${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=${auth}
DR695Hccff30b2017-02-17 18:44:24 -050020 Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name}
DR695Hccff30b2017-02-17 18:44:24 -050021
DR695Hccff30b2017-02-17 18:44:24 -050022Create Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050023 [Documentation] Query and Validates A&AI Service Instance
DR695H3bb6cf42019-06-20 15:04:04 -040024 [Arguments] ${customer_id}
DR695Hd9794652019-07-19 18:20:40 -040025 ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
DR695Hccff30b2017-02-17 18:44:24 -050026 ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
DR695Hd9794652019-07-19 18:20:40 -040027 ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}/VDNS ${json_string} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -050028 Should Be Equal As Strings ${put_resp.status_code} 201
DR695Hd9794652019-07-19 18:20:40 -040029 [Return] ${put_resp.status_code}