aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-10-31 19:19:02 -0400
committerJim Hahn <jrh3@att.com>2018-10-31 19:51:34 -0400
commit2b68d3077d8ca2ceb4186b2bf55c7b96029e40a8 (patch)
tree05dc2120414f99b2c23937482f96b7f1a5351808
parenta492781caecb83d326c4b1ffafcfbeabaf0bc6eb (diff)
Added config params to scale-out policy
Removed requestParameters and reverted name. Change-Id: Ia3470a751b22375206c571204eff8985e630e05f Issue-ID: POLICY-1240 Signed-off-by: Jim Hahn <jrh3@att.com>
-rw-r--r--controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml7
-rw-r--r--controlloop/packages/basex-controlloop/src/files/bin/create-cl-casablanca2
-rw-r--r--controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca2
-rw-r--r--controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml2
-rw-r--r--controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml4
5 files changed, 9 insertions, 8 deletions
diff --git a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml
index 08b82d92b..50de04d45 100644
--- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml
+++ b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml
@@ -46,13 +46,12 @@ policies:
- id: unique-policy-id-1-scale-up
name: Create a new VF Module
description:
- actor: MSO
+ actor: SO
recipe: VF Module Create
target:
- resourceID: 59a2ee3fB58045feB5a1.nodes.heat.vdns
+ type: VNF
payload:
- requestParameters: '{"usePreload":true,"userParams":[{"name":"gtp_bind_addr","value":"vmme_private_ip_0"},{"name":"mmc","value":"001"},{"name":"mme_addr","value":"vmme_private_ip_0"},{"name":"mnc","value":"01"},{"name":"n_prob","value":"50"},{"name":"vnfHostIpAddress","value":"veb_private_ip_0"}]}'
- configurationParameters: '[{"availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]","xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"}]'
+ configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'
retry: 0
timeout: 1200
success: final_success
diff --git a/controlloop/packages/basex-controlloop/src/files/bin/create-cl-casablanca b/controlloop/packages/basex-controlloop/src/files/bin/create-cl-casablanca
index 8b2045488..9765770cd 100644
--- a/controlloop/packages/basex-controlloop/src/files/bin/create-cl-casablanca
+++ b/controlloop/packages/basex-controlloop/src/files/bin/create-cl-casablanca
@@ -47,7 +47,7 @@ VFW_CONTROL_LOOP_YAML="controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoop
# vDNS Policy Parameters
VDNS_CONTROL_LOOP_NAME="ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
VDNS_POLICY_NAME="vdns"
-VDNS_CONTROL_LOOP_YAML="controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++payload%3A%0D%0A++++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue,%22userParams%22%3A%5B%7B%22name%22%3A%22gtp_bind_addr%22,%22value%22%3A%22vmme_private_ip_0%22%7D,%7B%22name%22%3A%22mmc%22,%22value%22%3A%22001%22%7D,%7B%22name%22%3A%22mme_addr%22,%22value%22%3A%22vmme_private_ip_0%22%7D,%7B%22name%22%3A%22mnc%22,%22value%22%3A%2201%22%7D,%7B%22name%22%3A%22n_prob%22,%22value%22%3A%2250%22%7D,%7B%22name%22%3A%22vnfHostIpAddress%22,%22value%22%3A%22veb_private_ip_0%22%7D%5D%7D%27%0D%0A++++++configurationParameters%3A+%27%5B%7B%22availability-zone%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22,%22xtz-123%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22%7D%5D%27%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+VDNS_CONTROL_LOOP_YAML="controlLoop%3A%0A++version%3A+2.0.0%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0A++timeout%3A+1200%0A++abatement%3A+false%0Apolicies%3A%0A++-+id%3A+unique-policy-id-1-scale-up%0A++++name%3A+Create+a+new+VF+Module%0A++++description%3A%0A++++actor%3A+SO%0A++++recipe%3A+VF+Module+Create%0A++++target%3A%0A++++++type%3A+VNF%0A++++payload%3A%0A++++++configurationParameters%3A+'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A++++retry%3A+0%0A++++timeout%3A+1200%0A++++success%3A+final_success%0A++++failure%3A+final_failure%0A++++failure_timeout%3A+final_failure_timeout%0A++++failure_retries%3A+final_failure_retries%0A++++failure_exception%3A+final_failure_exception%0A++++failure_guard%3A+final_failure_guard"
# VoLTE Policy Parameters
VOLTE_CONTROL_LOOP_NAME="ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b"
diff --git a/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca b/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca
index d8140c0a5..5c7e0a0ab 100644
--- a/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca
+++ b/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca
@@ -94,7 +94,7 @@ echo
echo "Inserting vDNS Policy..."
curl -k --silent --user @1b3rt:31nst31n -X PUT --header 'Content-Type: text/plain' -d '{
"closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++payload%3A%0D%0A++++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue,%22userParams%22%3A%5B%7B%22name%22%3A%22gtp_bind_addr%22,%22value%22%3A%22vmme_private_ip_0%22%7D,%7B%22name%22%3A%22mmc%22,%22value%22%3A%22001%22%7D,%7B%22name%22%3A%22mme_addr%22,%22value%22%3A%22vmme_private_ip_0%22%7D,%7B%22name%22%3A%22mnc%22,%22value%22%3A%2201%22%7D,%7B%22name%22%3A%22n_prob%22,%22value%22%3A%2250%22%7D,%7B%22name%22%3A%22vnfHostIpAddress%22,%22value%22%3A%22veb_private_ip_0%22%7D%5D%7D%27%0D%0A++++++configurationParameters%3A+%27%5B%7B%22availability-zone%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22,%22xtz-123%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22%7D%5D%27%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard",
+ "controlLoopYaml": "controlLoop%3A%0A++version%3A+2.0.0%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0A++timeout%3A+1200%0A++abatement%3A+false%0Apolicies%3A%0A++-+id%3A+unique-policy-id-1-scale-up%0A++++name%3A+Create+a+new+VF+Module%0A++++description%3A%0A++++actor%3A+SO%0A++++recipe%3A+VF+Module+Create%0A++++target%3A%0A++++++type%3A+VNF%0A++++payload%3A%0A++++++configurationParameters%3A+'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A++++retry%3A+0%0A++++timeout%3A+1200%0A++++success%3A+final_success%0A++++failure%3A+final_failure%0A++++failure_timeout%3A+final_failure_timeout%0A++++failure_retries%3A+final_failure_retries%0A++++failure_exception%3A+final_failure_exception%0A++++failure_guard%3A+final_failure_guard",
"policyName": "vdns",
"policyScope": "DCAE",
"policyVersion": "1.2.0"
diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml b/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml
index a96989acd..b5dfde974 100644
--- a/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -50,7 +50,7 @@
<defaultValue>vdns</defaultValue>
</requiredProperty>
<requiredProperty key="vdnsControlLoopYaml">
- <defaultValue>controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++payload%3A%0D%0A++++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue,%22userParams%22%3A%5B%7B%22name%22%3A%22gtp_bind_addr%22,%22value%22%3A%22vmme_private_ip_0%22%7D,%7B%22name%22%3A%22mmc%22,%22value%22%3A%22001%22%7D,%7B%22name%22%3A%22mme_addr%22,%22value%22%3A%22vmme_private_ip_0%22%7D,%7B%22name%22%3A%22mnc%22,%22value%22%3A%2201%22%7D,%7B%22name%22%3A%22n_prob%22,%22value%22%3A%2250%22%7D,%7B%22name%22%3A%22vnfHostIpAddress%22,%22value%22%3A%22veb_private_ip_0%22%7D%5D%7D%27%0D%0A++++++configurationParameters%3A+%27%5B%7B%22availability-zone%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22,%22xtz-123%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22%7D%5D%27%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard</defaultValue>
+ <defaultValue>controlLoop%3A%0A++version%3A+2.0.0%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0A++timeout%3A+1200%0A++abatement%3A+false%0Apolicies%3A%0A++-+id%3A+unique-policy-id-1-scale-up%0A++++name%3A+Create+a+new+VF+Module%0A++++description%3A%0A++++actor%3A+SO%0A++++recipe%3A+VF+Module+Create%0A++++target%3A%0A++++++type%3A+VNF%0A++++payload%3A%0A++++++configurationParameters%3A+'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A++++retry%3A+0%0A++++timeout%3A+1200%0A++++success%3A+final_success%0A++++failure%3A+final_failure%0A++++failure_timeout%3A+final_failure_timeout%0A++++failure_retries%3A+final_failure_retries%0A++++failure_exception%3A+final_failure_exception%0A++++failure_guard%3A+final_failure_guard</defaultValue>
</requiredProperty>
<requiredProperty key="volteClosedLoopControlName">
<defaultValue>ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b</defaultValue>
diff --git a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml
index 6ae062125..fdf5d1a6b 100644
--- a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml
+++ b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml
@@ -29,6 +29,8 @@ policies:
recipe: VF Module Create
target:
type: VNF
+ payload:
+ configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'
retry: 0
timeout: 30
success: final_success
@@ -36,4 +38,4 @@ policies:
failure_timeout: final_failure_timeout
failure_retries: final_failure_retries
failure_exception: final_failure_exception
- failure_guard: final_failure_guard \ No newline at end of file
+ failure_guard: final_failure_guard