aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2018-07-23 12:47:21 -0500
committerBrian Freeman <bf1936@att.com>2018-07-23 12:47:39 -0500
commitca5e32e9c0dfab04397aee554b3a61c21b21ca0d (patch)
treef253e1308831344a303dc2555e451c7b6401a484 /robot
parent6737be5ce652e050b69f21bdd36db8b38ee4f693 (diff)
First Pass Automated vFW control setup
Issue-ID: TEST-110 Change-Id: Ib3ea0120a72dc0b6932bb9e12c4ba385e89511c3 Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/assets/templates/policy/FirewallPolicy_delete.template6
-rw-r--r--robot/assets/templates/policy/FirewallPolicy_push.template5
-rw-r--r--robot/resources/demo_preload.robot11
-rw-r--r--robot/resources/global_properties.robot1
-rw-r--r--robot/resources/mso_interface.robot10
-rw-r--r--robot/resources/policy_interface.robot3
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot1
-rw-r--r--robot/testsuites/demo.robot1
8 files changed, 37 insertions, 1 deletions
diff --git a/robot/assets/templates/policy/FirewallPolicy_delete.template b/robot/assets/templates/policy/FirewallPolicy_delete.template
new file mode 100644
index 00000000..c88d718a
--- /dev/null
+++ b/robot/assets/templates/policy/FirewallPolicy_delete.template
@@ -0,0 +1,6 @@
+{
+ "pdpGroup": "default",
+ "policyComponent" : "PDP",
+ "policyName": "com.BRMSParamvFirewall",
+ "policyType": "BRMS_Param"
+}
diff --git a/robot/assets/templates/policy/FirewallPolicy_push.template b/robot/assets/templates/policy/FirewallPolicy_push.template
new file mode 100644
index 00000000..46033f84
--- /dev/null
+++ b/robot/assets/templates/policy/FirewallPolicy_push.template
@@ -0,0 +1,5 @@
+{
+ "pdpGroup": "default",
+ "policyName": "com.BRMSParamvFirewall",
+ "policyType": "BRMS_Param"
+}
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 664525b3..102305ab 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -4,7 +4,9 @@ Documentation This test template encapsulates the VNF Orchestration use case.
Resource test_templates/model_test_template.robot
Resource test_templates/vnf_orchestration_test_template.robot
Resource asdc_interface.robot
+Resource mso_interface.robot
Resource vid/vid_interface.robot
+Resource policy_interface.robot
Library UUID
Library Collections
@@ -152,6 +154,14 @@ Instantiate VNF
Save For Delete
Log to Console Customer Name=${CUSTOMER_NAME}
Log to Console VNF Module Name=${vf_module_name}
+ ${model_invariant_id}= Run MSO Get ModelInvariantId ${SUITE_SERVICE_MODEL_NAME}
+ Log to Console ModelInvariantID=${model_invariant_id}
+ Update vVFWCL Policy ${model_invariant_id}
+ APPC Mount Point ${vf_module_name}
+
+
+
+
Save For Delete
[Documentation] Create a variable file to be loaded for save for delete
@@ -182,5 +192,6 @@ Save For Delete
\ ${comma}= Catenate ,
${vars}= Catenate ${vars}]\n
OperatingSystem.Create File ${FILE_CACHE}/${STACK_NAME}.py ${vars}
+ OperatingSystem.Create File ${FILE_CACHE}/lastVNF4HEATBRIGE.py ${vars}
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot
index 70909e2a..e32b01e9 100644
--- a/robot/resources/global_properties.robot
+++ b/robot/resources/global_properties.robot
@@ -28,6 +28,7 @@ ${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s
${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s
${GLOBAL_VID_UI_TIMEOUT_LONG} 120s
${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
+${GLOBAL_ONAP_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/onap_dev.pvt
${GLOBAL_AAI_ZONE_ID} nova1
${GLOBAL_AAI_ZONE_NAME} nova
${GLOBAL_AAI_DESIGN_TYPE} integration
diff --git a/robot/resources/mso_interface.robot b/robot/resources/mso_interface.robot
index 49965c89..200b270f 100644
--- a/robot/resources/mso_interface.robot
+++ b/robot/resources/mso_interface.robot
@@ -20,6 +20,16 @@ Run MSO Health Check
${resp}= Get Request mso ${MSO_HEALTH_CHECK_PATH} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
+Run MSO Get ModelInvariantId
+ [Documentation] Runs an MSO Get ModelInvariantID for ClosedLoop Polieis
+ [Arguments] ${service_model_name}
+ ${param_dict}= Create Dictionary serviceModelName ${service_model_name}
+ ${param}= Evaluate urllib.urlencode(${param_dict}) urllib
+ ${data_path}= Catenate SEPARATOR= /ecomp/mso/catalog/v2/serviceVnfs? ${param}
+ ${resp}= Run MSO Get Request ${data_path}
+ Log ${resp.json()}
+ [Return] ${resp.json()['serviceVnfs'][0]['modelInfo']['modelInvariantUuid']}
+
Run MSO Get Request
[Documentation] Runs an MSO get request
[Arguments] ${data_path} ${accept}=application/json
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index f05f2650..8bc9c3b6 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -11,6 +11,7 @@ Resource global_properties.robot
${POLICY_HEALTH_CHECK_PATH} /healthcheck
${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_SERVER_PORT}
${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+${POLICY_TEMPLATES} robot/assets/templates/policy
*** Keywords ***
@@ -63,7 +64,7 @@ Run Policy Get Configs Request
Update vVFWCL Policy
[Arguments] ${resource_id}
- Delete vFWCL Policy
+ Run Keyword and Ignore Error Delete vFWCL Policy
Sleep 20s
Create vFWCL Policy ${resource_id}
Sleep 5s
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index 6e2cd9a4..ae0ba021 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -58,6 +58,7 @@ Orchestrate VNF
${service_name}= Catenate Service_Ete_Name${uuid}
${service_type}= Set Variable ${service}
${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Model Distribution For Directory ${service}
+ Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type}
Run Keyword If '${service}' == 'vVG' Create VVG Server ${uuid}
Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER}
Setup Browser
diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot
index 005b4100..e7c47f43 100644
--- a/robot/testsuites/demo.robot
+++ b/robot/testsuites/demo.robot
@@ -43,6 +43,7 @@ Instantiate VFWCL
[Tags] instantiateVFWCL
Instantiate VNF vFWCL
+
Delete Instantiated VNF
[Documentation] This test assumes all necessary variables are loaded via the variable file create in Save For Delete
... The Teardown VNF needs to be in the teardown step of the test case...