Fix issue with Guard policies 96/72496/3
authorMichael Mokry <michael.mokry@att.com>
Tue, 13 Nov 2018 02:10:34 +0000 (20:10 -0600)
committerAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Tue, 13 Nov 2018 19:45:28 +0000 (19:45 +0000)
Modified push-policies.sh to fix pre-loaded guard policies
Changed ecompName to onapName in createPolicy requests

Change-Id: I3fd0b7ba0eb3909e5f37ba233df3f8eee64b191a
Issue-ID: POLICY-1257
Signed-off-by: Michael Mokry <michael.mokry@att.com>
kubernetes/policy/resources/config/pe/push-policies.sh

index c6da184..f591096 100644 (file)
@@ -272,7 +272,7 @@ curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'A
     "policyClass": "Decision",
     "policyName": "com.AllPermitGuard",
     "policyDescription": "Testing all Permit YAML Guard Policy",
-    "ecompName": "PDPD",
+    "onapName": "PDPD",
     "ruleProvider": "GUARD_YAML",
     "attributes": {
         "MATCHING": {
@@ -284,7 +284,7 @@ curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'A
             "timeWindow": "1",
             "timeUnits": "minute",
             "guardActiveStart": "00:00:01-05:00",
-            "guardActiveEnd": "00:00:00-05:00"
+            "guardActiveEnd": "23:59:59-05:00"
         }
     }
 }' 'https://{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
@@ -296,7 +296,7 @@ curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'A
     "policyClass": "Decision",
     "policyName": "com.vDNS_Frequency",
     "policyDescription": "Limit vDNS Scale Up over time period",
-    "ecompName": "PDPD",
+    "onapName": "PDPD",
     "ruleProvider": "GUARD_YAML",
     "attributes": {
         "MATCHING": {
@@ -308,7 +308,7 @@ curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'A
             "timeWindow": "10",
             "timeUnits": "minute",
             "guardActiveStart": "00:00:01-05:00",
-            "guardActiveEnd": "00:00:00-05:00"
+            "guardActiveEnd": "23:59:59-05:00"
         }
     }
 }' 'https://{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
@@ -320,7 +320,7 @@ curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'A
     "policyClass": "Decision",
     "policyName": "com.vDNS_MinMax",
     "policyDescription": "Ensure number of instances within a range",
-    "ecompName": "PDPD",
+    "onapName": "SampleDemo",
     "ruleProvider": "GUARD_MIN_MAX",
     "attributes": {
         "MATCHING": {
@@ -331,7 +331,7 @@ curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'A
             "min": "1",
             "max": "5",
             "guardActiveStart": "00:00:01-05:00",
-            "guardActiveEnd": "00:00:00-05:00"
+            "guardActiveEnd": "23:59:59-05:00"
         }
     }
 }' 'https://{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'