@itentialopensource/adapter-centreon 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 (126) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +18 -0
  3. package/.jshintrc +3 -0
  4. package/AUTH.md +39 -0
  5. package/BROKER.md +199 -0
  6. package/CALLS.md +170 -0
  7. package/CHANGELOG.md +9 -0
  8. package/CODE_OF_CONDUCT.md +43 -0
  9. package/CONTRIBUTING.md +172 -0
  10. package/ENHANCE.md +69 -0
  11. package/LICENSE +201 -0
  12. package/PROPERTIES.md +641 -0
  13. package/README.md +337 -0
  14. package/SUMMARY.md +9 -0
  15. package/SYSTEMINFO.md +11 -0
  16. package/TROUBLESHOOT.md +47 -0
  17. package/adapter.js +13198 -0
  18. package/adapterBase.js +1787 -0
  19. package/entities/.generic/action.json +214 -0
  20. package/entities/.generic/schema.json +28 -0
  21. package/entities/.system/action.json +50 -0
  22. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  23. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  24. package/entities/.system/schema.json +19 -0
  25. package/entities/.system/schemaTokenReq.json +53 -0
  26. package/entities/.system/schemaTokenResp.json +53 -0
  27. package/entities/AccessControl/action.json +25 -0
  28. package/entities/AccessControl/schema.json +19 -0
  29. package/entities/Acknowledgement/action.json +351 -0
  30. package/entities/Acknowledgement/schema.json +90 -0
  31. package/entities/Administration/action.json +290 -0
  32. package/entities/Administration/mockdatafiles/listonevaultconfigurationbyitsid-default.json +9 -0
  33. package/entities/Administration/schema.json +54 -0
  34. package/entities/Authentication/action.json +126 -0
  35. package/entities/Authentication/mockdatafiles/providersConfigurations-default.json +26 -0
  36. package/entities/Authentication/schema.json +35 -0
  37. package/entities/Check/action.json +124 -0
  38. package/entities/Check/schema.json +57 -0
  39. package/entities/Comment/action.json +24 -0
  40. package/entities/Comment/schema.json +19 -0
  41. package/entities/Downtime/action.json +291 -0
  42. package/entities/Downtime/schema.json +98 -0
  43. package/entities/Gorgone/action.json +45 -0
  44. package/entities/Gorgone/mockdatafiles/gorgonepollerresponsestoken-default.json +398 -0
  45. package/entities/Gorgone/schema.json +42 -0
  46. package/entities/Host/action.json +46 -0
  47. package/entities/Host/schema.json +53 -0
  48. package/entities/HostCategory/action.json +106 -0
  49. package/entities/HostCategory/schema.json +45 -0
  50. package/entities/HostGroup/action.json +107 -0
  51. package/entities/HostGroup/schema.json +78 -0
  52. package/entities/HostSeverity/action.json +65 -0
  53. package/entities/HostSeverity/schema.json +32 -0
  54. package/entities/HostTemplate/action.json +25 -0
  55. package/entities/HostTemplate/schema.json +19 -0
  56. package/entities/Icons/action.json +25 -0
  57. package/entities/Icons/schema.json +19 -0
  58. package/entities/MetaService/action.json +67 -0
  59. package/entities/MetaService/schema.json +43 -0
  60. package/entities/Metrics/action.json +109 -0
  61. package/entities/Metrics/schema.json +56 -0
  62. package/entities/MonitoringServer/action.json +172 -0
  63. package/entities/MonitoringServer/schema.json +48 -0
  64. package/entities/NotificationPolicy/action.json +67 -0
  65. package/entities/NotificationPolicy/schema.json +54 -0
  66. package/entities/Platform/action.json +86 -0
  67. package/entities/Platform/schema.json +22 -0
  68. package/entities/Proxy/action.json +45 -0
  69. package/entities/Proxy/schema.json +20 -0
  70. package/entities/Resource/action.json +67 -0
  71. package/entities/Resource/schema.json +164 -0
  72. package/entities/Service/action.json +67 -0
  73. package/entities/Service/schema.json +54 -0
  74. package/entities/ServiceCategory/action.json +66 -0
  75. package/entities/ServiceCategory/schema.json +21 -0
  76. package/entities/ServiceGroup/action.json +107 -0
  77. package/entities/ServiceGroup/schema.json +89 -0
  78. package/entities/ServiceSeverity/action.json +65 -0
  79. package/entities/ServiceSeverity/schema.json +32 -0
  80. package/entities/Severity/action.json +46 -0
  81. package/entities/Severity/schema.json +31 -0
  82. package/entities/Submit/action.json +84 -0
  83. package/entities/Submit/schema.json +55 -0
  84. package/entities/TimePeriod/action.json +106 -0
  85. package/entities/TimePeriod/schema.json +23 -0
  86. package/entities/Timeline/action.json +46 -0
  87. package/entities/Timeline/schema.json +53 -0
  88. package/entities/Topology/action.json +65 -0
  89. package/entities/Topology/schema.json +32 -0
  90. package/entities/User/action.json +171 -0
  91. package/entities/User/schema.json +48 -0
  92. package/entities/UserFilters/action.json +84 -0
  93. package/entities/UserFilters/schema.json +44 -0
  94. package/error.json +190 -0
  95. package/package.json +87 -0
  96. package/pronghorn.json +9146 -0
  97. package/propertiesDecorators.json +14 -0
  98. package/propertiesSchema.json +1248 -0
  99. package/refs?service=git-upload-pack +0 -0
  100. package/report/Centreon Monitoring tool.yml-OpenApi3Json.json +20770 -0
  101. package/report/creationReport.json +1400 -0
  102. package/sampleProperties.json +195 -0
  103. package/test/integration/adapterTestBasicGet.js +83 -0
  104. package/test/integration/adapterTestConnectivity.js +93 -0
  105. package/test/integration/adapterTestIntegration.js +4456 -0
  106. package/test/unit/adapterBaseTestUnit.js +949 -0
  107. package/test/unit/adapterTestUnit.js +5654 -0
  108. package/utils/adapterInfo.js +206 -0
  109. package/utils/addAuth.js +94 -0
  110. package/utils/artifactize.js +146 -0
  111. package/utils/basicGet.js +50 -0
  112. package/utils/checkMigrate.js +63 -0
  113. package/utils/entitiesToDB.js +178 -0
  114. package/utils/findPath.js +74 -0
  115. package/utils/methodDocumentor.js +225 -0
  116. package/utils/modify.js +154 -0
  117. package/utils/packModificationScript.js +35 -0
  118. package/utils/patches2bundledDeps.js +90 -0
  119. package/utils/pre-commit.sh +32 -0
  120. package/utils/removeHooks.js +20 -0
  121. package/utils/setup.js +33 -0
  122. package/utils/tbScript.js +246 -0
  123. package/utils/tbUtils.js +490 -0
  124. package/utils/testRunner.js +298 -0
  125. package/utils/troubleshootingAdapter.js +195 -0
  126. package/workflows/README.md +3 -0
