Fix undeploye/delete operational policy

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>
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 3083cc4..3f5100b 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -212,7 +212,7 @@
     \    ${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}
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index b8ecf45..9ff95f0 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -188,7 +188,7 @@
      [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 @@
      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
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index e4b4427..9d33f7a 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -15,7 +15,6 @@
 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 @@
     \   ${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}
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 63266aa..1ab5852 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
@@ -15,7 +15,6 @@
 Resource        ../aai/create_tenant.robot
 Resource        ../aai/create_service.robot
 Resource        ../openstack/neutron_interface.robot
-Resource        ../heatbridge.robot
 
 Resource    	../global_properties.robot
 
diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot
index a2ffc83..2321770 100644
--- a/robot/resources/vid/teardown_vid.robot
+++ b/robot/resources/vid/teardown_vid.robot
@@ -7,7 +7,6 @@
 Resource        vid_interface.robot
 Resource        create_vid_vnf.robot
 Resource        create_service_instance.robot
-Resource        ../heatbridge.robot
 
 *** Variables ***
 ${VID_ENV}            /vid
diff --git a/robot/testsuites/closed-loop.robot b/robot/testsuites/closed-loop.robot
index 3c8e708..6f1a9db 100644
--- a/robot/testsuites/closed-loop.robot
+++ b/robot/testsuites/closed-loop.robot
@@ -28,10 +28,10 @@
     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}