diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2022-10-31 11:28:10 -0500 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2022-11-01 15:04:47 +0000 |
commit | 34e20080976b27122d03c77cf5f4d189ed3fb089 (patch) | |
tree | 09ca13bafe72011e76aa94bdbc3a848532e5cc5b | |
parent | dfc241e57c4f261f1983886582ba0c4ff83b79fb (diff) |
Wrap sample SON policies with topology template
Issue-ID: POLICY-4427
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iac9003105533fe9e59914f5082ff5b99bb49706d
(cherry picked from commit af8eea569e5e91f09c454746c177885597ea2c32)
4 files changed, 140 insertions, 114 deletions
diff --git a/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.json b/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.json index 2a53db2a3..c2790188e 100644 --- a/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.json +++ b/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.json @@ -1,35 +1,44 @@ { - "type": "onap.policies.controlloop.operational.common.Drools", - "type_version": "1.0.0", - "name": "op.5g.son.a1", - "version": "1.0.0", - "metadata": { - "policy-id": "op.5g.son.a1" - }, - "properties": { - "id": "ControlLoop-SONA1-7d4baf04-8875-4d1f-946d-06b874048b61", - "timeout": 1200, - "abatement": false, - "trigger": "modify-a1-policy", - "operations": [ + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ { - "id": "modify-a1-policy", - "description": "Control Loop Modify A1 Policy", - "operation": { - "actor": "SDNR", - "operation": "ModifyA1Policy", - "target": { - "targetType": "PNF" + "op.5g.son.a1": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "name": "op.5g.son.a1", + "version": "1.0.0", + "metadata": { + "policy-id": "op.5g.son.a1" + }, + "properties": { + "id": "ControlLoop-SONA1-7d4baf04-8875-4d1f-946d-06b874048b61", + "timeout": 1200, + "abatement": false, + "trigger": "modify-a1-policy", + "operations": [ + { + "id": "modify-a1-policy", + "description": "Control Loop Modify A1 Policy", + "operation": { + "actor": "SDNR", + "operation": "ModifyA1Policy", + "target": { + "targetType": "PNF" + } + }, + "timeout": 60, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ] } - }, - "timeout": 60, - "retries": 0, - "success": "final_success", - "failure": "final_failure", - "failure_timeout": "final_failure_timeout", - "failure_retries": "final_failure_retries", - "failure_exception": "final_failure_exception", - "failure_guard": "final_failure_guard" + } } ] } diff --git a/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.yaml b/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.yaml index 87dba6025..feaea446e 100644 --- a/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.yaml +++ b/models-examples/src/main/resources/policies/v5gSonA1.policy.operational.input.tosca.yaml @@ -1,28 +1,33 @@ -type: onap.policies.controlloop.operational.common.Drools -type_version: 1.0.0 -name: op.5g.son.a1 -version: 1.0.0 -metadata: - policy-id: op.5g.son.a1 -properties: - id: ControlLoop-SONA1-7d4baf04-8875-4d1f-946d-06b874048b61 - timeout: 1200 - abatement: false - trigger: modify-a1-policy - operations: - - id: modify-a1-policy - description: Control Loop Modify A1 Policy - operation: - actor: SDNR - operation: ModifyA1Policy - target: - targetType: PNF - timeout: 60 - retries: 0 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard +tosca_definitions_version: tosca_simple_yaml_1_1_0 +topology_template: + policies: + - op.5g.son.a1: + type: onap.policies.controlloop.operational.common.Drools + type_version: 1.0.0 + name: op.5g.son.a1 + version: 1.0.0 + metadata: + policy-id: op.5g.son.a1 + properties: + id: ControlLoop-SONA1-7d4baf04-8875-4d1f-946d-06b874048b61 + timeout: 1200 + abatement: false + trigger: modify-a1-policy + operations: + - id: modify-a1-policy + description: Control Loop Modify A1 Policy + operation: + actor: SDNR + operation: ModifyA1Policy + target: + targetType: PNF + timeout: 60 + retries: 0 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + failure_guard: final_failure_guard + diff --git a/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.json b/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.json index dae0f7460..f515853a7 100644 --- a/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.json +++ b/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.json @@ -1,36 +1,45 @@ { - "type": "onap.policies.controlloop.operational.common.Drools", - "type_version": "1.0.0", - "name": "op.5g.son.o1", - "version": "1.0.0", - "metadata": { - "policy-id": "op.5g.son.o1" - }, - "properties": { - "id": "ControlLoop-SONO1-fb41f388-a5f2-11e8-98d0-529269fb1459", - "timeout": 1200, - "abatement": false, - "trigger": "modify-o1-config", - "operations": [ + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ { - "id": "modify-o1-config", - "description": "Control Loop Modify O1 Configuration", - "operation": { - "actor": "SDNR", - "operation": "ModifyO1Config", - "target": { - "targetType": "PNF" + "op.5g.son.o1": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "name": "op.5g.son.o1", + "version": "1.0.0", + "metadata": { + "policy-id": "op.5g.son.o1" + }, + "properties": { + "id": "ControlLoop-SONO1-fb41f388-a5f2-11e8-98d0-529269fb1459", + "timeout": 1200, + "abatement": false, + "trigger": "modify-o1-config", + "operations": [ + { + "id": "modify-o1-config", + "description": "Control Loop Modify O1 Configuration", + "operation": { + "actor": "SDNR", + "operation": "ModifyO1Config", + "target": { + "targetType": "PNF" + } + }, + "timeout": 60, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ] } - }, - "timeout": 60, - "retries": 0, - "success": "final_success", - "failure": "final_failure", - "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 diff --git a/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.yaml b/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.yaml index 6f4d66559..3ab1c5777 100644 --- a/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.yaml +++ b/models-examples/src/main/resources/policies/v5gSonO1.policy.operational.input.tosca.yaml @@ -1,28 +1,31 @@ -type: onap.policies.controlloop.operational.common.Drools -type_version: 1.0.0 -name: op.5g.son.o1 -version: 1.0.0 -metadata: - policy-id: op.5g.son.o1 -properties: - id: ControlLoop-SONO1-fb41f388-a5f2-11e8-98d0-529269fb1459 - timeout: 1200 - abatement: false - trigger: modify-o1-config - operations: - - id: modify-o1-config - description: Control Loop Modify O1 Configuration - operation: - actor: SDNR - operation: ModifyO1Config - target: - targetType: PNF - timeout: 60 - retries: 0 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - +tosca_definitions_version: tosca_simple_yaml_1_1_0 +topology_template: + policies: + - op.5g.son.o1: + type: onap.policies.controlloop.operational.common.Drools + type_version: 1.0.0 + name: op.5g.son.o1 + version: 1.0.0 + metadata: + policy-id: op.5g.son.o1 + properties: + id: ControlLoop-SONO1-fb41f388-a5f2-11e8-98d0-529269fb1459 + timeout: 1200 + abatement: false + trigger: modify-o1-config + operations: + - id: modify-o1-config + description: Control Loop Modify O1 Configuration + operation: + actor: SDNR + operation: ModifyO1Config + target: + targetType: PNF + timeout: 60 + retries: 0 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + failure_guard: final_failure_guard |