aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/org/onap/policy/api/main/startstop/ApiDatabaseInitializer.java1
-rw-r--r--main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.Blacklist.json2
-rw-r--r--main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.FrequencyLimiter.json2
-rw-r--r--main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.MinMax.json2
-rw-r--r--main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.json38
-rw-r--r--main/src/test/java/org/onap/policy/api/main/startstop/TestApiCommandLineArguments.java2
6 files changed, 43 insertions, 4 deletions
diff --git a/main/src/main/java/org/onap/policy/api/main/startstop/ApiDatabaseInitializer.java b/main/src/main/java/org/onap/policy/api/main/startstop/ApiDatabaseInitializer.java
index 27fc83a8..ad82d4bb 100644
--- a/main/src/main/java/org/onap/policy/api/main/startstop/ApiDatabaseInitializer.java
+++ b/main/src/main/java/org/onap/policy/api/main/startstop/ApiDatabaseInitializer.java
@@ -64,6 +64,7 @@ public class ApiDatabaseInitializer {
"preloadedPolicyTypes/onap.policies.controlloop.guard.Blacklist.json",
"preloadedPolicyTypes/onap.policies.controlloop.guard.FrequencyLimiter.json",
"preloadedPolicyTypes/onap.policies.controlloop.guard.MinMax.json",
+ "preloadedPolicyTypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.json",
"preloadedPolicyTypes/onap.policies.controlloop.Operational.json"
};
diff --git a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.Blacklist.json b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.Blacklist.json
index 9391496c..cc59ca4b 100644
--- a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.Blacklist.json
+++ b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.Blacklist.json
@@ -37,7 +37,7 @@
},
"recipe": {
"type": "string",
- "description": "Specified the Recipe",
+ "description": "Specifies the Recipe",
"required": true
},
"time_range": {
diff --git a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.FrequencyLimiter.json b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.FrequencyLimiter.json
index 598bd3c7..d0e50b74 100644
--- a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.FrequencyLimiter.json
+++ b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.FrequencyLimiter.json
@@ -37,7 +37,7 @@
},
"recipe": {
"type": "string",
- "description": "Specified the Recipe",
+ "description": "Specifies the Recipe",
"required": true
},
"time_window": {
diff --git a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.MinMax.json b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.MinMax.json
index 71658dd4..c9ea671b 100644
--- a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.MinMax.json
+++ b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.MinMax.json
@@ -36,7 +36,7 @@
},
"recipe": {
"type": "string",
- "description": "Specified the Recipe",
+ "description": "Specifies the Recipe",
"required": true
},
"time_range": {
diff --git a/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.json b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.json
new file mode 100644
index 00000000..43539d02
--- /dev/null
+++ b/main/src/main/resources/preloadedPolicyTypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.json
@@ -0,0 +1,38 @@
+{
+ "policy_types": [
+ {
+ "onap.policies.controlloop.Guard": {
+ "derived_from": "tosca.policies.Root",
+ "version": "1.0.0",
+ "description": "Guard Policies for Control Loop Operational Policies"
+ }
+ },
+ {
+ "onap.policies.controlloop.guard.Coordination": {
+ "derived_from": "onap.policies.controlloop.Guard",
+ "version": "1.0.0",
+ "description": "Guard Policies for Control Loop Coordination"
+ }
+ },
+ {
+ "onap.policies.controlloop.guard.coordination.FirstBlocksSecond": {
+ "derived_from": "onap.policies.controlloop.guard.Coordination",
+ "version": "1.0.0",
+ "description": "Supports one Control Loop blocking another",
+ "properties": {
+ "controlLoop": {
+ "type": "list",
+ "description": "Specific Control Loops to which to apply this guard",
+ "required": true,
+ "constraint": {
+ "length": 2
+ },
+ "entry_schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/main/src/test/java/org/onap/policy/api/main/startstop/TestApiCommandLineArguments.java b/main/src/test/java/org/onap/policy/api/main/startstop/TestApiCommandLineArguments.java
index 73503694..bf728dd5 100644
--- a/main/src/test/java/org/onap/policy/api/main/startstop/TestApiCommandLineArguments.java
+++ b/main/src/test/java/org/onap/policy/api/main/startstop/TestApiCommandLineArguments.java
@@ -43,7 +43,7 @@ public class TestApiCommandLineArguments {
@Test(expected = PolicyApiRuntimeException.class)
public void testApiCommandLineArgumentsStringArray() {
String [] args = {"---d"};
- ApiCommandLineArguments apiCmdArgs1 = new ApiCommandLineArguments(args);
+ new ApiCommandLineArguments(args);
}
@Test