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.xml2
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-multi.yaml68
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-simple.yaml34
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventService/event-svc-guard-disabled.properties23
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventService/event-svc-http-client.properties24
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventService/event-svc-invalid-db.properties29
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventService/event-svc-no-guard-actor.properties25
-rw-r--r--controlloop/common/eventmanager/src/test/resources/eventService/event-svc-with-db.properties27
8 files changed, 231 insertions, 1 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
index 07dafecbb..4d47751bf 100644
--- a/controlloop/common/eventmanager/src/test/resources/META-INF/persistence.xml
+++ b/controlloop/common/eventmanager/src/test/resources/META-INF/persistence.xml
@@ -29,7 +29,7 @@
<properties>
<property name="eclipselink.ddl-generation" value="create-tables" />
- <property name="eclipselink.logging.level" value="FINE" />
+ <property name="eclipselink.logging.level" value="INFO" />
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE" />
diff --git a/controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-multi.yaml b/controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-multi.yaml
new file mode 100644
index 000000000..7acf02159
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-multi.yaml
@@ -0,0 +1,68 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+topology_template:
+ policies:
+ - operational.activity:
+ type: onap.policies.controlloop.operational.common.Drools
+ type_version: 1.0.0
+ version: 1.0.0
+ metadata:
+ policy-id: operational.activity
+ policy-version: 1.0.0
+ properties:
+ id: ControlLoop-event-mgr
+ timeout: 1200
+ abatement: false
+ trigger: first-operation
+ operations:
+ - id: first-operation
+ description: First action
+ operation:
+ actor: First
+ operation: OperationA
+ target:
+ targetType: VNF
+ entityIds:
+ resourceID: bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38
+ timeout: 300
+ retries: 0
+ success: second-operation
+ failure: final_failure
+ failure_timeout: final_failure_timeout
+ failure_retries: final_failure_retries
+ failure_exception: final_failure_exception
+ failure_guard: final_failure_guard
+ - id: second-operation
+ description: Second action
+ operation:
+ actor: Second
+ operation: OperationB
+ target:
+ targetType: VNF
+ entityIds:
+ resourceID: bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38
+ timeout: 300
+ retries: 0
+ success: third-operation
+ failure: final_failure
+ failure_timeout: final_failure_timeout
+ failure_retries: final_failure_retries
+ failure_exception: final_failure_exception
+ failure_guard: final_failure_guard
+ - id: third-operation
+ description: Third action
+ operation:
+ actor: Third
+ operation: OperationC
+ target:
+ targetType: VNF
+ entityIds:
+ resourceID: bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38
+ timeout: 300
+ 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
+ controllerName: usecases \ No newline at end of file
diff --git a/controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-simple.yaml b/controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-simple.yaml
new file mode 100644
index 000000000..c8b6db039
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventManager/event-mgr-simple.yaml
@@ -0,0 +1,34 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+topology_template:
+ policies:
+ - operational.activity:
+ type: onap.policies.controlloop.operational.common.Drools
+ type_version: 1.0.0
+ version: 1.0.0
+ metadata:
+ policy-id: operational.activity
+ policy-version: 1.0.0
+ properties:
+ id: ControlLoop-event-mgr
+ timeout: 1200
+ abatement: false
+ trigger: first-operation
+ operations:
+ - id: first-operation
+ description: First action
+ operation:
+ actor: First
+ operation: OperationA
+ target:
+ targetType: VNF
+ entityIds:
+ resourceID: bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38
+ timeout: 300
+ 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_openloop
+ controllerName: usecases \ No newline at end of file
diff --git a/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-guard-disabled.properties b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-guard-disabled.properties
new file mode 100644
index 000000000..65f6c0cc1
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-guard-disabled.properties
@@ -0,0 +1,23 @@
+#
+# ============LICENSE_START======================================================
+# ONAP
+# ===============================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ===============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END========================================================
+#
+
+actor.service.GUARD.disabled=true
+actor.service.GUARD.clientName=guard-client
+actor.service.GUARD.operations.Decision.path=decide
diff --git a/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-http-client.properties b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-http-client.properties
new file mode 100644
index 000000000..a563afdc3
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-http-client.properties
@@ -0,0 +1,24 @@
+#
+# ============LICENSE_START======================================================
+# ONAP
+# ===============================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ===============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END========================================================
+#
+
+http.client.services=guard-client
+http.client.services.guard-client.host=localhost
+http.client.services.guard-client.port=80
+http.client.services.guard-client.managed=true
diff --git a/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-invalid-db.properties b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-invalid-db.properties
new file mode 100644
index 000000000..59b0615b0
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-invalid-db.properties
@@ -0,0 +1,29 @@
+#
+# ============LICENSE_START======================================================
+# ONAP
+# ===============================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ===============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END========================================================
+#
+
+#actor.service.GUARD.disabled=true
+actor.service.GUARD.clientName=guard-client
+actor.service.GUARD.operations.Decision.path=decide
+
+# purposely missing the URL
+#operation.history.url=jdbc:h2:mem:EventManagerServicesTest
+
+operation.history.userName=sa
+operation.history.password=
diff --git a/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-no-guard-actor.properties b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-no-guard-actor.properties
new file mode 100644
index 000000000..027f824e8
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-no-guard-actor.properties
@@ -0,0 +1,25 @@
+#
+# ============LICENSE_START======================================================
+# ONAP
+# ===============================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ===============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END========================================================
+#
+
+# all GUARD properties are commented out on purpose
+
+#actor.service.GUARD.disabled=true
+#actor.service.GUARD.clientName=guard-client
+#actor.service.GUARD.operations.Decision.path=decide
diff --git a/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-with-db.properties b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-with-db.properties
new file mode 100644
index 000000000..6e003f6d6
--- /dev/null
+++ b/controlloop/common/eventmanager/src/test/resources/eventService/event-svc-with-db.properties
@@ -0,0 +1,27 @@
+#
+# ============LICENSE_START======================================================
+# ONAP
+# ===============================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ===============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END========================================================
+#
+
+#actor.service.GUARD.disabled=true
+actor.service.GUARD.clientName=guard-client
+actor.service.GUARD.operations.Decision.path=decide
+
+operation.history.url=jdbc:h2:mem:EventManagerServicesTest
+operation.history.userName=sa
+operation.history.password=