blob: 6bda4e27476781e50273800e41e2425f827f6923 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation Validate A&AI Serivce Instance
3...
4... Validate A&AI Serivce Instance
5
6Resource aai_interface.robot
7Library Collections
8Library OperatingSystem
9Library RequestsLibrary
10Library JSONUtils
11Library HttpLibrary.HTTP
12
13Resource ../json_templater.robot
14
15*** Variables ***
Jerry Flood8a6b0b52017-11-12 15:44:21 -050016${INDEX PATH} /aai/v11
DR695Hccff30b2017-02-17 18:44:24 -050017${GENERIC_QUERY_PATH} /search/generic-query?
18${SYSTEM USER} robot-ete
19${CUSTOMER SPEC PATH} /business/customers/customer/
20${SERVICE SUBSCRIPTIONS} /service-subscriptions/service-subscription/
21${SERVICE INSTANCE} /service-instances?service-instance-name=
Jerry Flood8a6b0b52017-11-12 15:44:21 -050022${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template
DR695Hccff30b2017-02-17 18:44:24 -050023
Jerry Flood8a6b0b52017-11-12 15:44:21 -050024*** Keywords ***
DR695Hccff30b2017-02-17 18:44:24 -050025Validate Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050026 [Documentation] Query and Validates A&AI Service Instance
27 [Arguments] ${service_instance_name} ${service_type} ${customer_id}
DR695Hccff30b2017-02-17 18:44:24 -050028 ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
29 Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name}
DR695Hccff30b2017-02-17 18:44:24 -050030
Jerry Flood8a6b0b52017-11-12 15:44:21 -050031
32
33*** Keywords ***
DR695Hccff30b2017-02-17 18:44:24 -050034Create Network
Jerry Flood8a6b0b52017-11-12 15:44:21 -050035 [Documentation] Query and Validates A&AI Service Instance
36 [Arguments] ${CUSTOMER ID}
DR695Hccff30b2017-02-17 18:44:24 -050037 ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
38 ${put_resp}= Run A&AI Put Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}/VDNS ${json_string}
39 Should Be Equal As Strings ${put_resp.status_code} 201
Jerry Flood8a6b0b52017-11-12 15:44:21 -050040 [Return] ${put_resp.status_code}
41