@@ -0,0 +1,46 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "listallserviceseveritiesfromtherealtime",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/monitoring/severities/service?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "listallhostseveritiesfromrealTimedata",
26
+ "protocol": "REST",
27
+ "method": "GET",
28
+ "entitypath": "{base_path}/{version}/monitoring/severities/host?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "sendGetBody": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {},
37
+ "responseObjects": [
38
+ {
39
+ "type": "default",
40
+ "key": "",
41
+ "mockFile": ""
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "listallserviceseveritiesfromtherealtime",
12
+ "enum": [
13
+ "listallserviceseveritiesfromtherealtime",
14
+ "listallhostseveritiesfromrealTimedata"
15
+ ],
16
+ "external_name": "ph_request_type"
17
+ },
18
+ "sortBy": {
19
+ "type": "object",
20
+ "description": "Sort the resulted data by its properties",
21
+ "parse": false,
22
+ "encode": false,
23
+ "encrypt": {
24
+ "type": "AES",
25
+ "key": ""
26
+ },
27
+ "external_name": "sort_by"
28
+ }
29
+ },
30
+ "definitions": {}
31
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "submitaresulttoasinglemetaservice",
5
+ "protocol": "REST",
6
+ "method": "POST",
7
+ "entitypath": "{base_path}/{version}/monitoring/metaservices/{pathv1}/submit?{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": ""
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "submitaresulttoasinglehost",
25
+ "protocol": "REST",
26
+ "method": "POST",
27
+ "entitypath": "{base_path}/{version}/monitoring/hosts/{pathv1}/submit?{query}",
28
+ "requestSchema": "schema.json",
29
+ "responseSchema": "schema.json",
30
+ "timeout": 0,
31
+ "sendEmpty": false,
32
+ "requestDatatype": "JSON",
33
+ "responseDatatype": "JSON",
34
+ "headers": {},
35
+ "responseObjects": [
36
+ {
37
+ "type": "default",
38
+ "key": "",
39
+ "mockFile": ""
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "name": "submitaresulttoasingleservice",
45
+ "protocol": "REST",
46
+ "method": "POST",
47
+ "entitypath": "{base_path}/{version}/monitoring/hosts/{pathv1}/services/{pathv2}/submit?{query}",
48
+ "requestSchema": "schema.json",
49
+ "responseSchema": "schema.json",
50
+ "timeout": 0,
51
+ "sendEmpty": false,
52
+ "requestDatatype": "JSON",
53
+ "responseDatatype": "JSON",
54
+ "headers": {},
55
+ "responseObjects": [
56
+ {
57
+ "type": "default",
58
+ "key": "",
59
+ "mockFile": ""
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "name": "submitresulttoresources",
65
+ "protocol": "REST",
66
+ "method": "POST",
67
+ "entitypath": "{base_path}/{version}/monitoring/resources/submit?{query}",
68
+ "requestSchema": "schema.json",
69
+ "responseSchema": "schema.json",
70
+ "timeout": 0,
71
+ "sendEmpty": false,
72
+ "requestDatatype": "JSON",
73
+ "responseDatatype": "JSON",
74
+ "headers": {},
75
+ "responseObjects": [
76
+ {
77
+ "type": "default",
78
+ "key": "",
79
+ "mockFile": ""
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "submitaresulttoasinglemetaservice",
12
+ "enum": [
13
+ "submitaresulttoasinglemetaservice",
14
+ "submitaresulttoasinglehost",
15
+ "submitaresulttoasingleservice",
16
+ "submitresulttoresources"
17
+ ],
18
+ "external_name": "ph_request_type"
19
+ },
20
+ "metaId": {
21
+ "type": "number",
22
+ "description": "ID of the meta service",
23
+ "parse": false,
24
+ "encode": false,
25
+ "encrypt": {
26
+ "type": "AES",
27
+ "key": ""
28
+ },
29
+ "external_name": "meta_id"
30
+ },
31
+ "hostId": {
32
+ "type": "number",
33
+ "description": "ID of the host",
34
+ "parse": false,
35
+ "encode": false,
36
+ "encrypt": {
37
+ "type": "AES",
38
+ "key": ""
39
+ },
40
+ "external_name": "host_id"
41
+ },
42
+ "serviceId": {
43
+ "type": "number",
44
+ "description": "ID of the service",
45
+ "parse": false,
46
+ "encode": false,
47
+ "encrypt": {
48
+ "type": "AES",
49
+ "key": ""
50
+ },
51
+ "external_name": "service_id"
52
+ }
53
+ },
54
+ "definitions": {}
55
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getalltimeperiods",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/configuration/timeperiods?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "createanewtimeperiod",
26
+ "protocol": "REST",
27
+ "method": "POST",
28
+ "entitypath": "{base_path}/{version}/configuration/timeperiods?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": ""
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "deleteatimeperiod",
46
+ "protocol": "REST",
47
+ "method": "DELETE",
48
+ "entitypath": "{base_path}/{version}/configuration/timeperiods/{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": ""
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "name": "getatimeperiod",
66
+ "protocol": "REST",
67
+ "method": "GET",
68
+ "entitypath": "{base_path}/{version}/configuration/timeperiods/{pathv1}?{query}",
69
+ "requestSchema": "schema.json",
70
+ "responseSchema": "schema.json",
71
+ "timeout": 0,
72
+ "sendEmpty": false,
73
+ "sendGetBody": false,
74
+ "requestDatatype": "JSON",
75
+ "responseDatatype": "JSON",
76
+ "headers": {},
77
+ "responseObjects": [
78
+ {
79
+ "type": "default",
80
+ "key": "",
81
+ "mockFile": ""
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "name": "updateatimeperiod",
87
+ "protocol": "REST",
88
+ "method": "PUT",
89
+ "entitypath": "{base_path}/{version}/configuration/timeperiods/{pathv1}?{query}",
90
+ "requestSchema": "schema.json",
91
+ "responseSchema": "schema.json",
92
+ "timeout": 0,
93
+ "sendEmpty": false,
94
+ "requestDatatype": "JSON",
95
+ "responseDatatype": "JSON",
96
+ "headers": {},
97
+ "responseObjects": [
98
+ {
99
+ "type": "default",
100
+ "key": "",
101
+ "mockFile": ""
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
@@ -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": "getalltimeperiods",
12
+ "enum": [
13
+ "getalltimeperiods",
14
+ "createanewtimeperiod",
15
+ "deleteatimeperiod",
16
+ "getatimeperiod",
17
+ "updateatimeperiod"
18
+ ],
19
+ "external_name": "ph_request_type"
20
+ }
21
+ },
22
+ "definitions": {}
23
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "gethosttimeline",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/monitoring/hosts/{pathv1}/timeline?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "getservicetimeline",
26
+ "protocol": "REST",
27
+ "method": "GET",
28
+ "entitypath": "{base_path}/{version}/monitoring/hosts/{pathv1}/services/{pathv2}/timeline?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "sendGetBody": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {},
37
+ "responseObjects": [
38
+ {
39
+ "type": "default",
40
+ "key": "",
41
+ "mockFile": ""
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "gethosttimeline",
12
+ "enum": [
13
+ "gethosttimeline",
14
+ "getservicetimeline"
15
+ ],
16
+ "external_name": "ph_request_type"
17
+ },
18
+ "hostId": {
19
+ "type": "number",
20
+ "description": "ID of the host",
21
+ "parse": false,
22
+ "encode": false,
23
+ "encrypt": {
24
+ "type": "AES",
25
+ "key": ""
26
+ },
27
+ "external_name": "host_id"
28
+ },
29
+ "sortBy": {
30
+ "type": "object",
31
+ "description": "Sort the resulted data by its properties",
32
+ "parse": false,
33
+ "encode": false,
34
+ "encrypt": {
35
+ "type": "AES",
36
+ "key": ""
37
+ },
38
+ "external_name": "sort_by"
39
+ },
40
+ "serviceId": {
41
+ "type": "number",
42
+ "description": "ID of the service",
43
+ "parse": false,
44
+ "encode": false,
45
+ "encrypt": {
46
+ "type": "AES",
47
+ "key": ""
48
+ },
49
+ "external_name": "service_id"
50
+ }
51
+ },
52
+ "definitions": {}
53
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "registertoplatformtopology",
5
+ "protocol": "REST",
6
+ "method": "POST",
7
+ "entitypath": "{base_path}/{version}/platform/topology?{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": ""
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "getaplatformtopology",
25
+ "protocol": "REST",
26
+ "method": "GET",
27
+ "entitypath": "{base_path}/{version}/platform/topology?{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": ""
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "deleteaPlatform",
46
+ "protocol": "REST",
47
+ "method": "DELETE",
48
+ "entitypath": "{base_path}/{version}/platform/topology/{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": ""
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "registertoplatformtopology",
12
+ "enum": [
13
+ "registertoplatformtopology",
14
+ "getaplatformtopology",
15
+ "deleteaPlatform"
16
+ ],
17
+ "external_name": "ph_request_type"
18
+ },
19
+ "pollerId": {
20
+ "type": "number",
21
+ "description": "ID of the poller",
22
+ "parse": false,
23
+ "encode": false,
24
+ "encrypt": {
25
+ "type": "AES",
26
+ "key": ""
27
+ },
28
+ "external_name": "poller_id"
29
+ }
30
+ },
31
+ "definitions": {}
32
+ }