diff options
author | Michael Mokry <mm117s@att.com> | 2018-09-14 14:39:22 -0500 |
---|---|---|
committer | Michael Mokry <mm117s@att.com> | 2018-09-14 15:23:07 -0500 |
commit | eeeec7bb00c6ee3ffef1f132161566b702d060a1 (patch) | |
tree | 595be43bd7af1c4b8bdb41000572ef2b18b4390f /test/csit/tests/policy/suite1 | |
parent | ecc880d8faa77f1df889fe46aacaad9e8a314213 (diff) |
SDNC Naming Policy CSIT tests
Added CSIT tests for SDNC Naming VFW and VPG policies
Change-Id: If0c70bbe0861105813fbf1b329edc0ff82e858a1
Issue-ID: POLICY-983
Signed-off-by: Michael Mokry <mm117s@att.com>
Diffstat (limited to 'test/csit/tests/policy/suite1')
3 files changed, 69 insertions, 5 deletions
diff --git a/test/csit/tests/policy/suite1/Policy-CSIT.robot b/test/csit/tests/policy/suite1/Policy-CSIT.robot index 5909abd29..785619f9d 100644 --- a/test/csit/tests/policy/suite1/Policy-CSIT.robot +++ b/test/csit/tests/policy/suite1/Policy-CSIT.robot @@ -17,6 +17,8 @@ ${CREATE_CONFIG_VDNS_TEMPLATE} ${CURDIR}/configpolicy_vDNS_R1.template ${CREATE_CONFIG_VCPE_TEMPLATE} ${CURDIR}/configpolicy_vCPE_R1.template ${CREATE_OPS_VFW_TEMPLATE} ${CURDIR}/opspolicy_VFW_R1.template ${CREATE_OOF_HPA_TEMPLATE} ${CURDIR}/oofpolicy_HPA_R1.template +${CREATE_SDNC_VFW_TEMPLATE} ${CURDIR}/sdncnamingpolicy_vFW.template +${CREATE_SDNC_VPG_TEMPLATE} ${CURDIR}/sdncnamingpolicy_vPG.template ${PUSH_POLICY_TEMPLATE} ${CURDIR}/pushpolicy.template ${CREATE_OPS_VDNS_TEMPLATE} ${CURDIR}/opspolicy_VDNS_R1.template ${DEL_POLICY_TEMPLATE} ${CURDIR}/deletepolicy.template @@ -38,6 +40,8 @@ ${OPS_POLICY_VOLTE_NAME} VoLTE ${OPS_POLICY_VOLTE_TYPE} BRMS_PARAM ${OOF_POLICY_HPA_NAME} HPA ${OOF_POLICY_HPA_TYPE} Optimization +${SDNC_POLICY_VFW_NAME} ONAP_vFW_Naming +${SDNC_POLICY_VPG_NAME} ONAP_vPG_Naming ${file_path} ../testsuite/robot/assets/templates/ControlLoopDemo__closedLoopControlName.drl ${RESOURCE_PATH_UPLOAD} /pdp/api/policyEngineImport?importParametersJson=%7B%22serviceName%22%3A%22Manyu456%22%2C%20%22serviceType%22%3A%22BRMSPARAM%22%7D ${CREATE_OPS_VCPE_TEMPLATE} ${CURDIR}/opspolicy_vCPE_R1.template @@ -80,6 +84,16 @@ VOLTE Ops Policy Push Ops Policy ${OPS_POLICY_VOLTE_NAME} ${OPS_POLICY_VOLTE_TYPE} #VOLTE Policy Tests +VFW SDNC Naming Policy + ${SDNC_POLICY_VFW_NAME}= Create VFW SDNC Naming Policy + Push Config Policy ${SDNC_POLICY_VFW_NAME} ${CONFIG_POLICY_VFW_TYPE} + #VFW Policy Tests + +VPG SDNC Naming Policy + ${SDNC_POLICY_VPG_NAME}= Create VPG SDNC Naming Policy + Push Config Policy ${SDNC_POLICY_VPG_NAME} ${CONFIG_POLICY_VFW_TYPE} + #VPG Policy Tests + HPA OOF Policy ${OOF_POLICY_HPA_NAME}= Create OOF HPA Policy Push Config Policy ${OOF_POLICY_HPA_NAME} ${OOF_POLICY_HPA_TYPE} @@ -109,6 +123,8 @@ VFW Policy Tests Get Configs VFW Policy ${OPS_POLICY_VFW_NAME}= Create Ops VFW Policy Push Ops Policy ${OPS_POLICY_VFW_NAME} ${OPS_POLICY_VFW_TYPE} + ${SDNC_POLICY_VFW_NAME}= Create VFW SDNC Naming Policy + Push Config Policy ${CONFIG_POLICY_VFW_NAME} ${CONFIG_POLICY_VFW_TYPE} VDNS Policy Tests ${CONFIG_POLICY_VDNS_NAME}= Create Config VDNS Policy @@ -123,6 +139,10 @@ VCPE Policy Tests Get Configs VCPE Policy ${OPS_POLICY_VCPE_NAME}= Create Ops VCPE Policy Push Ops Policy ${OPS_POLICY_VCPE_NAME} ${OPS_POLICY_VCPE_TYPE} + +VPG Policy Tests + ${SDNC_POLICY_VPG_NAME}= Create VPG SDNC Naming Policy + Push Config Policy ${SDNC_POLICY_VPG_NAME} ${CONFIG_POLICY_VFW_TYPE} VOLTE Policy Tests ${OPS_POLICY_VOLTE_NAME}= Create Ops VOLTE Policy @@ -172,7 +192,29 @@ Create Config VFW Policy Should Be Equal As Strings ${put_resp.status_code} 200 [Return] ${policyname1} - Create Policy Name +Create VPG SDNC Naming Policy + [Documentation] Create VPG SDNC Naming Policy + ${randompolicyname} = Create Policy Name + ${policyname1}= Catenate com.${randompolicyname}_ONAP_vPG_Naming + ${SDNC_POLICY_VPG_NAME}= Set Test Variable ${policyname1} + ${sdncpolicy}= Create Dictionary policy_name=${policyname1} + ${output} = Fill JSON Template File ${CREATE_SDNC_VPG_TEMPLATE} ${sdncpolicy} + ${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE} ${output} + Should Be Equal As Strings ${put_resp.status_code} 200 + [Return] ${policyname1} + +Create VFW SDNC Naming Policy + [Documentation] Create VFW SDNC Naming Policy + ${randompolicyname} = Create Policy Name + ${policyname1}= Catenate com.${randompolicyname}_ONAP_vFW_Naming + ${SDNC_POLICY_VFW_NAME}= Set Test Variable ${policyname1} + ${sdncpolicy}= Create Dictionary policy_name=${policyname1} + ${output} = Fill JSON Template File ${CREATE_SDNC_VFW_TEMPLATE} ${sdncpolicy} + ${put_resp} = Run Policy Put Request ${RESOURCE_PATH_CREATE} ${output} + Should Be Equal As Strings ${put_resp.status_code} 200 + [Return] ${policyname1} + +Create Policy Name [Documentation] Generate Policy Name [Arguments] ${prefix}=CSIT_ ${random}= Generate Random String 15 [LOWER][NUMBERS] @@ -180,7 +222,7 @@ Create Config VFW Policy [Return] ${policyname} Create Ops VFW Policy - [Documentation] Create Opertional Policy + [Documentation] Create Operational Policy ${randompolicyname} = Create Policy Name ${policyname1}= Catenate com.${randompolicyname}_vFirewall ${OPS_POLICY_VFW_NAME}= Set Test Variable ${policyname1} @@ -254,7 +296,7 @@ Create Config VDNS Policy [Return] ${policyname1} Create Ops VDNS Policy - [Documentation] Create Opertional Policy + [Documentation] Create Operational Policy ${randompolicyname} = Create Policy Name ${policyname1}= Catenate com.${randompolicyname}_vLoadBalancer ${OPS_POLICY_VDNS_NAME}= Set Test Variable ${policyname1} @@ -285,7 +327,7 @@ Get Configs VCPE Policy Should Be Equal As Strings ${get_resp.status_code} 200 Create Ops vCPE Policy - [Documentation] Create Opertional Policy + [Documentation] Create Operational Policy ${randompolicyname} = Create Policy Name ${policyname1}= Catenate com.${randompolicyname}_vCPE ${OPS_POLICY_VCPE_NAME}= Set Test Variable ${policyname1} @@ -297,7 +339,7 @@ Create Ops vCPE Policy [Return] ${policyname1} Create Ops VolTE Policy - [Documentation] Create Opertional Policy + [Documentation] Create Operational Policy ${randompolicyname} = Create Policy Name ${policyname1}= Catenate com.${randompolicyname}_VoLTE ${dict}= Create Dictionary policy_name=${policyname1} diff --git a/test/csit/tests/policy/suite1/sdncnamingpolicy_vFW.template b/test/csit/tests/policy/suite1/sdncnamingpolicy_vFW.template new file mode 100644 index 000000000..d9c773d1c --- /dev/null +++ b/test/csit/tests/policy/suite1/sdncnamingpolicy_vFW.template @@ -0,0 +1,11 @@ +{ + "configBody": "{\"service\":\"SDNC-GenerateName\",\"version\":\"CSIT\",\"content\":{\"policy-instance-name\":\"ONAP_VFW_NAMING_TIMESTAMP\",\"naming-models\":[{\"naming-properties\":[{\"property-name\":\"AIC_CLOUD_REGION\"},{\"property-name\":\"nfRole\"},{\"property-name\":\"TIMESTAMP\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNF\",\"nfRole\":\"vFW\",\"naming-recipe\":\"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NFC_NAMING_CODE\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNFC\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"},{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}}],\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"}],\"naming-type\":\"KEY\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"protected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"protected_private_net_id\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"unprotected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"unprotected_private_net_id\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"}]}}", + "policyName": "${policy_name}", + "policyConfigType": "MicroService", + "onapName": "SDNC", + "riskLevel": "4", + "riskType": "test", + "guard": "false", + "priority": "4", + "description": "ONAP_VFW_NAMING_TIMESTAMP" +}
\ No newline at end of file diff --git a/test/csit/tests/policy/suite1/sdncnamingpolicy_vPG.template b/test/csit/tests/policy/suite1/sdncnamingpolicy_vPG.template new file mode 100644 index 000000000..9bae20a13 --- /dev/null +++ b/test/csit/tests/policy/suite1/sdncnamingpolicy_vPG.template @@ -0,0 +1,11 @@ +{ + "configBody": "{\"service\":\"SDNC-GenerateName\",\"version\":\"CSIT\",\"content\":{\"policy-instance-name\":\"ONAP_VPG_NAMING_TIMESTAMP\",\"naming-models\":[{\"naming-properties\":[{\"property-name\":\"AIC_CLOUD_REGION\"},{\"property-name\":\"nfRole\"},{\"property-name\":\"TIMESTAMP\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNF\",\"nfRole\":\"vPG\",\"naming-recipe\":\"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NFC_NAMING_CODE\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNFC\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"},{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}}],\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"}],\"naming-type\":\"KEY\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"protected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"protected_private_net_id\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"unprotected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"unprotected_private_net_id\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"}]}}", "policyName": "${policy_name}", + "policyName": "${policy_name}", + "policyConfigType": "MicroService", + "onapName": "SDNC", + "riskLevel": "4", + "riskType": "test", + "guard": "false", + "priority": "4", + "description": "ONAP_VPG_NAMING_TIMESTAMP" +}
\ No newline at end of file |