summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--red.xml1
-rw-r--r--robot/resources/aai/aai_interface.robot63
-rw-r--r--robot/resources/aai/add-relationship-list.robot13
-rw-r--r--robot/resources/aai/ccvpn-connectivities.robot37
-rw-r--r--robot/resources/aai/ccvpn-vpn-bindings.robot41
-rw-r--r--robot/resources/aai/create_availability_zone.robot23
-rw-r--r--robot/resources/aai/create_complex.robot20
-rw-r--r--robot/resources/aai/create_customer.robot16
-rw-r--r--robot/resources/aai/create_service.robot24
-rw-r--r--robot/resources/aai/create_tenant.robot30
-rw-r--r--robot/resources/aai/create_vnfc.robot22
-rw-r--r--robot/resources/aai/create_zone.robot22
-rw-r--r--robot/resources/aai/network.robot13
-rw-r--r--robot/resources/aai/service_instance.robot35
-rw-r--r--robot/resources/aai/volume_group.robot4
-rw-r--r--robot/resources/asdc_interface.robot118
-rw-r--r--robot/resources/clamp_interface.robot10
-rw-r--r--robot/resources/consul_interface.robot3
-rw-r--r--robot/resources/demo_preload.robot19
-rw-r--r--robot/resources/heatbridge.robot29
-rw-r--r--robot/resources/mr_interface.robot10
-rw-r--r--robot/resources/oof_interface.robot12
-rw-r--r--robot/resources/policy_interface.robot26
-rw-r--r--robot/resources/so/create_cloud_config.robot14
-rw-r--r--robot/resources/stack_validation/packet_generator_interface.robot20
-rw-r--r--robot/resources/test_templates/closedloop_test_template.robot34
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot18
-rw-r--r--robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot12
-rw-r--r--robot/testsuites/update_onap_page.robot6
29 files changed, 361 insertions, 334 deletions
diff --git a/red.xml b/red.xml
index e87a9474..8e88eb62 100644
--- a/red.xml
+++ b/red.xml
@@ -21,6 +21,7 @@
<referencedLibrary type="PYTHON" name="ONAPLibrary.SDNC" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="ONAPLibrary.SDC" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="ONAPLibrary.PreloadData" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="ONAPLibrary.AAI" path="testsuite/robot/library"/>
<pythonpath>
<path location="robot/library"/>
</pythonpath>
diff --git a/robot/resources/aai/aai_interface.robot b/robot/resources/aai/aai_interface.robot
index 5580033f..cc8475fa 100644
--- a/robot/resources/aai/aai_interface.robot
+++ b/robot/resources/aai/aai_interface.robot
@@ -2,6 +2,7 @@
Documentation The main interface for interacting with A&AI. It handles low level stuff like managing the http request library and A&AI required fields
Library RequestsLibrary
Library ONAPLibrary.Utilities
+Library ONAPLibrary.AAI WITH NAME AAI
Resource ../global_properties.robot
*** Variables ***
@@ -13,66 +14,20 @@ ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_AA
*** Keywords ***
Run A&AI Health Check
[Documentation] Runs an A&AI health check
- ${resp}= Run A&AI Get Request ${AAI_HEALTH_PATH}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Run A&AI Get Request
- [Documentation] Runs an A&AI get request
- [Arguments] ${data_path}
- Disable Warnings
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${session}= Create Session aai ${AAI_FRONTEND_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request aai ${data_path} headers=${headers}
- Log Received response from aai ${resp.text}
- [Return] ${resp}
-
-Run A&AI Put Request
- [Documentation] Runs an A&AI put request
- [Arguments] ${data_path} ${data}
- Disable Warnings
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${session}= Create Session aai ${AAI_FRONTEND_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Put Request aai ${data_path} data=${data} headers=${headers}
- Log Received response from aai ${resp.text}
- [Return] ${resp}
-
-Run A&AI Post Request
- [Documentation] Runs an A&AI Post request
- [Arguments] ${data_path} ${data}
- Disable Warnings
${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${session}= Create Session aai ${AAI_FRONTEND_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Post Request aai ${data_path} data=${data} headers=${headers}
- Log Received response from aai ${resp.text}
- [Return] ${resp}
-
-Run A&AI Delete Request
- [Documentation] Runs an A&AI delete request
- [Arguments] ${data_path} ${resource_version}
- Disable Warnings
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${session}= Create Session aai ${AAI_FRONTEND_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Delete Request aai ${data_path}?resource-version=${resource_version} headers=${headers}
- Log Received response from aai ${resp.text}
- [Return] ${resp}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_HEALTH_PATH} auth=${auth}
+ Should Be Equal As Strings ${resp.status_code} 200
Delete A&AI Entity
[Documentation] Deletes an entity in A&AI
[Arguments] ${uri}
- ${get_resp}= Run A&AI Get Request ${VERSIONED_INDEX_PATH}${uri}
- Run Keyword If '${get_resp.status_code}' == '200' Delete A&AI Entity Exists ${uri} ${get_resp.json()['resource-version']}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${VERSIONED_INDEX_PATH}${uri} auth=${auth}
+ Run Keyword If '${resp.status_code}' == '200' Delete A&AI Entity Exists ${uri} ${resp.json()['resource-version']}
Delete A&AI Entity Exists
[Documentation] Deletes an A&AI entity
[Arguments] ${uri} ${resource_version_id}
- ${put_resp}= Run A&AI Delete Request ${VERSIONED_INDEX_PATH}${uri} ${resource_version_id}
- Should Be Equal As Strings ${put_resp.status_code} 204
-
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${VERSIONED_INDEX_PATH}${uri} ${resource_version_id} auth=${auth}
+ Should Be Equal As Strings ${put_resp.status_code} 204 \ No newline at end of file
diff --git a/robot/resources/aai/add-relationship-list.robot b/robot/resources/aai/add-relationship-list.robot
index 7b353498..95363fdf 100644
--- a/robot/resources/aai/add-relationship-list.robot
+++ b/robot/resources/aai/add-relationship-list.robot
@@ -5,7 +5,8 @@ Documentation Operations on relationship-list sub-object in AAI,
Resource aai_interface.robot
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${AAI_RELATIONSHIPLIST_PATH} relationship-list
@@ -18,9 +19,10 @@ Add Relationship
[Documentation] Adds Relationship sub-object to existing object in AAI
[Arguments] ${api_version_base_object_url} ${related_class_name} ${related_object_url}
${arguments}= Create Dictionary related_class_name=${related_class_name} related_object_url=${related_object_url}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_RELATIONSHIP_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${api_version_base_object_url}/${AAI_RELATIONSHIP_PATH} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_RELATIONSHIP_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${api_version_base_object_url}/${AAI_RELATIONSHIP_PATH} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
@@ -34,7 +36,8 @@ Get RelationshipList
Get Object With Depth
[Documentation] Return Object with Depth parameter to show RelationshipList
[Arguments] ${api_version_base_object_url}
- ${resp}= Run A&AI Get Request ${api_version_base_object_url}${AAI_RELATIONSHIP_DEPTH}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${api_version_base_object_url}${AAI_RELATIONSHIP_DEPTH} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
Log Returning response ${resp.json()}
[Return] ${resp.json()} \ No newline at end of file
diff --git a/robot/resources/aai/ccvpn-connectivities.robot b/robot/resources/aai/ccvpn-connectivities.robot
index 7e18709c..df783970 100644
--- a/robot/resources/aai/ccvpn-connectivities.robot
+++ b/robot/resources/aai/ccvpn-connectivities.robot
@@ -6,7 +6,8 @@ Resource api_version_properties.robot
Resource add-relationship-list.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${AAI_CONN_ROOT_PATH} /network/connectivities/connectivity
@@ -20,7 +21,8 @@ ${AAI_CONN_API_IMPL_INDEX_PATH}= ${AAI_CASABLANCA_INDEX_PATH}
Create Connectivity If Not Exists
[Documentation] Creates Connectivity in AAI if it doesn't exist
[Arguments] ${connectivity_id}
- ${get_resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} auth=${auth}
Return From Keyword If '${get_resp.status_code}' == '200'
Create Connectivity ${connectivity_id}
@@ -28,62 +30,71 @@ Create Connectivity
[Documentation] Creates Connectivity in AAI
[Arguments] ${connectivity_id}
${arguments}= Create Dictionary connectivity_id=${connectivity_id}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_CONNECTIVITY_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_CONNECTIVITY_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete Connectivity If Exists
[Documentation] Removes Connectivity from AAI if it exists
[Arguments] ${connectivity_id}
- ${get_resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete Connectivity ${connectivity_id} ${get_resp.json()}
Delete Connectivity
[Documentation] Removes Connectivity from AAI
[Arguments] ${connectivity_id} ${json}
${resource_version}= Catenate ${json['resource-version']}
- ${put_resp}= Run A&AI Delete Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Get Connectivity
[Documentation] Return Connectivity
[Arguments] ${connectivity_id}
- ${resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Valid Connectivity URL
[Documentation] Return Valid Connectivity URL
[Arguments] ${connectivity_id}
- ${resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
Get Nodes Query Connectivity
[Documentation] Return Nodes query Connectivity
[Arguments] ${connectivity_id}
- ${resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_NODES_PATH}?connectivity-id=${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_NODES_PATH}?connectivity-id=${connectivity_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Example Connectivity
[Documentation] Return Example Connectivity
- ${resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_EXAMPLES_PATH}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_EXAMPLES_PATH} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Confirm No Connectivity
[Documentation] Confirm No Connectivity
[Arguments] ${connectivity_id}
- ${resp}= Run A&AI Get Request ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 404
Confirm API Not Implemented Connectivity
[Documentation] Confirm latest API version where Connectivity is not implemented
[Arguments] ${connectivity_id}
- ${resp}= Run A&AI Get Request ${AAI_CONN_API_NA_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_CONN_API_NA_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 400
Add Connectivity Relationship
diff --git a/robot/resources/aai/ccvpn-vpn-bindings.robot b/robot/resources/aai/ccvpn-vpn-bindings.robot
index 67789e27..192753e0 100644
--- a/robot/resources/aai/ccvpn-vpn-bindings.robot
+++ b/robot/resources/aai/ccvpn-vpn-bindings.robot
@@ -8,7 +8,8 @@ Resource api_version_properties.robot
Resource add-relationship-list.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${AAI_VPNB_ROOT_PATH} /network/vpn-bindings/vpn-binding
@@ -22,7 +23,8 @@ ${AAI_VPNB_API_IMPL_INDEX_PATH}= ${AAI_CASABLANCA_INDEX_PATH}
Create VPN Binding If Not Exists
[Documentation] Creates VPN Binding in AAI if it doesn't exist
[Arguments] ${vpn_id}
- ${get_resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
Return From Keyword If '${get_resp.status_code}' == '200'
Create VPN Binding ${vpn_id}
@@ -30,65 +32,66 @@ Create VPN Binding
[Documentation] Creates VPN Binding in AAI
[Arguments] ${vpn_id}
${arguments}= Create Dictionary vpn_id=${vpn_id}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_VPNBINDING_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_VPNBINDING_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete VPN Binding If Exists
[Documentation] Removes VPN Binding from AAI if it exists
[Arguments] ${vpn_id}
- ${get_resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete VPN Binding ${vpn_id} ${get_resp.json()}
Delete VPN Binding
[Documentation] Removes VPN Binding from AAI
[Arguments] ${vpn_id} ${json}
${resource_version}= Catenate ${json['resource-version']}
- ${put_resp}= Run A&AI Delete Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Get VPN Binding
[Documentation] Return VPN Binding
[Arguments] ${vpn_id}
- ${resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Valid VPN Binding URL
[Documentation] Return Valid VPN Binding URL
[Arguments] ${vpn_id}
- ${resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
Get Nodes Query VPN Binding
[Documentation] Return Nodes query VPN Binding
[Arguments] ${vpn_id}
- ${resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_NODES_PATH}?vpn-id=${vpn_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_NODES_PATH}?vpn-id=${vpn_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Example VPN Binding
[Documentation] Return Example VPN Binding
- ${resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_EXAMPLES_PATH}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_EXAMPLES_PATH} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Confirm No VPN Binding
[Documentation] Confirm No VPN Binding
[Arguments] ${vpn_id}
- ${resp}= Run A&AI Get Request ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 404
-# Not applicable to VPN Binding as it appears in all known API versions
-# Confirm API Not Implemented VPN Binding
- # [Documentation] Confirm latest API version where VPN Binding is not implemented
- # [Arguments] ${vpn_id}
- # ${resp}= Run A&AI Get Request ${AAI_VPNB_API_NA_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
- # Should Be Equal As Strings ${resp.status_code} 400
-
Add VPN Binding Relationship
[Documentation] Adds Relationship to existing VPN Binding in AAI
[Arguments] ${vpn_id} ${related_class_name} ${related_object_url}
diff --git a/robot/resources/aai/create_availability_zone.robot b/robot/resources/aai/create_availability_zone.robot
index 8bc7b640..af05faf9 100644
--- a/robot/resources/aai/create_availability_zone.robot
+++ b/robot/resources/aai/create_availability_zone.robot
@@ -4,7 +4,9 @@ Documentation Create availability zone in A&AI.
Resource aai_interface.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
+
*** Variables ***
${AZ_ROOT_PATH} /cloud-infrastructure/cloud-regions/cloud-region
@@ -16,7 +18,8 @@ ${AAI_ADD_AVAILABILITY_ZONE_BODY} aai/add_availability_zone_body.jinja
Create Availability Zone If Not Exists
[Documentation] Creates availability zone in A&AI if it doesn't exist
[Arguments] ${cloud-owner} ${cloud-region-id} ${availability_zone_name}=${GLOBAL_AAI_AVAILABILITY_ZONE_NAME}
- ${get_resp}= Run A&AI Get Request ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} auth=${auth}
Return From Keyword If '${get_resp.status_code}' == '200'
Create Availability Zone ${availability_zone_name} ${cloud-owner} ${cloud-region-id}
@@ -24,27 +27,31 @@ Create Availability Zone
[Documentation] Creates availability zone in A&AI
[Arguments] ${availability_zone_name} ${cloud-owner} ${cloud-region-id}
${arguments}= Create Dictionary availability_zone_name=${availability_zone_name}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_AVAILABILITY_ZONE_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_AVAILABILITY_ZONE_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete Availability Zone If Exists
[Documentation] Removes availability zone
[Arguments] ${cloud-owner} ${cloud-region-id} ${availability_zone_name}=${GLOBAL_AAI_AVAILABILITY_ZONE_NAME}
- ${get_resp}= Run A&AI Get Request ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete Availability Zone ${availability_zone_name} ${cloud-owner} ${cloud-region-id} ${get_resp.json()}
Delete Availability Zone
[Arguments] ${availability_zone_name} ${cloud-owner} ${cloud-region-id} ${json}
${resource_version}= Catenate ${json['resource-version']}
- ${put_resp}= Run A&AI Delete Request ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Get Availability Zone
[Documentation] Return availability zone
[Arguments] ${availability_zone_name} ${cloud-owner} ${cloud-region-id}
- ${resp}= Run A&AI Get Request ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
diff --git a/robot/resources/aai/create_complex.robot b/robot/resources/aai/create_complex.robot
index 8fed0c79..43a641a0 100644
--- a/robot/resources/aai/create_complex.robot
+++ b/robot/resources/aai/create_complex.robot
@@ -4,7 +4,8 @@ Documentation Create A&AI Customer API.
Resource aai_interface.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
@@ -18,7 +19,8 @@ ${AAI_ADD_COMPLEX_BODY} aai/add_complex_body.jinja
Inventory Complex If Not Exists
[Documentation] Creates a service in A&AI if it doesn't exist
[Arguments] ${complex_name} ${physical_location_id} ${cloud_owner} ${region} ${owner_defined_type}
- ${get_resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} auth=${auth}
Return From Keyword If '${get_resp.status_code}' == '200'
Inventory Complex ${complex_name} ${physical_location_id} ${cloud_owner} ${region} ${owner_defined_type}
@@ -32,32 +34,36 @@ Inventory Complex
Set To Dictionary ${arguments} owner_defined_type=${owner_defined_type}
Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
${data}= Apply Template aai ${AAI_ADD_COMPLEX_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} ${data}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete Complex If Exists
[Documentation] Removes a complex
[Arguments] ${physical_location_id}
- ${get_resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id}
Run Keyword If '${get_resp.status_code}' == '200' Delete Complex ${physical_location_id} ${get_resp.json()}
Delete Complex
[Arguments] ${physical_location_id} ${json}
${resource_version}= Catenate ${json['resource-version']}
- ${put_resp}= Run A&AI Delete Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Get Complex
[Documentation] Return a complex
[Arguments] ${physical_location_id}
- ${resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Complexes
[Documentation] Return all complexes
- ${resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEXES_PATH}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${COMPLEX_INDEX_PATH}${ROOT_COMPLEXES_PATH} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.json()}
[Return] ${resp.json()} \ No newline at end of file
diff --git a/robot/resources/aai/create_customer.robot b/robot/resources/aai/create_customer.robot
index ecae4d3a..f1ebe936 100644
--- a/robot/resources/aai/create_customer.robot
+++ b/robot/resources/aai/create_customer.robot
@@ -3,7 +3,8 @@ Documentation Create A&AI Customer API.
Resource aai_interface.robot
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${INDEX PATH} /aai/v11
@@ -16,9 +17,10 @@ Create Customer
[Documentation] Creates a customer in A&AI
[Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${clouder_owner} ${cloud_region_id} ${tenant_id}
${arguments}= Create Dictionary subscriber_name=${customer_name} global_customer_id=${customer_id} subscriber_type=${customer_type} cloud_owner1=${clouder_owner} cloud_region_id1=${cloud_region_id} tenant_id1=${tenant_id} service1=${service_type}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${A&AI ADD CUSTOMER BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${A&AI ADD CUSTOMER BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 201
[Return] ${put_resp.status_code}
@@ -26,12 +28,14 @@ Create Customer
Delete Customer
[Documentation] Deletes a customer in A&AI
[Arguments] ${customer_id}
- ${get_resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete Customer Exists ${customer_id} ${get_resp.json()['resource-version']}
*** Keywords ***
Delete Customer Exists
[Documentation] Deletes a customer in A&AI
[Arguments] ${customer_id} ${resource_version_id}
- ${put_resp}= Run A&AI Delete Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${resource_version_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${resource_version_id} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
diff --git a/robot/resources/aai/create_service.robot b/robot/resources/aai/create_service.robot
index cbf04676..b4e21bb0 100644
--- a/robot/resources/aai/create_service.robot
+++ b/robot/resources/aai/create_service.robot
@@ -4,7 +4,8 @@ Documentation Create A&AI Customer API.
Resource aai_interface.robot
Library Collections
Library ONAPLibrary.Utilities
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
@@ -27,14 +28,14 @@ Create Service
[Arguments] ${service_type}
${uuid}= Generate UUID4
${arguments}= Create Dictionary service_type=${service_type} UUID=${uuid}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_SERVICE_BODY} ${arguments}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_SERVICE_BODY} ${arguments}
${fullpath}= Catenate ${INDEX PATH}${ROOT_SERVICE_PATH}/service/${uuid}
- ${put_resp}= Run A&AI Put Request ${fullpath} ${data}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${fullpath} ${data} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 201
[Return] ${put_resp.status_code}
-
Delete Service If Exists
[Documentation] Deletes a service in A&AI if it exists
[Arguments] ${service_type}
@@ -48,13 +49,14 @@ Delete Service
${uuid}= Get From Dictionary ${dict} service-id
${resource_version}= Get From Dictionary ${dict} resource-version
${fullpath}= Catenate ${INDEX PATH}${ROOT_SERVICE_PATH}/service/${uuid}
- ${resp}= Run A&AI Delete Request ${fullpath} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${fullpath} ${resource_version} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 204
-
Get Services
[Documentation] Creates a service in A&AI
- ${resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_SERVICE_PATH}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_SERVICE_PATH} auth=${auth}
${dict}= Create Dictionary
${status} ${value}= Run Keyword And Ignore Error Should Be Equal As Strings ${resp.status_code} 200
Run Keyword If '${status}' == 'PASS' Update Service Dictionary ${dict} ${resp.json()}
@@ -62,10 +64,8 @@ Get Services
Update Service Dictionary
[Arguments] ${dict} ${json}
- ${list}= Evaluate ${json}['service']
+ @{list}= Copy List ${json['service']}
:FOR ${map} IN @{list}
\ ${status} ${service_type}= Run Keyword And Ignore Error Get From Dictionary ${map} service-description
\ Run Keyword If '${status}' == 'PASS' Set To Dictionary ${dict} ${service_type}=${map}
- Log ${dict}
-
-
+ Log ${dict} \ No newline at end of file
diff --git a/robot/resources/aai/create_tenant.robot b/robot/resources/aai/create_tenant.robot
index 1e9fa802..08e70ce7 100644
--- a/robot/resources/aai/create_tenant.robot
+++ b/robot/resources/aai/create_tenant.robot
@@ -3,7 +3,8 @@ Documentation Create A&AI Customer API.
Resource aai_interface.robot
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
@@ -25,9 +26,10 @@ Inventory Tenant
[Arguments] ${cloud_owner} ${cloud_region_id} ${cloud_type} ${owner_defined_type} ${cloud_region_version} ${cloud_zone} ${tenant_id} ${tenant_name}
${json_resource_version}= Get Resource Version If Exists ${cloud_owner} ${cloud_region_id} ${cloud_type} ${owner_defined_type} ${cloud_region_version} ${cloud_zone}
${arguments}= Create Dictionary cloud_owner=${cloud_owner} cloud_region_id=${cloud_region_id} cloud_type=${cloud_type} owner_defined_type=${owner_defined_type} cloud_region_version=${cloud_region_version} cloud_zone=${cloud_zone} tenant_id=${tenant_id} tenant_name=${tenant_name} resource_version=${json_resource_version}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_TENANT_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_TENANT_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
@@ -45,31 +47,36 @@ Get Resource Version If Exists
Delete Tenant
[Documentation] Removes both Tenant
[Arguments] ${tenant_id} ${cloud_owner} ${cloud_region_id}
- ${get_resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}/tenants/tenant/${tenant_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}/tenants/tenant/${tenant_id} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete Tenant Exists ${tenant_id} ${cloud_owner} ${cloud_region_id} ${get_resp.json()['resource-version']}
Delete Tenant Exists
[Arguments] ${tenant_id} ${cloud_owner} ${cloud_region_id} ${resource_version}
- ${put_resp}= Run A&AI Delete Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}/tenants/tenant/${tenant_id} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}/tenants/tenant/${tenant_id} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Delete Cloud Region
[Documentation] Removes both Tenant and Cloud Region in A&AI
[Arguments] ${tenant_id} ${cloud_owner} ${cloud_region_id}
- ${get_resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete Cloud Region Exists ${tenant_id} ${cloud_owner} ${cloud_region_id} ${get_resp.json()['resource-version']}
Delete Cloud Region Exists
[Documentation] Delete may get status 400 (Bad Request) if the region is still referenced
[Arguments] ${tenant_id} ${cloud_owner} ${cloud_region_id} ${resource_version}
- ${put_resp}= Run A&AI Delete Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id} ${resource_version} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(204|400)$
Get Tenants
[Documentation] Return list of tenants for this cloud owner/region
[Arguments] ${cloud_owner} ${cloud_region_id}
- ${resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}/tenants
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}/tenants auth=${auth}
${dict}= Create Dictionary
${status} ${value}= Run Keyword And Ignore Error Should Be Equal As Strings ${resp.status_code} 200
Run Keyword If '${status}' == 'PASS' Update Tenant Dictionary ${dict} ${resp.json()}
@@ -78,12 +85,13 @@ Get Tenants
Get Cloud Region
[Documentation] Returns the Cloud Region if it exists
[Arguments] ${cloud_owner} ${cloud_region_id}
- ${resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id} auth=${auth}
[Return] ${resp}
Update Tenant Dictionary
[Arguments] ${dict} ${json}
- ${list}= Evaluate ${json}['tenant']
+ @{list}= Copy List ${json['tenant']}
:FOR ${map} IN @{list}
\ ${status} ${tenant_id}= Run Keyword And Ignore Error Get From Dictionary ${map} tenant-id
\ Run Keyword If '${status}' == 'PASS' Set To Dictionary ${dict} ${tenant_id}=${map}
diff --git a/robot/resources/aai/create_vnfc.robot b/robot/resources/aai/create_vnfc.robot
index de79f468..16f9ef30 100644
--- a/robot/resources/aai/create_vnfc.robot
+++ b/robot/resources/aai/create_vnfc.robot
@@ -4,7 +4,8 @@ Documentation Create VNFC in AAI
Resource aai_interface.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${VNFC_ROOT_PATH} /network/vnfcs/vnfc
@@ -15,7 +16,8 @@ ${AAI_ADD_VNFC_BODY}= aai/add_vnfc_body.jinja
Create VNFC If Not Exists
[Documentation] Creates VNFC in A&AI if it doesn't exist
[Arguments] ${vnfc_name} ${vnfc_nc} ${vnfc_func}
- ${get_resp}= Run A&AI Get Request ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} auth=${auth}
Return From Keyword If '${get_resp.status_code}' == '200'
Create VNFC ${vnfc_name} ${vnfc_nc} ${vnfc_func}
@@ -23,28 +25,32 @@ Create VNFC
[Documentation] Creates VNFC in A&AI
[Arguments] ${vnfc_name} ${vnfc_nc} ${vnfc_func}
${arguments}= Create Dictionary vnfc_name=${vnfc_name} vnfc_nc=${vnfc_nc} vnfc_func=${vnfc_func}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_VNFC_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_VNFC_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete VNFC If Exists
[Documentation] Removes VNFC from AAI if it exists
[Arguments] ${vnfc_name}
- ${get_resp}= Run A&AI Get Request ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete VNFC ${vnfc_name} ${get_resp.json()}
Delete VNFC
[Documentation] Removes VNFC from AAI
[Arguments] ${vnfc_name} ${json}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${resource_version}= Catenate ${json['resource-version']}
- ${put_resp}= Run A&AI Delete Request ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} ${resource_version}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Get VNFC
[Documentation] Return VNFC
[Arguments] ${vnfc_name}
- ${resp}= Run A&AI Get Request ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
diff --git a/robot/resources/aai/create_zone.robot b/robot/resources/aai/create_zone.robot
index 644817c9..bb6577d1 100644
--- a/robot/resources/aai/create_zone.robot
+++ b/robot/resources/aai/create_zone.robot
@@ -4,7 +4,8 @@ Documentation Create A&AI Customer API.
Resource aai_interface.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
@@ -17,7 +18,8 @@ ${AAI_ADD_ZONE_BODY}= aai/add_zone_body.jinja
Inventory Zone If Not Exists
[Documentation] Creates a service in A&AI if it doesn't exist
[Arguments] ${zone_id}=${GLOBAL_AAI_ZONE_ID} ${zone_name}=${GLOBAL_AAI_ZONE_NAME} ${design_type}=${GLOBAL_AAI_DESIGN_TYPE} ${zone_context}=${GLOBAL_AAI_ZONE_CONTEXT}
- ${get_resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} auth=${auth}
Return From Keyword If '${get_resp.status_code}' == '200'
Inventory Zone ${zone_id} ${zone_name} ${design_type} ${zone_context}
@@ -25,27 +27,31 @@ Inventory Zone
[Documentation] Inventorys a Tenant in A&AI
[Arguments] ${zone_id} ${zone_name} ${design_type} ${zone_context}
${arguments}= Create Dictionary zone_id=${zone_id} zone_name=${zone_name} design_type=${design_type} zone_context=${zone_context}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${AAI_ADD_ZONE_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${AAI_ADD_ZONE_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete Zone
[Documentation] Removes both Tenant
[Arguments] ${zone_id}=${GLOBAL_AAI_ZONE_ID}
- ${get_resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} auth=${auth}
Run Keyword If '${get_resp.status_code}' == '200' Delete Zone Exists ${zone_id} ${get_resp.json()}
Delete Zone Exists
[Arguments] ${zone_id} ${json}
${resource_version}= Catenate ${json['resource-version']}
- ${put_resp}= Run A&AI Delete Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${resource_version}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${resource_version} auth=${auth}
Should Be Equal As Strings ${put_resp.status_code} 204
Get Zone
[Documentation] Return zone
[Arguments] ${zone_id}
- ${resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
diff --git a/robot/resources/aai/network.robot b/robot/resources/aai/network.robot
index 8229a7e4..bb74d388 100644
--- a/robot/resources/aai/network.robot
+++ b/robot/resources/aai/network.robot
@@ -3,6 +3,7 @@ Documentation Validate A&AI Serivce Instance
Resource aai_interface.robot
Library Collections
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${INDEX_PATH} /aai/v11
@@ -14,17 +15,15 @@ ${SERVICE_INSTANCE} /service-instances?service-instance-name=
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}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${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}
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}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${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=${auth}
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
diff --git a/robot/resources/aai/service_instance.robot b/robot/resources/aai/service_instance.robot
index 6c110977..cca1eaf6 100644
--- a/robot/resources/aai/service_instance.robot
+++ b/robot/resources/aai/service_instance.robot
@@ -1,14 +1,13 @@
*** Settings ***
Documentation Validate A&AI Serivce Instance
-...
-... Validate A&AI Serivce Instance
Resource aai_interface.robot
Library Collections
Library OperatingSystem
Library RequestsLibrary
Library ONAPLibrary.JSON
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
Resource ../stack_validation/validate_vlb.robot
Resource ../stack_validation/validate_vfw.robot
Resource ../stack_validation/validate_vvg.robot
@@ -35,19 +34,21 @@ ${VLB_CLOSED_LOOP_VNF_ID}
Validate Service Instance
[Documentation] Query and Validates A&AI Service Instance
[Arguments] ${service_instance_name} ${service_type} ${customer_name}
- ${cust_resp}= Run A&AI Get Request ${INDEX PATH}/business/customers?subscriber-name=${customer_name}
- ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${cust_resp.json()['customer'][0]['global-customer-id']}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${cust_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}/business/customers?subscriber-name=${customer_name} auth=${auth
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${CUSTOMER SPEC PATH}${cust_resp.json()['customer'][0]['global-customer-id']}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name} auth=${auth
Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name}
Validate Generic VNF
[Documentation] Query and Validates A&AI Service Instance
[Arguments] ${vnf_name} ${vnf_type} ${service_instance_id}
- ${generic_vnf}= Run A&AI Get Request ${INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-name=${vnf_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${generic_vnf}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-name=${vnf_name} auth=${auth
Dictionary Should Contain Value ${generic_vnf.json()} ${vnf_name}
${returned_vnf_type}= Get From Dictionary ${generic_vnf.json()} vnf-type
Should Contain ${returned_vnf_type} ${vnf_type}
${vnf_id}= Get From Dictionary ${generic_vnf.json()} vnf-id
- ${generic_vnf}= Run A&AI Get Request ${INDEX PATH}/network/generic-vnfs/generic-vnf/${vnf_id}?depth=all
+ ${generic_vnf}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}/network/generic-vnfs/generic-vnf/${vnf_id}?depth=all auth=${auth
[Return] ${generic_vnf.json()}
VLB Closed Loop Hack
@@ -61,10 +62,11 @@ VLB Closed Loop Hack
${persona_model_version}= Get From Dictionary ${closedloop_vf_module} version
${dummy}= Catenate dummy_${vnf_id}
${dict}= Create Dictionary vnf_id=${vnf_id} vf_module_id=${dummy} persona_model_id=${persona_model_id} persona_model_version=${persona_model_version}
- ${datapath}= Template String ${GENERIC_VNF_PATH_TEMPLATE} ${dict}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${VLB_CLOSED_LOOP_HACK_BODY} ${dict}
- ${put_resp}= Run A&AI Put Request ${INDEX PATH}${datapath} ${data}
+ ${datapath}= Templating.Template String ${GENERIC_VNF_PATH_TEMPLATE} ${dict}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${data}= Templating.Apply Template aai ${VLB_CLOSED_LOOP_HACK_BODY} ${dict}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${datapath} ${data} auth=${auth
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|412)$
Set Test Variable ${VLB_CLOSED_LOOP_DELETE} ${datapath}
@@ -73,16 +75,17 @@ VLB Closed Loop Hack
VLB Closed Loop Hack Update
[Documentation] Update the A&AI vDNS scaling vf module to have persona-model-version 1 rather than 1.0
[Arguments] ${stack_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${dict}= Create Dictionary vnf_id=${VLB_CLOSED_LOOP_VNF_ID} vf_module_name=${stack_name}
- ${query}= Template String ${GENERIC_VNF_QUERY_TEMPLATE} ${dict}
- ${get_resp}= Run A&AI Get Request ${INDEX_PATH}${query}
+ ${query}= Templating.Template String ${GENERIC_VNF_QUERY_TEMPLATE} ${dict}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX_PATH}${query} auth=${auth
${json}= Set Variable ${get_resp.json()}
Set to Dictionary ${json} persona-model-version 1
${vf_module_id}= Get From Dictionary ${json} vf-module-id
Set to Dictionary ${dict} vf_module_id=${vf_module_id}
- ${uri}= Template String ${GENERIC_VNF_PATH_TEMPLATE} ${dict}
- ${resp}= Run A&AI Put Request ${INDEX_PATH}${uri} ${json}
- ${get_resp}= Run A&AI Get Request ${INDEX_PATH}${query}
+ ${uri}= Templating.Template String ${GENERIC_VNF_PATH_TEMPLATE} ${dict}
+ ${resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX_PATH}${uri} ${json} auth=${auth
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX_PATH}${query} auth=${auth
Teardown VLB Closed Loop Hack
Return From Keyword If ' ${VLB_CLOSED_LOOP_DELETE}' == ''
diff --git a/robot/resources/aai/volume_group.robot b/robot/resources/aai/volume_group.robot
index c9fc0f84..8277ec74 100644
--- a/robot/resources/aai/volume_group.robot
+++ b/robot/resources/aai/volume_group.robot
@@ -3,6 +3,7 @@ Documentation Validate A&AI Serivce Instance
Resource aai_interface.robot
Library Collections
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${INDEX_PATH} /aai/v11
@@ -13,5 +14,6 @@ ${SERVICE_INSTANCE} /service-instances?service-instance-name=
*** Keywords ***
Validate Volume Group
[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}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${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}
Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name} \ No newline at end of file
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index c212eacf..ecd0211a 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -11,7 +11,7 @@ Library ArchiveLibrary
Library ONAPLibrary.Openstack
Library DateTime
Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Library ONAPLibrary.SDC WITH NAME SDC
Resource global_properties.robot
Resource browser_setup.robot
@@ -326,8 +326,8 @@ Setup SDC Catalog Resource Deployment Artifact Properties
${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
${payloadData}= Base64 Encode ${blueprint_data}
${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
# POST artifactUpload to resource
${artifact_upload_path}= Catenate ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
@@ -361,8 +361,8 @@ Setup SDC Catalog Resource GenericNeutronNet Properties
\ ${ownerId} Set Variable ${comp['ownerId']}
\ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description}
\ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role}
- \ Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- \ ${data}= Apply Template sdc ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict}
+ \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ \ ${data}= Templating.Apply Template sdc ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict}
\ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data}
@@ -397,8 +397,8 @@ Setup SDC Catalog Resource AllottedResource Properties
\ ${uniqueId} Set Variable ${comp['uniqueId']}
\ ${uniqueId} Fetch From Left ${uniqueId} .
\ Set To Dictionary ${dict} uniqueId=${uniqueId}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict}
${response}= Set ASDC Catalog Resource Component Instance Properties For Resource ${catalog_resource_id} ${componentInstance1} ${data}
Log resp=${response}
@@ -414,8 +414,8 @@ Setup SDC Catalog Resource AllottedResource Inputs
\ ${uid} Set Variable ${comp['uniqueId']}
\ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid}
\ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=${nf_role} nf_role_uid=${uid}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict}
${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
[Return] ${response}
@@ -435,8 +435,8 @@ Setup ASDC Catalog Resource CDS Properties
\ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP
\ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP
\ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP
- \ Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- \ ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict}
+ \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ \ ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict}
\ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data}
\ Log resp=${response}
@@ -451,8 +451,8 @@ Setup ASDC Catalog Resource CDS Properties
\ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid}
\ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid}
\ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict}
${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
Add ASDC License Model
@@ -460,8 +460,8 @@ Add ASDC License Model
${uuid}= Generate UUID4
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${map}= Create Dictionary vendor_name=${shortened_uuid}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_LICENSE_MODEL_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_LICENSE_MODEL_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -484,8 +484,8 @@ Checkin ASDC License Model
[Documentation] Checks in an ASDC License Model by its id
[Arguments] ${id} ${version_id}=0.1
${map}= Create Dictionary action=Checkin
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -495,8 +495,8 @@ Submit ASDC License Model
[Documentation] Submits an ASDC License Model by its id
[Arguments] ${id} ${version_id}=0.1
${map}= Create Dictionary action=Submit
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
[Return] ${resp.json()}
@@ -505,8 +505,8 @@ Checkin ASDC Software Product
[Documentation] Checks in an ASDC Software Product by its id
[Arguments] ${id} ${version_id}=0.1
${map}= Create Dictionary action=Checkin
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -525,8 +525,8 @@ Submit ASDC Software Product
[Documentation] Submits an ASDC Software Product by its id
[Arguments] ${id} ${version_id}=0.1
${map}= Create Dictionary action=Submit
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -536,8 +536,8 @@ Package ASDC Software Product
[Documentation] Creates a package of an ASDC Software Product by its id
[Arguments] ${id} ${version_id}=0.1
${map}= Create Dictionary action=Create_Package
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -549,8 +549,8 @@ Add ASDC Entitlement Pool
${uuid}= Generate UUID4
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -569,8 +569,8 @@ Add ASDC License Group
${uuid}= Generate UUID4
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_KEY_GROUP_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_KEY_GROUP_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -589,8 +589,8 @@ Add ASDC Feature Group
${uuid}= Generate UUID4
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${map}= Create Dictionary feature_group_name=${shortened_uuid} key_group_id=${key_group_id} entitlement_pool_id=${entitlement_pool_id} manufacturer_reference_number=mrn${shortened_uuid}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_FEATURE_GROUP_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_FEATURE_GROUP_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -609,8 +609,8 @@ Add ASDC License Agreement
${uuid}= Generate UUID4
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -630,8 +630,8 @@ Add ASDC Software Product
${shortened_uuid}= Evaluate str("${uuid}")[:13]
${software_product_name}= Catenate ${name_prefix} ${shortened_uuid}
${map}= Create Dictionary software_product_name=${software_product_name} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id} version_id=${license_model_version_id}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -648,8 +648,8 @@ Add ASDC Catalog Resource
[Documentation] Creates an ASDC Catalog Resource and returns its id
[Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id}
${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 201
@@ -659,8 +659,8 @@ Add ASDC Allotted Resource Catalog Resource
[Documentation] Creates an ASDC Allotted Resource Catalog Resource and returns its id
[Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${subcategory}
${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} subcategory=${subcategory}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 201
@@ -789,8 +789,8 @@ Checkin ASDC Catalog Resource
[Documentation] Checks in an ASDC Catalog Resource by its id
[Arguments] ${catalog_resource_id}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_DESIGNER_USER_ID} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -800,8 +800,8 @@ Request Certify ASDC Catalog Resource
[Documentation] Requests certification of an ASDC Catalog Resource by its id
[Arguments] ${catalog_resource_id}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -819,8 +819,8 @@ Certify ASDC Catalog Resource
[Documentation] Certifies an ASDC Catalog Resource by its id and returns the new id
[Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -842,8 +842,8 @@ Add ASDC Catalog Service
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
${map}= Create Dictionary service_name=${catalog_service_name}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 201
@@ -875,8 +875,8 @@ Checkin ASDC Catalog Service
[Documentation] Checks in an ASDC Catalog Service by its id
[Arguments] ${catalog_service_id}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -886,8 +886,8 @@ Request Certify ASDC Catalog Service
[Documentation] Requests certification of an ASDC Catalog Service by its id
[Arguments] ${catalog_service_id}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -905,8 +905,8 @@ Certify ASDC Catalog Service
[Documentation] Certifies an ASDC Catalog Service by its id and returns the new id
[Arguments] ${catalog_service_id}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -916,8 +916,8 @@ Approve ASDC Catalog Service
[Documentation] Approves an ASDC Catalog Service by its id
[Arguments] ${catalog_service_id}
${map}= Create Dictionary user_remarks=Robot remarks
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${ASDC_GOVERNOR_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -938,8 +938,8 @@ Add ASDC Resource Instance
${xoffset}= Set Variable ${xoffset+306}
${yoffset}= Set Variable ${yoffset+248}
${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 201
@@ -952,8 +952,8 @@ Add ASDC Resource Instance To Resource
${xoffset}= Set Variable ${xoffset+306}
${yoffset}= Set Variable ${yoffset+248}
${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType}
- Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
+ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 201
diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot
index a83bc4d3..8aaaa556 100644
--- a/robot/resources/clamp_interface.robot
+++ b/robot/resources/clamp_interface.robot
@@ -4,7 +4,7 @@ Library RequestsLibrary
Library Collections
Library String
Library ONAPLibrary.JSON
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Resource global_properties.robot
*** Variables ***
@@ -22,8 +22,8 @@ Run CLAMP Create Model
[Documentation] Create a new CLAMP Model
[Arguments] ${model_name} ${template_name}
${dict}= Create Dictionary MODEL_NAME=${model_name} TEMPLATE_NAME=${template_name}
- Create Environment clamp ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template clamp ${CLAMP_TEMPLATE_PATH}/create_model.jinja ${dict}
+ Templating.Create Environment clamp ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template clamp ${CLAMP_TEMPLATE_PATH}/create_model.jinja ${dict}
${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model/${model_name}
${resp}= Run CLAMP HTTPS Put Request ${data_path} ${data}
Should Be Equal As Strings ${resp.status_code} 200
@@ -35,8 +35,8 @@ Run CLAMP Save vLB Model
[Documentation] Save CLAMP Model
[Arguments] ${model_name} ${template_name} ${policy_name}
${dict}= Create Dictionary MODEL_NAME=${model_name} TEMPLATE_NAME=${template_name} POLICY_NAME=${policy_name} DOLLAR_SIGN=$
- Create Environment clamp ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template clamp ${CLAMP_TEMPLATE_PATH}/save_model_vlb.jinja ${dict}
+ Templating.Create Environment clamp ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template clamp ${CLAMP_TEMPLATE_PATH}/save_model_vlb.jinja ${dict}
${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model/${model_name}
${resp}= Run CLAMP HTTPS Put Request ${data_path} ${data}
Should Be Equal As Strings ${resp.status_code} 200
diff --git a/robot/resources/consul_interface.robot b/robot/resources/consul_interface.robot
index 00f4334b..d5d4e8da 100644
--- a/robot/resources/consul_interface.robot
+++ b/robot/resources/consul_interface.robot
@@ -1,7 +1,8 @@
*** Settings ***
Documentation The main interface for interacting with Consul.
Library RequestsLibrary
-
+Library Collections
+Library String
Resource global_properties.robot
*** Variables ***
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index beb819d0..cc74f8e5 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -16,7 +16,8 @@ Library Collections
Library OperatingSystem
Library SeleniumLibrary
Library RequestsLibrary
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
@@ -100,9 +101,10 @@ Create Customer For VNF Demo
Create Service If Not Exists gNB
${arguments}= Create Dictionary subscriber_name=${customer_name} global_customer_id=${customer_id} subscriber_type=${customer_type} cloud_owner=${clouder_owner} cloud_region_id=${cloud_region_id} tenant_id=${tenant_id}
Set To Dictionary ${arguments} service1=vFWCL service2=vLB service3=vCPE service4=vIMS service5=gNB service6=vFW
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template aai ${ADD_DEMO_CUSTOMER_BODY} ${arguments}
- ${put_resp}= Run A&AI Put Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template aai ${ADD_DEMO_CUSTOMER_BODY} ${arguments}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(200|201|412)$
@@ -141,20 +143,23 @@ Get Relationship Data
Get Generic VNF By ID
[Arguments] ${vnf_id}
- ${resp}= Run A&AI Get Request ${AAI_INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-id=${vnf_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-id=${vnf_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Service Instance
[Arguments] ${vnf_name}
- ${resp}= Run A&AI Get Request ${AAI_INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-name=${vnf_name}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-name=${vnf_name} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Persona Model Id
[Documentation] Query and Validates A&AI Service Instance
[Arguments] ${service_instance_id} ${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_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${CUSTOMER SPEC PATH}${customer_id}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_id} auth=${auth}
${persona_model_id}= Get From DIctionary ${resp.json()['service-instance'][0]} model-invariant-id
[Return] ${persona_model_id}
diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot
index 39385437..49d78af1 100644
--- a/robot/resources/heatbridge.robot
+++ b/robot/resources/heatbridge.robot
@@ -3,7 +3,9 @@ Library HeatBridge
Library Collections
Library OperatingSystem
Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
+
Resource openstack/keystone_interface.robot
Resource openstack/heat_interface.robot
@@ -58,7 +60,8 @@ Execute Heatbridge
... ELSE Init Bridge ${openstack_identity_url} ${user} ${pass} ${tenant_id} ${region} ${GLOBAL_AAI_CLOUD_OWNER} ${GLOBAL_INJECTED_OPENSTACK_DOMAIN_ID} ${GLOBAL_INJECTED_OPENSTACK_PROJECT_NAME}
${request}= Bridge Data ${stack_id}
Log ${request}
- ${resp}= Run A&AI Put Request ${VERSIONED_INDEX_PATH}${MULTIPART_PATH} ${request}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${VERSIONED_INDEX_PATH}${MULTIPART_PATH} ${request} auth=${auth}
${status_string}= Convert To String ${resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
${reverse_heatbridge}= Generate Reverse Heatbridge From Stack Info ${stack_info}
@@ -92,9 +95,10 @@ Run Vserver Query
[Documentation] Run A&AI query to validate the bulk add
[Arguments] ${vserver_name}
${dict}= Create Dictionary vserver_name=${vserver_name}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${request}= Apply Template aai ${NAMED_QUERY_TEMPLATE} ${dict}
- ${resp}= Run A&AI Post Request ${NAMED_QUERY_PATH} ${request}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${request}= Templating.Apply Template aai ${NAMED_QUERY_TEMPLATE} ${dict}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Post Request ${AAI_FRONTEND_ENDPOINT} ${NAMED_QUERY_PATH} ${request} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
@@ -108,8 +112,8 @@ Run Set VNF Params
set to dictionary ${payload} orchestration-status ${orch_status}
set to dictionary ${payload} ipv4-oam-address ${ipv4_vnf_address}
${payload_string}= evaluate json.dumps(${payload}) json
-
- ${put_resp}= Run A&AI Put Request ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf/${vnf_id} ${payload_string}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf/${vnf_id} ${payload_string} auth=${auth}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(200|201)$
Log Set VNF ProvStatus: ${vnf_id} to ${prov_status}
@@ -117,7 +121,8 @@ Run Set VNF Params
Run Get Generic VNF By VnfId
[Documentation] Get VNF GET Payload with resource ID
[Arguments] ${vnf_id}
- ${resp}= Run A&AI Get Request ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf?vnf-id=${vnf_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf?vnf-id=${vnf_id} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
@@ -161,11 +166,11 @@ Generate Vserver Uri
Set To Dictionary ${keys} vserver_id=${info['server']['id']}
Set To Dictionary ${keys} flavor=${info['server']['flavor']['id']}
Set To Dictionary ${keys} image_id=${info['server']['image']['id']}
- ${uri}= Template String ${VSERVER_URI} ${keys}
+ ${uri}= Templating.Template String ${VSERVER_URI} ${keys}
Append To List ${reverse_heatbridge} ${uri}
- ${uri}= Template String ${FLAVOR_URI} ${keys}
+ ${uri}= Templating.Template String ${FLAVOR_URI} ${keys}
Append To List ${reverse_heatbridge} ${uri}
- ${uri}= Template String ${IMAGE_URI} ${keys}
+ ${uri}= Templating.Template String ${IMAGE_URI} ${keys}
Append To List ${reverse_heatbridge} ${uri}
Generate Linterface Uri
@@ -176,6 +181,6 @@ Generate Linterface Uri
${info}= Set Variable ${resp.json()}
Set To Dictionary ${keys} vserver_id=${info['port']['device_id']}
Set To Dictionary ${keys} linterface_id=${info['port']['name']}
- ${uri}= Template String ${L_INTERFACE_URI} ${keys}
+ ${uri}= Templating.Template String ${L_INTERFACE_URI} ${keys}
Append To List ${reverse_heatbridge} ${uri}
diff --git a/robot/resources/mr_interface.robot b/robot/resources/mr_interface.robot
index 2c79d075..7a3c3d90 100644
--- a/robot/resources/mr_interface.robot
+++ b/robot/resources/mr_interface.robot
@@ -5,7 +5,7 @@ Library DateTime
Library Process
Library ONAPLibrary.JSON
Library ONAPLibrary.Utilities
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Resource global_properties.robot
@@ -54,8 +54,8 @@ Run MR Update Topic Acl
# Appears to not care if topic already exists with the POST / PUT method
#
${dict}= Create Dictionary TOPIC_NAME=TEST_TOPIC_ACL
- Create Environment mr ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template mr ${MR_PUT_ACL_TEMPLATE} ${dict}
+ Templating.Create Environment mr ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template mr ${MR_PUT_ACL_TEMPLATE} ${dict}
${resp}= Run MR Auth Post Request ${MR_CREATE_TOPIC_PATH} iPIxkpAMI8qTcQj8 Ehq3WyT4bkif4zwgEbvshGal ${data}
#Log Update Owner for TEST_TOPIC_ACL
${resp}= Run MR Auth Put Request ${MR_UPDATE_ACL_TOPIC_PATH}/iPIxkpAMI8qTcQj8 iPIxkpAMI8qTcQj8 Ehq3WyT4bkif4zwgEbvshGal ${data}
@@ -111,8 +111,8 @@ Run MR Post Request
${session}= Create Session mr ${MR_ENDPOINT}
${timestamp}= Get Current Date
${dict}= Create Dictionary timestamp=${timestamp}
- Create Environment mr ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template mr ${MR_PUBLISH_TEMPLATE} ${dict}
+ Templating.Create Environment mr ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template mr ${MR_PUBLISH_TEMPLATE} ${dict}
${uuid}= Generate UUID4
${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
${resp}= Post Request mr ${data_path} data=${data} headers=${headers}
diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot
index 1e740a5a..255ba400 100644
--- a/robot/resources/oof_interface.robot
+++ b/robot/resources/oof_interface.robot
@@ -7,8 +7,8 @@ Library String
Library DateTime
Library Collections
Library ONAPLibrary.JSON
-Library ONAPLibrary.OOF
-Library ONAPLibrary.Templating
+Library ONAPLibrary.OOF WITH NAME OOF
+Library ONAPLibrary.Templating WITH NAME Templating
Resource global_properties.robot
*** Variables ***
@@ -61,7 +61,7 @@ RUN OOF-Homing SendPlanWithWrongVersion
Run OOF-SNIRO Health Check
[Documentation] Runs OOF-SNIRO Health check
- ${resp}= Run SNIRO Get Request ${OOF_SNIRO_ENDPOINT} ${OOF_SNIRO_HEALTH_CHECK_PATH}
+ ${resp}= OOF.Run SNIRO Get Request ${OOF_SNIRO_ENDPOINT} ${OOF_SNIRO_HEALTH_CHECK_PATH}
Run OOF-CMSO Health Check
[Documentation] Runs OOF-CMSO Health check
@@ -117,17 +117,17 @@ OOF-CMSO Create Schedule
\ ${end_time}= Get Current Date UTC + ${tomorrow} minutes result_format=${OOF_CMSO_UTC}
\ Set To Dictionary ${map} start_time${i}=${start_time} end_time${i}=${end_time}
${requestList}= Create List
- Create Environment oof ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment oof ${GLOBAL_TEMPLATE_FOLDER}
:FOR ${vnf} IN @{nodelist}
\ Set To Dictionary ${map} node${nn} ${vnf}
\ ${nn}= Evaluate ${nn}+1
\ Set To DIctionary ${dict} vnfName=${vnf}
- \ ${requestInfo}= Apply Template oof ${OOF_CMSO_TEMPLATE_FOLDER}/VidCallbackData.jinja ${dict}
+ \ ${requestInfo}= Templating.Apply Template oof ${OOF_CMSO_TEMPLATE_FOLDER}/VidCallbackData.jinja ${dict}
\ Append To List ${requestList} ${requestInfo}
${callBackDataMap}= Create Dictionary requestType=Update requestDetails=${requestList}
${callbackDataString}= OOF-CMSO Json Escape ${callbackDataMap}
Set To Dictionary ${map} callbackData=${callbackDataString}
- ${data}= Apply Template oof ${OOF_CMSO_TEMPLATE_FOLDER}/${request_file} ${map}
+ ${data}= Templating.Apply Template oof ${OOF_CMSO_TEMPLATE_FOLDER}/${request_file} ${map}
${resp}= Run OOF-CMSO Post Scheduler cmso/v1/schedules/${uuid} data=${data}
[Return] ${resp}
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 65698a1a..dba8d3ea 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -5,7 +5,7 @@ Library String
Library Collections
Library SSHLibrary
Library OperatingSystem
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Resource global_properties.robot
Resource ssh/files.robot
@@ -154,24 +154,24 @@ Update vVFWCL Policy
Delete vFWCL Policy
- Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
${dict}= Create Dictionary policyName=com.BRMSParamvFirewall
- ${data}= Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_delete.jinja ${dict}
+ ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_delete.jinja ${dict}
${resp}= Run Policy Delete Request /pdp/api/deletePolicy ${data}
Should Be Equal As Strings ${resp.status_code} 200
Create vFWCL Policy
[Arguments] ${resource_id}
${dict}= Create Dictionary RESOURCE_ID=${resource_id}
- Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_update.jinja ${dict}
+ Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_update.jinja ${dict}
${resp}= Run Policy Put Request /pdp/api/updatePolicy ${data}
Should Be Equal As Strings ${resp.status_code} 200
Push vFWCL Policy
- Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
${dict}= Create Dictionary
- ${data}= Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_push.jinja ${dict}
+ ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_push.jinja ${dict}
${resp}= Run Policy Put Request /pdp/api/pushPolicy ${data}
Should Be Equal As Strings ${resp.status_code} 200
@@ -188,20 +188,20 @@ Validate the vFWCL Policy
Create vFirewall Monitoring Policy
${dict}= Create Dictionary
- Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.jinja ${dict}
+ Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.jinja ${dict}
${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies ${data}
Should Be Equal As Strings ${resp.status_code} 200
Create vFirewall Operational Policy
[Arguments] ${resource_id}
${dict}= Create Dictionary RESOURCE_ID=${resource_id}
- Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
${content_data} OperatingSystem.Get File ${POLICY_TEMPLATES}/vFirewall_policy_operational_content.yaml
${content_data}= Replace String Using Regexp ${content_data} __RESOURCE_ID__ ${resource_id}
${encoded_content_data}= Evaluate urllib.quote_plus('''${content_data}''') urllib
${content_dictionary}= Create Dictionary URL_ENCODED_CONTENT ${encoded_content_data}
- ${data_2}= Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_operational_url_enc_content_input.jinja ${content_dictionary}
+ ${data_2}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_operational_url_enc_content_input.jinja ${content_dictionary}
Log ${data_2}
${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data_2}
Should Be Equal As Strings ${resp.status_code} 200
@@ -210,8 +210,8 @@ Create vFirewall Operational Policy
Push vFirewall Policies To PDP Group
[Arguments] ${op_policy_version}
${dict}= Create Dictionary OP_POLICY_VERSION=${op_policy_version}
- Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template policy ${POLICY_TEMPLATES}/vFirewall_push.jinja ${dict}
+ Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_push.jinja ${dict}
${resp}= Run Policy Pap Post Request /policy/pap/v1/pdps/policies ${data}
Should Be Equal As Strings ${resp.status_code} 200
diff --git a/robot/resources/so/create_cloud_config.robot b/robot/resources/so/create_cloud_config.robot
index 9c310fd0..5f471fb9 100644
--- a/robot/resources/so/create_cloud_config.robot
+++ b/robot/resources/so/create_cloud_config.robot
@@ -4,7 +4,7 @@ Documentation Create Cloud Config
Resource ../so_interface.robot
Library OperatingSystem
Library Collections
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
*** Variables ***
@@ -19,8 +19,8 @@ Create Cloud Configuration
[Documentation] Creates a cloud configuration in SO, so it knows how to talk to an openstack cloud
[Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type}
${arguments}= Create Dictionary site_name=${site_name} region_id=${region_id} clli=${clli} identity_id=${identity_id} identity_url=${identity_url} mso_id=${mso_id} mso_pass=${mso_pass} admin_tenant=${admin_tenant} member_role=${member_role} identity_server_type=${identity_server_type} authentication_type=${authentication_type}
- Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments}
+ Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments}
${get_resp}= Run SO Catalog Post request ${CLOUD_CONFIG_PATH}/${site_name} ${data}
${get_resp}= Run Keyword If '${get_resp.status_code}'=='404' Update Cloud Configuration ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type}
@@ -32,8 +32,8 @@ Create Cloud Configuration v3
[Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type} ${project_domain_name} ${user_domain_Name}
${arguments}= Create Dictionary site_name=${site_name} region_id=${region_id} clli=${clli} identity_id=${identity_id} identity_url=${identity_url} mso_id=${mso_id} mso_pass=${mso_pass} admin_tenant=${admin_tenant} member_role=${member_role} identity_server_type=${identity_server_type} authentication_type=${authentication_type} project_domain_name=${project_domain_name} user_domain_name=${user_domain_name}
Log ${arguments}
- Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template so ${SO_ADD_CLOUD_CONFIG_V3} ${arguments}
+ Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template so ${SO_ADD_CLOUD_CONFIG_V3} ${arguments}
${get_resp}= Run SO Catalog Post request ${CLOUD_CONFIG_PATH} ${data}
${status_string}= Convert To String ${get_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
@@ -42,8 +42,8 @@ Update Cloud Configuration
[Documentation] Updates a cloud configuration in SO
[Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type}
${arguments}= Create Dictionary site_name=${site_name} region_id=${region_id} clli=${clli} identity_id=${identity_id} identity_url=${identity_url} mso_id=${mso_id} mso_pass=${mso_pass} admin_tenant=${admin_tenant} member_role=${member_role} identity_server_type=${identity_server_type} authentication_type=${authentication_type}
- Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments}
+ Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments}
${get_resp}= Run SO Catalog Put request ${CLOUD_CONFIG_PATH}/${site_name} ${data}
Should Be Equal As Strings ${get_resp.status_code} 200
[Return] ${get_resp}
diff --git a/robot/resources/stack_validation/packet_generator_interface.robot b/robot/resources/stack_validation/packet_generator_interface.robot
index 85b997d2..6b34669d 100644
--- a/robot/resources/stack_validation/packet_generator_interface.robot
+++ b/robot/resources/stack_validation/packet_generator_interface.robot
@@ -2,7 +2,7 @@
Documentation The main interface for interacting with A&AI. It handles low level stuff like managing the http request library and A&AI required fields
Library RequestsLibrary
Library ONAPLibrary.Utilities
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Library OperatingSystem
Resource ../global_properties.robot
@@ -19,7 +19,7 @@ Connect To Packet Generator
[Documentation] Enables packet generator for the passed stream on the passed host
[Arguments] ${host} ${alias}=pgn
${map}= Create Dictionary host=${host} port=${GLOBAL_PACKET_GENERATOR_PORT}
- ${url}= Template String ${PGN_URL_TEMPLATE} ${map}
+ ${url}= Templating.Template String ${PGN_URL_TEMPLATE} ${map}
${auth}= Create List ${GLOBAL_PACKET_GENERATOR_USERNAME} ${GLOBAL_PACKET_GENERATOR_PASSWORD}
${session}= Create Session ${alias} ${url} auth=${auth}
[Return] ${session}
@@ -31,11 +31,11 @@ Enable Stream
${headers}= Create Headers
${data_path}= Catenate ${PGN_PATH}/pg-streams
${map}= Create Dictionary stream=${stream}
- Create Environment pgi ${GLOBAL_TEMPLATE_FOLDER}
- ${streams}= Apply Template pgi ${PGN_ENABLE_STREAM_TEMPLATE} ${map}
+ Templating.Create Environment pgi ${GLOBAL_TEMPLATE_FOLDER}
+ ${streams}= Templating.Apply Template pgi ${PGN_ENABLE_STREAM_TEMPLATE} ${map}
${streams}= evaluate json.dumps(${streams}) json
${map}= Create Dictionary pgstreams=${streams}
- ${data}= Apply Template pgi ${PGN_ENABLE_STREAMS_TEMPLATE} ${map}
+ ${data}= Templating.Apply Template pgi ${PGN_ENABLE_STREAMS_TEMPLATE} ${map}
${resp}= Put Request ${alias} ${data_path} data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp}
@@ -49,16 +49,16 @@ Enable Streams
${streams}= Set Variable
${comma}= Set Variable
${stream_count}= Evaluate ${stream_count}+1
- Create Environment pgi ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment pgi ${GLOBAL_TEMPLATE_FOLDER}
:FOR ${i} IN RANGE 1 ${stream_count}
\ ${name}= Catenate ${prefix}${i}
\ ${map}= Create Dictionary stream=${name}
- \ ${one}= Apply Template pgi ${PGN_ENABLE_STREAM_TEMPLATE} ${map}
+ \ ${one}= Templating.Apply Template pgi ${PGN_ENABLE_STREAM_TEMPLATE} ${map}
\ ${one}= evaluate json.dumps(${one}) json
\ ${streams}= Set Variable ${streams}${comma}${one}
\ ${comma}= Set Variable ,
${map}= Create Dictionary pgstreams=${streams}
- ${data}= Apply Template pgi ${PGN_ENABLE_STREAMS_TEMPLATE} ${map}
+ ${data}= Templating.Apply Template pgi ${PGN_ENABLE_STREAMS_TEMPLATE} ${map}
${resp}= Put Request ${alias} ${data_path} data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp}
@@ -69,11 +69,11 @@ Enable Streams V2
... Enable <stream_count> number of streams on the passed packet generator host IP
[Arguments] ${host} ${stream_count}=5 ${alias}=pgn ${prefix}=fw_udp
Connect To Packet Generator ${host} alias=${alias}
- Create Environment pgi ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment pgi ${GLOBAL_TEMPLATE_FOLDER}
${headers}= Create Headers
${data_path}= Catenate ${PGN_PATH_V2}/streams
${map}= Create Dictionary number_streams=${stream_count}
- ${data}= Apply Template pgi ${PGN_ENABLE_STREAMS_V2_TEMPLATE} ${map}
+ ${data}= Templating.Apply Template pgi ${PGN_ENABLE_STREAMS_V2_TEMPLATE} ${map}
${resp}= Put Request ${alias} ${data_path} data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot
index e43233e0..15686a11 100644
--- a/robot/resources/test_templates/closedloop_test_template.robot
+++ b/robot/resources/test_templates/closedloop_test_template.robot
@@ -5,7 +5,7 @@ Resource ../stack_validation/policy_check_vfw.robot
Library String
Library Process
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Library ONAPLibrary.Utilities
*** Variables ***
@@ -73,8 +73,8 @@ Get Configs VFW Policy
[Documentation] Get Config Policy for VFW
${getconfigpolicy}= Catenate .*${CONFIG_POLICY_NAME}*
${configpolicy_name}= Create Dictionary config_policy_name=${getconfigpolicy}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${GECONFIG_VFW_TEMPLATE} ${configpolicy_name}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${GECONFIG_VFW_TEMPLATE} ${configpolicy_name}
${get_resp} = Run Policy Get Configs Request ${RESOURCE_PATH_GET_CONFIG} ${output}
Should Be Equal As Strings ${get_resp.status_code} 200
${config}= Catenate ${get_resp.json()[0]["config"]}
@@ -94,8 +94,8 @@ Get Configs VDNS Policy
[Documentation] Get Config Policy for VDNS
${getconfigpolicy}= Catenate .*MicroServicevDNS*
${configpolicy_name}= Create Dictionary config_policy_name=${getconfigpolicy}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${GECONFIG_VFW_TEMPLATE} ${configpolicy_name}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${GECONFIG_VFW_TEMPLATE} ${configpolicy_name}
${get_resp} = Run Policy Get Configs Request ${RESOURCE_PATH_GET_CONFIG} ${output}
Should Be Equal As Strings ${get_resp.status_code} 200
${config}= Catenate ${get_resp.json()[0]["config"]}
@@ -119,8 +119,8 @@ Create Config Policy
${policyname1}= Catenate com.${randompolicyname}
${CONFIG_POLICY_NAME}= Set Test Variable ${policyname1}
${configpolicy}= Create Dictionary policy_name=${CONFIG_POLICY_NAME}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${CREATE_CONFIG_TEMPLATE} ${configpolicy}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${CREATE_CONFIG_TEMPLATE} ${configpolicy}
${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE} ${output}
Should Be Equal As Strings ${put_resp.status_code} 200
@@ -137,8 +137,8 @@ Create Ops Policy
${policyname1}= Catenate com.${randompolicyname}
${OPS_POLICY_NAME}= Set Test Variable ${policyname1}
${dict}= Create Dictionary policy_name=${OPS_POLICY_NAME}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${CREATE_OPS_TEMPLATE} ${dict}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${CREATE_OPS_TEMPLATE} ${dict}
${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE} ${output}
Log ${put_resp}
Should Be Equal As Strings ${put_resp.status_code} 200
@@ -147,8 +147,8 @@ Push Ops Policy
[Documentation] Push Ops Policy
[Arguments] ${policyname} ${policytype}
${dict}= Create Dictionary policy_name=${policyname} policy_type=${policytype}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${PUSH_POLICY_TEMPLATE} ${dict}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${PUSH_POLICY_TEMPLATE} ${dict}
${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE_PUSH} ${output}
Should Be Equal As Strings ${put_resp.status_code} 200
@@ -156,8 +156,8 @@ Push Config Policy
[Documentation] Push Config Policy
[Arguments] ${policyname} ${policytype}
${dict}= Create Dictionary policy_name=${policyname} policy_type=${policytype}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${PUSH_POLICY_TEMPLATE} ${dict}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${PUSH_POLICY_TEMPLATE} ${dict}
${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE_PUSH} ${output}
Should Be Equal As Strings ${put_resp.status_code} 200
@@ -167,8 +167,8 @@ Delete Config Policy
[Arguments] ${policy_name}
${policyname3}= Catenate com.Config_BRMS_Param_${policyname}.1.xml
${dict}= Create Dictionary policy_name=${policyname3}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${DEL_POLICY_TEMPLATE} ${dict}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${DEL_POLICY_TEMPLATE} ${dict}
${put_resp} = Run Policy Delete Request ${RESOURCE_PATH_CREATE_DELETE} ${output}
Should Be Equal As Strings ${put_resp.status_code} 200
@@ -177,8 +177,8 @@ Delete Ops Policy
[Arguments] ${policy_name}
${policyname3}= Catenate com.Config_MS_com.vFirewall.1.xml
${dict}= Create Dictionary policy_name=${policyname3}
- Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
- ${output}= Apply Template cl ${DEL_POLICY_TEMPLATE} ${dict}
+ Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER}
+ ${output}= Templating.Apply Template cl ${DEL_POLICY_TEMPLATE} ${dict}
${put_resp} = Run Policy Delete Request ${RESOURCE_PATH_CREATE_DELETE} ${output}
Should Be Equal As Strings ${put_resp.status_code} 200
diff --git a/robot/resources/test_templates/pnf_registration_without_SO_template.robot b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
index 497bbeb2..950634c3 100644
--- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot
+++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
@@ -8,8 +8,8 @@ Library RequestsLibrary
Library Collections
Library ONAPLibrary.JSON
Library ONAPLibrary.Utilities
-Library ONAPLibrary.Templating
-
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.AAI WITH NAME AAI
*** Variables ***
${aai_so_registration_entry_template}= aai/add_pnf_registration_info.jinja
@@ -30,20 +30,21 @@ Create A&AI antry without SO and succesfully registrate PNF
Create PNF initial entry in A&AI
[Documentation] Creates PNF initial entry in A&AI registry. Entry contains only correlation id (pnf-name)
[Arguments] ${PNF_entry_dict}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${template}= Apply Template aai ${aai_so_registration_entry_template} ${PNF_entry_dict}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${template}= Templating.Apply Template aai ${aai_so_registration_entry_template} ${PNF_entry_dict}
Log Filled A&AI entry template ${template}
${correlation_id}= Get From Dictionary ${PNF_entry_dict} correlation_id
${del_resp}= Delete A&AI Entity /network/pnfs/pnf/${PNF_entry_dict.correlation_id}
Log Removing existing entry "${PNF_entry_dict.correlation_id}" from A&AI registry
- ${put_resp}= Run A&AI Put Request /aai/v11/network/pnfs/pnf/${PNF_entry_dict.correlation_id} ${template}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} /aai/v11/network/pnfs/pnf/${PNF_entry_dict.correlation_id} ${template} auth=${auth}
Log Adding new entry with correlation ID "${PNF_entry_dict.correlation_id}" to A&AI registry (empty IPv4 and IPv6 address)
Send VES integration request
[Documentation] Send VES integration request. Request contains correlation id (sourceName), oamV4IpAddress and oamV6IpAddress
[Arguments] ${PNF_entry_dict}
- Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
- ${template}= Apply Template aai ${pnf_ves_integration_request} ${PNF_entry_dict}
+ Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
+ ${template}= Templating.Apply Template aai ${pnf_ves_integration_request} ${PNF_entry_dict}
${post_resp}= Run VES HTTP Post Request ${template}
Should Be Equal As Strings ${post_resp.status_code} 202
Log VES integration request has been send
@@ -63,7 +64,8 @@ Verify PNF integration request in MR
Query PNF A&AI updated entry
[Documentation] Query PNF A&AI updated entry
[Arguments] ${PNF_entry_dict}
- ${get_resp}= Run A&AI Get Request /aai/v11/network/pnfs/pnf/${PNF_entry_dict.correlation_id}
+ ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} /aai/v11/network/pnfs/pnf/${PNF_entry_dict.correlation_id} auth=${auth}
Should Be Equal As Strings ${get_resp.status_code} 200
${json_resp}= Set Variable ${get_resp.json()}
Log JSON recieved from A&AI endpoint ${json_resp}
diff --git a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
index ec746ff0..537dc5f1 100644
--- a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
@@ -22,7 +22,7 @@ Resource ../so_interface.robot
Library ONAPLibrary.Openstack
Library ONAPLibrary.Utilities
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Library Collections
Library String
Library ONAPLibrary.JSON
@@ -68,7 +68,7 @@ Orchestrate VNF With CDS
${vnfs}= Get From Dictionary ${jsondata['topology_template']} node_templates
${keys}= Get Dictionary Keys ${vnfs}
- Create Environment cds ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment cds ${GLOBAL_TEMPLATE_FOLDER}
:FOR ${key} IN @{keys}
\ ${vnf}= Get From Dictionary ${vnfs} ${key}
\ Get VNF Info ${key} ${vnf} ${dict}
@@ -77,11 +77,11 @@ Orchestrate VNF With CDS
\ ${value}= Convert To Lowercase ${value}
\ ${vfmodules}= Get VFModule Info ${jsondata} ${value} ${dict}
\ Set To Dictionary ${dict} vf_modules=${vfmodules}
- \ ${vnf_payload}= Apply Template cds ${vnf_template_name} ${dict}
+ \ ${vnf_payload}= Templating.Apply Template cds ${vnf_template_name} ${dict}
\ ${data}= Catenate [${vnf_payload}]
Set To Dictionary ${dict} vnfs=${data}
- ${request}= Apply Template cds ${so_request_template} ${dict}
+ ${request}= Templating.Apply Template cds ${so_request_template} ${dict}
Log --------request--------
Log ${request}
Log --------end request--------
@@ -114,12 +114,12 @@ Get VFModule Info
${keys}= Get Dictionary Keys ${vfModules}
${data}= Catenate
${delim}= Catenate
- Create Environment cds ${GLOBAL_TEMPLATE_FOLDER}
+ Templating.Create Environment cds ${GLOBAL_TEMPLATE_FOLDER}
:FOR ${key} IN @{keys}
\ ${module}= Get From Dictionary ${vfModules} ${key}
\ Log ${vnf} ${key}
\ Run keyword if "${vnf}" in "${key}" set vfmodule param ${key} ${module} ${dict}
- \ ${vfmodule_payload}= Apply Template cds ${vfmodule_template_name} ${dict}
+ \ ${vfmodule_payload}= Templating.Apply Template cds ${vfmodule_template_name} ${dict}
\ ${data}= Catenate ${data} ${delim} ${vfmodule_payload}
\ ${delim}= Catenate ,
Log ${data}
diff --git a/robot/testsuites/update_onap_page.robot b/robot/testsuites/update_onap_page.robot
index 3d79cf46..08c958fb 100644
--- a/robot/testsuites/update_onap_page.robot
+++ b/robot/testsuites/update_onap_page.robot
@@ -3,7 +3,7 @@ Documentation Initializes ONAP Test Web Page and Password
Library Collections
Library OperatingSystem
-Library ONAPLibrary.Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Resource ../resources/openstack/keystone_interface.robot
Resource ../resources/openstack/nova_interface.robot
@@ -69,8 +69,8 @@ Update ONAP Page
*** Keywords ***
Create File From Template
[Arguments] ${template} ${file} ${values}
- Create Environment web ${GLOBAL_TEMPLATE_FOLDER}
- ${data}= Apply Template web ${template} ${values}
+ Templating.Create Environment web ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template web ${template} ${values}
Create File ${file} ${data}
Set Public Ip