blob: 8229a7e4fdf46c9ac1811555574e457988eaef9f [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
DR695Hccff30b2017-02-17 18:44:24 -05006
7*** Variables ***
DR695H3bb6cf42019-06-20 15:04:04 -04008${INDEX_PATH} /aai/v11
9${CUSTOMER_SPEC_PATH} /business/customers/customer/
10${SERVICE_SUBSCRIPTIONS} /service-subscriptions/service-subscription/
11${SERVICE_INSTANCE} /service-instances?service-instance-name=
DR695Hccff30b2017-02-17 18:44:24 -050012
Jerry Flood8a6b0b52017-11-12 15:44:21 -050013*** Keywords ***
DR695Hccff30b2017-02-17 18:44:24 -050014Validate Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050015 [Documentation] Query and Validates A&AI Service Instance
16 [Arguments] ${service_instance_name} ${service_type} ${customer_id}
DR695H3bb6cf42019-06-20 15:04:04 -040017 ${resp}= Run A&AI Get Request ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}${service_type}${SERVICE_INSTANCE}${service_instance_name}
DR695Hccff30b2017-02-17 18:44:24 -050018 Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name}
DR695Hccff30b2017-02-17 18:44:24 -050019
Jerry Flood8a6b0b52017-11-12 15:44:21 -050020
21
22*** Keywords ***
DR695Hccff30b2017-02-17 18:44:24 -050023Create Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050024 [Documentation] Query and Validates A&AI Service Instance
DR695H3bb6cf42019-06-20 15:04:04 -040025 [Arguments] ${customer_id}
DR695Hccff30b2017-02-17 18:44:24 -050026 ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
DR695H3bb6cf42019-06-20 15:04:04 -040027 ${put_resp}= Run A&AI Put Request ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}/VDNS ${json_string}
DR695Hccff30b2017-02-17 18:44:24 -050028 Should Be Equal As Strings ${put_resp.status_code} 201
Jerry Flood8a6b0b52017-11-12 15:44:21 -050029 [Return] ${put_resp.status_code}
30