Fix undeploye/delete operational policy 22/116322/1
authorBrian Freeman <bf1936@att.com>
Fri, 11 Dec 2020 19:03:57 +0000 (14:03 -0500)
committerBrian Freeman <bf1936@att.com>
Fri, 11 Dec 2020 19:04:02 +0000 (14:04 -0500)
do both policy undeploys before deletes so that undeploy has more time to process
remove heatbridge.robot include references to get rid of error message at startup
remove commented out referecnes to heatbridge (cleanup)

Issue-ID: INT-1803
Change-Id: I0cb071f487faf6ecababdc6d8a5c0e3aa79720b7
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/resources/demo_preload.robot
robot/resources/policy_interface.robot
robot/resources/test_templates/vnf_orchestration_test_template.robot
robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
robot/resources/vid/teardown_vid.robot
robot/testsuites/closed-loop.robot

index 3083cc4..3f5100b 100644 (file)
@@ -212,7 +212,7 @@ Instantiate VNF
     \    ${generic_vnf}=    Get From Dictionary    ${generic_vnfs}    ${vf_module}
     \    ${model_invariant_id}=    Set Variable If    '${vf_module_label}' in '${vf_module}'   ${generic_vnf['model-invariant-id']}    ${model_invariant_id}
     Log   Update old vFWCL Policy for ModelInvariantID=${model_invariant_id}
-    ${status}   ${value}=   Run Keyword And Ignore Error  Update vVFWCL Policy   ${model_invariant_id}
+    ${status}   ${value}=   Run Keyword And Ignore Error  Update vFWCL Operational and Monitoring Policies    ${model_invariant_id}
     :FOR  ${vf_module_name}  IN   @{vf_module_name_list}
     \   Log   APPC Mount Point for VNF Module Name=${vf_module_name}
     \   ${status}   ${value}=   Run Keyword And Ignore Error  APPC Mount Point    ${vf_module_name}
index b8ecf45..9ff95f0 100644 (file)
@@ -188,7 +188,7 @@ Run Deploy Policy Pap Post Request
      [Return]    ${resp}
      Should Be Equal As Strings    ${resp.status_code}     200
 
-Run Undeploy Policy
+Run Undeploy vFW Operational Policy
      [Documentation]    Runs Policy PAP Undeploy a Policy from PDP Groups
      #[Arguments]    ${policy_name}
      ${auth}=    Create List    ${POLICY_HEALTHCHECK_USERNAME}    ${POLICY_HEALTHCHECK_PASSWORD}
@@ -222,6 +222,16 @@ Run Delete vFW Monitoring Policy
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
 
+Run Delete vFW Operational Policy
+     [Documentation]    Runs Policy API Delete Operational Policy
+     #[Arguments]    ${policy_name}
+     ${auth}=    Create List    ${POLICY_HEALTHCHECK_USERNAME}    ${POLICY_HEALTHCHECK_PASSWORD}
+     ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
+     Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Delete Request     policy   /policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0     headers=${headers}
+     Log    Received response from policy ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
 
 Run Delete Policy Request
      [Documentation]    Runs Policy Delete request
index e4b4427..9d33f7a 100644 (file)
@@ -15,7 +15,6 @@ Resource        ../aai/create_complex.robot
 Resource        ../aai/create_tenant.robot
 Resource        ../aai/create_service.robot
 Resource        ../openstack/neutron_interface.robot
-Resource        ../heatbridge.robot
 
 
 Library         ONAPLibrary.Openstack
@@ -76,9 +75,6 @@ Orchestrate VNF
     \   ${generic_vnf}=   Validate Generic VNF    ${vnf_name}    ${vnf_type}    ${service_instance_id}
     \   Set To Dictionary    ${generic_vnfs}    ${vf_module_type}    ${generic_vnf}
     #    TODO: Need to look at a better way to default ipv4_oam_interface  search for Heatbridge
-    ##  Part of removale of heatbridge
-    ##  \   ${uris_to_delete}=    Execute Heatbridge    ${vf_module_name}    ${vnf}  ${service}    ipv4_oam_interface
-    ##  set a fake urils_to_delete until we confirm heatbridge can be fully removed
     \   ${uris_to_delete}=   Set Variable   'http://devnull'
     \   Validate VF Module      ${vf_module_name}    ${vnf}
     \   Append To List   ${vf_module_name_list}    ${vf_module_name}
index 63266aa..1ab5852 100644 (file)
@@ -15,7 +15,6 @@ Resource        ../aai/create_complex.robot
 Resource        ../aai/create_tenant.robot
 Resource        ../aai/create_service.robot
 Resource        ../openstack/neutron_interface.robot
-Resource        ../heatbridge.robot
 
 Resource       ../global_properties.robot
 
index a2ffc83..2321770 100644 (file)
@@ -7,7 +7,6 @@ Library        ONAPLibrary.SO    WITH NAME     SO
 Resource        vid_interface.robot
 Resource        create_vid_vnf.robot
 Resource        create_service_instance.robot
-Resource        ../heatbridge.robot
 
 *** Variables ***
 ${VID_ENV}            /vid
index 3c8e708..6f1a9db 100644 (file)
@@ -28,10 +28,10 @@ VFWCL Repush Monitoring And Operational Policies
     Validate the vFWCL Policy
     Run Keyword And Ignore Error     Run Undeploy vFW Monitoring Policy
     Validate the vFWCL Policy
-    Run Keyword and Ignore Error     Run Delete vFW Monitoring Policy
-    Validate the vFWCL Policy
     Run Keyword And Ignore Error     Run Undeploy vFW Operational Policy
     Validate the vFWCL Policy
+    Run Keyword and Ignore Error     Run Delete vFW Monitoring Policy
+    Validate the vFWCL Policy
     Run Keyword And Ignore Error     Run Delete vFW Operational Policy
     Validate the vFWCL Policy
     Update vVFWCL Policy     ${MODEL_INVARIANT_ID}