aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml70
-rw-r--r--pom.xml28
2 files changed, 70 insertions, 28 deletions
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
index b1b03f4ee..d679e0773 100644
--- 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
@@ -1,24 +1,34 @@
controlLoop:
version: 2.0.0
- controlLoopName: ControlLoop-vUSP-vCTS-cbed919f-2212-4ef7-8051-fe6308da1bda
- services:
- - serviceName: vUSP
- resources:
- - resourceName: vCTS
+ controlLoopName: ControlLoop-GENERIC-64cdc9fa-6601-4989-9de7-8f47134aa043
+ #
+ # Example of how someone can fine-grain this
+ # policy for a specific service and/or resources
+ # contained within the service.
+ #
+ services:
+ - serviceName: vFooService
+
+ resources:
+ - resourceName: vVNF1
resourceType: VFC
- - resourceName: vCOM
+ - resourceName: vVNF2
resourceType: VFC
- - resourceName: vRAR
+ - resourceName: vVNF3
resourceType: VFC
- - resourceName: vLCS
- resourceType: VFC
- - resourceName: v3CB
+ - resourceName: vVNF4
resourceType: VFC
+
trigger_policy: unique-policy-id-1-restart
timeout: 1200
+ #
+ # Example of case where an abatement isn't possible
+ # from DCAE to Policy. So Policy should NOT expect
+ #
abatement: false
-
+
policies:
+
- id: unique-policy-id-1-restart
name: Restart Policy
description:
@@ -34,14 +44,15 @@ policies:
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
+ type: VM
retry: 0
timeout: 600
success: unique-policy-id-2-healthdiagnostic
@@ -50,13 +61,13 @@ policies:
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:
+ target:
type: VM
retry: 0
timeout: 600
@@ -66,17 +77,18 @@ policies:
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
+ name: Do A Health Diagnostic
description:
- actor: SDNO
+ actor: APPC
recipe: health-diagnostic
- payload:
- health-diagnostic-code: HC99
+ # Example of a payload
+ payload:
+ health-diagnostic-code: HC01234
health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
- target:
- type: VM
+ target:
+ type: VM
retry: 0
timeout: 600
success: final_success
@@ -85,15 +97,16 @@ policies:
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
+ name: Do Health Diagnostic
description:
- actor: SDNO
+ actor: APPC
recipe: health-diagnostic
- payload:
- health-diagnostic-code: HC99
- health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
+ payload:
+ health-diagnostic-code: HC01234
+ health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
target:
type: VM
retry: 0
@@ -104,4 +117,5 @@ policies:
failure_retries: final_failure_retries
failure_exception: final_failure_exception
failure_guard: final_failure_guard
+
diff --git a/pom.xml b/pom.xml
index 5d5d5d617..35d341050 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,6 +203,34 @@
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <versionRange>2.17,)</versionRange>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<modules>