@itentialopensource/adapter-nokia_nsp_network_management 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +18 -0
  3. package/.jshintrc +3 -0
  4. package/AUTH.md +38 -0
  5. package/BROKER.md +211 -0
  6. package/CALLS.md +206 -0
  7. package/CHANGELOG.md +9 -0
  8. package/CODE_OF_CONDUCT.md +43 -0
  9. package/CONTRIBUTING.md +13 -0
  10. package/ENHANCE.md +69 -0
  11. package/LICENSE +201 -0
  12. package/PROPERTIES.md +646 -0
  13. package/README.md +343 -0
  14. package/SUMMARY.md +9 -0
  15. package/SYSTEMINFO.md +22 -0
  16. package/TAB1.md +14 -0
  17. package/TAB2.md +321 -0
  18. package/TROUBLESHOOT.md +47 -0
  19. package/adapter.js +11110 -0
  20. package/adapterBase.js +1452 -0
  21. package/entities/.generic/action.json +214 -0
  22. package/entities/.generic/schema.json +28 -0
  23. package/entities/.system/action.json +52 -0
  24. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  25. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  26. package/entities/.system/schema.json +19 -0
  27. package/entities/.system/schemaTokenReq.json +53 -0
  28. package/entities/.system/schemaTokenResp.json +31 -0
  29. package/entities/AddressPool/action.json +65 -0
  30. package/entities/AddressPool/mockdatafiles/getIPv4AddressPool-default.json +47 -0
  31. package/entities/AddressPool/mockdatafiles/obtainValueFromPool-default.json +23 -0
  32. package/entities/AddressPool/schema.json +32 -0
  33. package/entities/AuditAndAlignment/action.json +165 -0
  34. package/entities/AuditAndAlignment/mockdatafiles/alignConfigurationDeployment-default.json +6 -0
  35. package/entities/AuditAndAlignment/mockdatafiles/alignConfigurationTemplateAllDeployments-default.json +7 -0
  36. package/entities/AuditAndAlignment/mockdatafiles/alignConfigurationTemplateMisalignedDeployments-default.json +7 -0
  37. package/entities/AuditAndAlignment/mockdatafiles/auditDeployment-default.json +7 -0
  38. package/entities/AuditAndAlignment/mockdatafiles/auditNodeDeployments-default.json +6 -0
  39. package/entities/AuditAndAlignment/mockdatafiles/auditTemplate-default.json +7 -0
  40. package/entities/AuditAndAlignment/mockdatafiles/checkAuditStatusCount-default.json +15 -0
  41. package/entities/AuditAndAlignment/mockdatafiles/getAuditDetails-default.json +9 -0
  42. package/entities/AuditAndAlignment/schema.json +26 -0
  43. package/entities/BaselineOperationsRestconfAPI/action.json +207 -0
  44. package/entities/BaselineOperationsRestconfAPI/mockdatafiles/createBaselineDetector-default.json +35 -0
  45. package/entities/BaselineOperationsRestconfAPI/mockdatafiles/getAllBaselines-default.json +44 -0
  46. package/entities/BaselineOperationsRestconfAPI/mockdatafiles/getBaseline-default.json +24 -0
  47. package/entities/BaselineOperationsRestconfAPI/mockdatafiles/getBaselineDetector-default.json +15 -0
  48. package/entities/BaselineOperationsRestconfAPI/mockdatafiles/patchBaselineDetector-default.json +13 -0
  49. package/entities/BaselineOperationsRestconfAPI/schema.json +39 -0
  50. package/entities/Brownfield/action.json +24 -0
  51. package/entities/Brownfield/mockdatafiles/discoverDeployments-default.json +7 -0
  52. package/entities/Brownfield/schema.json +19 -0
  53. package/entities/ConfigurationDeployments/action.json +207 -0
  54. package/entities/ConfigurationDeployments/mockdatafiles/createDeployment-default.json +7 -0
  55. package/entities/ConfigurationDeployments/mockdatafiles/createPortGroup-default.json +18 -0
  56. package/entities/ConfigurationDeployments/mockdatafiles/createPortGroupDirectory-default.json +16 -0
  57. package/entities/ConfigurationDeployments/mockdatafiles/deleteDeployments-default.json +7 -0
  58. package/entities/ConfigurationDeployments/mockdatafiles/getDeployments-default.json +322 -0
  59. package/entities/ConfigurationDeployments/mockdatafiles/getPortGroupFDN-default.json +18 -0
  60. package/entities/ConfigurationDeployments/mockdatafiles/getSpecificDeployment-default.json +43 -0
  61. package/entities/ConfigurationDeployments/mockdatafiles/replaceDeployment-default.json +7 -0
  62. package/entities/ConfigurationDeployments/mockdatafiles/updateDeploymentConfiguration-default.json +7 -0
  63. package/entities/ConfigurationDeployments/schema.json +28 -0
  64. package/entities/ConfigurationTemplates/action.json +85 -0
  65. package/entities/ConfigurationTemplates/mockdatafiles/createTemplate-default.json +4 -0
  66. package/entities/ConfigurationTemplates/mockdatafiles/getTemplates-default.json +195 -0
  67. package/entities/ConfigurationTemplates/schema.json +22 -0
  68. package/entities/DataTablesRetention/action.json +86 -0
  69. package/entities/DataTablesRetention/mockdatafiles/getBaselineAgeoutPolicySettings-default.json +22 -0
  70. package/entities/DataTablesRetention/mockdatafiles/getIndicatorAgeoutPolicySettings-default.json +16 -0
  71. package/entities/DataTablesRetention/schema.json +22 -0
  72. package/entities/IETFL2Model/action.json +67 -0
  73. package/entities/IETFL2Model/mockdatafiles/getL2TopologyAttributes-default.json +5 -0
  74. package/entities/IETFL2Model/mockdatafiles/getL2TopologyNodeTerminationPoints-default.json +69 -0
  75. package/entities/IETFL2Model/schema.json +21 -0
  76. package/entities/IETFL3Model/action.json +277 -0
  77. package/entities/IETFL3Model/mockdatafiles/getAllNodesInANetwork-default.json +207 -0
  78. package/entities/IETFL3Model/mockdatafiles/getL3TopologyAttribute-default.json +8 -0
  79. package/entities/IETFL3Model/mockdatafiles/getNetworkType-default.json +7 -0
  80. package/entities/IETFL3Model/mockdatafiles/getSpecificLinkInANetwork-default.json +67 -0
  81. package/entities/IETFL3Model/mockdatafiles/getSpecificNetwork-default.json +498 -0
  82. package/entities/IETFL3Model/mockdatafiles/getSpecificNodeInANetwork-default.json +56 -0
  83. package/entities/IETFL3Model/mockdatafiles/getSpecificTerminationPointsOfANode-default.json +17 -0
  84. package/entities/IETFL3Model/mockdatafiles/getSupportingLink-default.json +8 -0
  85. package/entities/IETFL3Model/mockdatafiles/getSupportingNetwork-default.json +7 -0
  86. package/entities/IETFL3Model/mockdatafiles/getSupportingTerminationPoint-default.json +9 -0
  87. package/entities/IETFL3Model/mockdatafiles/l3GETSRTopologyLinkAttributes-default.json +41 -0
  88. package/entities/IETFL3Model/mockdatafiles/l3GETSRTopologyNodeAttributes-default.json +16 -0
  89. package/entities/IETFL3Model/schema.json +42 -0
  90. package/entities/IETFLogicalInventoryRestconfAPI/action.json +235 -0
  91. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkInterfacesConfig-default.json +14 -0
  92. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkInterfacesUnnumbered-default.json +28 -0
  93. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkInterfacesUnnumberedIntf-default.json +21 -0
  94. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkSubInterfacesConfig-default.json +16 -0
  95. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkSubInterfacesIPv4Addresses-default.json +39 -0
  96. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkSubInterfacesIPv6Addresses-default.json +38 -0
  97. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveNetworkSubInterfacesState-default.json +15 -0
  98. package/entities/IETFLogicalInventoryRestconfAPI/mockdatafiles/retrieveResyncPolicyNodeVersionEntity-default.json +797 -0
  99. package/entities/IETFLogicalInventoryRestconfAPI/schema.json +51 -0
  100. package/entities/IETFSAPTopology/action.json +67 -0
  101. package/entities/IETFSAPTopology/mockdatafiles/getIETFNetworkFromSpecificNode-default.json +483 -0
  102. package/entities/IETFSAPTopology/mockdatafiles/getSAPNetwork-default.json +9 -0
  103. package/entities/IETFSAPTopology/mockdatafiles/getSAPsOnASpecificNodeOfSpecificServiceType-default.json +153 -0
  104. package/entities/IETFSAPTopology/schema.json +21 -0
  105. package/entities/IndicatorRules/action.json +106 -0
  106. package/entities/IndicatorRules/mockdatafiles/getAllIndicatorRules-default.json +818 -0
  107. package/entities/IndicatorRules/mockdatafiles/getSpecificIndicatorRule-default.json +119 -0
  108. package/entities/IndicatorRules/schema.json +23 -0
  109. package/entities/IndicatorTemplates/action.json +106 -0
  110. package/entities/IndicatorTemplates/mockdatafiles/avgCPUAllNodesAllActions-default.json +105 -0
  111. package/entities/IndicatorTemplates/mockdatafiles/getAllIndicatorTemplates-default.json +512 -0
  112. package/entities/IndicatorTemplates/mockdatafiles/getSpecificIndicatorTemplate-default.json +88 -0
  113. package/entities/IndicatorTemplates/mockdatafiles/uPDATEIndicatorTemplate-default.json +48 -0
  114. package/entities/IndicatorTemplates/schema.json +23 -0
  115. package/entities/Intent/action.json +105 -0
  116. package/entities/Intent/mockdatafiles/getIntent-default.json +161 -0
  117. package/entities/Intent/mockdatafiles/synchronizeIntent-default.json +6 -0
  118. package/entities/Intent/schema.json +23 -0
  119. package/entities/IntentTypeManagement/action.json +65 -0
  120. package/entities/IntentTypeManagement/mockdatafiles/getIntentTypes-default.json +482 -0
  121. package/entities/IntentTypeManagement/mockdatafiles/importIntentTypeFromIntentManager-default.json +6 -0
  122. package/entities/IntentTypeManagement/mockdatafiles/removeIntentType-default.json +7 -0
  123. package/entities/IntentTypeManagement/schema.json +21 -0
  124. package/entities/LogicalInventoryRestconfAPI/action.json +107 -0
  125. package/entities/LogicalInventoryRestconfAPI/mockdatafiles/nspInventoryFindWithFilter-default.json +528 -0
  126. package/entities/LogicalInventoryRestconfAPI/mockdatafiles/retrieveResyncPolicy-default.json +4189 -0
  127. package/entities/LogicalInventoryRestconfAPI/mockdatafiles/retrieveResyncPolicyNEAndVersionSpecific-default.json +1083 -0
  128. package/entities/LogicalInventoryRestconfAPI/mockdatafiles/retrieveResyncPollingPolicyNESpecific-default.json +1113 -0
  129. package/entities/LogicalInventoryRestconfAPI/schema.json +34 -0
  130. package/entities/ManageZTPListFromDeviceAdministrator/action.json +85 -0
  131. package/entities/ManageZTPListFromDeviceAdministrator/mockdatafiles/getZTPListFromDeviceAdministrator-default.json +114 -0
  132. package/entities/ManageZTPListFromDeviceAdministrator/schema.json +33 -0
  133. package/entities/RouterNECorrelationMappingService/action.json +147 -0
  134. package/entities/RouterNECorrelationMappingService/mockdatafiles/getCorrelationPolicy-default.json +38 -0
  135. package/entities/RouterNECorrelationMappingService/mockdatafiles/getRouterNeMapping-default.json +32 -0
  136. package/entities/RouterNECorrelationMappingService/mockdatafiles/getSpecificMappingPolicy-default.json +32 -0
  137. package/entities/RouterNECorrelationMappingService/schema.json +47 -0
  138. package/entities/TemplateMigration/action.json +44 -0
  139. package/entities/TemplateMigration/mockdatafiles/cloneTemplate-default.json +7 -0
  140. package/entities/TemplateMigration/mockdatafiles/migrateDeployments-default.json +7 -0
  141. package/entities/TemplateMigration/schema.json +20 -0
  142. package/entities/UploadMappingFiles/action.json +45 -0
  143. package/entities/UploadMappingFiles/mockdatafiles/getIETFMappingFiles-default.json +953 -0
  144. package/entities/UploadMappingFiles/schema.json +31 -0
  145. package/error.json +190 -0
  146. package/metadata.json +61 -0
  147. package/package.json +81 -0
  148. package/pronghorn.json +5141 -0
  149. package/propertiesDecorators.json +14 -0
  150. package/propertiesSchema.json +1666 -0
  151. package/refs?service=git-upload-pack +0 -0
  152. package/report/creationReport.json +657 -0
  153. package/report/update-postman.json-OpenApi3Json.json +112049 -0
  154. package/report/updateReport1718639512342.json +120 -0
  155. package/sampleProperties.json +268 -0
  156. package/test/integration/adapterTestBasicGet.js +83 -0
  157. package/test/integration/adapterTestConnectivity.js +142 -0
  158. package/test/integration/adapterTestIntegration.js +3836 -0
  159. package/test/unit/adapterBaseTestUnit.js +1024 -0
  160. package/test/unit/adapterTestUnit.js +5403 -0
  161. package/utils/adapterInfo.js +206 -0
  162. package/utils/addAuth.js +94 -0
  163. package/utils/artifactize.js +146 -0
  164. package/utils/basicGet.js +50 -0
  165. package/utils/checkMigrate.js +63 -0
  166. package/utils/entitiesToDB.js +179 -0
  167. package/utils/findPath.js +74 -0
  168. package/utils/methodDocumentor.js +273 -0
  169. package/utils/modify.js +152 -0
  170. package/utils/packModificationScript.js +35 -0
  171. package/utils/patches2bundledDeps.js +90 -0
  172. package/utils/pre-commit.sh +32 -0
  173. package/utils/removeHooks.js +20 -0
  174. package/utils/setup.js +33 -0
  175. package/utils/taskMover.js +309 -0
  176. package/utils/tbScript.js +239 -0
  177. package/utils/tbUtils.js +489 -0
  178. package/utils/testRunner.js +298 -0
  179. package/utils/troubleshootingAdapter.js +193 -0
