From 542385d1e097a68ca8330e5c79b96d20a58d3f4a Mon Sep 17 00:00:00 2001 From: "Gao, Chenfei (cg287m)" Date: Thu, 20 Jul 2017 16:45:26 -0400 Subject: [POLICY-76] Remove/rename ATT internal stuffs Change-Id: I3ec4fa22e22e9fccf4b6783b3bc8c92da25e181f Signed-off-by: Gao, Chenfei (cg287m) --- .../policy/ControlLoopPolicyBuilderTest.java | 22 ++--- .../controlloop/policy/ControlLoopPolicyTest.java | 39 +------- .../src/test/resources/v1.0.0/policy_OpenLoop.yaml | 12 +++ .../resources/v1.0.0/policy_OpenLoop_1610.yaml | 12 --- .../test/resources/v1.0.0/policy_SDNO_1702.yaml | 26 ----- .../v1.0.0/policy_Test_MultipleService.yaml | 26 ----- .../test/resources/v1.0.0/policy_vProbes_1610.yaml | 24 ----- .../test/resources/v1.0.0/policy_vSCP_F5_1610.yaml | 26 ----- .../src/test/resources/v1.0.0/policy_vService.yaml | 61 ++++++++++++ .../test/resources/v1.0.0/policy_vUSP_1610.yaml | 61 ------------ .../v2.0.0-guard/policy_guard_blacklist.yaml | 17 ++++ .../resources/v2.0.0/policy_ONAP_demo_vDNS.yaml | 47 +++++++++ .../v2.0.0/policy_ONAP_demo_vFirewall.yaml | 58 +++++++++++ .../v2.0.0/policy_OpenECOMP_demo_vDNS.yaml | 47 --------- .../v2.0.0/policy_OpenECOMP_demo_vFirewall.yaml | 58 ----------- .../resources/v2.0.0/policy_eNodeB_ALU_1707.yaml | 72 -------------- .../v2.0.0/policy_eNodeB_Ericsson_1707.yaml | 86 ----------------- .../src/test/resources/v2.0.0/policy_vService.yaml | 107 +++++++++++++++++++++ .../test/resources/v2.0.0/policy_vUSP_1707.yaml | 107 --------------------- 19 files changed, 318 insertions(+), 590 deletions(-) create mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop_1610.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_SDNO_1702.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_Test_MultipleService.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vProbes_1610.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vSCP_F5_1610.yaml create mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vService.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vUSP_1610.yaml create mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0-guard/policy_guard_blacklist.yaml create mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml create mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vFirewall.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vDNS.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vFirewall.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_ALU_1707.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_Ericsson_1707.yaml create mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml delete mode 100644 controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vUSP_1707.yaml (limited to 'controlloop/common/policy-yaml/src') diff --git a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java index f8ad499f0..90d498a8d 100644 --- a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java +++ b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java @@ -61,30 +61,30 @@ public class ControlLoopPolicyBuilderTest { // // Test add services // - Service vSCP = new Service("vSCP"); - Service vUSP = new Service("vUSP"); - Service vTrinity = new Service("Trinity"); - builder = builder.addService(vSCP, vUSP, vTrinity); + Service Ser1 = new Service("Ser1"); + Service Ser2 = new Service("Ser2"); + Service Ser3 = new Service("Ser3"); + builder = builder.addService(Ser1, Ser2, Ser3); assertTrue(builder.getControlLoop().services.size() == 3); // // Test remove services // - builder = builder.removeService(vSCP); + builder = builder.removeService(Ser1); assertTrue(builder.getControlLoop().services.size() == 2); builder = builder.removeAllServices(); assertTrue(builder.getControlLoop().services.size() == 0); // // Test add resources // - Resource vCTS = new Resource("vCTS", ResourceType.VF); - Resource vCOM = new Resource("vCTS", ResourceType.VF); - Resource vRAR = new Resource("vCTS", ResourceType.VF); - builder = builder.addResource(vCTS, vCOM, vRAR); + Resource Resrc1 = new Resource("Resrc1", ResourceType.VF); + Resource Resrc2 = new Resource("Resrc1", ResourceType.VF); + Resource Resrc3 = new Resource("Resrc1", ResourceType.VF); + builder = builder.addResource(Resrc1, Resrc2, Resrc3); assertTrue(builder.getControlLoop().resources.size() == 3); // // Test remove resources // - builder = builder.removeResource(vCTS); + builder = builder.removeResource(Resrc1); assertTrue(builder.getControlLoop().resources.size() == 2); builder = builder.removeAllResources(); assertTrue(builder.getControlLoop().resources.size() == 0); @@ -308,7 +308,7 @@ public class ControlLoopPolicyBuilderTest { Policy triggerPolicy = builder.setTriggerPolicy( "Restart the eNodeB", "Upon getting the trigger event, restart the eNodeB", - "SDNR", + "RANController", new Target(TargetType.PNF), "Restart", null, diff --git a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java index 9e91dc4d3..555b69282 100644 --- a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java +++ b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java @@ -36,54 +36,25 @@ import org.yaml.snakeyaml.constructor.Constructor; public class ControlLoopPolicyTest { - @Test - public void testSDNO() { - this.test("src/test/resources/v1.0.0/policy_SDNO_1702.yaml"); - } @Test public void test() { this.test("src/test/resources/v1.0.0/policy_Test.yaml"); } - - @Test - public void testMultipleService() { - this.test("src/test/resources/v1.0.0/policy_Test_MultipleService.yaml"); - } - - @Test - public void testF5() { - this.test("src/test/resources/v1.0.0/policy_vSCP_F5_1610.yaml"); - } @Test - public void testUSP() { - this.test("src/test/resources/v1.0.0/policy_vUSP_1610.yaml"); + public void testvService1() { + this.test("src/test/resources/v1.0.0/policy_vService.yaml"); } @Test public void testOpenLoop() { - this.test("src/test/resources/v1.0.0/policy_OpenLoop_1610.yaml"); - } - - @Test - public void testvProbes() { - this.test("src/test/resources/v1.0.0/policy_vProbes_1610.yaml"); - } - - @Test - public void test1707() { - this.test("src/test/resources/v2.0.0/policy_vUSP_1707.yaml"); - } - - @Test - public void testeNodeBALU() { - this.test("src/test/resources/v2.0.0/policy_eNodeB_ALU_1707.yaml"); + this.test("src/test/resources/v1.0.0/policy_OpenLoop.yaml"); } @Test - public void testeNodeBEricsson() { - this.test("src/test/resources/v2.0.0/policy_eNodeB_Ericsson_1707.yaml"); + public void testvService2() { + this.test("src/test/resources/v2.0.0/policy_vService.yaml"); } public void test(String testFile) { diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml new file mode 100644 index 000000000..7fd27fa97 --- /dev/null +++ b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml @@ -0,0 +1,12 @@ +controlLoop: + version: 1.0.0 + controlLoopName: ControlLoop-Open-fac4ae3d-c3f5-4bab-8e54-0a8581ede132 + services: + - serviceName: Service + resources: + - resourceType: VF + resourceName: Example + trigger_policy: final_openloop + timeout: 0 + +policies: diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop_1610.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop_1610.yaml deleted file mode 100644 index 7fd27fa97..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_OpenLoop_1610.yaml +++ /dev/null @@ -1,12 +0,0 @@ -controlLoop: - version: 1.0.0 - controlLoopName: ControlLoop-Open-fac4ae3d-c3f5-4bab-8e54-0a8581ede132 - services: - - serviceName: Service - resources: - - resourceType: VF - resourceName: Example - trigger_policy: final_openloop - timeout: 0 - -policies: diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_SDNO_1702.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_SDNO_1702.yaml deleted file mode 100644 index 339950f6f..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_SDNO_1702.yaml +++ /dev/null @@ -1,26 +0,0 @@ -controlLoop: - version: 1.0.0 - controlLoopName: PoloControlLoop-vPE-248b154b-ff3f-458f-885c-ec290c615714 - services: - - serviceName: vPE - trigger_policy: unique-policy-id-1-healthdianostic - timeout: 600 - -policies: - - id: unique-policy-id-1-healthdiagnostic - name: Do SDNO Health Diagnostic - description: - actor: SDNO - recipe: health-diagnostic - payload: - health-diagnostic-code: HC99 - health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" - target: VM - retry: 0 - timeout: 600 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - \ No newline at end of file diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_Test_MultipleService.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_Test_MultipleService.yaml deleted file mode 100644 index 8ce707729..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_Test_MultipleService.yaml +++ /dev/null @@ -1,26 +0,0 @@ -controlLoop: - version: 1.0.0 - controlLoopName: ClosedLoop-FRWL-SIG-d925ed73-8231-4d02-9545-db4e101f88f8 - services: - - serviceName: vSCP - - serviceName: vSBG - resources: - - resourceName: F5FW - resourceType: VF - trigger_policy: unique-policy-id-1-restart - timeout: 1200 - -policies: - - id: unique-policy-id-1-restart - name: Restart Policy - description: - actor: APPC - recipe: Restart - target: VM - retry: 2 - timeout: 300 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vProbes_1610.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vProbes_1610.yaml deleted file mode 100644 index 2a5f513ab..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vProbes_1610.yaml +++ /dev/null @@ -1,24 +0,0 @@ -controlLoop: - version: 1.0.0 - controlLoopName: ControlLoop-vProbes-41aba939-9a93-4535-b193-973c68fc8763 - services: - resources: - - resourceName: vProbes - resourceType: VF - trigger_policy: unique-policy-id-1-restart - timeout: 600 - -policies: - - id: unique-policy-id-1-restart - name: Restart Policy - description: - actor: APPC - recipe: Restart - target: VM - retry: 2 - timeout: 300 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vSCP_F5_1610.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vSCP_F5_1610.yaml deleted file mode 100644 index 7feaecf7e..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vSCP_F5_1610.yaml +++ /dev/null @@ -1,26 +0,0 @@ -controlLoop: - version: 1.0.0 - controlLoopName: ClosedLoop-FRWL-SIG-d925ed73-8231-4d02-9545-db4e101f88f8 - services: - - serviceName: vSCP - - serviceName: trinity - resources: - - resourceName: F5FW - resourceType: VF - trigger_policy: unique-policy-id-1-restart - timeout: 1200 - -policies: - - id: unique-policy-id-1-restart - name: Restart Policy - description: - actor: APPC - recipe: Restart - target: VM - retry: 2 - timeout: 300 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vService.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vService.yaml new file mode 100644 index 000000000..aebde931e --- /dev/null +++ b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vService.yaml @@ -0,0 +1,61 @@ +controlLoop: + version: 1.0.0 + controlLoopName: ControlLoop-vUSP-vCTS-cbed919f-2212-4ef7-8051-fe6308da1bda + services: + - serviceName: vUSP + resources: + - resourceName: vCTS + resourceType: VF + - resourceName: vCOM + resourceType: VF + - resourceName: vRAR + resourceType: VF + - resourceName: vLCS + resourceType: VF + - resourceName: v3CB + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy + description: + actor: APPC + recipe: Restart + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-2-rebuild + failure_timeout: unique-policy-id-2-rebuild + failure_retries: unique-policy-id-2-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-2-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: VM + retry: 0 + timeout: 600 + success: final_success + failure: unique-policy-id-3-migrate + failure_timeout: unique-policy-id-3-migrate + failure_retries: unique-policy-id-3-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-3-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: VM + retry: 0 + timeout: 600 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception diff --git a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vUSP_1610.yaml b/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vUSP_1610.yaml deleted file mode 100644 index aebde931e..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v1.0.0/policy_vUSP_1610.yaml +++ /dev/null @@ -1,61 +0,0 @@ -controlLoop: - version: 1.0.0 - controlLoopName: ControlLoop-vUSP-vCTS-cbed919f-2212-4ef7-8051-fe6308da1bda - services: - - serviceName: vUSP - resources: - - resourceName: vCTS - resourceType: VF - - resourceName: vCOM - resourceType: VF - - resourceName: vRAR - resourceType: VF - - resourceName: vLCS - resourceType: VF - - resourceName: v3CB - resourceType: VF - trigger_policy: unique-policy-id-1-restart - timeout: 1200 - -policies: - - id: unique-policy-id-1-restart - name: Restart Policy - description: - actor: APPC - recipe: Restart - target: VM - retry: 2 - timeout: 300 - success: final_success - failure: unique-policy-id-2-rebuild - failure_timeout: unique-policy-id-2-rebuild - failure_retries: unique-policy-id-2-rebuild - failure_exception: final_failure_exception - - - id: unique-policy-id-2-rebuild - name: Rebuild Policy - description: - actor: APPC - recipe: Rebuild - target: VM - retry: 0 - timeout: 600 - success: final_success - failure: unique-policy-id-3-migrate - failure_timeout: unique-policy-id-3-migrate - failure_retries: unique-policy-id-3-migrate - failure_exception: final_failure_exception - - - id: unique-policy-id-3-migrate - name: Migrate Policy - description: - actor: APPC - recipe: Migrate - target: VM - retry: 0 - timeout: 600 - success: final_success - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception diff --git a/controlloop/common/policy-yaml/src/test/resources/v2.0.0-guard/policy_guard_blacklist.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0-guard/policy_guard_blacklist.yaml new file mode 100644 index 000000000..d413313e7 --- /dev/null +++ b/controlloop/common/policy-yaml/src/test/resources/v2.0.0-guard/policy_guard_blacklist.yaml @@ -0,0 +1,17 @@ +guard: + version: 2.0.0 + +guards: + - id: unique_guard_vService_blacklist + name: APPC Restart Blacklist + description: | + We deny restart of the blacklisted targets (avoid midnight to 5am) + actor: APPC + recipe: Restart + limit_constraints: + - blacklist: + - TargetName1 + - TargetName2 + time_in_range: + arg2: 00:00:00-05:00 + arg3: 23:59:59-05:00 \ No newline at end of file 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 new file mode 100644 index 000000000..5deb8f7ff --- /dev/null +++ b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vDNS.yaml @@ -0,0 +1,47 @@ +controlLoop: + version: 2.0.0 + controlLoopName: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3 + services: + - serviceName: d4738992-6497-4dca-9db9 + serviceInvariantUUID: dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f + serviceUUID: 2eea06c6-e1d3-4c3a-b9c4-478c506eeedf +# +# OPTIONAL to specify the exact resource VF and/or VFC(s) +# +# resources: +# - resourceInvariantUUID: 4b8d4018-068b-4c33-b9bb-d980798e52c2 +# resourceUUID: d7d28881-b24d-4512-bfee-1e2eb335591f +# resourceVersion: '1.0' +# resourceName: 59a2ee3f-b580-45fe-b5a1 +# resourceType: VF +# +# resources: +# - resourceInvariantUUID: ee585c30-127b-492e-b2c1-871dc61d1dde +# resourceUUID: d816cb01-b5d0-4bbb-b614-f7c3e230ab19 +# resourceVersion: '1.0' +# resourceName: 59a2ee3fB58045feB5a1.nodes.heat.vdns +# resourceType: VFC +# - resourceInvariantUUID: f7f1d745-cfb1-4aa9-83fc-31280d0ce513 +# resourceUUID: 1821f13e-411f-4b29-87a5-ae935897b2e1 +# resourceVersion: '1.0' +# resourceName: 59a2ee3fB58045feB5a1.nodes.heat.vlb +# resourceType: VFC + trigger_policy: unique-policy-id-1-scale-up + timeout: 1200 + +policies: + - id: unique-policy-id-1-scale-up + name: Create a new VF Module + description: + actor: MSO + recipe: VF Module Create + target: + resourceID: 59a2ee3fB58045feB5a1.nodes.heat.vdns + retry: 0 + timeout: 1200 + 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vFirewall.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vFirewall.yaml new file mode 100644 index 000000000..51597714c --- /dev/null +++ b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vFirewall.yaml @@ -0,0 +1,58 @@ +controlLoop: + version: 2.0.0 + controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a + services: + - serviceInvariantUUID: 5cfe6f4a-41bc-4247-8674-ebd4b98e35cc + serviceUUID: 0f40bba5-986e-4b3c-803f-ddd1b7b25f24 + serviceName: 57e66ea7-0ed6-45c7-970f +# +# OPTIONAL +# +# IF they want this CL restricted to a particular VFC(s) +# +#resources: +# - resourceInvariantUUID: 06fe411e-d006-4ac3-8b0e-fb4f13cd78d3 +# resourceUUID: 172ce7c5-c2e4-4f8d-b66c-edb49e8e548a +# resourceVersion: '1.0' +# resourceName: eace9331-04d4-43b4-96b8 +# resourceType: VF + +# resources: +# - resourceType: VFC +# resourceInvariantUUID: b19f6643-3db0-4d73-b280-94d6f21caa71 +# resourceUUID: 6dca6eb9-330c-4090-a542-7aca5f446e21 +# resourceVersion: '1.0' +# resourceName: Eace933104d443b496b8.nodes.heat.vsn +# - resourceName: vFW +# resourceType: VFC +# resourceInvariantUUID: 0129e34c-d9fa-442d-bb2c-f925d018000a +# resourceUUID: 7fa1f6c7-c6bd-4444-8db2-63334a5aed1b +# resourceVersion: '1.0' +# resourceName: Eace933104d443b496b8.nodes.heat.vfw +# - resourceType: VFC +# resourceInvariantUUID: 7654ae14-4e98-45bc-a8c0-2c43e1805bb4 +# resourceUUID: 5267d6dd-f676-4f98-abec-6387ce6beaf2 +# resourceVersion: '1.0' +# resourceName: Eace933104d443b496b8.nodes.heat.vpg + trigger_policy: unique-policy-id-1-modifyConfig + timeout: 1200 + +policies: + - id: unique-policy-id-1-modifyConfig + name: Change the Load Balancer + description: + actor: APPC + recipe: ModifyConfig + target: + resourceID: Eace933104d443b496b8.nodes.heat.vpg + payload: + generic-vnf.vnf-id: {generic-vnf.vnf-id} + ref$: pgstreams.json + retry: 0 + timeout: 300 + 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vDNS.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vDNS.yaml deleted file mode 100644 index 5deb8f7ff..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vDNS.yaml +++ /dev/null @@ -1,47 +0,0 @@ -controlLoop: - version: 2.0.0 - controlLoopName: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3 - services: - - serviceName: d4738992-6497-4dca-9db9 - serviceInvariantUUID: dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f - serviceUUID: 2eea06c6-e1d3-4c3a-b9c4-478c506eeedf -# -# OPTIONAL to specify the exact resource VF and/or VFC(s) -# -# resources: -# - resourceInvariantUUID: 4b8d4018-068b-4c33-b9bb-d980798e52c2 -# resourceUUID: d7d28881-b24d-4512-bfee-1e2eb335591f -# resourceVersion: '1.0' -# resourceName: 59a2ee3f-b580-45fe-b5a1 -# resourceType: VF -# -# resources: -# - resourceInvariantUUID: ee585c30-127b-492e-b2c1-871dc61d1dde -# resourceUUID: d816cb01-b5d0-4bbb-b614-f7c3e230ab19 -# resourceVersion: '1.0' -# resourceName: 59a2ee3fB58045feB5a1.nodes.heat.vdns -# resourceType: VFC -# - resourceInvariantUUID: f7f1d745-cfb1-4aa9-83fc-31280d0ce513 -# resourceUUID: 1821f13e-411f-4b29-87a5-ae935897b2e1 -# resourceVersion: '1.0' -# resourceName: 59a2ee3fB58045feB5a1.nodes.heat.vlb -# resourceType: VFC - trigger_policy: unique-policy-id-1-scale-up - timeout: 1200 - -policies: - - id: unique-policy-id-1-scale-up - name: Create a new VF Module - description: - actor: MSO - recipe: VF Module Create - target: - resourceID: 59a2ee3fB58045feB5a1.nodes.heat.vdns - retry: 0 - timeout: 1200 - 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vFirewall.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vFirewall.yaml deleted file mode 100644 index 51597714c..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_OpenECOMP_demo_vFirewall.yaml +++ /dev/null @@ -1,58 +0,0 @@ -controlLoop: - version: 2.0.0 - controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a - services: - - serviceInvariantUUID: 5cfe6f4a-41bc-4247-8674-ebd4b98e35cc - serviceUUID: 0f40bba5-986e-4b3c-803f-ddd1b7b25f24 - serviceName: 57e66ea7-0ed6-45c7-970f -# -# OPTIONAL -# -# IF they want this CL restricted to a particular VFC(s) -# -#resources: -# - resourceInvariantUUID: 06fe411e-d006-4ac3-8b0e-fb4f13cd78d3 -# resourceUUID: 172ce7c5-c2e4-4f8d-b66c-edb49e8e548a -# resourceVersion: '1.0' -# resourceName: eace9331-04d4-43b4-96b8 -# resourceType: VF - -# resources: -# - resourceType: VFC -# resourceInvariantUUID: b19f6643-3db0-4d73-b280-94d6f21caa71 -# resourceUUID: 6dca6eb9-330c-4090-a542-7aca5f446e21 -# resourceVersion: '1.0' -# resourceName: Eace933104d443b496b8.nodes.heat.vsn -# - resourceName: vFW -# resourceType: VFC -# resourceInvariantUUID: 0129e34c-d9fa-442d-bb2c-f925d018000a -# resourceUUID: 7fa1f6c7-c6bd-4444-8db2-63334a5aed1b -# resourceVersion: '1.0' -# resourceName: Eace933104d443b496b8.nodes.heat.vfw -# - resourceType: VFC -# resourceInvariantUUID: 7654ae14-4e98-45bc-a8c0-2c43e1805bb4 -# resourceUUID: 5267d6dd-f676-4f98-abec-6387ce6beaf2 -# resourceVersion: '1.0' -# resourceName: Eace933104d443b496b8.nodes.heat.vpg - trigger_policy: unique-policy-id-1-modifyConfig - timeout: 1200 - -policies: - - id: unique-policy-id-1-modifyConfig - name: Change the Load Balancer - description: - actor: APPC - recipe: ModifyConfig - target: - resourceID: Eace933104d443b496b8.nodes.heat.vpg - payload: - generic-vnf.vnf-id: {generic-vnf.vnf-id} - ref$: pgstreams.json - retry: 0 - timeout: 300 - 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_ALU_1707.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_ALU_1707.yaml deleted file mode 100644 index 9f41f46d9..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_ALU_1707.yaml +++ /dev/null @@ -1,72 +0,0 @@ -controlLoop: - version: 2.0.0 - controlLoopName: ControlLoop-eNodeB-ALU-3ee91181-6f05-4cd3-8437-cad5f58653ca - services: - resources: - pnf: - PNFName: eNodeB.ALU - trigger_policy: unique-policy-id-1-check-aots - timeout: 2400 - -policies: - - id: unique-policy-id-1-check-aots - name: Check AOTS CTS - description: Discard sleeping cell based on the new signature if it appears in recent CTS tickets - actor: AOTS - recipe: checkENodeBTicketHours - payload: - timeWindow: 5 - retry: 2 - timeout: 300 - success: unique-policy-id-2-check-aots-cts - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-2-check-aots-cts - name: Check AOTS CTS Equipment - description: Discard sleeping cell based on the new signature if it is not active in CTS equipment data - actor: AOTS - recipe: checkEquipmentStatus - retry: 2 - timeout: 300 - success: unique-policy-id-3-check-aots-eim - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-3-check-aots-eim - name: Check AOTS EIM_RT - description: Discard sleeping cell based on the new signature if it appears in EIM_RT data - actor: AOTS - recipe: checkEimStatus - retry: 2 - timeout: 300 - success: unique-policy-id-4-sdnr-reset - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-4-sdnr-reset - name: Have SDNR Reset - description: SDNR should now reset this sleeper - actor: SDNR - recipe: Reset - operationsAccumulateParams: - period: 15m - limit: 5 - retry: 2 - timeout: 300 - 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_Ericsson_1707.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_Ericsson_1707.yaml deleted file mode 100644 index 9eff3439d..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_eNodeB_Ericsson_1707.yaml +++ /dev/null @@ -1,86 +0,0 @@ -controlLoop: - version: 2.0.0 - controlLoopName: ControlLoop-eNodeB-Ericsson-0732e76a-4228-42d1-8185-972510be388c - services: - resources: - pnf: - PNFName: eNodeB.Ericsson - trigger_policy: unique-policy-id-1-check-aots-ticket - timeout: 2400 - -policies: - - id: unique-policy-id-1-check-aots-ticket - name: Check AOTS CTS - description: Discard sleeping cell based on the new signature if it appears in recent CTS tickets - actor: AOTS - recipe: checkENodeBTicketHours - payload: - timeWindow: 5 - retry: 2 - timeout: 300 - success: unique-policy-id-2-check-aots-cts - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-2-check-aots-cts - name: Check AOTS CTS Equipment - description: Discard sleeping cell based on the new signature if it is not active in CTS equipment data - actor: AOTS - recipe: checkEquipmentStatus - payload: - retry: 2 - timeout: 300 - success: unique-policy-id-3-check-aots-eim - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-3-check-aots-eim - name: Check AOTS EIM_RT - description: Discard sleeping cell based on the new signature if it appears in EIM_RT data - actor: AOTS - recipe: checkEimStatus - retry: 2 - timeout: 300 - success: unique-policy-id-3-check-aots-maintenance - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-4-check-aots-maintenance - name: Check AOTS MAINTENANCE - description: Discard sleeping cell based on the new signature if it appears in Maintenance - actor: AOTS - recipe: checkMaintenanceWindow - retry: 2 - timeout: 300 - success: unique-policy-id-5-sdnr-reset - failure: final_failure - failure_timeout: final_failure_timeout - failure_retries: final_failure_retries - failure_exception: final_failure_exception - failure_guard: final_failure_guard - - - id: unique-policy-id-5-sdnr-reset - name: Have SDNR Reset - description: SDNR should now reset this sleeper - actor: SDNR - recipe: Reset - operationsAccumulateParams: - period: 15m - limit: 5 - retry: 2 - timeout: 300 - 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml new file mode 100644 index 000000000..b1b03f4ee --- /dev/null +++ b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml @@ -0,0 +1,107 @@ +controlLoop: + version: 2.0.0 + controlLoopName: ControlLoop-vUSP-vCTS-cbed919f-2212-4ef7-8051-fe6308da1bda + services: + - serviceName: vUSP + resources: + - resourceName: vCTS + resourceType: VFC + - resourceName: vCOM + resourceType: VFC + - resourceName: vRAR + resourceType: VFC + - resourceName: vLCS + resourceType: VFC + - resourceName: v3CB + resourceType: VFC + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + abatement: false + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy + description: + actor: APPC + recipe: Restart + target: + type: VM + retry: 2 + timeout: 300 + success: unique-policy-id-1-healthdiagnostic + failure: unique-policy-id-2-rebuild + failure_timeout: unique-policy-id-2-rebuild + failure_retries: unique-policy-id-2-rebuild + failure_exception: final_failure_exception + failure_guard: unique-policy-id-2-rebuild + + - id: unique-policy-id-2-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: + type: VM + retry: 0 + timeout: 600 + success: unique-policy-id-2-healthdiagnostic + failure: unique-policy-id-3-migrate + failure_timeout: unique-policy-id-3-migrate + failure_retries: unique-policy-id-3-migrate + failure_exception: final_failure_exception + failure_guard: unique-policy-id-3-migrate + + - id: unique-policy-id-3-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: + type: VM + retry: 0 + timeout: 600 + 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 + + - id: unique-policy-id-1-healthdiagnostic + name: Do SDNO Health Diagnostic + description: + actor: SDNO + recipe: health-diagnostic + payload: + health-diagnostic-code: HC99 + health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" + target: + type: VM + retry: 0 + timeout: 600 + success: final_success + failure: unique-policy-id-2-rebuild + failure_timeout: unique-policy-id-2-rebuild + failure_retries: unique-policy-id-2-rebuild + failure_exception: final_failure_exception + failure_guard: unique-policy-id-2-rebuild + + - id: unique-policy-id-2-healthdiagnostic + name: Do SDNO Health Diagnostic + description: + actor: SDNO + recipe: health-diagnostic + payload: + health-diagnostic-code: HC99 + health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" + target: + type: VM + retry: 0 + timeout: 600 + 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/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vUSP_1707.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vUSP_1707.yaml deleted file mode 100644 index b1b03f4ee..000000000 --- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vUSP_1707.yaml +++ /dev/null @@ -1,107 +0,0 @@ -controlLoop: - version: 2.0.0 - controlLoopName: ControlLoop-vUSP-vCTS-cbed919f-2212-4ef7-8051-fe6308da1bda - services: - - serviceName: vUSP - resources: - - resourceName: vCTS - resourceType: VFC - - resourceName: vCOM - resourceType: VFC - - resourceName: vRAR - resourceType: VFC - - resourceName: vLCS - resourceType: VFC - - resourceName: v3CB - resourceType: VFC - trigger_policy: unique-policy-id-1-restart - timeout: 1200 - abatement: false - -policies: - - id: unique-policy-id-1-restart - name: Restart Policy - description: - actor: APPC - recipe: Restart - target: - type: VM - retry: 2 - timeout: 300 - success: unique-policy-id-1-healthdiagnostic - failure: unique-policy-id-2-rebuild - failure_timeout: unique-policy-id-2-rebuild - failure_retries: unique-policy-id-2-rebuild - failure_exception: final_failure_exception - failure_guard: unique-policy-id-2-rebuild - - - id: unique-policy-id-2-rebuild - name: Rebuild Policy - description: - actor: APPC - recipe: Rebuild - target: - type: VM - retry: 0 - timeout: 600 - success: unique-policy-id-2-healthdiagnostic - failure: unique-policy-id-3-migrate - failure_timeout: unique-policy-id-3-migrate - failure_retries: unique-policy-id-3-migrate - failure_exception: final_failure_exception - failure_guard: unique-policy-id-3-migrate - - - id: unique-policy-id-3-migrate - name: Migrate Policy - description: - actor: APPC - recipe: Migrate - target: - type: VM - retry: 0 - timeout: 600 - 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 - - - id: unique-policy-id-1-healthdiagnostic - name: Do SDNO Health Diagnostic - description: - actor: SDNO - recipe: health-diagnostic - payload: - health-diagnostic-code: HC99 - health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" - target: - type: VM - retry: 0 - timeout: 600 - success: final_success - failure: unique-policy-id-2-rebuild - failure_timeout: unique-policy-id-2-rebuild - failure_retries: unique-policy-id-2-rebuild - failure_exception: final_failure_exception - failure_guard: unique-policy-id-2-rebuild - - - id: unique-policy-id-2-healthdiagnostic - name: Do SDNO Health Diagnostic - description: - actor: SDNO - recipe: health-diagnostic - payload: - health-diagnostic-code: HC99 - health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" - target: - type: VM - retry: 0 - timeout: 600 - 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 - -- cgit 1.2.3-korg