@itentialopensource/adapter-delinea 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 (287) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc.js +18 -0
  3. package/.gitlab/.gitkeep +0 -0
  4. package/.gitlab/issue_templates/.gitkeep +0 -0
  5. package/.gitlab/issue_templates/Default.md +17 -0
  6. package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
  7. package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
  8. package/.jshintrc +0 -0
  9. package/AUTH.md +39 -0
  10. package/BROKER.md +199 -0
  11. package/CALLS.md +4964 -0
  12. package/CHANGELOG.md +9 -0
  13. package/CODE_OF_CONDUCT.md +43 -0
  14. package/CONTRIBUTING.md +172 -0
  15. package/ENHANCE.md +69 -0
  16. package/LICENSE +201 -0
  17. package/PROPERTIES.md +641 -0
  18. package/README.md +337 -0
  19. package/SUMMARY.md +9 -0
  20. package/SYSTEMINFO.md +11 -0
  21. package/TROUBLESHOOT.md +47 -0
  22. package/adapter.js +66067 -0
  23. package/adapterBase.js +1787 -0
  24. package/entities/.generic/action.json +214 -0
  25. package/entities/.generic/schema.json +28 -0
  26. package/entities/.system/action.json +50 -0
  27. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  28. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  29. package/entities/.system/schema.json +19 -0
  30. package/entities/.system/schemaTokenReq.json +53 -0
  31. package/entities/.system/schemaTokenResp.json +53 -0
  32. package/entities/Activations/action.json +24 -0
  33. package/entities/Activations/schema.json +19 -0
  34. package/entities/ActiveDirectory/action.json +24 -0
  35. package/entities/ActiveDirectory/schema.json +19 -0
  36. package/entities/ApiToken/action.json +25 -0
  37. package/entities/ApiToken/schema.json +19 -0
  38. package/entities/AppClients/action.json +106 -0
  39. package/entities/AppClients/schema.json +23 -0
  40. package/entities/ApplicationAccounts/action.json +25 -0
  41. package/entities/ApplicationAccounts/schema.json +85 -0
  42. package/entities/ApplicationRequest/action.json +87 -0
  43. package/entities/ApplicationRequest/schema.json +77 -0
  44. package/entities/CategorizedLists/action.json +370 -0
  45. package/entities/CategorizedLists/schema.json +124 -0
  46. package/entities/CharacterSets/action.json +107 -0
  47. package/entities/CharacterSets/schema.json +67 -0
  48. package/entities/Configuration/action.json +1416 -0
  49. package/entities/Configuration/mockdatafiles/configurationServiceGetSiteConnectors-default.json +7 -0
  50. package/entities/Configuration/schema.json +131 -0
  51. package/entities/ConnectionManagerSettings/action.json +25 -0
  52. package/entities/ConnectionManagerSettings/schema.json +19 -0
  53. package/entities/DevOpsSecretsVaultSync/action.json +106 -0
  54. package/entities/DevOpsSecretsVaultSync/mockdatafiles/devOpsSecretsVaultSyncServiceSyncSecret-default.json +439 -0
  55. package/entities/DevOpsSecretsVaultSync/schema.json +89 -0
  56. package/entities/DevOpsSecretsVaultTenant/action.json +128 -0
  57. package/entities/DevOpsSecretsVaultTenant/schema.json +101 -0
  58. package/entities/Diagnostics/action.json +295 -0
  59. package/entities/Diagnostics/mockdatafiles/diagnosticsServiceGetBackgroundProcesses-default.json +10 -0
  60. package/entities/Diagnostics/mockdatafiles/diagnosticsServiceGetQuartzJobs-default.json +34 -0
  61. package/entities/Diagnostics/schema.json +32 -0
  62. package/entities/DiagnosticsV2/action.json +25 -0
  63. package/entities/DiagnosticsV2/schema.json +74 -0
  64. package/entities/DirectoryServices/action.json +333 -0
  65. package/entities/DirectoryServices/schema.json +122 -0
  66. package/entities/DisasterRecovery/action.json +289 -0
  67. package/entities/DisasterRecovery/schema.json +87 -0
  68. package/entities/Discovery/action.json +375 -0
  69. package/entities/Discovery/mockdatafiles/discoveryServiceGetAvailableDiscoverySourceScanners-default.json +23 -0
  70. package/entities/Discovery/mockdatafiles/discoveryServiceGetScanTypes-default.json +17 -0
  71. package/entities/Discovery/mockdatafiles/discoveryServiceSearchDiscoverySourceScannerSettings-default.json +10 -0
  72. package/entities/Discovery/mockdatafiles/discoveryServiceSearchForDomainOu-default.json +10 -0
  73. package/entities/Discovery/schema.json +124 -0
  74. package/entities/DistributedEngine/action.json +561 -0
  75. package/entities/DistributedEngine/mockdatafiles/distributedEngineServiceGetServerCapabilities-default.json +22 -0
  76. package/entities/DistributedEngine/schema.json +199 -0
  77. package/entities/DomainNameIndex/action.json +145 -0
  78. package/entities/DomainNameIndex/schema.json +91 -0
  79. package/entities/DualControls/action.json +189 -0
  80. package/entities/DualControls/mockdatafiles/dualControlsServiceGetTypes-default.json +18 -0
  81. package/entities/DualControls/schema.json +71 -0
  82. package/entities/Enterprise/action.json +45 -0
  83. package/entities/Enterprise/schema.json +20 -0
  84. package/entities/EventPipeline/action.json +189 -0
  85. package/entities/EventPipeline/mockdatafiles/eventPipelineServiceReorderPipeline-default.json +8 -0
  86. package/entities/EventPipeline/schema.json +137 -0
  87. package/entities/EventPipelineAudit/action.json +25 -0
  88. package/entities/EventPipelineAudit/schema.json +63 -0
  89. package/entities/EventPipelinePolicy/action.json +414 -0
  90. package/entities/EventPipelinePolicy/mockdatafiles/eventPipelinePolicyServiceGetChildFolderDataForPipelinePolicyFolder-default.json +22 -0
  91. package/entities/EventPipelinePolicy/mockdatafiles/eventPipelinePolicyServiceGetEventPipelinePolicyRunActivity-default.json +22 -0
  92. package/entities/EventPipelinePolicy/mockdatafiles/eventPipelinePolicyServiceGetFoldersForPipelinePolicies-default.json +20 -0
  93. package/entities/EventPipelinePolicy/mockdatafiles/eventPipelinePolicyServiceGetGroupsForPipelinePolicies-default.json +16 -0
  94. package/entities/EventPipelinePolicy/schema.json +148 -0
  95. package/entities/EventPipelineSettings/action.json +109 -0
  96. package/entities/EventPipelineSettings/mockdatafiles/eventPipelineSettingsServiceGetEventPipelineFilterSettings-default.json +294 -0
  97. package/entities/EventPipelineSettings/mockdatafiles/eventPipelineSettingsServiceGetEventPipelineTaskSettings-default.json +222 -0
  98. package/entities/EventPipelineSettings/mockdatafiles/eventPipelineSettingsServiceGetPipelineFilterOptions-default.json +29 -0
  99. package/entities/EventPipelineSettings/mockdatafiles/eventPipelineSettingsServiceGetPipelineTaskOptions-default.json +22 -0
  100. package/entities/EventPipelineSettings/schema.json +67 -0
  101. package/entities/EventPipelineTrigger/action.json +67 -0
  102. package/entities/EventPipelineTrigger/mockdatafiles/eventPipelineTriggerServiceGetEventPipelineTriggerOptions-default.json +18 -0
  103. package/entities/EventPipelineTrigger/mockdatafiles/eventPipelineTriggerServiceGetEventPipelineTriggers-default.json +26 -0
  104. package/entities/EventPipelineTrigger/schema.json +21 -0
  105. package/entities/EventSubscriptions/action.json +128 -0
  106. package/entities/EventSubscriptions/mockdatafiles/eventSubscriptionsServiceGetSubscriptionEntityTypes-default.json +348 -0
  107. package/entities/EventSubscriptions/schema.json +68 -0
  108. package/entities/ExtendedFields/action.json +25 -0
  109. package/entities/ExtendedFields/schema.json +19 -0
  110. package/entities/FolderPermissions/action.json +127 -0
  111. package/entities/FolderPermissions/schema.json +123 -0
  112. package/entities/Folders/action.json +331 -0
  113. package/entities/Folders/schema.json +122 -0
  114. package/entities/Groups/action.json +392 -0
  115. package/entities/Groups/schema.json +147 -0
  116. package/entities/HealthCheck/action.json +25 -0
  117. package/entities/HealthCheck/schema.json +19 -0
  118. package/entities/HsmConfiguration/action.json +25 -0
  119. package/entities/HsmConfiguration/schema.json +63 -0
  120. package/entities/Inbox/action.json +455 -0
  121. package/entities/Inbox/mockdatafiles/inboxServiceGetInboxMessageDataNames-default.json +14 -0
  122. package/entities/Inbox/mockdatafiles/inboxServiceGetInboxMessageTypes-default.json +22 -0
  123. package/entities/Inbox/schema.json +205 -0
  124. package/entities/InboxRules/action.json +331 -0
  125. package/entities/InboxRules/schema.json +265 -0
  126. package/entities/IpAddressRestrictions/action.json +312 -0
  127. package/entities/IpAddressRestrictions/schema.json +66 -0
  128. package/entities/JumpboxRoute/action.json +209 -0
  129. package/entities/JumpboxRoute/schema.json +94 -0
  130. package/entities/KeyManagement/action.json +169 -0
  131. package/entities/KeyManagement/mockdatafiles/keyManagementServiceGetKeyRotationAuditUsers-default.json +14 -0
  132. package/entities/KeyManagement/schema.json +103 -0
  133. package/entities/LauncherAgents/action.json +190 -0
  134. package/entities/LauncherAgents/schema.json +104 -0
  135. package/entities/Launchers/action.json +129 -0
  136. package/entities/Launchers/schema.json +90 -0
  137. package/entities/License/action.json +25 -0
  138. package/entities/License/schema.json +19 -0
  139. package/entities/Metadata/action.json +168 -0
  140. package/entities/Metadata/schema.json +125 -0
  141. package/entities/Mobile/action.json +25 -0
  142. package/entities/Mobile/schema.json +19 -0
  143. package/entities/OAuthExpiration/action.json +24 -0
  144. package/entities/OAuthExpiration/schema.json +19 -0
  145. package/entities/OneTimePasswordCode/action.json +25 -0
  146. package/entities/OneTimePasswordCode/mockdatafiles/oneTimePasswordCodeServiceGet-default.json +12 -0
  147. package/entities/OneTimePasswordCode/schema.json +19 -0
  148. package/entities/PasswordRequirements/action.json +106 -0
  149. package/entities/PasswordRequirements/schema.json +56 -0
  150. package/entities/PbaConfiguration/action.json +125 -0
  151. package/entities/PbaConfiguration/schema.json +24 -0
  152. package/entities/Proxy/action.json +476 -0
  153. package/entities/Proxy/mockdatafiles/proxyServiceGetTerminalClientOverrides-default.json +17 -0
  154. package/entities/Proxy/schema.json +140 -0
  155. package/entities/RemotePasswordChanging/action.json +187 -0
  156. package/entities/RemotePasswordChanging/schema.json +93 -0
  157. package/entities/Reports/action.json +803 -0
  158. package/entities/Reports/mockdatafiles/reportsServiceGetCategories-default.json +22 -0
  159. package/entities/Reports/mockdatafiles/reportsServiceGetChartTypes-default.json +14 -0
  160. package/entities/Reports/mockdatafiles/reportsServiceGetReportCategoryPermissionOptions-default.json +14 -0
  161. package/entities/Reports/mockdatafiles/reportsServiceGetReportPermissionOptions-default.json +10 -0
  162. package/entities/Reports/schema.json +156 -0
  163. package/entities/RoleAudit/action.json +25 -0
  164. package/entities/RoleAudit/schema.json +63 -0
  165. package/entities/RolePermissions/action.json +25 -0
  166. package/entities/RolePermissions/schema.json +19 -0
  167. package/entities/Roles/action.json +210 -0
  168. package/entities/Roles/schema.json +116 -0
  169. package/entities/Schedule/action.json +65 -0
  170. package/entities/Schedule/schema.json +21 -0
  171. package/entities/Script/action.json +66 -0
  172. package/entities/Script/schema.json +76 -0
  173. package/entities/SdkClientAccounts/action.json +147 -0
  174. package/entities/SdkClientAccounts/schema.json +91 -0
  175. package/entities/SdkClientAudits/action.json +25 -0
  176. package/entities/SdkClientAudits/schema.json +85 -0
  177. package/entities/SdkClientRules/action.json +148 -0
  178. package/entities/SdkClientRules/schema.json +91 -0
  179. package/entities/SecretAccessRequests/action.json +190 -0
  180. package/entities/SecretAccessRequests/schema.json +82 -0
  181. package/entities/SecretDependencies/action.json +251 -0
  182. package/entities/SecretDependencies/mockdatafiles/secretDependenciesServiceGetScripts-default.json +49 -0
  183. package/entities/SecretDependencies/mockdatafiles/secretDependenciesServiceGetTemplates-default.json +9 -0
  184. package/entities/SecretDependencies/schema.json +129 -0
  185. package/entities/SecretEraseRequests/action.json +170 -0
  186. package/entities/SecretEraseRequests/schema.json +114 -0
  187. package/entities/SecretExtensions/action.json +105 -0
  188. package/entities/SecretExtensions/mockdatafiles/secretExtensionsServiceGetWebSecretTemplates-default.json +706 -0
  189. package/entities/SecretExtensions/mockdatafiles/secretExtensionsServiceSearch-default.json +32 -0
  190. package/entities/SecretExtensions/mockdatafiles/secretExtensionsServiceSearchActiveDirectorySecrets-default.json +16 -0
  191. package/entities/SecretExtensions/mockdatafiles/secretExtensionsServiceSearchWindowsAccountSecrets-default.json +44 -0
  192. package/entities/SecretExtensions/schema.json +23 -0
  193. package/entities/SecretHealth/action.json +25 -0
  194. package/entities/SecretHealth/schema.json +63 -0
  195. package/entities/SecretHooks/action.json +230 -0
  196. package/entities/SecretHooks/mockdatafiles/secretHooksServiceGetHooks-default.json +54 -0
  197. package/entities/SecretHooks/mockdatafiles/secretHooksServiceGetHooksV2-default.json +54 -0
  198. package/entities/SecretHooks/schema.json +29 -0
  199. package/entities/SecretPermissions/action.json +147 -0
  200. package/entities/SecretPermissions/schema.json +124 -0
  201. package/entities/SecretPolicy/action.json +149 -0
  202. package/entities/SecretPolicy/schema.json +80 -0
  203. package/entities/SecretServerSettings/action.json +86 -0
  204. package/entities/SecretServerSettings/schema.json +22 -0
  205. package/entities/SecretSessions/action.json +150 -0
  206. package/entities/SecretSessions/schema.json +256 -0
  207. package/entities/SecretTemplatePermissions/action.json +107 -0
  208. package/entities/SecretTemplatePermissions/mockdatafiles/secretTemplatePermissionsServiceGetTemplatePermissionRoles-default.json +18 -0
  209. package/entities/SecretTemplatePermissions/schema.json +111 -0
  210. package/entities/SecretTemplates/action.json +822 -0
  211. package/entities/SecretTemplates/mockdatafiles/secretTemplatesServiceGetPasswordDictionaries-default.json +14 -0
  212. package/entities/SecretTemplates/schema.json +168 -0
  213. package/entities/Secrets/action.json +1101 -0
  214. package/entities/Secrets/mockdatafiles/secretsServiceGetFavorites-default.json +26 -0
  215. package/entities/Secrets/mockdatafiles/secretsServiceGetSecretExtendedSearchDetails-default.json +34 -0
  216. package/entities/Secrets/schema.json +391 -0
  217. package/entities/SecurityAuditLogs/action.json +25 -0
  218. package/entities/SecurityAuditLogs/schema.json +74 -0
  219. package/entities/ServerNodes/action.json +66 -0
  220. package/entities/ServerNodes/mockdatafiles/serverNodesServiceGetList-default.json +59 -0
  221. package/entities/ServerNodes/schema.json +21 -0
  222. package/entities/Sites/action.json +25 -0
  223. package/entities/Sites/mockdatafiles/sitesServiceGet-default.json +7 -0
  224. package/entities/Sites/schema.json +19 -0
  225. package/entities/Slack/action.json +106 -0
  226. package/entities/Slack/schema.json +23 -0
  227. package/entities/SshCommand/action.json +107 -0
  228. package/entities/SshCommand/schema.json +78 -0
  229. package/entities/SshCommandBlocklist/action.json +128 -0
  230. package/entities/SshCommandBlocklist/schema.json +101 -0
  231. package/entities/SshCommandMenu/action.json +149 -0
  232. package/entities/SshCommandMenu/schema.json +91 -0
  233. package/entities/Teams/action.json +251 -0
  234. package/entities/Teams/mockdatafiles/teamsServiceAddTeamMember-default.json +30 -0
  235. package/entities/Teams/mockdatafiles/teamsServiceAddTeamSite-default.json +14 -0
  236. package/entities/Teams/mockdatafiles/teamsServiceGetTeamMembers-default.json +23 -0
  237. package/entities/Teams/mockdatafiles/teamsServiceGetTeamSites-default.json +20 -0
  238. package/entities/Teams/schema.json +85 -0
  239. package/entities/TicketSystems/action.json +128 -0
  240. package/entities/TicketSystems/mockdatafiles/ticketSystemsServiceGetTicketSystems-default.json +24 -0
  241. package/entities/TicketSystems/schema.json +57 -0
  242. package/entities/Users/action.json +841 -0
  243. package/entities/Users/schema.json +202 -0
  244. package/entities/Version/action.json +25 -0
  245. package/entities/Version/schema.json +19 -0
  246. package/entities/WorkflowInstances/action.json +25 -0
  247. package/entities/WorkflowInstances/mockdatafiles/workflowInstancesServiceGetByTemplateId-default.json +47 -0
  248. package/entities/WorkflowInstances/schema.json +19 -0
  249. package/entities/WorkflowStepTemplates/action.json +127 -0
  250. package/entities/WorkflowStepTemplates/mockdatafiles/workflowStepTemplatesServiceUpdateStep-default.json +43 -0
  251. package/entities/WorkflowStepTemplates/schema.json +57 -0
  252. package/entities/WorkflowTemplates/action.json +169 -0
  253. package/entities/WorkflowTemplates/schema.json +81 -0
  254. package/error.json +190 -0
  255. package/package.json +85 -0
  256. package/pronghorn.json +47291 -0
  257. package/propertiesDecorators.json +14 -0
  258. package/propertiesSchema.json +1248 -0
  259. package/refs?service=git-upload-pack +0 -0
  260. package/report/Delinea_Swagger.json-OpenApi3Json.json +135346 -0
  261. package/report/adapterInfo.json +10 -0
  262. package/report/creationReport.json +5205 -0
  263. package/sampleProperties.json +195 -0
  264. package/test/integration/adapterTestBasicGet.js +83 -0
  265. package/test/integration/adapterTestConnectivity.js +93 -0
  266. package/test/integration/adapterTestIntegration.js +20829 -0
  267. package/test/unit/adapterBaseTestUnit.js +949 -0
  268. package/test/unit/adapterTestUnit.js +18668 -0
  269. package/utils/adapterInfo.js +206 -0
  270. package/utils/addAuth.js +94 -0
  271. package/utils/artifactize.js +146 -0
  272. package/utils/basicGet.js +50 -0
  273. package/utils/checkMigrate.js +63 -0
  274. package/utils/entitiesToDB.js +178 -0
  275. package/utils/findPath.js +74 -0
  276. package/utils/methodDocumentor.js +225 -0
  277. package/utils/modify.js +154 -0
  278. package/utils/packModificationScript.js +35 -0
  279. package/utils/patches2bundledDeps.js +90 -0
  280. package/utils/pre-commit.sh +32 -0
  281. package/utils/removeHooks.js +20 -0
  282. package/utils/setup.js +33 -0
  283. package/utils/tbScript.js +246 -0
  284. package/utils/tbUtils.js +490 -0
  285. package/utils/testRunner.js +298 -0
  286. package/utils/troubleshootingAdapter.js +195 -0
  287. package/workflows/README.md +3 -0