@@ -0,0 +1,119 @@
1
+ {
2
+ "nsp-indicator:rule": [
3
+ {
4
+ "@": {
5
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule",
6
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']"
7
+ },
8
+ "name": "AvgCpuAllNodesAllActions",
9
+ "description": "avg cpu from all nodes",
10
+ "units-name": "%",
11
+ "telemetry-type": "telemetry:/base/system-info/system",
12
+ "formula": "avg({cpu-usage_avg})",
13
+ "multiple-output": false,
14
+ "window-duration": "PT1M",
15
+ "enabled": true,
16
+ "collection-interval": 30,
17
+ "subscription-id": "ia-f95ea845-3569-4251-9c2b-2221c26b00cb",
18
+ "counters": [
19
+ {
20
+ "@": {
21
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/counters",
22
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/counters[name='cpu-usage'][function='avg']"
23
+ },
24
+ "name": "cpu-usage",
25
+ "function": "avg"
26
+ }
27
+ ],
28
+ "thresholds": [
29
+ {
30
+ "@": {
31
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds",
32
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']"
33
+ },
34
+ "threshold-value-decimal": "20",
35
+ "direction": "increasing",
36
+ "actions": [
37
+ {
38
+ "@": {
39
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds/actions",
40
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='threshold_20_increasing_kafka_action1']"
41
+ },
42
+ "name": "threshold_20_increasing_kafka_action1",
43
+ "type": "kafka",
44
+ "kafka": {
45
+ "@": {
46
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds/actions/kafka",
47
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='threshold_20_increasing_kafka_action1']/kafka"
48
+ },
49
+ "topic-name": "nsp-act-action-event",
50
+ "topic-content": "CPU is a rising"
51
+ }
52
+ },
53
+ {
54
+ "@": {
55
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds/actions",
56
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='threshold_20_increasing_alarm_action2']"
57
+ },
58
+ "name": "threshold_20_increasing_alarm_action2",
59
+ "type": "alarm",
60
+ "alarm": {
61
+ "@": {
62
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds/actions/alarm",
63
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='threshold_20_increasing_alarm_action2']/alarm"
64
+ },
65
+ "severity": "major"
66
+ }
67
+ },
68
+ {
69
+ "@": {
70
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds/actions",
71
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='threshold_20_increasing_email_action3']"
72
+ },
73
+ "name": "threshold_20_increasing_email_action3",
74
+ "type": "email",
75
+ "email": {
76
+ "@": {
77
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/thresholds/actions/email",
78
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='threshold_20_increasing_email_action3']/email"
79
+ },
80
+ "email-address": "userid@user.com",
81
+ "email-subject": "Hmmmmm, It's getting hot",
82
+ "email-content": "Your temperature is rising.",
83
+ "aggregation": false,
84
+ "period": 5,
85
+ "number-events": 5
86
+ }
87
+ }
88
+ ]
89
+ }
90
+ ],
91
+ "act-rules": [
92
+ {
93
+ "@": {
94
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/act-rules",
95
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/act-rules[name='ind_act_rule_ae697e27_9eb7_46c6_9d30_8c668fd0ee9d']"
96
+ },
97
+ "name": "ind_act_rule_ae697e27_9eb7_46c6_9d30_8c668fd0ee9d",
98
+ "definition": "{\"name\":\"ind_act_rule_ae697e27_9eb7_46c6_9d30_8c668fd0ee9d\",\"description\":\"avg cpu from all nodes\",\"owner\":\"AvgCpuAllNodesAllActions\",\"keepalive\":120,\"enabled\":true,\"process\":[{\"name\":\"telemetrySource\",\"type\":\"stream-source\",\"stream-source\":{\"type\":\"kafka\",\"select-input-keys\":[\"ia-f95ea845-3569-4251-9c2b-2221c26b00cb\"],\"options\":[{\"name\":\"subscribe\",\"value\":\"rta-indicator-topic\"},{\"name\":\"failOnDataLoss\",\"value\":\"false\"}],\"schema\":{\"columns\":[{\"full-name\":\"data/ietf-restconf:notification/eventTime\",\"type\":\"timestamp\",\"timestamp-type-format\":\"yyyy-MM-dd'T'HH:mm:ss'Z'\",\"mandatory\":true},{\"full-name\":\"data/ietf-restconf:notification/nsp-kpi:real_time_rtindr-event/networkDeviceId\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"data/ietf-restconf:notification/nsp-kpi:real_time_rtindr-event/neId\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"data/ietf-restconf:notification/nsp-kpi:real_time_rtindr-event/neName\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"data/ietf-restconf:notification/nsp-kpi:real_time_rtindr-event/subscriptionId\",\"type\":\"string\"},{\"full-name\":\"data/ietf-restconf:notification/nsp-kpi:real_time_rtindr-event/cpu-usage\",\"type\":\"decimal(30,4)\"}]}}},{\"name\":\"act-event-adapter-source\",\"input-process\":[\"telemetrySource\"],\"type\":\"adapter\",\"adapter\":{\"columns\":[{\"full-name\":\"eventTime\"},{\"full-name\":\"networkDeviceId\"},{\"full-name\":\"neId\"},{\"full-name\":\"neName\"},{\"full-name\":\"name\",\"type\":\"string\",\"value\":\"AvgCpuAllNodesAllActions\"},{\"full-name\":\"cpu-usage\"}]}},{\"name\":\"timebased-tumbling-window\",\"type\":\"timebased-tumbling-window\",\"input-process\":[\"act-event-adapter-source\"],\"timebased-tumbling-window\":{\"event-time-in-property\":\"eventTime\",\"in-object-key-property\":[\"networkDeviceId\",\"name\"],\"pass-through-property\":[\"networkDeviceId\",\"neId\",\"neName\",\"name\"],\"in-property\":[\"cpu-usage\"],\"window-period\":60,\"aggregations\":[{\"operation\":\"avg\",\"arguments\":[\"cpu-usage\"]}]}},{\"name\":\"stream-sink-source\",\"input-process\":[\"timebased-tumbling-window\"],\"type\":\"stream-sink\",\"stream-sink\":{\"type\":\"kafka\",\"options\":[{\"name\":\"topic\",\"value\":\"rta.internal-pipeline-topic\"}]}}]}"
99
+ },
100
+ {
101
+ "@": {
102
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/act-rules",
103
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/act-rules[name='ind_compute_output_3d052cd9_944a_439f_a871_a653ec297107']"
104
+ },
105
+ "name": "ind_compute_output_3d052cd9_944a_439f_a871_a653ec297107",
106
+ "definition": "{\"name\":\"ind_compute_output_3d052cd9_944a_439f_a871_a653ec297107\",\"description\":\"Aggregation Operation Act Rule\",\"owner\":\"AvgCpuAllNodesAllActions\",\"keepalive\":120,\"enabled\":true,\"process\":[{\"name\":\"telemetrySource\",\"type\":\"stream-source\",\"stream-source\":{\"type\":\"kafka\",\"select-input-keys\":[\"ind_act_rule_ae697e27_9eb7_46c6_9d30_8c668fd0ee9d\"],\"options\":[{\"name\":\"subscribe\",\"value\":\"rta.internal-pipeline-topic\"},{\"name\":\"failOnDataLoss\",\"value\":\"false\"}],\"schema\":{\"columns\":[{\"full-name\":\"startTime\",\"type\":\"timestamp\",\"timestamp-type-format\":\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\",\"rename-to\":\"eventTime\",\"mandatory\":true},{\"full-name\":\"name\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"networkDeviceId\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"neId\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"neName\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"cpu-usage_avg\",\"type\":\"decimal(30,4)\"}]}}},{\"name\":\"mixedOperations\",\"input-process\":[\"telemetrySource\"],\"type\":\"mixed-expression-operator\",\"mixed-expression-operator\":{\"event-time-in-property\":\"eventTime\",\"in-object-key-property\":[\"eventTime\",\"name\"],\"in-property\":[\"cpu-usage_avg\"],\"resource-property\":\"networkDeviceId\",\"mixed-operations\":[{\"aggregation-operation\":\"avg\",\"aggregation-operation-argument\":\"cpu-usage_avg\",\"result-property\":\"result1\"}],\"out-property\":\"resultData\"}},{\"name\":\"stream-sink-aggregation-operation\",\"input-process\":[\"mixedOperations\"],\"type\":\"stream-sink\",\"stream-sink\":{\"type\":\"kafka\",\"options\":[{\"name\":\"topic\",\"value\":\"rta.internal-pipeline-topic\"}]}}]}"
107
+ },
108
+ {
109
+ "@": {
110
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-rules/rule/act-rules",
111
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']/act-rules[name='ind_threshold_42d013e0_f4a0_4851_acd8_cb2e91a1c192']"
112
+ },
113
+ "name": "ind_threshold_42d013e0_f4a0_4851_acd8_cb2e91a1c192",
114
+ "definition": "{\"name\":\"ind_threshold_42d013e0_f4a0_4851_acd8_cb2e91a1c192\",\"description\":\"Absolute Threshold Act rule\",\"owner\":\"AvgCpuAllNodesAllActions\",\"keepalive\":120,\"enabled\":true,\"process\":[{\"name\":\"telemetrySource\",\"type\":\"stream-source\",\"stream-source\":{\"type\":\"kafka\",\"select-input-keys\":[\"ind_compute_output_3d052cd9_944a_439f_a871_a653ec297107\"],\"options\":[{\"name\":\"subscribe\",\"value\":\"rta.internal-pipeline-topic\"},{\"name\":\"failOnDataLoss\",\"value\":\"false\"}],\"schema\":{\"columns\":[{\"full-name\":\"eventTime\",\"type\":\"timestamp\",\"timestamp-type-format\":\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\",\"mandatory\":true},{\"full-name\":\"name\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"networkDeviceId\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"neId\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"neName\",\"type\":\"string\",\"mandatory\":true},{\"full-name\":\"resultData\",\"type\":\"decimal(30,4)\"}]}}},{\"name\":\"AvgCpuAllNodesAllActions_20_increasing\",\"input-process\":[\"telemetrySource\"],\"type\":\"absolute-thresholds\",\"absolute-thresholds\":{\"in-object-key-property\":[\"networkDeviceId\",\"name\"],\"pass-through-property\":[\"networkDeviceId\",\"eventTime\",\"neId\",\"neName\",\"name\"],\"thresholds\":[{\"name\":\"AvgCpuAllNodesAllActions_20_increasing\",\"threshold-value-decimal\":\"20\",\"direction\":\"increasing\",\"in-property\":\"resultData\"}]}},{\"name\":\"act-event-adapter-1\",\"input-process\":[\"AvgCpuAllNodesAllActions_20_increasing\"],\"type\":\"adapter\",\"adapter\":{\"columns\":[{\"full-name\":\"source\"},{\"full-name\":\"payload\"},{\"full-name\":\"timestamp\"},{\"full-name\":\"rule\"},{\"full-name\":\"process\"},{\"full-name\":\"type\"}]}}],\"action\":[{\"type\":\"kafka\",\"kafka\":{\"topic-name\":\"nsp-act-action-event\",\"topic-content\":\"CPU is a rising\"},\"action-name\":\"threshold_20_increasing_kafka_action1\",\"process-name\":\"AvgCpuAllNodesAllActions_20_increasing\"},{\"type\":\"alarm\",\"alarm\":{\"severity\":\"major\",\"alarm-name\":\"IndicatorThresholdCrossingEvent\",\"alarm-type\":\"qualityOfServiceAlarm\",\"probable-cause\":\"thresholdCrossed\",\"additional-text\":\"Threshold Crossing:\",\"additional-text-props\":[{\"property\":\"payload.threshold\",\"displayed-name\":\"threshold-value\"},{\"property\":\"payload.direction\",\"displayed-name\":\"direction\"},{\"property\":\"payload.value\",\"displayed-name\":\"value\"},{\"property\":\"source.eventTime\",\"displayed-name\":\"event-time\"},{\"property\":\"source.networkDeviceId\",\"displayed-name\":\"resource\"}],\"object-fdn\":\"fdn:yang:nsp-indicator:/nsp-indicator:rta-indicator-rules/rule[name='AvgCpuAllNodesAllActions']\",\"object-name\":\"AvgCpuAllNodesAllActions\",\"object-type\":\"nsp-indicator:rta-indicator-rules/rule\",\"source-type\":\"nsp\",\"key-prefix\":\"fm.Alarm\",\"key-properties\":[\"$ALARM_NAME\",\"source.name\"],\"ne-name-property\":null,\"ne-id-property\":null,\"last-time-detected-property\":\"source.eventTime\",\"last-time-detected-format\":\"yyyy-MM-dd'T'HH:mm:ss'Z'\",\"key-fdn-namespace\":\"nsp-indicator\",\"implicitly-cleared\":false},\"action-name\":\"threshold_20_increasing_alarm_action2\",\"process-name\":\"AvgCpuAllNodesAllActions_20_increasing\"},{\"type\":\"email\",\"email\":{\"aggregation\":false,\"period\":5,\"email-address\":\"userid@user.com\",\"email-subject\":\"Hmmmmm, It's getting hot\",\"email-content\":\"Your temperature is rising.\",\"number-events\":5},\"action-name\":\"threshold_20_increasing_email_action3\",\"process-name\":\"AvgCpuAllNodesAllActions_20_increasing\"}]}"
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "postavgCPUAllNodesAllActions",
12
+ "enum": [
13
+ "postavgCPUAllNodesAllActions",
14
+ "getAllIndicatorRules",
15
+ "updateIndicatorRule",
16
+ "deleteIndicatorRule",
17
+ "getSpecificIndicatorRule"
18
+ ],
19
+ "external_name": "ph_request_type"
20
+ }
21
+ },
22
+ "definitions": {}
23
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "avgCPUAllNodesAllActions",
5
+ "protocol": "REST",
6
+ "method": "POST",
7
+ "entitypath": "{base_path}/{version}/restconf/data/nsp-indicator:rta-indicator-templates?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "requestDatatype": "JSON",
13
+ "responseDatatype": "JSON",
14
+ "headers": {},
15
+ "responseObjects": [
16
+ {
17
+ "type": "default",
18
+ "key": "",
19
+ "mockFile": "mockdatafiles/avgCPUAllNodesAllActions-default.json"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "getAllIndicatorTemplates",
25
+ "protocol": "REST",
26
+ "method": "GET",
27
+ "entitypath": "{base_path}/{version}/restconf/data/nsp-indicator:rta-indicator-templates?{query}",
28
+ "requestSchema": "schema.json",
29
+ "responseSchema": "schema.json",
30
+ "timeout": 0,
31
+ "sendEmpty": false,
32
+ "sendGetBody": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": "mockdatafiles/getAllIndicatorTemplates-default.json"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "uPDATEIndicatorTemplate",
46
+ "protocol": "REST",
47
+ "method": "PUT",
48
+ "entitypath": "{base_path}/{version}/restconf/data/nsp-indicator:rta-indicator-templates/{pathv1}?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "requestDatatype": "JSON",
54
+ "responseDatatype": "JSON",
55
+ "headers": {},
56
+ "responseObjects": [
57
+ {
58
+ "type": "default",
59
+ "key": "",
60
+ "mockFile": "mockdatafiles/uPDATEIndicatorTemplate-default.json"
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "name": "deleteIndicatorTemplate",
66
+ "protocol": "REST",
67
+ "method": "DELETE",
68
+ "entitypath": "{base_path}/{version}/restconf/data/nsp-indicator:rta-indicator-templates/{pathv1}?{query}",
69
+ "requestSchema": "schema.json",
70
+ "responseSchema": "schema.json",
71
+ "timeout": 0,
72
+ "sendEmpty": false,
73
+ "requestDatatype": "JSON",
74
+ "responseDatatype": "JSON",
75
+ "headers": {},
76
+ "responseObjects": [
77
+ {
78
+ "type": "default",
79
+ "key": "",
80
+ "mockFile": ""
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "name": "getSpecificIndicatorTemplate",
86
+ "protocol": "REST",
87
+ "method": "GET",
88
+ "entitypath": "{base_path}/{version}/restconf/data/nsp-indicator:rta-indicator-templates/{pathv1}?{query}",
89
+ "requestSchema": "schema.json",
90
+ "responseSchema": "schema.json",
91
+ "timeout": 0,
92
+ "sendEmpty": false,
93
+ "sendGetBody": false,
94
+ "requestDatatype": "JSON",
95
+ "responseDatatype": "JSON",
96
+ "headers": {},
97
+ "responseObjects": [
98
+ {
99
+ "type": "default",
100
+ "key": "",
101
+ "mockFile": "mockdatafiles/getSpecificIndicatorTemplate-default.json"
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "created": {
3
+ "@": {
4
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template",
5
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']",
6
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
7
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
8
+ },
9
+ "name": "AvgCpuAllNodesAllActionsTemplate",
10
+ "description": "avg cpu from all nodes template",
11
+ "units-name": "%",
12
+ "telemetry-type": "telemetry:/base/system-info/system",
13
+ "formula": "avg({cpu-usage_avg})",
14
+ "counters": [
15
+ {
16
+ "@": {
17
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/counters",
18
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/counters[name='cpu-usage'][function='avg']",
19
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
20
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
21
+ },
22
+ "name": "cpu-usage",
23
+ "function": "avg"
24
+ }
25
+ ],
26
+ "thresholds": [
27
+ {
28
+ "@": {
29
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds",
30
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']",
31
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
32
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
33
+ },
34
+ "threshold-value-decimal": "20",
35
+ "direction": "increasing",
36
+ "actions": [
37
+ {
38
+ "@": {
39
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds/actions",
40
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='template_threshold_20_increasing_kafka_action']",
41
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
42
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
43
+ },
44
+ "name": "template_threshold_20_increasing_kafka_action",
45
+ "type": "kafka",
46
+ "kafka": {
47
+ "@": {
48
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds/actions/kafka",
49
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='template_threshold_20_increasing_kafka_action']/kafka",
50
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
51
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
52
+ },
53
+ "topic-name": "nsp-act-action-event",
54
+ "topic-content": "CPU is a rising"
55
+ }
56
+ },
57
+ {
58
+ "@": {
59
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds/actions",
60
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='template_threshold_20_increasing_alarm_action']",
61
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
62
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
63
+ },
64
+ "name": "template_threshold_20_increasing_alarm_action",
65
+ "type": "alarm",
66
+ "alarm": {
67
+ "@": {
68
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds/actions/alarm",
69
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='template_threshold_20_increasing_alarm_action']/alarm",
70
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
71
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
72
+ },
73
+ "severity": "major"
74
+ }
75
+ },
76
+ {
77
+ "@": {
78
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds/actions",
79
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='template_threshold_20_increasing_email_action']",
80
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
81
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
82
+ },
83
+ "name": "template_threshold_20_increasing_email_action",
84
+ "type": "email",
85
+ "email": {
86
+ "@": {
87
+ "nsp-model:schema-nodeid": "/nsp-indicator:rta-indicator-templates/template/thresholds/actions/email",
88
+ "nsp-model:identifier": "/nsp-indicator:rta-indicator-templates/template[name='AvgCpuAllNodesAllActionsTemplate']/thresholds[threshold-value-decimal='20'][direction='increasing']/actions[name='template_threshold_20_increasing_email_action']/email",
89
+ "nsp-model:creation-time": "2023-12-07T23:43:31.014Z",
90
+ "nsp-model:last-modified-time": "2023-12-07T23:43:31.014Z"
91
+ },
92
+ "email-address": "userid@user.com",
93
+ "email-subject": "Hmmmmm, It's getting hot",
94
+ "email-content": "Your temperature is rising.",
95
+ "aggregation": false,
96
+ "period": 5,
97
+ "number-events": 5
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ ]
103
+ },
104
+ "Location": "/restconf/data/nsp-indicator:rta-indicator-templates/template=AvgCpuAllNodesAllActionsTemplate"
105
+ }