aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/test/resources')
-rw-r--r--controlloop/common/eventmanager/src/test/resources/META-INF/persistence.xml17
-rw-r--r--controlloop/common/eventmanager/src/test/resources/badtriggerpolicy.yaml62
-rw-r--r--controlloop/common/eventmanager/src/test/resources/nopolicy.yaml18
-rw-r--r--controlloop/common/eventmanager/src/test/resources/notutf8.yamlbin0 -> 294 bytes
-rw-r--r--controlloop/common/eventmanager/src/test/resources/string.yaml1
-rw-r--r--controlloop/common/eventmanager/src/test/resources/testSOactor.yaml62
6 files changed, 160 insertions, 0 deletions
diff --git a/controlloop/common/eventmanager/src/test/resources/META-INF/persistence.xml b/controlloop/common/eventmanager/src/test/resources/META-INF/persistence.xml
new file mode 100644
index 000000000..d5fadfffb
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/META-INF/persistence.xml
@@ -0,0 +1,17 @@
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+ <persistence-unit name="TestOperationsHistoryPU" transaction-type="RESOURCE_LOCAL">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+
+ <class>org.onap.policy.whatever.WhatEver</class>
+
+ <properties>
+ <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
+ <property name="javax.persistence.target-database" value="Derby" />
+ <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database"/>
+ <property name="eclipselink.logging.level" value="INFO" />
+ </properties>
+ </persistence-unit>
+</persistence>
diff --git a/controlloop/common/eventmanager/src/test/resources/badtriggerpolicy.yaml b/controlloop/common/eventmanager/src/test/resources/badtriggerpolicy.yaml
new file mode 100644
index 000000000..e263cd5b2
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/badtriggerpolicy.yaml
@@ -0,0 +1,62 @@
+controlLoop:
+ version: 1.0.0
+ controlLoopName: ControlLoop-vService-cbed919f-2212-4ef7-8051-fe6308da1bda
+ services:
+ - serviceName: service1
+ resources:
+ - resourceName: resource1
+ resourceType: VF
+ - resourceName: resource2
+ resourceType: VF
+ - resourceName: resource3
+ resourceType: VF
+ - resourceName: resource4
+ resourceType: VF
+ - resourceName: resource5
+ resourceType: VF
+ trigger_policy: a-policy-that-does-not-exist
+ timeout: 60
+
+policies:
+ - id: unique-policy-id-1-restart
+ name: Restart Policy
+ description:
+ actor: APPC
+ recipe: Restart
+ target:
+ type: VNF
+ retry: 1
+ timeout: 20
+ 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: 10
+ 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: 30
+ 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/eventmanager/src/test/resources/nopolicy.yaml b/controlloop/common/eventmanager/src/test/resources/nopolicy.yaml
new file mode 100644
index 000000000..d3758f3da
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/nopolicy.yaml
@@ -0,0 +1,18 @@
+controlLoop:
+ version: 1.0.0
+ controlLoopName: ControlLoop-vService-cbed919f-2212-4ef7-8051-fe6308da1bda
+ services:
+ - serviceName: service1
+ resources:
+ - resourceName: resource1
+ resourceType: VF
+ - resourceName: resource2
+ resourceType: VF
+ - resourceName: resource3
+ resourceType: VF
+ - resourceName: resource4
+ resourceType: VF
+ - resourceName: resource5
+ resourceType: VF
+ trigger_policy: a-policy-that-does-not-exist
+ timeout: 60
diff --git a/controlloop/common/eventmanager/src/test/resources/notutf8.yaml b/controlloop/common/eventmanager/src/test/resources/notutf8.yaml
new file mode 100644
index 000000000..c2366a1cd
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/notutf8.yaml
Binary files differ
diff --git a/controlloop/common/eventmanager/src/test/resources/string.yaml b/controlloop/common/eventmanager/src/test/resources/string.yaml
new file mode 100644
index 000000000..dc03f8041
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/string.yaml
@@ -0,0 +1 @@
+string: hello
diff --git a/controlloop/common/eventmanager/src/test/resources/testSOactor.yaml b/controlloop/common/eventmanager/src/test/resources/testSOactor.yaml
new file mode 100644
index 000000000..0d5f3b1e2
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/testSOactor.yaml
@@ -0,0 +1,62 @@
+controlLoop:
+ version: 1.0.0
+ controlLoopName: ControlLoop-vService-cbed919f-2212-4ef7-8051-fe6308da1bda
+ services:
+ - serviceName: service1
+ resources:
+ - resourceName: resource1
+ resourceType: VF
+ - resourceName: resource2
+ resourceType: VF
+ - resourceName: resource3
+ resourceType: VF
+ - resourceName: resource4
+ resourceType: VF
+ - resourceName: resource5
+ resourceType: VF
+ trigger_policy: unique-policy-id-1-restart
+ timeout: 60
+
+policies:
+ - id: unique-policy-id-1-restart
+ name: Restart Policy
+ description:
+ actor: SO
+ recipe: Restart
+ target:
+ type: VNF
+ retry: 1
+ timeout: 20
+ 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: SO
+ recipe: Rebuild
+ target: VM
+ retry: 0
+ timeout: 10
+ 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: SO
+ recipe: Migrate
+ target: VM
+ retry: 0
+ timeout: 30
+ success: final_success
+ failure: final_failure
+ failure_timeout: final_failure_timeout
+ failure_retries: final_failure_retries
+ failure_exception: final_failure_exception