Update to new tcagen2 policy type 58/111458/3
authorPamela Dragosh <pdragosh@research.att.com>
Wed, 19 Aug 2020 20:18:52 +0000 (16:18 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Wed, 19 Aug 2020 22:58:52 +0000 (18:58 -0400)
Replacing deprecated tca policy type with new tcagen2
policy type.

Issue-ID: POLICY-2772
Change-Id: Id53e61caf9675e0080274784870970c7ea2575f8
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
tests/policy/api/api-test.robot
tests/policy/api/data/onap.policy.monitoring.tcagen2.v1.json [moved from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json with 99% similarity]
tests/policy/api/data/onap.policy.monitoring.tcagen2.v2.json [moved from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json with 99% similarity]
tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json
tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json
tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json
tests/policy/pap/data/create.group.request.json
tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json
tests/policy/pap/pap-test.robot
tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json
tests/policy/xacml-pdp/xacml-pdp-test.robot

index d3df9cc..c229bcf 100644 (file)
@@ -41,7 +41,7 @@ RetrievePolicyTypes
 CreateTCAPolicyTypeV1
      [Documentation]    Create TCA Policy Type Version 1. Trying to create an existing policy type with any change and same version should cause error.
      ${auth}=    Create List    healthcheck    zb!XztG34
-     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
+     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.tcagen2.v1.json
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
@@ -52,7 +52,7 @@ CreateTCAPolicyTypeV1
 CreateTCAPolicyTypeV2
      [Documentation]    Create TCA Policy Type Version 2
      ${auth}=    Create List    healthcheck    zb!XztG34
-     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json
+     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.tcagen2.v2.json
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
@@ -82,7 +82,7 @@ CreateNewMonitoringPolicyV1
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies  data=${postjson}   headers=${headers}
+     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies  data=${postjson}   headers=${headers}
      Log    Received response from policy ${resp.text}
      ${postjsonobject}   To Json    ${postjson}
      Should Be Equal As Strings    ${resp.status_code}     200
@@ -121,7 +121,7 @@ RetrievePoliciesOfType
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Get Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies     headers=${headers}
+     ${resp}=   Get Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies     headers=${headers}
      Log    Received response from policy ${resp.text}
      ${expjsonobject}   To Json    ${expjson}
      Should Be Equal As Strings    ${resp.status_code}     200
@@ -173,10 +173,10 @@ DeleteSpecificPolicyV2
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
      Should Be Equal As Strings    ${resp.status_code}     404
 
 DeleteSpecificPolicyTypeV1
@@ -185,10 +185,10 @@ DeleteSpecificPolicyTypeV1
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0    headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0    headers=${headers}
      Should Be Equal As Strings    ${resp.status_code}     404
 
 DeleteSpecificPolicyTypeV2
@@ -197,8 +197,8 @@ DeleteSpecificPolicyTypeV2
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0    headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0    headers=${headers}
      Should Be Equal As Strings    ${resp.status_code}     404
@@ -6,11 +6,11 @@
       "version": "1.0.0",
       "description": "a base policy type for all policies that governs monitoring provisioning"
     },
-    "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+    "onap.policies.monitoring.tcagen2": {
       "derived_from": "onap.policies.Monitoring",
       "version": "1.0.0",
       "properties": {
-        "tca_policy": {
+        "tca.policy": {
           "type": "onap.datatypes.monitoring.tca_policy",
           "description": "TCA Policy JSON"
         }
@@ -1,11 +1,11 @@
 {
   "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
   "policy_types": {
-    "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+    "onap.policies.monitoring.tcagen2": {
       "derived_from": "onap.policies.Monitoring",
       "version": "2.0.0",
       "properties": {
-        "tca_policy": {
+        "tca.policy": {
           "type": "onap.datatypes.monitoring.tca_policy",
           "description": "TCA Policy JSON"
         }
index 1079c7c..d57a64c 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy" : {
+                        "tca.policy" : {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index 35ad3c5..12e066e 100644 (file)
@@ -4,7 +4,7 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "description": "monitoring policy",
@@ -12,7 +12,7 @@
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy" : {
+                        "tca.policy" : {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index c6b2ad2..cd4be20 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "2.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy" : {
+                        "tca.policy" : {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index ea04c0e..1b63563 100644 (file)
@@ -13,7 +13,7 @@
                     "properties": {},
                     "supportedPolicyTypes": [
                         {
-                            "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                            "name": "onap.policies.monitoring.tcagen2",
                             "version": "1.0.0"
                         }
                     ],
@@ -25,7 +25,7 @@
                     "properties": {},
                     "supportedPolicyTypes": [
                         {
-                            "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                            "name": "onap.policies.monitoring.tcagen2",
                             "version": "1.0.0"
                         }
                     ],
index 3003d9a..8ec03fe 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy": {
+                        "tca.policy": {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index 67a5782..5387e85 100644 (file)
@@ -12,7 +12,7 @@ LoadPolicy
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${postjson}=  Get file  ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json
-     ${resp}=   Post Request     policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies    data=${postjson}     headers=${headers}
+     ${resp}=   Post Request     policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies    data=${postjson}     headers=${headers}
      Log    Received response from API ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
 
index 3003d9a..8ec03fe 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy": {
+                        "tca.policy": {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index 6e2fa00..150c97e 100644 (file)
@@ -52,7 +52,7 @@ CreateMonitorPolicy
      Log    Creating session https://${POLICY_API_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies  data=${postjson}   headers=${headers}
+     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies  data=${postjson}   headers=${headers}
      Log    Received response from policy4 ${resp.text}
      ${postjsonobject}   To Json    ${postjson}
      Should Be Equal As Strings    ${resp.status_code}     200