aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'runtime-acm/src/main/resources')
-rw-r--r--runtime-acm/src/main/resources/application-stub.yaml6
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.json1
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.yaml1
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json95
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml59
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.json (renamed from runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.json)1
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.yaml (renamed from runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.yaml)1
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.json138
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.yaml93
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.json (renamed from runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.json)1
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.yaml4
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.yaml3
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.json64
-rw-r--r--runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.yaml49
-rw-r--r--runtime-acm/src/main/resources/openapi/openapi.yaml30
15 files changed, 398 insertions, 148 deletions
diff --git a/runtime-acm/src/main/resources/application-stub.yaml b/runtime-acm/src/main/resources/application-stub.yaml
index 39641e39d..3f519a23c 100644
--- a/runtime-acm/src/main/resources/application-stub.yaml
+++ b/runtime-acm/src/main/resources/application-stub.yaml
@@ -13,11 +13,11 @@ stub:
postCommissionResponse: "/openapi/examples/postCommissionCompositionDefinitionsResponse.json"
postCompositionDefinitions: "/openapi/examples/postCompositionDefinitions.json"
postCompositionInstance: "/openapi/examples/postCompositionInstance.json"
- postInstanceResponse: "/openapi/examples/postCompositionInstancesResponse.json"
+ postInstanceResponse: "/openapi/examples/postCompositionInstanceResponse.json"
putCompositionDefinitionUpdate: "/openapi/examples/putCompositionDefinitionUpdate.json"
putCompositionDefinitionUpdateResponse: "/openapi/examples/putCompositionDefinitionUpdateResponse.json"
- putCompositionInstanceUpdate: "/openapi/examples/putCompositionInstanceUpdate.json"
- putCompositionInstanceUpdateResponse: " /openapi/examples/putCompositionInstanceUpdateResponse.json"
+ postCompositionInstanceUpdate: "/openapi/examples/postCompositionInstanceUpdate.json"
+ postCompositionInstanceUpdateResponse: " /openapi/examples/postCompositionInstanceUpdateResponse.json"
diff --git a/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.json b/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.json
index b662bc6b6..eba1c8823 100644
--- a/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.json
+++ b/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.json
@@ -1,4 +1,5 @@
{
+ "instanceId": "caf50cde-11a2-4915-a49c-609762714a6f",
"affectedAutomationComposition": {
"name": "InstanceHttp",
"version": "1.0.1"
diff --git a/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.yaml b/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.yaml
index 1fbca51ac..dc4081ba6 100644
--- a/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.yaml
+++ b/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.yaml
@@ -1,3 +1,4 @@
+instanceId: caf50cde-11a2-4915-a49c-609762714a6f
affectedAutomationComposition:
name: InstanceHttp
version: 1.0.1
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json
index d2886038f..f6715a9cd 100644
--- a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json
@@ -2,8 +2,6 @@
"name": "InstanceHttp",
"version": "1.0.1",
"compositionId": "562ed027-2689-481a-b3a5-e284b1fbc33f",
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
"description": "Demo automation composition instance Http",
"elements": {
"709c62b3-8918-41b9-a747-d21eb79c6c24": {
@@ -20,9 +18,34 @@
"name": "org.onap.policy.clamp.acm.HttpParticipant",
"version": "2.3.4"
},
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
- "description": "Starter Automation Composition Element for the Demo"
+ "description": "Starter Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://10.101.0.249:30800",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.starter",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request1",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
},
"709c62b3-8918-41b9-a747-d21eb79c6c25": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c25",
@@ -38,9 +61,34 @@
"name": "org.onap.policy.clamp.acm.HttpParticipant",
"version": "2.3.4"
},
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
- "description": "Bridge Automation Composition Element for the Demo"
+ "description": "Bridge Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://10.101.0.249:30801",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.bridge",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request2",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
},
"709c62b3-8918-41b9-a747-d21eb79c6c23": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
@@ -56,9 +104,34 @@
"name": "org.onap.policy.clamp.acm.HttpParticipant",
"version": "2.3.4"
},
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
- "description": "Sink Automation Composition Element for the Demo"
+ "description": "Sink Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://10.101.0.249:30802",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.sink",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request3",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"message-router\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
}
}
}
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml
index 96111aa35..9e006ecc1 100644
--- a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml
@@ -1,8 +1,6 @@
name: InstanceHttp
version: 1.0.1
compositionId: 562ed027-2689-481a-b3a5-e284b1fbc33f
-state: UNINITIALISED
-orderedState: UNINITIALISED
description: Demo automation composition instance Http
elements:
709c62b3-8918-41b9-a747-d21eb79c6c24:
@@ -16,9 +14,24 @@ elements:
participantType:
name: org.onap.policy.clamp.acm.HttpParticipant
version: 2.3.4
- state: UNINITIALISED
- orderedState: UNINITIALISED
description: Starter Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://10.101.0.249:30800
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.starter
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request1
+ version: 1.0.1
+ httpMethod: POST
+ path: /activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 20000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+ expectedResponse: 201
709c62b3-8918-41b9-a747-d21eb79c6c25:
id: 709c62b3-8918-41b9-a747-d21eb79c6c25
definition:
@@ -30,9 +43,24 @@ elements:
participantType:
name: org.onap.policy.clamp.acm.HttpParticipant
version: 2.3.4
- state: UNINITIALISED
- orderedState: UNINITIALISED
description: Bridge Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://10.101.0.249:30801
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.bridge
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request2
+ version: 1.0.1
+ httpMethod: POST
+ path: /activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridgetosink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+ expectedResponse: 201
709c62b3-8918-41b9-a747-d21eb79c6c23:
id: 709c62b3-8918-41b9-a747-d21eb79c6c23
definition:
@@ -44,6 +72,21 @@ elements:
participantType:
name: org.onap.policy.clamp.acm.HttpParticipant
version: 2.3.4
- state: UNINITIALISED
- orderedState: UNINITIALISED
description: Sink Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://10.101.0.249:30802
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.sink
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request3
+ version: 1.0.1
+ httpMethod: POST
+ path: /activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+ expectedResponse: 201
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.json b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.json
index b662bc6b6..d3b975b59 100644
--- a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.json
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.json
@@ -1,4 +1,5 @@
{
+ "instanceId": "2d6dafe7-2662-4c4e-8f60-6c8ee360d2d3",
"affectedAutomationComposition": {
"name": "InstanceHttp",
"version": "1.0.1"
diff --git a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.yaml b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.yaml
index 1fbca51ac..951536ed8 100644
--- a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.yaml
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceResponse.yaml
@@ -1,3 +1,4 @@
+instanceId: 2d6dafe7-2662-4c4e-8f60-6c8ee360d2d3
affectedAutomationComposition:
name: InstanceHttp
version: 1.0.1
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.json b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.json
new file mode 100644
index 000000000..7800d1f29
--- /dev/null
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.json
@@ -0,0 +1,138 @@
+{
+ "name": "InstanceHttp",
+ "version": "1.0.1",
+ "compositionId": "562ed027-2689-481a-b3a5-e284b1fbc33f",
+ "instanceId": "caf50cde-11a2-4915-a49c-609762714a6f",
+ "description": "Demo automation composition instance Http",
+ "elements": {
+ "709c62b3-8918-41b9-a747-d21eb79c6c24": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c24",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "participantId": {
+ "name": "HttpParticipant0",
+ "version": "1.0.0"
+ },
+ "participantType": {
+ "name": "org.onap.policy.clamp.acm.HttpParticipant",
+ "version": "2.3.4"
+ },
+ "description": "Starter Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://10.101.0.249:30800",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.starter",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request1",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c25": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c25",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "participantId": {
+ "name": "HttpParticipant0",
+ "version": "1.0.0"
+ },
+ "participantType": {
+ "name": "org.onap.policy.clamp.acm.HttpParticipant",
+ "version": "2.3.4"
+ },
+ "description": "Bridge Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://10.101.0.249:30801",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.bridge",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request2",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c23": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "participantId": {
+ "name": "HttpParticipant0",
+ "version": "1.0.0"
+ },
+ "participantType": {
+ "name": "org.onap.policy.clamp.acm.HttpParticipant",
+ "version": "2.3.4"
+ },
+ "description": "Sink Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://10.101.0.249:30802",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.sink",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request3",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"message-router\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.yaml b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.yaml
new file mode 100644
index 000000000..ab1409c7a
--- /dev/null
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.yaml
@@ -0,0 +1,93 @@
+name: InstanceHttp
+version: 1.0.1
+compositionId: 562ed027-2689-481a-b3a5-e284b1fbc33f
+instanceId: caf50cde-11a2-4915-a49c-609762714a6f
+description: Demo automation composition instance Http
+elements:
+ 709c62b3-8918-41b9-a747-d21eb79c6c24:
+ id: 709c62b3-8918-41b9-a747-d21eb79c6c24
+ definition:
+ name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement
+ version: 1.2.3
+ participantId:
+ name: HttpParticipant0
+ version: 1.0.0
+ participantType:
+ name: org.onap.policy.clamp.acm.HttpParticipant
+ version: 2.3.4
+ description: Starter Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://10.101.0.249:30800
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.starter
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request1
+ version: 1.0.1
+ httpMethod: POST
+ path: /activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 20000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+ expectedResponse: 201
+ 709c62b3-8918-41b9-a747-d21eb79c6c25:
+ id: 709c62b3-8918-41b9-a747-d21eb79c6c25
+ definition:
+ name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement
+ version: 1.2.3
+ participantId:
+ name: HttpParticipant0
+ version: 1.0.0
+ participantType:
+ name: org.onap.policy.clamp.acm.HttpParticipant
+ version: 2.3.4
+ description: Bridge Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://10.101.0.249:30801
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.bridge
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request2
+ version: 1.0.1
+ httpMethod: POST
+ path: /activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridgetosink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+ expectedResponse: 201
+ 709c62b3-8918-41b9-a747-d21eb79c6c23:
+ id: 709c62b3-8918-41b9-a747-d21eb79c6c23
+ definition:
+ name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement
+ version: 1.2.3
+ participantId:
+ name: HttpParticipant0
+ version: 1.0.0
+ participantType:
+ name: org.onap.policy.clamp.acm.HttpParticipant
+ version: 2.3.4
+ description: Sink Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://10.101.0.249:30802
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.sink
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request3
+ version: 1.0.1
+ httpMethod: POST
+ path: /activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+ expectedResponse: 201
diff --git a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.json b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.json
index b662bc6b6..eba1c8823 100644
--- a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.json
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.json
@@ -1,4 +1,5 @@
{
+ "instanceId": "caf50cde-11a2-4915-a49c-609762714a6f",
"affectedAutomationComposition": {
"name": "InstanceHttp",
"version": "1.0.1"
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.yaml b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.yaml
new file mode 100644
index 000000000..937cf94e9
--- /dev/null
+++ b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdateResponse.yaml
@@ -0,0 +1,4 @@
+instanceId: caf50cde-11a2-4915-a49c-609762714a6f
+affectedAutomationComposition:
+ name: InstanceHttp
+ version: 1.0.1 \ No newline at end of file
diff --git a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.yaml b/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.yaml
deleted file mode 100644
index 1fbca51ac..000000000
--- a/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-affectedAutomationComposition:
- name: InstanceHttp
- version: 1.0.1
diff --git a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.json b/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.json
deleted file mode 100644
index 2b3d96896..000000000
--- a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "name": "InstanceHttp",
- "version": "1.0.1",
- "compositionId": "562ed027-2689-481a-b3a5-e284b1fbc33f",
- "state": "UNINITIALISED",
- "orderedState": "PASSIVE",
- "description": "Demo automation composition instance Http",
- "elements": {
- "709c62b3-8918-41b9-a747-d21eb79c6c24": {
- "id": "709c62b3-8918-41b9-a747-d21eb79c6c24",
- "definition": {
- "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
- "version": "1.2.3"
- },
- "participantId": {
- "name": "HttpParticipant0",
- "version": "1.0.0"
- },
- "participantType": {
- "name": "org.onap.policy.clamp.acm.HttpParticipant",
- "version": "2.3.4"
- },
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
- "description": "Starter Automation Composition Element for the Demo"
- },
- "709c62b3-8918-41b9-a747-d21eb79c6c25": {
- "id": "709c62b3-8918-41b9-a747-d21eb79c6c25",
- "definition": {
- "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
- "version": "1.2.3"
- },
- "participantId": {
- "name": "HttpParticipant0",
- "version": "1.0.0"
- },
- "participantType": {
- "name": "org.onap.policy.clamp.acm.HttpParticipant",
- "version": "2.3.4"
- },
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
- "description": "Bridge Automation Composition Element for the Demo"
- },
- "709c62b3-8918-41b9-a747-d21eb79c6c23": {
- "id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
- "definition": {
- "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
- "version": "1.2.3"
- },
- "participantId": {
- "name": "HttpParticipant0",
- "version": "1.0.0"
- },
- "participantType": {
- "name": "org.onap.policy.clamp.acm.HttpParticipant",
- "version": "2.3.4"
- },
- "state": "UNINITIALISED",
- "orderedState": "UNINITIALISED",
- "description": "Sink Automation Composition Element for the Demo"
- }
- }
-}
diff --git a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.yaml b/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.yaml
deleted file mode 100644
index 3628c6340..000000000
--- a/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdate.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
-name: InstanceHttp
-version: 1.0.1
-compositionId: 562ed027-2689-481a-b3a5-e284b1fbc33f
-state: UNINITIALISED
-orderedState: PASSIVE
-description: Demo automation composition instance Http
-elements:
- 709c62b3-8918-41b9-a747-d21eb79c6c24:
- id: 709c62b3-8918-41b9-a747-d21eb79c6c24
- definition:
- name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement
- version: 1.2.3
- participantId:
- name: HttpParticipant0
- version: 1.0.0
- participantType:
- name: org.onap.policy.clamp.acm.HttpParticipant
- version: 2.3.4
- state: UNINITIALISED
- orderedState: UNINITIALISED
- description: Starter Automation Composition Element for the Demo
- 709c62b3-8918-41b9-a747-d21eb79c6c25:
- id: 709c62b3-8918-41b9-a747-d21eb79c6c25
- definition:
- name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement
- version: 1.2.3
- participantId:
- name: HttpParticipant0
- version: 1.0.0
- participantType:
- name: org.onap.policy.clamp.acm.HttpParticipant
- version: 2.3.4
- state: UNINITIALISED
- orderedState: UNINITIALISED
- description: Bridge Automation Composition Element for the Demo
- 709c62b3-8918-41b9-a747-d21eb79c6c23:
- id: 709c62b3-8918-41b9-a747-d21eb79c6c23
- definition:
- name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement
- version: 1.2.3
- participantId:
- name: HttpParticipant0
- version: 1.0.0
- participantType:
- name: org.onap.policy.clamp.acm.HttpParticipant
- version: 2.3.4
- state: UNINITIALISED
- orderedState: UNINITIALISED
- description: Sink Automation Composition Element for the Demo
diff --git a/runtime-acm/src/main/resources/openapi/openapi.yaml b/runtime-acm/src/main/resources/openapi/openapi.yaml
index 076007c57..42ddd8cd1 100644
--- a/runtime-acm/src/main/resources/openapi/openapi.yaml
+++ b/runtime-acm/src/main/resources/openapi/openapi.yaml
@@ -1073,14 +1073,14 @@ paths:
post:
tags:
- Automation Composition Instance
- summary: Create automation composition instance
- description: Creates automation composition instance that use the sepcified automation composition definition. The ID of the created
- automation composition instance is returned.
+ summary: Create or Update automation composition instance
+ description: Creates or updates an automation composition instance that uses the specified automation composition definition. The ID of the created
+ automation composition instance is returned. In the case of an update, the instanceId should be included in the request body.
operationId: createCompositionInstance
parameters:
- name : compositionId
in: path
- description: The UUID of the automation composition definition on which to create instance
+ description: The UUID of the automation composition definition on which to create/update instance
required: true
schema:
type: string
@@ -1094,24 +1094,34 @@ paths:
requestBody:
description: Serialised instance of
[AutomationComposition](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationComposition.java)
- containing a automation composition instance to create
+ containing a automation composition instance to create/update
content:
application/json:
schema:
$ref: '#/components/schemas/AutomationComposition'
- example:
- externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json'
+ examples:
+ createValue:
+ name: create
+ value: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json'
+ updateValue:
+ name: update
+ value: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.json'
application/yaml:
schema:
$ref: '#/components/schemas/AutomationComposition'
- example:
- externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml'
+ examples:
+ createValue:
+ name: create
+ value: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml'
+ updateValue:
+ name: update
+ value: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstanceUpdate.yaml'
required: true
responses:
201:
description: Serialised instance of
[InstantiationResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationResponse.java)
- containing the UUID of the created automation composition instance
+ containing the UUID of the created/updated automation composition instance
headers:
X-LatestVersion:
$ref: '#/components/headers/X-LatestVersion'