aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-10-09 02:58:18 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-09 02:58:18 +0000
commitd0709b896d63f1312bfd322b9c0a1be0bf70d39a (patch)
treec4a84d983a84c838115c1f738249a490ddb05001 /test
parent683198d9f03761ef8402ec707abe28671273b206 (diff)
parent39e27744130df96299152ce81f766d12a0fe7eb3 (diff)
Merge "Policy CSIT Files"
Diffstat (limited to 'test')
-rw-r--r--test/csit/tests/policy/suite1/Policy-CSIT.robot41
-rw-r--r--test/csit/tests/policy/suite1/opspolicy_VDNS_R1.template2
-rw-r--r--test/csit/tests/policy/suite1/opspolicy_VFW_R1.template2
-rw-r--r--test/csit/tests/policy/suite1/opspolicy_vCPE.template16
-rw-r--r--test/csit/tests/policy/suite1/opspolicy_vOLTE.template16
5 files changed, 61 insertions, 16 deletions
diff --git a/test/csit/tests/policy/suite1/Policy-CSIT.robot b/test/csit/tests/policy/suite1/Policy-CSIT.robot
index be52cd2ea..c7cc7256a 100644
--- a/test/csit/tests/policy/suite1/Policy-CSIT.robot
+++ b/test/csit/tests/policy/suite1/Policy-CSIT.robot
@@ -7,16 +7,16 @@ Resource policy_interface.robot
Resource json_templater.robot
*** Variables ***
-${RESOURCE_PATH_CREATE} /pdp/createPolicy
-${RESOURCE_PATH_CREATE_PUSH} /pdp/pushPolicy
-${RESOURCE_PATH_CREATE_DELETE} /pdp/deletePolicy
-${RESOURCE_PATH_GET_CONFIG} /pdp/getConfig
+${RESOURCE_PATH_CREATE} /pdp/api/createPolicy
+${RESOURCE_PATH_CREATE_PUSH} /pdp/api/pushPolicy
+${RESOURCE_PATH_CREATE_DELETE} /pdp/api/deletePolicy
+${RESOURCE_PATH_GET_CONFIG} /pdp/api/getConfig
${CREATE_CONFIG_VFW_TEMPLATE} ${CURDIR}/configpolicy_vFW.template
${CREATE_CONFIG_VDNS_TEMPLATE} ${CURDIR}/configpolicy_vDNS.template
${CREATE_CONFIG_VCPE_TEMPLATE} ${CURDIR}/configpolicy_vCPE.template
-${CREATE_OPS_VFW_TEMPLATE} ${CURDIR}/opspolicy_VFW.template
+${CREATE_OPS_VFW_TEMPLATE} ${CURDIR}/opspolicy_VFW_R1.template
${PUSH_POLICY_TEMPLATE} ${CURDIR}/pushpolicy.template
-${CREATE_OPS_VDNS_TEMPLATE} ${CURDIR}/opspolicy_VDNS.template
+${CREATE_OPS_VDNS_TEMPLATE} ${CURDIR}/opspolicy_VDNS_R1.template
${DEL_POLICY_TEMPLATE} ${CURDIR}/deletepolicy.template
${GETCONFIG_TEMPLATE} ${CURDIR}/getconfigpolicy.template
${CONFIG_POLICY_VFW_NAME} vFirewall
@@ -60,7 +60,21 @@ VCPE Config Policy
Push Config Policy ${CONFIG_POLICY_VCPE_NAME} ${CONFIG_POLICY_VCPE_TYPE}
#VCPE Policy Tests
-#VOLTE Policy
+VFW Ops Policy
+ ${OPS_POLICY_VFW_NAME}= Create Ops VFW Policy
+ Push Ops Policy ${OPS_POLICY_VFW_NAME} ${OPS_POLICY_VFW_TYPE}
+
+VDNS Ops Policy
+ ${OPS_POLICY_VDNS_NAME}= Create Ops VDNS Policy
+ Push Ops Policy ${OPS_POLICY_VDNS_NAME} ${OPS_POLICY_VDNS_TYPE}
+
+VCPE Ops Policy
+ ${OPS_POLICY_VCPE_NAME}= Create Ops VCPE Policy
+ Push Ops Policy ${OPS_POLICY_VCPE_NAME} ${OPS_POLICY_VCPE_TYPE}
+
+VOLTE Ops Policy
+ ${OPS_POLICY_VOLTE_NAME}= Create Ops VOLTE Policy
+ Push Ops Policy ${OPS_POLICY_VOLTE_NAME} ${OPS_POLICY_VOLTE_TYPE}
#VOLTE Policy Tests
*** Keywords ***
@@ -216,25 +230,24 @@ Create Ops vCPE Policy
[Documentation] Create Opertional Policy
${randompolicyname} = Create Policy Name
${policyname1}= Catenate com.${randompolicyname}
- ${OPS_POLICY_NAME}= Set Test Variable ${policyname1}
- ${dict}= Create Dictionary policy_name=${OPS_POLICY_NAME}
- ${NEWPOLICY1}= Create Dictionary policy_name=com.${OPS_POLICY_NAME}
+ ${OPS_POLICY_VCPE_NAME}= Set Test Variable ${policyname1}
+ ${dict}= Create Dictionary policy_name=${policyname1}
${output} = Fill JSON Template File ${CREATE_OPS_VCPE_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
+ [Return] ${policyname1}
Create Ops VolTE Policy
[Documentation] Create Opertional Policy
${randompolicyname} = Create Policy Name
- ${policyname2}= Catenate com.${randompolicyname}
- #${OPS_POLICY_VOLTE_NAME}= Set Test Variable ${policyname2}
- ${dict}= Create Dictionary policy_name=${policyname2}
- #${NEWPOLICY1}= Create Dictionary policy_name=com.${OPS_POLICY_NAME}
+ ${policyname1}= Catenate com.${randompolicyname}
+ ${dict}= Create Dictionary policy_name=${policyname1}
${output} = Fill JSON Template File ${CREATE_OPS_VOLTE_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
+ [Return] ${policyname1}
Upload DRL file
[Documentation] Upload DRL file1
diff --git a/test/csit/tests/policy/suite1/opspolicy_VDNS_R1.template b/test/csit/tests/policy/suite1/opspolicy_VDNS_R1.template
index cfd43c0c8..b5312b500 100644
--- a/test/csit/tests/policy/suite1/opspolicy_VDNS_R1.template
+++ b/test/csit/tests/policy/suite1/opspolicy_VDNS_R1.template
@@ -8,7 +8,7 @@
"controller" : "amsterdam"
},
"RULE": {
- "templateName": "policy_ops_1",
+ "templateName": "ClosedLoopControlName",
"closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
"controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++services%3A%0D%0A++++-+serviceName%3A+d4738992-6497-4dca-9db9%0D%0A++++++serviceInvariantUUID%3A+dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f%0D%0A++++++serviceUUID%3A+2eea06c6-e1d3-4c3a-b9c4-478c506eeedf%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+MSO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
}
diff --git a/test/csit/tests/policy/suite1/opspolicy_VFW_R1.template b/test/csit/tests/policy/suite1/opspolicy_VFW_R1.template
index 94820d431..e9893446e 100644
--- a/test/csit/tests/policy/suite1/opspolicy_VFW_R1.template
+++ b/test/csit/tests/policy/suite1/opspolicy_VFW_R1.template
@@ -8,7 +8,7 @@
"controller" : "amsterdam"
},
"RULE": {
- "templateName": "policy_ops_1",
+ "templateName": "ClosedLoopControlName",
"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
"controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++services%3A%0D%0A++++-+serviceInvariantUUID%3A+5cfe6f4a-41bc-4247-8674-ebd4b98e35cc%0D%0A++++++serviceUUID%3A+0f40bba5-986e-4b3c-803f-ddd1b7b25f24%0D%0A++++++serviceName%3A+57e66ea7-0ed6-45c7-970f%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-modifyConfig%0D%0A++++name%3A+modify+packet+gen+config%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
}
diff --git a/test/csit/tests/policy/suite1/opspolicy_vCPE.template b/test/csit/tests/policy/suite1/opspolicy_vCPE.template
new file mode 100644
index 000000000..c17a1bc62
--- /dev/null
+++ b/test/csit/tests/policy/suite1/opspolicy_vCPE.template
@@ -0,0 +1,16 @@
+{
+ "policyConfigType": "BRMS_PARAM",
+ "policyName": "${policy_name}",
+ "policyDescription": "BRMS Param vCPE policy",
+ "policyScope": "com",
+ "attributes": {
+ "MATCHING": {
+ "controller" : "amsterdam"
+ },
+ "RULE": {
+ "templateName": "ClosedLoopControlName",
+ "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
+ "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ }
+} \ No newline at end of file
diff --git a/test/csit/tests/policy/suite1/opspolicy_vOLTE.template b/test/csit/tests/policy/suite1/opspolicy_vOLTE.template
new file mode 100644
index 000000000..e43a3e6f9
--- /dev/null
+++ b/test/csit/tests/policy/suite1/opspolicy_vOLTE.template
@@ -0,0 +1,16 @@
+{
+ "policyConfigType": "BRMS_PARAM",
+ "policyName": "${policy_name}",
+ "policyDescription": "BRMS Param VOLTE policy",
+ "policyScope": "com",
+ "attributes": {
+ "MATCHING": {
+ "controller" : "amsterdam"
+ },
+ "RULE": {
+ "templateName": "ClosedLoopControlName",
+ "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
+ "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ }
+} \ No newline at end of file