aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/feature-controlloop-management/src/test/resources
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2018-12-13 10:10:43 -0600
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2018-12-17 09:04:15 -0600
commit5506fd867367e73c8472ee80103243080f208760 (patch)
tree8749b99b06f55670aaece7763134da3806cd4faf /controlloop/common/feature-controlloop-management/src/test/resources
parent07e3b4e48315294a5827e5b5faa38c3ecad831a4 (diff)
Telemetry extension to manage Operational Policies
This is work in progress to directly work with Operational Policies with the casablanca controller for now. It is part of prototyping efforts to enhance the management of control loops, but the functionality can be used in production environments. Change-Id: I4fcb748e162ed38ad4cc4ca22cc4e278fd4c4096 Issue-ID: POLICY-1383 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'controlloop/common/feature-controlloop-management/src/test/resources')
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/op-http.properties5
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/op.drl29
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/op.kmodule26
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/op.pom45
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/settings.xml89
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/vCPE.yaml37
6 files changed, 231 insertions, 0 deletions
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/op-http.properties b/controlloop/common/feature-controlloop-management/src/test/resources/op-http.properties
new file mode 100644
index 000000000..b96c5d133
--- /dev/null
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/op-http.properties
@@ -0,0 +1,5 @@
+http.client.services=op
+
+http.client.services.op.host=localhost
+http.client.services.op.port=9696
+http.client.services.op.contextUriPath=policy/pdp/engine
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/op.drl b/controlloop/common/feature-controlloop-management/src/test/resources/op.drl
new file mode 100644
index 000000000..48ed09929
--- /dev/null
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/op.drl
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP
+ * ================================================================================
+ * Copyright (C) 2018 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=========================================================
+ */
+
+package org.onap.policy.drools.apps.controlloop.feature.management;
+
+import org.onap.policy.controlloop.params.ControlLoopParams;
+
+rule "PARAMS"
+when
+ $params : ControlLoopParams()
+then
+end
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/op.kmodule b/controlloop/common/feature-controlloop-management/src/test/resources/op.kmodule
new file mode 100644
index 000000000..8b49eb6a0
--- /dev/null
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/op.kmodule
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP
+ ================================================================================
+ Copyright (C) 2018 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=========================================================
+ -->
+
+<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">
+ <kbase name="kbop">
+ <ksession name="op"/>
+ </kbase>
+</kmodule> \ No newline at end of file
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/op.pom b/controlloop/common/feature-controlloop-management/src/test/resources/op.pom
new file mode 100644
index 000000000..133387217
--- /dev/null
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/op.pom
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP
+ ================================================================================
+ Copyright (C) 2018 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=========================================================
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <artifactId>model-impl</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.onap.policy.drools.apps.test</groupId>
+ <artifactId>op</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <artifactId>events</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/settings.xml b/controlloop/common/feature-controlloop-management/src/test/resources/settings.xml
new file mode 100644
index 000000000..3d49366bb
--- /dev/null
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/settings.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP
+ ================================================================================
+ Copyright (C) 2018 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=========================================================
+ -->
+
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <profiles>
+
+ <profile>
+ <id>onap-releases</id>
+ <repositories>
+ <repository>
+ <id>onap-releases</id>
+ <name>onap-releases</name>
+ <url>https://nexus.onap.org/content/repositories/releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
+ <id>onap-staging</id>
+ <repositories>
+ <repository>
+ <id>onap-staging</id>
+ <name>onap-staging</name>
+ <url>https://nexus.onap.org/content/repositories/staging/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
+ <id>onap-snapshots</id>
+ <repositories>
+ <repository>
+ <id>onap-snapshots</id>
+ <name>onap-snapshots</name>
+ <url>https://nexus.onap.org/content/repositories/snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>onap-releases</activeProfile>
+ <activeProfile>onap-staging</activeProfile>
+ <activeProfile>onap-snapshots</activeProfile>
+ </activeProfiles>
+
+</settings>
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/vCPE.yaml b/controlloop/common/feature-controlloop-management/src/test/resources/vCPE.yaml
new file mode 100644
index 000000000..9ab15c60e
--- /dev/null
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/vCPE.yaml
@@ -0,0 +1,37 @@
+# Copyright 2018 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.
+
+controlLoop:
+ version: 2.0.0
+ controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ trigger_policy: unique-policy-id-1-restart
+ timeout: 3600
+ abatement: false
+
+policies:
+- id: unique-policy-id-1-restart
+ name: Restart the VM
+ description:
+ actor: APPC
+ recipe: Restart
+ target:
+ type: VM
+ retry: 3
+ 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 \ No newline at end of file