diff options
Diffstat (limited to 'tosca-controlloop/runtime/src/test/resources')
5 files changed, 121 insertions, 0 deletions
diff --git a/tosca-controlloop/runtime/src/test/resources/META-INF/persistence.xml b/tosca-controlloop/runtime/src/test/resources/META-INF/persistence.xml index 610bfe97e..5df575c22 100644 --- a/tosca-controlloop/runtime/src/test/resources/META-INF/persistence.xml +++ b/tosca-controlloop/runtime/src/test/resources/META-INF/persistence.xml @@ -46,6 +46,8 @@ <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaTopologyTemplate</class> <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaControlLoop</class> <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaControlLoopElement</class> + <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaParticipantStatistics</class> + <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaClElementStatistics</class> <properties> <property name="eclipselink.ddl-generation" value="drop-and-create-tables" /> diff --git a/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestClElementStatistics.json b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestClElementStatistics.json new file mode 100644 index 000000000..21a048ff0 --- /dev/null +++ b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestClElementStatistics.json @@ -0,0 +1,44 @@ +{ + "clElementStatistics":[ + { + "participantId":{ + "name":"name1", + "version":"1.001" + }, + "id": "709c62b3-8918-41b9-a747-d21eb79c6c20", + "timeStamp": "2021-01-10T13:45:00.000Z", + "controlLoopState": "UNINITIALISED", + "clElementUptime":250 + }, + { + "participantId":{ + "name":"name1", + "version":"1.001" + }, + "id": "709c62b3-8918-41b9-a747-d21eb79c6c20", + "timeStamp": "2021-01-10T15:45:00.000Z", + "controlLoopState": "UNINITIALISED", + "clElementUptime":450 + }, + { + "participantId":{ + "name":"name2", + "version":"1.001" + }, + "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", + "timeStamp": "2021-01-10T14:25:00.000Z", + "controlLoopState": "UNINITIALISED", + "clElementUptime":330 + }, + { + "participantId":{ + "name":"name2", + "version":"1.001" + }, + "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", + "timeStamp": "2021-01-10T16:35:00.000Z", + "controlLoopState": "UNINITIALISED", + "clElementUptime":650 + } + ] +}
\ No newline at end of file diff --git a/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestClElementStatistics_Invalid.json b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestClElementStatistics_Invalid.json new file mode 100644 index 000000000..2cf2619bf --- /dev/null +++ b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestClElementStatistics_Invalid.json @@ -0,0 +1,13 @@ +{ + "clElementStatisticsList":[ + { + "participantId":{ + "name":"name1", + "version":"1.001" + }, + "id": "709c62b3-8918-41b9-a747-d21eb79c6c20", + "controlLoopState": "UNINITIALISED", + "clElementUptime":250 + } + ] +}
\ No newline at end of file diff --git a/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestParticipantStatistics.json b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestParticipantStatistics.json new file mode 100644 index 000000000..acd88e24b --- /dev/null +++ b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestParticipantStatistics.json @@ -0,0 +1,46 @@ +{ + "statisticsList":[ + { + "participantId":{ + "name":"name1", + "version":"1.001" + }, + "timeStamp": "2021-01-10T13:45:00.000Z", + "state": "PASSIVE", + "healthStatus": "HEALTHY", + "eventCount":250, + "lastExecutionTime":100, + "averageExecutionTime":90, + "upTime":1000, + "lastStart":3000 + }, + { + "participantId":{ + "name":"name1", + "version":"1.001" + }, + "timeStamp": "2021-01-10T15:45:00.000Z", + "state": "PASSIVE", + "healthStatus": "HEALTHY", + "eventCount":262, + "lastExecutionTime":100, + "averageExecutionTime":90, + "upTime":2000, + "lastStart":3000 + }, + { + "participantId":{ + "name":"name2", + "version":"1.001" + }, + "timeStamp": "2021-01-27T14:25:00.000Z", + "state": "PASSIVE", + "healthStatus": "HEALTHY", + "eventCount":245, + "lastExecutionTime":1020, + "averageExecutionTime":85, + "upTime":1050, + "lastStart":3100 + } + ] +}
\ No newline at end of file diff --git a/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestParticipantStatistics_Invalid.json b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestParticipantStatistics_Invalid.json new file mode 100644 index 000000000..7281822f0 --- /dev/null +++ b/tosca-controlloop/runtime/src/test/resources/rest/monitoring/TestParticipantStatistics_Invalid.json @@ -0,0 +1,16 @@ +{ + "participantStatisticsList":[ + { + "participantId":{ + "name":"name3", + "version":"1.001" + }, + "state": "PASSIVE", + "eventCount":250, + "lastExecutionTime":100, + "averageExecutionTime":90, + "upTime":1000, + "lastStart":3000 + } + ] +}
\ No newline at end of file |