- apex-pdp
- kafka
- jaeger
- - policy-clamp-ac-pf-ppnt-replica
+ - policy-clamp-ac-pf-ppnt
- policy-clamp-ac-sim-ppnt-1
- policy-clamp-ac-sim-ppnt-2
expose:
'-c', 'java -jar /app/app.jar',
'apex-pdp', '6969',
'kafka', '9092',
- 'policy-clamp-ac-pf-ppnt-replica', '6969',
+ 'policy-clamp-ac-pf-ppnt', '6969',
'policy-clamp-ac-sim-ppnt-1', '6969',
'policy-clamp-ac-sim-ppnt-2', '6969',
]
type: map
description: The configuration entities the Automation Composition Element is managing and their associated REST requests
+ org.onap.policy.clamp.acm.SimAutomationCompositionElement2:
+ version: 1.0.0
+ derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+ properties:
+ baseUrl:
+ type: string
+ required: true
+ description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+ metadata:
+ sensitive: true
+ httpHeaders:
+ type: map
+ required: false
+ entry_schema:
+ type: string
+ description: HTTP headers to send on REST requests
+ configurationEntities:
+ type: map
+ required: true
+ entry_schema:
+ type: map
+ description: The configuration entities the Automation Composition Element is managing and their associated REST requests
+
topology_template:
node_templates:
prepare: [0,2]
migrate: [0,2]
+ onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement:
+ version: 1.2.3
+ type: org.onap.policy.clamp.acm.SimAutomationCompositionElement2
+ type_version: 1.0.0
+ description: Automation composition element for the http requests of AC Element Sink microservice
+ properties:
+ provider: ONAP
+ startPhase: 0
+ stage:
+ prepare: [ 0,3 ]
+ migrate: [ 0,3 ]
+
onap.policy.clamp.ac.element.AutomationCompositionDefinition:
version: 1.2.3
type: org.onap.policy.clamp.acm.AutomationComposition
version: 1.2.3
- name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
version: 1.2.3
+ - name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+ version: 1.2.3
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
myParameterToUpdate: text
+
+ 709c62b3-8918-41b9-a747-d21eb79c6c38:
+ id: 709c62b3-8918-41b9-a747-d21eb79c6c38
+ definition:
+ name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+ version: 1.2.3
+ description: Sink Automation Composition Element for the Demo
+ properties:
+ baseUrl: http://address:30803
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.sink2
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request4
+ version: 1.0.1
+ httpMethod: POST
+ path: /onap/policy/clamp/acelement/v2/activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink2", "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
+ myParameterToUpdate: TEXTPLACEHOLDER
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
myParameterToUpdate: TEXTPLACEHOLDER
+
+ 709c62b3-8918-41b9-a747-d21eb79c6c38:
+ id: 709c62b3-8918-41b9-a747-d21eb79c6c38
+ definition:
+ name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+ version: 1.2.3
+ description: Sink Automation Composition Element for the Demo
+ properties:
+ deployTimeoutMs: 200000
+ undeployTimeoutMs: 150000
+ updateTimeoutMs: 200000
+ migrateTimeoutMs: 200000
+ deleteTimeoutMs: 100000
+ baseUrl: http://address:30803
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.sink2
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request4
+ version: 1.0.1
+ httpMethod: POST
+ path: /onap/policy/clamp/acelement/v2/activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink2", "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
+ myParameterToUpdate: TEXTPLACEHOLDER
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
myParameterToUpdate: text
+
+ 709c62b3-8918-41b9-a747-d21eb79c6c38:
+ id: 709c62b3-8918-41b9-a747-d21eb79c6c38
+ definition:
+ name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+ version: 1.2.3
+ description: Sink Automation Composition Element for the Demo
+ properties:
+ deployTimeoutMs: 200
+ undeployTimeoutMs: 150
+ updateTimeoutMs: 200
+ migrateTimeoutMs: 200
+ deleteTimeoutMs: 100
+ baseUrl: http://address:30803
+ httpHeaders:
+ Content-Type: application/json
+ Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+ configurationEntities:
+ - configurationEntityId:
+ name: onap.policy.clamp.ac.sink2
+ version: 1.0.0
+ restSequence:
+ - restRequestId:
+ name: request4
+ version: 1.0.1
+ httpMethod: POST
+ path: /onap/policy/clamp/acelement/v2/activate
+ body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink2", "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
+ myParameterToUpdate: TEXTPLACEHOLDER
${postjson}= Get file ${CURDIR}/data/${instantiationfile}
${tmpInstanceId}= MakeJsonInstantiateAutomationComposition ${compositionId} ${postjson}
DeleteAutomationComposition ${compositionId} ${tmpInstanceId}
- Wait Until Keyword Succeeds 2 min 5 sec VerifyUninstantiated ${compositionId}
+ Wait Until Keyword Succeeds 3 min 5 sec VerifyUninstantiated ${compositionId}
InstantiateAutomationComposition
[Documentation] Instantiate automation composition.
DeployAutomationCompositionTimeout
[Documentation] Deploy automation composition timeout.
SetParticipantSimTimeout
+ SetParticipantSim2Timeout
${postjson}= Get file ${CURDIR}/data/DeployAC.json
ChangeStatusAutomationComposition ${compositionFromId} ${instanceTimeoutId} ${postjson}
Wait Until Keyword Succeeds 5 min 5 sec VerifyStateChangeResult ${compositionFromId} ${instanceTimeoutId} TIMEOUT
DeleteAutomationCompositionTimeout
[Documentation] Delete automation composition timeout.
SetParticipantSimSuccess
+ SetParticipantSim2Success
UndeployAndDeleteAutomationComposition ${compositionFromId} ${instanceTimeoutId}
InstantiateAutomationCompositionMigrationFrom
FailPrepareAutomationCompositionMigrationFrom
[Documentation] Fail Prepare automation composition migration.
SetParticipantSimFail
+ SetParticipantSim2Fail
${postjson}= Get file ${CURDIR}/data/PrepareAC.json
ChangeStatusAutomationComposition ${compositionFromId} ${instanceMigrationId} ${postjson}
Wait Until Keyword Succeeds 2 min 5 sec VerifyStateChangeResult ${compositionFromId} ${instanceMigrationId} FAILED
PrepareAutomationCompositionMigrationFrom
[Documentation] Prepare automation composition migration.
SetParticipantSimSuccess
+ SetParticipantSim2Success
${postjson}= Get file ${CURDIR}/data/PrepareAC.json
ChangeStatusAutomationComposition ${compositionFromId} ${instanceMigrationId} ${postjson}
Wait Until Keyword Succeeds 10 min 5 sec VerifySubStatus ${compositionFromId} ${instanceMigrationId}
VerifyParticipantSim ${instanceMigrationId} TextForMigration
VerifyMigratedElementsRuntime ${compositionToId} ${instanceMigrationId}
VerifyMigratedElementsSim ${instanceMigrationId}
+ VerifyRemovedElementsSim ${instanceMigrationId}
FailAutomationCompositionMigration
[Documentation] Fail Migration of an automation composition.
Should Match Regexp ${respstring} Sim_NewAutomationCompositionElement
Should Not Match Regexp ${respstring} Sim_SinkAutomationCompositionElement
+VerifyRemovedElementsSim
+ [Arguments] ${theInstanceId}
+ [Documentation] Query on Participant Simulator 2
+ ${auth}= ParticipantAuth
+ ${resp}= MakeGetRequest participant ${HTTP_PARTICIPANT_SIM2_IP} /onap/policy/simparticipant/v2/instances/${theInstanceId} ${auth}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${respstring} Convert To String ${resp.json()}
+ Should Not Match Regexp ${respstring} Sim_Sink2AutomationCompositionElement
+
VerifyRollbackElementsSim
[Arguments] ${theInstanceId}
[Documentation] Query on Participant Simulator
${resp}= MakeJsonPutRequest participant ${HTTP_PARTICIPANT_SIM1_IP} /onap/policy/simparticipant/v2/parameters ${postjson} ${auth}
Should Be Equal As Strings ${resp.status_code} 200
+SetParticipantSim2Fail
+ [Documentation] Set Participant Simulator2 Fail.
+ ${auth}= ParticipantAuth
+ ${postjson}= Get file ${CURDIR}/data/SettingSimPropertiesFail.json
+ ${resp}= MakeJsonPutRequest participant ${HTTP_PARTICIPANT_SIM2_IP} /onap/policy/simparticipant/v2/parameters ${postjson} ${auth}
+ Should Be Equal As Strings ${resp.status_code} 200
+
SetParticipantSimSuccess
[Documentation] Set Participant Simulator Success.
${auth}= ParticipantAuth
${resp}= MakeJsonPutRequest participant ${HTTP_PARTICIPANT_SIM1_IP} /onap/policy/simparticipant/v2/parameters ${postjson} ${auth}
Should Be Equal As Strings ${resp.status_code} 200
+SetParticipantSim2Success
+ [Documentation] Set Participant Simulator Success.
+ ${auth}= ParticipantAuth
+ ${postjson}= Get file ${CURDIR}/data/SettingSimPropertiesSuccess.json
+ ${resp}= MakeJsonPutRequest participant ${HTTP_PARTICIPANT_SIM2_IP} /onap/policy/simparticipant/v2/parameters ${postjson} ${auth}
+ Should Be Equal As Strings ${resp.status_code} 200
+
SetParticipantSimTimeout
[Documentation] Set Participant Simulator Timeout.
${auth}= ParticipantAuth
${resp}= MakeJsonPutRequest participant ${HTTP_PARTICIPANT_SIM1_IP} /onap/policy/simparticipant/v2/parameters ${postjson} ${auth}
Should Be Equal As Strings ${resp.status_code} 200
+SetParticipantSim2Timeout
+ [Documentation] Set Participant Simulator Timeout.
+ ${auth}= ParticipantAuth
+ ${postjson}= Get file ${CURDIR}/data/SettingSimPropertiesTimeout.json
+ ${resp}= MakeJsonPutRequest participant ${HTTP_PARTICIPANT_SIM2_IP} /onap/policy/simparticipant/v2/parameters ${postjson} ${auth}
+ Should Be Equal As Strings ${resp.status_code} 200
+
SetParticipantSimDelay
[Documentation] Set Participant Simulator Delay.
${auth}= ParticipantAuth
${resp}= GET On Session jaeger /api/traces params=${params} expected_status=200
Log Received response from jaeger ${resp.text}
RETURN ${resp}
+