blob: 00b26774c1331ba2c2fe7a0576fc21733e33cbea [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}
DR695Hc6184272019-07-26 15:50:23 -040018 ${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}
DR695Hccff30b2017-02-17 18:44:24 -050019 Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name}
DR695Hccff30b2017-02-17 18:44:24 -050020
DR695Hccff30b2017-02-17 18:44:24 -050021Create Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050022 [Documentation] Query and Validates A&AI Service Instance
DR695H3bb6cf42019-06-20 15:04:04 -040023 [Arguments] ${customer_id}
DR695Hccff30b2017-02-17 18:44:24 -050024 ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
DR695Hc6184272019-07-26 15:50:23 -040025 ${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}
DR695Hccff30b2017-02-17 18:44:24 -050026 Should Be Equal As Strings ${put_resp.status_code} 201
DR695Hd9794652019-07-19 18:20:40 -040027 [Return] ${put_resp.status_code}