Release image version 1.12.2
[testsuite.git] / robot / resources / aai / network.robot
index 6bda4e2..00b2677 100644 (file)
@@ -1,41 +1,27 @@
 *** Settings ***
 Documentation    Validate A&AI Serivce Instance
-...
-...                  Validate A&AI Serivce Instance
 
 Resource          aai_interface.robot
 Library    Collections
-Library    OperatingSystem
-Library    RequestsLibrary
-Library    JSONUtils
-Library    HttpLibrary.HTTP
-
-Resource          ../json_templater.robot
+Library    ONAPLibrary.AAI    WITH NAME    AAI
 
 *** Variables ***
-${INDEX PATH}     /aai/v11
-${GENERIC_QUERY_PATH}  /search/generic-query?
-${SYSTEM USER}    robot-ete
-${CUSTOMER SPEC PATH}    /business/customers/customer/
-${SERVICE SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
-${SERVICE INSTANCE}    /service-instances?service-instance-name=
-${SERVCE INSTANCE TEMPLATE}    robot/assets/templates/aai/service_subscription.template
+${INDEX_PATH}     /aai/v11
+${CUSTOMER_SPEC_PATH}    /business/customers/customer/
+${SERVICE_SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
+${SERVICE_INSTANCE}    /service-instances?service-instance-name=
 
 *** Keywords ***
 Validate Network
     [Documentation]    Query and Validates A&AI Service Instance
     [Arguments]    ${service_instance_name}    ${service_type}  ${customer_id}
-       ${resp}=    Run A&AI Get Request      ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
+       ${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}
     Dictionary Should Contain Value    ${resp.json()['service-instance'][0]}    ${service_instance_name}
 
-
-
-*** Keywords ***
 Create Network
     [Documentation]    Query and Validates A&AI Service Instance
-    [Arguments]    ${CUSTOMER ID}
+    [Arguments]    ${customer_id}
     ${json_string}=    Catenate     { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
-       ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}/VDNS    ${json_string}
+       ${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}
     Should Be Equal As Strings         ${put_resp.status_code}         201
-       [Return]  ${put_resp.status_code}
-
+       [Return]  ${put_resp.status_code}
\ No newline at end of file