@@ -0,0 +1,195 @@
1
+ {
2
+ "id": "Adapter-delinea",
3
+ "type": "Delinea",
4
+ "properties": {
5
+ "host": "localhost",
6
+ "port": 443,
7
+ "base_path": "/https:/sspam.armstrongceilings.com/api",
8
+ "version": "",
9
+ "cache_location": "none",
10
+ "encode_pathvars": true,
11
+ "encode_queryvars": true,
12
+ "save_metric": false,
13
+ "stub": true,
14
+ "protocol": "https",
15
+ "authentication": {
16
+ "auth_method": "no_authentication",
17
+ "username": "username",
18
+ "password": "password",
19
+ "token": "token",
20
+ "token_timeout": 600000,
21
+ "token_cache": "local",
22
+ "invalid_token_error": 401,
23
+ "auth_field": "header.headers.Authorization",
24
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
25
+ "auth_logging": false,
26
+ "client_id": "",
27
+ "client_secret": "",
28
+ "grant_type": ""
29
+ },
30
+ "healthcheck": {
31
+ "type": "none",
32
+ "frequency": 60000,
33
+ "query_object": {}
34
+ },
35
+ "throttle": {
36
+ "throttle_enabled": false,
37
+ "number_pronghorns": 1,
38
+ "sync_async": "sync",
39
+ "max_in_queue": 1000,
40
+ "concurrent_max": 1,
41
+ "expire_timeout": 0,
42
+ "avg_runtime": 200,
43
+ "priorities": [
44
+ {
45
+ "value": 0,
46
+ "percent": 100
47
+ }
48
+ ]
49
+ },
50
+ "request": {
51
+ "number_redirects": 0,
52
+ "number_retries": 3,
53
+ "limit_retry_error": [
54
+ 0
55
+ ],
56
+ "failover_codes": [],
57
+ "attempt_timeout": 5000,
58
+ "global_request": {
59
+ "payload": {},
60
+ "uriOptions": {},
61
+ "addlHeaders": {},
62
+ "authData": {}
63
+ },
64
+ "healthcheck_on_timeout": true,
65
+ "return_raw": false,
66
+ "archiving": false,
67
+ "return_request": false
68
+ },
69
+ "proxy": {
70
+ "enabled": false,
71
+ "host": "",
72
+ "port": 1,
73
+ "protocol": "http",
74
+ "username": "",
75
+ "password": ""
76
+ },
77
+ "ssl": {
78
+ "ecdhCurve": "",
79
+ "enabled": false,
80
+ "accept_invalid_cert": false,
81
+ "ca_file": "",
82
+ "key_file": "",
83
+ "cert_file": "",
84
+ "secure_protocol": "",
85
+ "ciphers": ""
86
+ },
87
+ "mongo": {
88
+ "host": "",
89
+ "port": 0,
90
+ "database": "",
91
+ "username": "",
92
+ "password": "",
93
+ "replSet": "",
94
+ "db_ssl": {
95
+ "enabled": false,
96
+ "accept_invalid_cert": false,
97
+ "ca_file": "",
98
+ "key_file": "",
99
+ "cert_file": ""
100
+ }
101
+ },
102
+ "devicebroker": {
103
+ "getDevice": [
104
+ {
105
+ "path": "/get/devices/{id}",
106
+ "method": "GET",
107
+ "query": {},
108
+ "body": {},
109
+ "headers": {},
110
+ "handleFailure": "ignore",
111
+ "requestFields": {
112
+ "id": "name"
113
+ },
114
+ "responseDatakey": "",
115
+ "responseFields": {
116
+ "name": "host",
117
+ "ostype": "os",
118
+ "ostypePrefix": "system-",
119
+ "ipaddress": "attributes.ipaddr",
120
+ "port": "443"
121
+ }
122
+ }
123
+ ],
124
+ "getDevicesFiltered": [
125
+ {
126
+ "path": "/get/devices",
127
+ "method": "GET",
128
+ "query": {},
129
+ "body": {},
130
+ "headers": {},
131
+ "handleFailure": "ignore",
132
+ "requestFields": {},
133
+ "responseDatakey": "",
134
+ "responseFields": {
135
+ "name": "host",
136
+ "ostype": "os",
137
+ "ostypePrefix": "system-",
138
+ "ipaddress": "attributes.ipaddr",
139
+ "port": "443"
140
+ }
141
+ }
142
+ ],
143
+ "isAlive": [
144
+ {
145
+ "path": "/get/devices/{id}/status",
146
+ "method": "GET",
147
+ "query": {},
148
+ "body": {},
149
+ "headers": {},
150
+ "handleFailure": "ignore",
151
+ "requestFields": {
152
+ "id": "name"
153
+ },
154
+ "responseDatakey": "",
155
+ "responseFields": {
156
+ "status": "status",
157
+ "statusValue": "online"
158
+ }
159
+ }
160
+ ],
161
+ "getConfig": [
162
+ {
163
+ "path": "/get/devices/{id}/configPart1",
164
+ "method": "GET",
165
+ "query": {},
166
+ "body": {},
167
+ "headers": {},
168
+ "handleFailure": "ignore",
169
+ "requestFields": {
170
+ "id": "name"
171
+ },
172
+ "responseDatakey": "",
173
+ "responseFields": {}
174
+ }
175
+ ],
176
+ "getCount": [
177
+ {
178
+ "path": "/get/devices",
179
+ "method": "GET",
180
+ "query": {},
181
+ "body": {},
182
+ "headers": {},
183
+ "handleFailure": "ignore",
184
+ "requestFields": {},
185
+ "responseDatakey": "",
186
+ "responseFields": {}
187
+ }
188
+ ]
189
+ }
190
+ },
191
+ "groups": [],
192
+ "brokers": [],
193
+ "logLevel": "none",
194
+ "timeout": 120000
195
+ }
@@ -0,0 +1,83 @@
1
+ /* @copyright Itential, LLC 2020 */
2
+
3
+ /* global describe context before after */
4
+ /* eslint global-require: warn */
5
+ /* eslint no-unused-vars: warn */
6
+ /* eslint import/no-extraneous-dependencies: warn */
7
+ /* eslint import/no-dynamic-require: warn */
8
+ /* eslint import/no-unresolved: warn */
9
+
10
+ const mocha = require('mocha');
11
+ const path = require('path');
12
+ const assert = require('assert');
13
+ const itParam = require('mocha-param');
14
+
15
+ const utils = require('../../utils/tbUtils');
16
+ const basicGet = require('../../utils/basicGet');
17
+ const { name } = require('../../package.json');
18
+ const { methods } = require('../../pronghorn.json');
19
+
20
+ const getPronghornProps = (iapDir) => {
21
+ console.log('Retrieving properties.json file...');
22
+ const rawProps = require(path.join(iapDir, 'properties.json'));
23
+ console.log('Decrypting properties...');
24
+ const pronghornProps = utils.decryptProperties(rawProps, iapDir);
25
+ console.log('Found properties.\n');
26
+ return pronghornProps;
27
+ };
28
+
29
+ let a;
30
+
31
+ describe('[integration] Adapter BasicGET Test', () => {
32
+ context('Testing GET calls without query parameters', () => {
33
+ before(async () => {
34
+ const iapDir = path.join(__dirname, '../../../../../');
35
+ if (!utils.areWeUnderIAPinstallationDirectory()) {
36
+ const sampleProperties = require('../../sampleProperties.json');
37
+ const adapter = { properties: sampleProperties };
38
+ a = basicGet.getAdapterInstance(adapter);
39
+ } else {
40
+ const pronghornProps = getPronghornProps(iapDir);
41
+ console.log('Connecting to Database...');
42
+ const database = await basicGet.connect(pronghornProps);
43
+ console.log('Connection established.');
44
+ const adapter = await database.collection(utils.SERVICE_CONFIGS_COLLECTION).findOne(
45
+ { model: name }
46
+ );
47
+ a = basicGet.getAdapterInstance(adapter);
48
+ }
49
+ });
50
+
51
+ after((done) => {
52
+ done();
53
+ });
54
+
55
+ const basicGets = methods.filter((method) => (method.route.verb === 'GET' && method.input.length === 0));
56
+ if (basicGets.length === 0) {
57
+ console.log('No non-parameter GET calls found.');
58
+ process.exit(0);
59
+ }
60
+ const functionNames = basicGets.map((g) => g.name);
61
+ const request = function request(f, ad) {
62
+ return new Promise((resolve, reject) => {
63
+ const getRespCode = (resp) => {
64
+ if (resp) {
65
+ if (resp.metrics.code !== 200) {
66
+ console.log('\x1b[31m', `Testing ${f} \nResponseCode: ${resp.metrics.code}`);
67
+ }
68
+ resolve(resp.metrics.code);
69
+ } else {
70
+ console.log('\x1b[31m', `call ${f} results in failure`);
71
+ reject(new Error(`${f} failed`));
72
+ }
73
+ };
74
+ ad[f](getRespCode, console.log);
75
+ });
76
+ };
77
+
78
+ itParam('GET call should return 200', functionNames, (fname) => {
79
+ console.log(`\t ${fname}`);
80
+ return request(fname, a).then((result) => assert.equal(result, 200));
81
+ });
82
+ });
83
+ });
@@ -0,0 +1,93 @@
1
+ /* @copyright Itential, LLC 2020 */
2
+
3
+ /* global describe it context before after */
4
+ /* eslint no-unused-vars: warn */
5
+
6
+ const mocha = require('mocha');
7
+ const assert = require('assert');
8
+ const diagnostics = require('network-diagnostics');
9
+
10
+ let host;
11
+ process.argv.forEach((val) => {
12
+ if (val.indexOf('--HOST') === 0) {
13
+ [, host] = val.split('=');
14
+ }
15
+ });
16
+
17
+ describe('[integration] Adapter Test', () => {
18
+ context(`Testing network connection on ${host}`, () => {
19
+ before(() => {
20
+ diagnostics.setTestURL(host);
21
+ });
22
+
23
+ after((done) => {
24
+ done();
25
+ });
26
+
27
+ it('DNS resolve', (done) => {
28
+ diagnostics.haveDNS((result) => {
29
+ try {
30
+ assert.equal(result, true);
31
+ done();
32
+ } catch (error) {
33
+ done(error);
34
+ }
35
+ });
36
+ });
37
+
38
+ it('Responds to ping', (done) => {
39
+ diagnostics.havePing((result) => {
40
+ try {
41
+ assert.equal(result, true);
42
+ done();
43
+ } catch (error) {
44
+ done(error);
45
+ }
46
+ });
47
+ });
48
+
49
+ it('Support HTTP on port 80', (done) => {
50
+ diagnostics.haveHTTP((result) => {
51
+ try {
52
+ assert.equal(result, true);
53
+ done();
54
+ } catch (error) {
55
+ done(error);
56
+ }
57
+ });
58
+ });
59
+
60
+ it('Support HTTPS on port 443', (done) => {
61
+ diagnostics.haveHTTPS((result) => {
62
+ try {
63
+ assert.equal(result, true);
64
+ done();
65
+ } catch (error) {
66
+ done(error);
67
+ }
68
+ });
69
+ });
70
+
71
+ it('Support IPv4', (done) => {
72
+ diagnostics.haveIPv4Async((result) => {
73
+ try {
74
+ assert.equal(result, true);
75
+ done();
76
+ } catch (error) {
77
+ done(error);
78
+ }
79
+ });
80
+ });
81
+
82
+ it('Support IPv6', (done) => {
83
+ diagnostics.haveIPv6Async((result) => {
84
+ try {
85
+ assert.equal(result, true);
86
+ done();
87
+ } catch (error) {
88
+ done(error);
89
+ }
90
+ });
91
+ });
92
+ });
93
+ });