@itentialopensource/adapter-infoblox_universal_ddi 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 (111) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +19 -0
  3. package/.jshintrc +3 -0
  4. package/AUTH.md +39 -0
  5. package/BROKER.md +211 -0
  6. package/CALLS.md +923 -0
  7. package/CODE_OF_CONDUCT.md +43 -0
  8. package/CONTRIBUTING.md +13 -0
  9. package/ENHANCE.md +69 -0
  10. package/LICENSE +201 -0
  11. package/PROPERTIES.md +661 -0
  12. package/README.md +344 -0
  13. package/SUMMARY.md +9 -0
  14. package/SYSTEMINFO.md +16 -0
  15. package/TAB1.md +10 -0
  16. package/TAB2.md +314 -0
  17. package/TROUBLESHOOT.md +56 -0
  18. package/UTILITIES.md +473 -0
  19. package/adapter.js +13131 -0
  20. package/adapterBase.js +1488 -0
  21. package/entities/.generic/action.json +214 -0
  22. package/entities/.generic/schema.json +28 -0
  23. package/entities/.system/action.json +50 -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 +53 -0
  29. package/entities/Address/action.json +106 -0
  30. package/entities/Address/schema.json +122 -0
  31. package/entities/AddressBlock/action.json +270 -0
  32. package/entities/AddressBlock/schema.json +163 -0
  33. package/entities/Asm/action.json +66 -0
  34. package/entities/Asm/schema.json +43 -0
  35. package/entities/ConfigProfile/action.json +126 -0
  36. package/entities/ConfigProfile/schema.json +90 -0
  37. package/entities/DhcpHost/action.json +87 -0
  38. package/entities/DhcpHost/schema.json +110 -0
  39. package/entities/DhcpUniversalService/action.json +46 -0
  40. package/entities/DhcpUniversalService/schema.json +20 -0
  41. package/entities/DnsUsage/action.json +46 -0
  42. package/entities/DnsUsage/schema.json +86 -0
  43. package/entities/Filter/action.json +25 -0
  44. package/entities/Filter/schema.json +107 -0
  45. package/entities/FixedAddress/action.json +106 -0
  46. package/entities/FixedAddress/schema.json +111 -0
  47. package/entities/Global/action.json +86 -0
  48. package/entities/Global/schema.json +33 -0
  49. package/entities/HaGroup/action.json +106 -0
  50. package/entities/HaGroup/schema.json +122 -0
  51. package/entities/HardwareFilter/action.json +106 -0
  52. package/entities/HardwareFilter/schema.json +111 -0
  53. package/entities/IpSpace/action.json +167 -0
  54. package/entities/IpSpace/schema.json +136 -0
  55. package/entities/IpamHost/action.json +106 -0
  56. package/entities/IpamHost/schema.json +111 -0
  57. package/entities/LeasesCommand/action.json +24 -0
  58. package/entities/LeasesCommand/schema.json +19 -0
  59. package/entities/MacAddressItem/action.json +146 -0
  60. package/entities/MacAddressItem/schema.json +91 -0
  61. package/entities/OptionCode/action.json +106 -0
  62. package/entities/OptionCode/schema.json +89 -0
  63. package/entities/OptionFilter/action.json +106 -0
  64. package/entities/OptionFilter/schema.json +111 -0
  65. package/entities/OptionGroup/action.json +106 -0
  66. package/entities/OptionGroup/schema.json +111 -0
  67. package/entities/OptionSpace/action.json +106 -0
  68. package/entities/OptionSpace/schema.json +111 -0
  69. package/entities/Range/action.json +147 -0
  70. package/entities/Range/schema.json +113 -0
  71. package/entities/Server/action.json +106 -0
  72. package/entities/Server/schema.json +111 -0
  73. package/entities/Service/action.json +46 -0
  74. package/entities/Service/schema.json +108 -0
  75. package/entities/Subnet/action.json +188 -0
  76. package/entities/Subnet/schema.json +137 -0
  77. package/error.json +190 -0
  78. package/metadata.json +61 -0
  79. package/package.json +75 -0
  80. package/pronghorn.json +8232 -0
  81. package/propertiesDecorators.json +18 -0
  82. package/propertiesSchema.json +1727 -0
  83. package/report/adapterInfo.json +10 -0
  84. package/report/auto-adapter-openapi.json +6163 -0
  85. package/report/creationReport.json +1150 -0
  86. package/report/universal_ddi_v1.json +10288 -0
  87. package/sampleProperties.json +260 -0
  88. package/test/integration/adapterTestBasicGet.js +117 -0
  89. package/test/integration/adapterTestConnectivity.js +117 -0
  90. package/test/integration/adapterTestIntegration.js +3484 -0
  91. package/test/unit/adapterBaseTestUnit.js +1628 -0
  92. package/test/unit/adapterTestUnit.js +4871 -0
  93. package/utils/adapterInfo.js +156 -0
  94. package/utils/argParser.js +44 -0
  95. package/utils/checkMigrate.js +102 -0
  96. package/utils/entitiesToDB.js +190 -0
  97. package/utils/findPath.js +74 -0
  98. package/utils/logger.js +26 -0
  99. package/utils/methodDocumentor.js +273 -0
  100. package/utils/modify.js +153 -0
  101. package/utils/mongoDbConnection.js +79 -0
  102. package/utils/mongoUtils.js +162 -0
  103. package/utils/pre-commit.sh +32 -0
  104. package/utils/removeHooks.js +20 -0
  105. package/utils/setup.js +33 -0
  106. package/utils/taskMover.js +308 -0
  107. package/utils/tbScript.js +103 -0
  108. package/utils/tbUtils.js +347 -0
  109. package/utils/testRunner.js +298 -0
  110. package/utils/troubleshootingAdapter.js +177 -0
  111. package/utils/updateAdapterConfig.js +158 -0
@@ -0,0 +1,4871 @@
1
+ /* @copyright Itential, LLC 2019 (pre-modifications) */
2
+
3
+ // Set globals
4
+ /* global describe it log pronghornProps */
5
+ /* eslint global-require: warn */
6
+ /* eslint no-unused-vars: warn */
7
+ /* eslint import/no-dynamic-require:warn */
8
+
9
+ // include required items for testing & logging
10
+ const assert = require('assert');
11
+ const path = require('path');
12
+ const util = require('util');
13
+ const execute = require('child_process').execSync;
14
+ const fs = require('fs-extra');
15
+ const mocha = require('mocha');
16
+ const winston = require('winston');
17
+ const { expect } = require('chai');
18
+ const { use } = require('chai');
19
+ const td = require('testdouble');
20
+ const Ajv = require('ajv');
21
+ const log = require('../../utils/logger');
22
+
23
+ const ajv = new Ajv({ strictSchema: false, allErrors: true, allowUnionTypes: true });
24
+ const anything = td.matchers.anything();
25
+ const isRapidFail = false;
26
+
27
+ // read in the properties from the sampleProperties files
28
+ let adaptdir = __dirname;
29
+ if (adaptdir.endsWith('/test/integration')) {
30
+ adaptdir = adaptdir.substring(0, adaptdir.length - 17);
31
+ } else if (adaptdir.endsWith('/test/unit')) {
32
+ adaptdir = adaptdir.substring(0, adaptdir.length - 10);
33
+ }
34
+ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
35
+
36
+ // these variables can be changed to run in integrated mode so easier to set them here
37
+ // always check these in with bogus data!!!
38
+ samProps.stub = true;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
50
+ samProps.request.attempt_timeout = 1200000;
51
+ const attemptTimeout = samProps.request.attempt_timeout;
52
+ const { stub } = samProps;
53
+
54
+ // these are the adapter properties. You generally should not need to alter
55
+ // any of these after they are initially set up
56
+ global.pronghornProps = {
57
+ pathProps: {
58
+ encrypted: false
59
+ },
60
+ adapterProps: {
61
+ adapters: [{
62
+ id: 'Test-infoblox_universal_ddi',
63
+ type: 'InfobloxUniversalDdi',
64
+ properties: samProps
65
+ }]
66
+ }
67
+ };
68
+
69
+ global.$HOME = `${__dirname}/../..`;
70
+
71
+ /**
72
+ * Runs the error asserts for the test
73
+ */
74
+ function runErrorAsserts(data, error, code, origin, displayStr) {
75
+ assert.equal(null, data);
76
+ assert.notEqual(undefined, error);
77
+ assert.notEqual(null, error);
78
+ assert.notEqual(undefined, error.IAPerror);
79
+ assert.notEqual(null, error.IAPerror);
80
+ assert.notEqual(undefined, error.IAPerror.displayString);
81
+ assert.notEqual(null, error.IAPerror.displayString);
82
+ assert.equal(code, error.icode);
83
+ assert.equal(origin, error.IAPerror.origin);
84
+ assert.equal(displayStr, error.IAPerror.displayString);
85
+ }
86
+
87
+ // require the adapter that we are going to be using
88
+ const InfobloxUniversalDdi = require('../../adapter');
89
+
90
+ // delete the .DS_Store directory in entities -- otherwise this will cause errors
91
+ const dirPath = path.join(__dirname, '../../entities/.DS_Store');
92
+ if (fs.existsSync(dirPath)) {
93
+ try {
94
+ fs.removeSync(dirPath);
95
+ console.log('.DS_Store deleted');
96
+ } catch (e) {
97
+ console.log('Error when deleting .DS_Store:', e);
98
+ }
99
+ }
100
+
101
+ // begin the testing - these should be pretty well defined between the describe and the it!
102
+ describe('[unit] Infoblox_universal_ddi Adapter Test', () => {
103
+ describe('InfobloxUniversalDdi Class Tests', () => {
104
+ const a = new InfobloxUniversalDdi(
105
+ pronghornProps.adapterProps.adapters[0].id,
106
+ pronghornProps.adapterProps.adapters[0].properties
107
+ );
108
+
109
+ if (isRapidFail) {
110
+ const state = {};
111
+ state.passed = true;
112
+
113
+ mocha.afterEach(function x() {
114
+ state.passed = state.passed
115
+ && (this.currentTest.state === 'passed');
116
+ });
117
+ mocha.beforeEach(function x() {
118
+ if (!state.passed) {
119
+ return this.currentTest.skip();
120
+ }
121
+ return true;
122
+ });
123
+ }
124
+
125
+ describe('#class instance created', () => {
126
+ it('should be a class with properties', (done) => {
127
+ try {
128
+ assert.notEqual(null, a);
129
+ assert.notEqual(undefined, a);
130
+ const checkId = global.pronghornProps.adapterProps.adapters[0].id;
131
+ assert.equal(checkId, a.id);
132
+ assert.notEqual(null, a.allProps);
133
+ const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
134
+ assert.equal(check, a.healthcheckType);
135
+ done();
136
+ } catch (error) {
137
+ log.error(`Test Failure: ${error}`);
138
+ done(error);
139
+ }
140
+ }).timeout(attemptTimeout);
141
+ });
142
+
143
+ describe('adapterBase.js', () => {
144
+ it('should have an adapterBase.js', (done) => {
145
+ try {
146
+ fs.exists('adapterBase.js', (val) => {
147
+ assert.equal(true, val);
148
+ done();
149
+ });
150
+ } catch (error) {
151
+ log.error(`Test Failure: ${error}`);
152
+ done(error);
153
+ }
154
+ });
155
+ });
156
+
157
+ let wffunctions = [];
158
+ describe('#iapGetAdapterWorkflowFunctions', () => {
159
+ it('should retrieve workflow functions', (done) => {
160
+ try {
161
+ wffunctions = a.iapGetAdapterWorkflowFunctions([]);
162
+
163
+ try {
164
+ assert.notEqual(0, wffunctions.length);
165
+ done();
166
+ } catch (err) {
167
+ log.error(`Test Failure: ${err}`);
168
+ done(err);
169
+ }
170
+ } catch (error) {
171
+ log.error(`Adapter Exception: ${error}`);
172
+ done(error);
173
+ }
174
+ }).timeout(attemptTimeout);
175
+ });
176
+
177
+ describe('package.json', () => {
178
+ it('should have a package.json', (done) => {
179
+ try {
180
+ fs.exists('package.json', (val) => {
181
+ assert.equal(true, val);
182
+ done();
183
+ });
184
+ } catch (error) {
185
+ log.error(`Test Failure: ${error}`);
186
+ done(error);
187
+ }
188
+ });
189
+ it('package.json should be validated', (done) => {
190
+ try {
191
+ const packageDotJson = require('../../package.json');
192
+ // Define the JSON schema for package.json
193
+ const packageJsonSchema = {
194
+ type: 'object',
195
+ properties: {
196
+ name: { type: 'string' },
197
+ version: { type: 'string' }
198
+ // May need to add more properties as needed
199
+ },
200
+ required: ['name', 'version']
201
+ };
202
+ const validate = ajv.compile(packageJsonSchema);
203
+ const isValid = validate(packageDotJson);
204
+
205
+ if (isValid === false) {
206
+ log.error('The package.json contains errors');
207
+ assert.equal(true, isValid);
208
+ } else {
209
+ assert.equal(true, isValid);
210
+ }
211
+
212
+ done();
213
+ } catch (error) {
214
+ log.error(`Test Failure: ${error}`);
215
+ done(error);
216
+ }
217
+ });
218
+ it('package.json standard fields should be customized', (done) => {
219
+ try {
220
+ const packageDotJson = require('../../package.json');
221
+ assert.notEqual(-1, packageDotJson.name.indexOf('infoblox_universal_ddi'));
222
+ assert.notEqual(undefined, packageDotJson.version);
223
+ assert.notEqual(null, packageDotJson.version);
224
+ assert.notEqual('', packageDotJson.version);
225
+ assert.notEqual(undefined, packageDotJson.description);
226
+ assert.notEqual(null, packageDotJson.description);
227
+ assert.notEqual('', packageDotJson.description);
228
+ assert.equal('adapter.js', packageDotJson.main);
229
+ assert.notEqual(undefined, packageDotJson.wizardVersion);
230
+ assert.notEqual(null, packageDotJson.wizardVersion);
231
+ assert.notEqual('', packageDotJson.wizardVersion);
232
+ assert.notEqual(undefined, packageDotJson.engineVersion);
233
+ assert.notEqual(null, packageDotJson.engineVersion);
234
+ assert.notEqual('', packageDotJson.engineVersion);
235
+ assert.equal('http', packageDotJson.adapterType);
236
+ done();
237
+ } catch (error) {
238
+ log.error(`Test Failure: ${error}`);
239
+ done(error);
240
+ }
241
+ });
242
+ it('package.json proper scripts should be provided', (done) => {
243
+ try {
244
+ const packageDotJson = require('../../package.json');
245
+ assert.notEqual(undefined, packageDotJson.scripts);
246
+ assert.notEqual(null, packageDotJson.scripts);
247
+ assert.notEqual('', packageDotJson.scripts);
248
+ assert.equal('node utils/setup.js', packageDotJson.scripts.preinstall);
249
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
250
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
251
+ assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
252
+ assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
253
+ assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
254
+ assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
255
+ done();
256
+ } catch (error) {
257
+ log.error(`Test Failure: ${error}`);
258
+ done(error);
259
+ }
260
+ });
261
+ it('package.json proper directories should be provided', (done) => {
262
+ try {
263
+ const packageDotJson = require('../../package.json');
264
+ assert.notEqual(undefined, packageDotJson.repository);
265
+ assert.notEqual(null, packageDotJson.repository);
266
+ assert.notEqual('', packageDotJson.repository);
267
+ assert.equal('git', packageDotJson.repository.type);
268
+ assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
269
+ assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
270
+ done();
271
+ } catch (error) {
272
+ log.error(`Test Failure: ${error}`);
273
+ done(error);
274
+ }
275
+ });
276
+ it('package.json proper dependencies should be provided', (done) => {
277
+ try {
278
+ const packageDotJson = require('../../package.json');
279
+ assert.notEqual(undefined, packageDotJson.dependencies);
280
+ assert.notEqual(null, packageDotJson.dependencies);
281
+ assert.notEqual('', packageDotJson.dependencies);
282
+ assert.equal('8.17.1', packageDotJson.dependencies.ajv);
283
+ assert.equal('1.9.0', packageDotJson.dependencies.axios);
284
+ assert.equal('11.1.0', packageDotJson.dependencies.commander);
285
+ assert.equal('11.3.0', packageDotJson.dependencies['fs-extra']);
286
+ assert.equal('10.8.2', packageDotJson.dependencies.mocha);
287
+ assert.equal('2.0.1', packageDotJson.dependencies['mocha-param']);
288
+ assert.equal('0.4.4', packageDotJson.dependencies.ping);
289
+ assert.equal('1.4.10', packageDotJson.dependencies['readline-sync']);
290
+ assert.equal('7.7.2', packageDotJson.dependencies.semver);
291
+ assert.equal('3.17.0', packageDotJson.dependencies.winston);
292
+ done();
293
+ } catch (error) {
294
+ log.error(`Test Failure: ${error}`);
295
+ done(error);
296
+ }
297
+ });
298
+ it('package.json proper dev dependencies should be provided', (done) => {
299
+ try {
300
+ const packageDotJson = require('../../package.json');
301
+ assert.notEqual(undefined, packageDotJson.devDependencies);
302
+ assert.notEqual(null, packageDotJson.devDependencies);
303
+ assert.notEqual('', packageDotJson.devDependencies);
304
+ assert.equal('4.5.0', packageDotJson.devDependencies.chai);
305
+ assert.equal('8.57.0', packageDotJson.devDependencies.eslint);
306
+ assert.equal('15.0.0', packageDotJson.devDependencies['eslint-config-airbnb-base']);
307
+ assert.equal('2.31.0', packageDotJson.devDependencies['eslint-plugin-import']);
308
+ assert.equal('3.1.0', packageDotJson.devDependencies['eslint-plugin-json']);
309
+ assert.equal('3.18.0', packageDotJson.devDependencies.testdouble);
310
+ done();
311
+ } catch (error) {
312
+ log.error(`Test Failure: ${error}`);
313
+ done(error);
314
+ }
315
+ });
316
+ });
317
+
318
+ describe('pronghorn.json', () => {
319
+ it('should have a pronghorn.json', (done) => {
320
+ try {
321
+ fs.exists('pronghorn.json', (val) => {
322
+ assert.equal(true, val);
323
+ done();
324
+ });
325
+ } catch (error) {
326
+ log.error(`Test Failure: ${error}`);
327
+ done(error);
328
+ }
329
+ });
330
+ it('pronghorn.json should be customized', (done) => {
331
+ try {
332
+ const pronghornDotJson = require('../../pronghorn.json');
333
+ assert.notEqual(-1, pronghornDotJson.id.indexOf('infoblox_universal_ddi'));
334
+ assert.equal('Adapter', pronghornDotJson.type);
335
+ assert.equal('InfobloxUniversalDdi', pronghornDotJson.export);
336
+ assert.equal('Infoblox_universal_ddi', pronghornDotJson.title);
337
+ assert.equal('adapter.js', pronghornDotJson.src);
338
+ done();
339
+ } catch (error) {
340
+ log.error(`Test Failure: ${error}`);
341
+ done(error);
342
+ }
343
+ });
344
+ it('pronghorn.json should contain generic adapter methods', (done) => {
345
+ try {
346
+ const pronghornDotJson = require('../../pronghorn.json');
347
+ assert.notEqual(undefined, pronghornDotJson.methods);
348
+ assert.notEqual(null, pronghornDotJson.methods);
349
+ assert.notEqual('', pronghornDotJson.methods);
350
+ assert.equal(true, Array.isArray(pronghornDotJson.methods));
351
+ assert.notEqual(0, pronghornDotJson.methods.length);
352
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUpdateAdapterConfiguration'));
353
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapSuspendAdapter'));
354
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUnsuspendAdapter'));
355
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterQueue'));
356
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapFindAdapterPath'));
357
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapTroubleshootAdapter'));
358
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterHealthcheck'));
359
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterConnectivity'));
360
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterBasicGet'));
361
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapMoveAdapterEntitiesToDB'));
362
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapDeactivateTasks'));
363
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapActivateTasks'));
364
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapPopulateEntityCache'));
365
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRetrieveEntitiesCache'));
366
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getDevice'));
367
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getDevicesFiltered'));
368
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'isAlive'));
369
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getConfig'));
370
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetDeviceCount'));
371
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapExpandedGenericAdapterRequest'));
372
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequest'));
373
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequestNoBasePath'));
374
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterLint'));
375
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterTests'));
376
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterInventory'));
377
+ done();
378
+ } catch (error) {
379
+ log.error(`Test Failure: ${error}`);
380
+ done(error);
381
+ }
382
+ });
383
+ it('pronghorn.json should only expose workflow functions', (done) => {
384
+ try {
385
+ const pronghornDotJson = require('../../pronghorn.json');
386
+
387
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
388
+ let found = false;
389
+ let paramissue = false;
390
+
391
+ for (let w = 0; w < wffunctions.length; w += 1) {
392
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
393
+ found = true;
394
+ const methLine = execute(`grep " ${wffunctions[w]}(" adapter.js | grep "callback) {"`).toString();
395
+ let wfparams = [];
396
+
397
+ if (methLine && methLine.indexOf('(') >= 0 && methLine.indexOf(')') >= 0) {
398
+ const temp = methLine.substring(methLine.indexOf('(') + 1, methLine.lastIndexOf(')'));
399
+ wfparams = temp.split(',');
400
+
401
+ for (let t = 0; t < wfparams.length; t += 1) {
402
+ // remove default value from the parameter name
403
+ wfparams[t] = wfparams[t].substring(0, wfparams[t].search(/=/) > 0 ? wfparams[t].search(/#|\?|=/) : wfparams[t].length);
404
+ // remove spaces
405
+ wfparams[t] = wfparams[t].trim();
406
+
407
+ if (wfparams[t] === 'callback') {
408
+ wfparams.splice(t, 1);
409
+ }
410
+ }
411
+ }
412
+
413
+ // if there are inputs defined but not on the method line
414
+ if (wfparams.length === 0 && (pronghornDotJson.methods[m].input
415
+ && pronghornDotJson.methods[m].input.length > 0)) {
416
+ paramissue = true;
417
+ } else if (wfparams.length > 0 && (!pronghornDotJson.methods[m].input
418
+ || pronghornDotJson.methods[m].input.length === 0)) {
419
+ // if there are no inputs defined but there are on the method line
420
+ paramissue = true;
421
+ } else {
422
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
423
+ let pfound = false;
424
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
425
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
426
+ pfound = true;
427
+ }
428
+ }
429
+
430
+ if (!pfound) {
431
+ paramissue = true;
432
+ }
433
+ }
434
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
435
+ let pfound = false;
436
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
437
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
438
+ pfound = true;
439
+ }
440
+ }
441
+
442
+ if (!pfound) {
443
+ paramissue = true;
444
+ }
445
+ }
446
+ }
447
+
448
+ break;
449
+ }
450
+ }
451
+
452
+ if (!found) {
453
+ // this is the reason to go through both loops - log which ones are not found so
454
+ // they can be worked
455
+ log.error(`${pronghornDotJson.methods[m].name} not found in workflow functions`);
456
+ }
457
+ if (paramissue) {
458
+ // this is the reason to go through both loops - log which ones are not found so
459
+ // they can be worked
460
+ log.error(`${pronghornDotJson.methods[m].name} has a parameter mismatch`);
461
+ }
462
+ assert.equal(true, found);
463
+ assert.equal(false, paramissue);
464
+ }
465
+ done();
466
+ } catch (error) {
467
+ log.error(`Adapter Exception: ${error}`);
468
+ done(error);
469
+ }
470
+ }).timeout(attemptTimeout);
471
+ it('pronghorn.json should expose all workflow functions', (done) => {
472
+ try {
473
+ const pronghornDotJson = require('../../pronghorn.json');
474
+ for (let w = 0; w < wffunctions.length; w += 1) {
475
+ let found = false;
476
+
477
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
478
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
479
+ found = true;
480
+ break;
481
+ }
482
+ }
483
+
484
+ if (!found) {
485
+ // this is the reason to go through both loops - log which ones are not found so
486
+ // they can be worked
487
+ log.error(`${wffunctions[w]} not found in pronghorn.json`);
488
+ }
489
+ assert.equal(true, found);
490
+ }
491
+ done();
492
+ } catch (error) {
493
+ log.error(`Adapter Exception: ${error}`);
494
+ done(error);
495
+ }
496
+ });
497
+ it('pronghorn.json verify input/output schema objects', (done) => {
498
+ const verifySchema = (methodName, schema) => {
499
+ try {
500
+ ajv.compile(schema);
501
+ } catch (error) {
502
+ const errorMessage = `Invalid schema found in '${methodName}' method.
503
+ Schema => ${JSON.stringify(schema)}.
504
+ Details => ${error.message}`;
505
+ throw new Error(errorMessage);
506
+ }
507
+ };
508
+
509
+ try {
510
+ const pronghornDotJson = require('../../pronghorn.json');
511
+ const { methods } = pronghornDotJson;
512
+ for (let i = 0; i < methods.length; i += 1) {
513
+ for (let j = 0; j < methods[i].input.length; j += 1) {
514
+ const inputSchema = methods[i].input[j].schema;
515
+ if (inputSchema) {
516
+ verifySchema(methods[i].name, inputSchema);
517
+ }
518
+ }
519
+ const outputSchema = methods[i].output.schema;
520
+ if (outputSchema) {
521
+ verifySchema(methods[i].name, outputSchema);
522
+ }
523
+ }
524
+ done();
525
+ } catch (error) {
526
+ log.error(`Adapter Exception: ${error}`);
527
+ done(error);
528
+ }
529
+ }).timeout(attemptTimeout);
530
+ });
531
+
532
+ describe('propertiesSchema.json', () => {
533
+ it('should have a propertiesSchema.json', (done) => {
534
+ try {
535
+ fs.exists('propertiesSchema.json', (val) => {
536
+ assert.equal(true, val);
537
+ done();
538
+ });
539
+ } catch (error) {
540
+ log.error(`Test Failure: ${error}`);
541
+ done(error);
542
+ }
543
+ });
544
+ it('propertiesSchema.json should be customized', (done) => {
545
+ try {
546
+ const propertiesDotJson = require('../../propertiesSchema.json');
547
+ assert.equal('adapter-infoblox_universal_ddi', propertiesDotJson.$id);
548
+ assert.equal('object', propertiesDotJson.type);
549
+ assert.equal('http://json-schema.org/draft-07/schema#', propertiesDotJson.$schema);
550
+ done();
551
+ } catch (error) {
552
+ log.error(`Test Failure: ${error}`);
553
+ done(error);
554
+ }
555
+ });
556
+ it('propertiesSchema.json should contain generic adapter properties', (done) => {
557
+ try {
558
+ const propertiesDotJson = require('../../propertiesSchema.json');
559
+ assert.notEqual(undefined, propertiesDotJson.properties);
560
+ assert.notEqual(null, propertiesDotJson.properties);
561
+ assert.notEqual('', propertiesDotJson.properties);
562
+ assert.equal('string', propertiesDotJson.properties.host.type);
563
+ assert.equal('integer', propertiesDotJson.properties.port.type);
564
+ assert.equal('boolean', propertiesDotJson.properties.stub.type);
565
+ assert.equal('string', propertiesDotJson.properties.protocol.type);
566
+ assert.notEqual(undefined, propertiesDotJson.definitions.authentication);
567
+ assert.notEqual(null, propertiesDotJson.definitions.authentication);
568
+ assert.notEqual('', propertiesDotJson.definitions.authentication);
569
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_method.type);
570
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.username.type);
571
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.password.type);
572
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token.type);
573
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.invalid_token_error.type);
574
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.token_timeout.type);
575
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token_cache.type);
576
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field.type));
577
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field_format.type));
578
+ assert.equal('boolean', propertiesDotJson.definitions.authentication.properties.auth_logging.type);
579
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
580
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
581
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
582
+ assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
583
+ assert.notEqual(null, propertiesDotJson.definitions.ssl);
584
+ assert.notEqual('', propertiesDotJson.definitions.ssl);
585
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ecdhCurve.type);
586
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.enabled.type);
587
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.accept_invalid_cert.type);
588
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ca_file.type);
589
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.key_file.type);
590
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.cert_file.type);
591
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.secure_protocol.type);
592
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ciphers.type);
593
+ assert.equal('string', propertiesDotJson.properties.base_path.type);
594
+ assert.equal('string', propertiesDotJson.properties.version.type);
595
+ assert.equal('string', propertiesDotJson.properties.cache_location.type);
596
+ assert.equal('boolean', propertiesDotJson.properties.encode_pathvars.type);
597
+ assert.equal('boolean', propertiesDotJson.properties.encode_queryvars.type);
598
+ assert.equal(true, Array.isArray(propertiesDotJson.properties.save_metric.type));
599
+ assert.notEqual(undefined, propertiesDotJson.definitions);
600
+ assert.notEqual(null, propertiesDotJson.definitions);
601
+ assert.notEqual('', propertiesDotJson.definitions);
602
+ assert.notEqual(undefined, propertiesDotJson.definitions.healthcheck);
603
+ assert.notEqual(null, propertiesDotJson.definitions.healthcheck);
604
+ assert.notEqual('', propertiesDotJson.definitions.healthcheck);
605
+ assert.equal('string', propertiesDotJson.definitions.healthcheck.properties.type.type);
606
+ assert.equal('integer', propertiesDotJson.definitions.healthcheck.properties.frequency.type);
607
+ assert.equal('object', propertiesDotJson.definitions.healthcheck.properties.query_object.type);
608
+ assert.notEqual(undefined, propertiesDotJson.definitions.throttle);
609
+ assert.notEqual(null, propertiesDotJson.definitions.throttle);
610
+ assert.notEqual('', propertiesDotJson.definitions.throttle);
611
+ assert.equal('boolean', propertiesDotJson.definitions.throttle.properties.throttle_enabled.type);
612
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.number_pronghorns.type);
613
+ assert.equal('string', propertiesDotJson.definitions.throttle.properties.sync_async.type);
614
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.max_in_queue.type);
615
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.concurrent_max.type);
616
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.expire_timeout.type);
617
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.avg_runtime.type);
618
+ assert.equal('array', propertiesDotJson.definitions.throttle.properties.priorities.type);
619
+ assert.notEqual(undefined, propertiesDotJson.definitions.request);
620
+ assert.notEqual(null, propertiesDotJson.definitions.request);
621
+ assert.notEqual('', propertiesDotJson.definitions.request);
622
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_redirects.type);
623
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_retries.type);
624
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.request.properties.limit_retry_error.type));
625
+ assert.equal('array', propertiesDotJson.definitions.request.properties.failover_codes.type);
626
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.attempt_timeout.type);
627
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.type);
628
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.payload.type);
629
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.uriOptions.type);
630
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.addlHeaders.type);
631
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.authData.type);
632
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.healthcheck_on_timeout.type);
633
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_raw.type);
634
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.archiving.type);
635
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_request.type);
636
+ assert.notEqual(undefined, propertiesDotJson.definitions.proxy);
637
+ assert.notEqual(null, propertiesDotJson.definitions.proxy);
638
+ assert.notEqual('', propertiesDotJson.definitions.proxy);
639
+ assert.equal('boolean', propertiesDotJson.definitions.proxy.properties.enabled.type);
640
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.host.type);
641
+ assert.equal('integer', propertiesDotJson.definitions.proxy.properties.port.type);
642
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.protocol.type);
643
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.username.type);
644
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.password.type);
645
+ assert.notEqual(undefined, propertiesDotJson.definitions.mongo);
646
+ assert.notEqual(null, propertiesDotJson.definitions.mongo);
647
+ assert.notEqual('', propertiesDotJson.definitions.mongo);
648
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.host.type);
649
+ assert.equal('integer', propertiesDotJson.definitions.mongo.properties.port.type);
650
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.database.type);
651
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.username.type);
652
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.password.type);
653
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.replSet.type);
654
+ assert.equal('object', propertiesDotJson.definitions.mongo.properties.db_ssl.type);
655
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.enabled.type);
656
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.accept_invalid_cert.type);
657
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.ca_file.type);
658
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.key_file.type);
659
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.cert_file.type);
660
+ assert.notEqual('', propertiesDotJson.definitions.devicebroker);
661
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevice.type);
662
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevicesFiltered.type);
663
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.isAlive.type);
664
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getConfig.type);
665
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getCount.type);
666
+ done();
667
+ } catch (error) {
668
+ log.error(`Test Failure: ${error}`);
669
+ done(error);
670
+ }
671
+ });
672
+ });
673
+
674
+ describe('error.json', () => {
675
+ it('should have an error.json', (done) => {
676
+ try {
677
+ fs.exists('error.json', (val) => {
678
+ assert.equal(true, val);
679
+ done();
680
+ });
681
+ } catch (error) {
682
+ log.error(`Test Failure: ${error}`);
683
+ done(error);
684
+ }
685
+ });
686
+ it('error.json should have standard adapter errors', (done) => {
687
+ try {
688
+ const errorDotJson = require('../../error.json');
689
+ assert.notEqual(undefined, errorDotJson.errors);
690
+ assert.notEqual(null, errorDotJson.errors);
691
+ assert.notEqual('', errorDotJson.errors);
692
+ assert.equal(true, Array.isArray(errorDotJson.errors));
693
+ assert.notEqual(0, errorDotJson.errors.length);
694
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.100'));
695
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.101'));
696
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.102'));
697
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.110'));
698
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.111'));
699
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.112'));
700
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.113'));
701
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.114'));
702
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.115'));
703
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.116'));
704
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.300'));
705
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.301'));
706
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.302'));
707
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.303'));
708
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.304'));
709
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.305'));
710
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.310'));
711
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.311'));
712
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.312'));
713
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.320'));
714
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.321'));
715
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.400'));
716
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.401'));
717
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.402'));
718
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.500'));
719
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.501'));
720
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.502'));
721
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.503'));
722
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.600'));
723
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.900'));
724
+ done();
725
+ } catch (error) {
726
+ log.error(`Test Failure: ${error}`);
727
+ done(error);
728
+ }
729
+ });
730
+ });
731
+
732
+ describe('sampleProperties.json', () => {
733
+ it('should have a sampleProperties.json', (done) => {
734
+ try {
735
+ fs.exists('sampleProperties.json', (val) => {
736
+ assert.equal(true, val);
737
+ done();
738
+ });
739
+ } catch (error) {
740
+ log.error(`Test Failure: ${error}`);
741
+ done(error);
742
+ }
743
+ });
744
+ it('sampleProperties.json should contain generic adapter properties', (done) => {
745
+ try {
746
+ const sampleDotJson = require('../../sampleProperties.json');
747
+ assert.notEqual(-1, sampleDotJson.id.indexOf('infoblox_universal_ddi'));
748
+ assert.equal('InfobloxUniversalDdi', sampleDotJson.type);
749
+ assert.notEqual(undefined, sampleDotJson.properties);
750
+ assert.notEqual(null, sampleDotJson.properties);
751
+ assert.notEqual('', sampleDotJson.properties);
752
+ assert.notEqual(undefined, sampleDotJson.properties.host);
753
+ assert.notEqual(undefined, sampleDotJson.properties.port);
754
+ assert.notEqual(undefined, sampleDotJson.properties.stub);
755
+ assert.notEqual(undefined, sampleDotJson.properties.protocol);
756
+ assert.notEqual(undefined, sampleDotJson.properties.authentication);
757
+ assert.notEqual(null, sampleDotJson.properties.authentication);
758
+ assert.notEqual('', sampleDotJson.properties.authentication);
759
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_method);
760
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.username);
761
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.password);
762
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token);
763
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.invalid_token_error);
764
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_timeout);
765
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_cache);
766
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field);
767
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field_format);
768
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_logging);
769
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_id);
770
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_secret);
771
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.grant_type);
772
+ assert.notEqual(undefined, sampleDotJson.properties.ssl);
773
+ assert.notEqual(null, sampleDotJson.properties.ssl);
774
+ assert.notEqual('', sampleDotJson.properties.ssl);
775
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ecdhCurve);
776
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.enabled);
777
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.accept_invalid_cert);
778
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ca_file);
779
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.key_file);
780
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.cert_file);
781
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.secure_protocol);
782
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ciphers);
783
+ assert.notEqual(undefined, sampleDotJson.properties.base_path);
784
+ assert.notEqual(undefined, sampleDotJson.properties.version);
785
+ assert.notEqual(undefined, sampleDotJson.properties.cache_location);
786
+ assert.notEqual(undefined, sampleDotJson.properties.encode_pathvars);
787
+ assert.notEqual(undefined, sampleDotJson.properties.encode_queryvars);
788
+ assert.notEqual(undefined, sampleDotJson.properties.save_metric);
789
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck);
790
+ assert.notEqual(null, sampleDotJson.properties.healthcheck);
791
+ assert.notEqual('', sampleDotJson.properties.healthcheck);
792
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.type);
793
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.frequency);
794
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.query_object);
795
+ assert.notEqual(undefined, sampleDotJson.properties.throttle);
796
+ assert.notEqual(null, sampleDotJson.properties.throttle);
797
+ assert.notEqual('', sampleDotJson.properties.throttle);
798
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.throttle_enabled);
799
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.number_pronghorns);
800
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.sync_async);
801
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.max_in_queue);
802
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.concurrent_max);
803
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.expire_timeout);
804
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.avg_runtime);
805
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.priorities);
806
+ assert.notEqual(undefined, sampleDotJson.properties.request);
807
+ assert.notEqual(null, sampleDotJson.properties.request);
808
+ assert.notEqual('', sampleDotJson.properties.request);
809
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_redirects);
810
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_retries);
811
+ assert.notEqual(undefined, sampleDotJson.properties.request.limit_retry_error);
812
+ assert.notEqual(undefined, sampleDotJson.properties.request.failover_codes);
813
+ assert.notEqual(undefined, sampleDotJson.properties.request.attempt_timeout);
814
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request);
815
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.payload);
816
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.uriOptions);
817
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.addlHeaders);
818
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.authData);
819
+ assert.notEqual(undefined, sampleDotJson.properties.request.healthcheck_on_timeout);
820
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_raw);
821
+ assert.notEqual(undefined, sampleDotJson.properties.request.archiving);
822
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_request);
823
+ assert.notEqual(undefined, sampleDotJson.properties.proxy);
824
+ assert.notEqual(null, sampleDotJson.properties.proxy);
825
+ assert.notEqual('', sampleDotJson.properties.proxy);
826
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.enabled);
827
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.host);
828
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.port);
829
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.protocol);
830
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.username);
831
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.password);
832
+ assert.notEqual(undefined, sampleDotJson.properties.mongo);
833
+ assert.notEqual(null, sampleDotJson.properties.mongo);
834
+ assert.notEqual('', sampleDotJson.properties.mongo);
835
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.host);
836
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.port);
837
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.database);
838
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.username);
839
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.password);
840
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.replSet);
841
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl);
842
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.enabled);
843
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.accept_invalid_cert);
844
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.ca_file);
845
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.key_file);
846
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.cert_file);
847
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker);
848
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevice);
849
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevicesFiltered);
850
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.isAlive);
851
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getConfig);
852
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getCount);
853
+ assert.notEqual(undefined, sampleDotJson.properties.cache);
854
+ assert.notEqual(undefined, sampleDotJson.properties.cache.entities);
855
+ done();
856
+ } catch (error) {
857
+ log.error(`Test Failure: ${error}`);
858
+ done(error);
859
+ }
860
+ });
861
+ });
862
+
863
+ describe('#checkProperties', () => {
864
+ it('should have a checkProperties function', (done) => {
865
+ try {
866
+ assert.equal(true, typeof a.checkProperties === 'function');
867
+ done();
868
+ } catch (error) {
869
+ log.error(`Test Failure: ${error}`);
870
+ done(error);
871
+ }
872
+ });
873
+ it('the sample properties should be good - if failure change the log level', (done) => {
874
+ try {
875
+ const samplePropsJson = require('../../sampleProperties.json');
876
+ const clean = a.checkProperties(samplePropsJson.properties);
877
+
878
+ try {
879
+ assert.notEqual(0, Object.keys(clean));
880
+ assert.equal(undefined, clean.exception);
881
+ assert.notEqual(undefined, clean.host);
882
+ assert.notEqual(null, clean.host);
883
+ assert.notEqual('', clean.host);
884
+ done();
885
+ } catch (err) {
886
+ log.error(`Test Failure: ${err}`);
887
+ done(err);
888
+ }
889
+ } catch (error) {
890
+ log.error(`Adapter Exception: ${error}`);
891
+ done(error);
892
+ }
893
+ }).timeout(attemptTimeout);
894
+ });
895
+
896
+ describe('README.md', () => {
897
+ it('should have a README', (done) => {
898
+ try {
899
+ fs.exists('README.md', (val) => {
900
+ assert.equal(true, val);
901
+ done();
902
+ });
903
+ } catch (error) {
904
+ log.error(`Test Failure: ${error}`);
905
+ done(error);
906
+ }
907
+ });
908
+ it('README.md should be customized', (done) => {
909
+ try {
910
+ fs.readFile('README.md', 'utf8', (err, data) => {
911
+ assert.equal(-1, data.indexOf('[System]'));
912
+ assert.equal(-1, data.indexOf('[system]'));
913
+ assert.equal(-1, data.indexOf('[version]'));
914
+ assert.equal(-1, data.indexOf('[namespace]'));
915
+ done();
916
+ });
917
+ } catch (error) {
918
+ log.error(`Test Failure: ${error}`);
919
+ done(error);
920
+ }
921
+ });
922
+ });
923
+
924
+ describe('#connect', () => {
925
+ it('should have a connect function', (done) => {
926
+ try {
927
+ assert.equal(true, typeof a.connect === 'function');
928
+ done();
929
+ } catch (error) {
930
+ log.error(`Test Failure: ${error}`);
931
+ done(error);
932
+ }
933
+ });
934
+ });
935
+
936
+ describe('#healthCheck', () => {
937
+ it('should have a healthCheck function', (done) => {
938
+ try {
939
+ assert.equal(true, typeof a.healthCheck === 'function');
940
+ done();
941
+ } catch (error) {
942
+ log.error(`Test Failure: ${error}`);
943
+ done(error);
944
+ }
945
+ });
946
+ });
947
+
948
+ describe('#iapUpdateAdapterConfiguration', () => {
949
+ it('should have a iapUpdateAdapterConfiguration function', (done) => {
950
+ try {
951
+ assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
952
+ done();
953
+ } catch (error) {
954
+ log.error(`Test Failure: ${error}`);
955
+ done(error);
956
+ }
957
+ });
958
+ });
959
+
960
+ describe('#iapSuspendAdapter', () => {
961
+ it('should have a iapSuspendAdapter function', (done) => {
962
+ try {
963
+ assert.equal(true, typeof a.iapSuspendAdapter === 'function');
964
+ done();
965
+ } catch (error) {
966
+ log.error(`Test Failure: ${error}`);
967
+ done(error);
968
+ }
969
+ });
970
+ });
971
+
972
+ describe('#iapUnsuspendAdapter', () => {
973
+ it('should have a iapUnsuspendAdapter function', (done) => {
974
+ try {
975
+ assert.equal(true, typeof a.iapUnsuspendAdapter === 'function');
976
+ done();
977
+ } catch (error) {
978
+ log.error(`Test Failure: ${error}`);
979
+ done(error);
980
+ }
981
+ });
982
+ });
983
+
984
+ describe('#iapGetAdapterQueue', () => {
985
+ it('should have a iapGetAdapterQueue function', (done) => {
986
+ try {
987
+ assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
988
+ done();
989
+ } catch (error) {
990
+ log.error(`Test Failure: ${error}`);
991
+ done(error);
992
+ }
993
+ });
994
+ });
995
+
996
+ describe('#iapFindAdapterPath', () => {
997
+ it('should have a iapFindAdapterPath function', (done) => {
998
+ try {
999
+ assert.equal(true, typeof a.iapFindAdapterPath === 'function');
1000
+ done();
1001
+ } catch (error) {
1002
+ log.error(`Test Failure: ${error}`);
1003
+ done(error);
1004
+ }
1005
+ });
1006
+ it('iapFindAdapterPath should find atleast one path that matches', (done) => {
1007
+ try {
1008
+ a.iapFindAdapterPath('{base_path}/{version}', (data, error) => {
1009
+ try {
1010
+ assert.equal(undefined, error);
1011
+ assert.notEqual(undefined, data);
1012
+ assert.notEqual(null, data);
1013
+ assert.equal(true, data.found);
1014
+ assert.notEqual(undefined, data.foundIn);
1015
+ assert.notEqual(null, data.foundIn);
1016
+ assert.notEqual(0, data.foundIn.length);
1017
+ done();
1018
+ } catch (err) {
1019
+ log.error(`Test Failure: ${err}`);
1020
+ done(err);
1021
+ }
1022
+ });
1023
+ } catch (error) {
1024
+ log.error(`Adapter Exception: ${error}`);
1025
+ done(error);
1026
+ }
1027
+ }).timeout(attemptTimeout);
1028
+ });
1029
+
1030
+ describe('#iapTroubleshootAdapter', () => {
1031
+ it('should have a iapTroubleshootAdapter function', (done) => {
1032
+ try {
1033
+ assert.equal(true, typeof a.iapTroubleshootAdapter === 'function');
1034
+ done();
1035
+ } catch (error) {
1036
+ log.error(`Test Failure: ${error}`);
1037
+ done(error);
1038
+ }
1039
+ });
1040
+ });
1041
+
1042
+ describe('#iapRunAdapterHealthcheck', () => {
1043
+ it('should have a iapRunAdapterHealthcheck function', (done) => {
1044
+ try {
1045
+ assert.equal(true, typeof a.iapRunAdapterHealthcheck === 'function');
1046
+ done();
1047
+ } catch (error) {
1048
+ log.error(`Test Failure: ${error}`);
1049
+ done(error);
1050
+ }
1051
+ });
1052
+ });
1053
+
1054
+ describe('#iapRunAdapterConnectivity', () => {
1055
+ it('should have a iapRunAdapterConnectivity function', (done) => {
1056
+ try {
1057
+ assert.equal(true, typeof a.iapRunAdapterConnectivity === 'function');
1058
+ done();
1059
+ } catch (error) {
1060
+ log.error(`Test Failure: ${error}`);
1061
+ done(error);
1062
+ }
1063
+ });
1064
+ });
1065
+
1066
+ describe('#iapRunAdapterBasicGet', () => {
1067
+ it('should have a iapRunAdapterBasicGet function', (done) => {
1068
+ try {
1069
+ assert.equal(true, typeof a.iapRunAdapterBasicGet === 'function');
1070
+ done();
1071
+ } catch (error) {
1072
+ log.error(`Test Failure: ${error}`);
1073
+ done(error);
1074
+ }
1075
+ });
1076
+ });
1077
+
1078
+ describe('#iapMoveAdapterEntitiesToDB', () => {
1079
+ it('should have a iapMoveAdapterEntitiesToDB function', (done) => {
1080
+ try {
1081
+ assert.equal(true, typeof a.iapMoveAdapterEntitiesToDB === 'function');
1082
+ done();
1083
+ } catch (error) {
1084
+ log.error(`Test Failure: ${error}`);
1085
+ done(error);
1086
+ }
1087
+ });
1088
+ });
1089
+
1090
+ describe('#checkActionFiles', () => {
1091
+ it('should have a checkActionFiles function', (done) => {
1092
+ try {
1093
+ assert.equal(true, typeof a.checkActionFiles === 'function');
1094
+ done();
1095
+ } catch (error) {
1096
+ log.error(`Test Failure: ${error}`);
1097
+ done(error);
1098
+ }
1099
+ });
1100
+ it('the action files should be good - if failure change the log level as most issues are warnings', (done) => {
1101
+ try {
1102
+ const clean = a.checkActionFiles();
1103
+
1104
+ try {
1105
+ for (let c = 0; c < clean.length; c += 1) {
1106
+ log.error(clean[c]);
1107
+ }
1108
+ assert.equal(0, clean.length);
1109
+ done();
1110
+ } catch (err) {
1111
+ log.error(`Test Failure: ${err}`);
1112
+ done(err);
1113
+ }
1114
+ } catch (error) {
1115
+ log.error(`Adapter Exception: ${error}`);
1116
+ done(error);
1117
+ }
1118
+ }).timeout(attemptTimeout);
1119
+ });
1120
+
1121
+ describe('#encryptProperty', () => {
1122
+ it('should have a encryptProperty function', (done) => {
1123
+ try {
1124
+ assert.equal(true, typeof a.encryptProperty === 'function');
1125
+ done();
1126
+ } catch (error) {
1127
+ log.error(`Test Failure: ${error}`);
1128
+ done(error);
1129
+ }
1130
+ });
1131
+ it('should get base64 encoded property', (done) => {
1132
+ try {
1133
+ a.encryptProperty('testing', 'base64', (data, error) => {
1134
+ try {
1135
+ assert.equal(undefined, error);
1136
+ assert.notEqual(undefined, data);
1137
+ assert.notEqual(null, data);
1138
+ assert.notEqual(undefined, data.response);
1139
+ assert.notEqual(null, data.response);
1140
+ assert.equal(0, data.response.indexOf('{code}'));
1141
+ done();
1142
+ } catch (err) {
1143
+ log.error(`Test Failure: ${err}`);
1144
+ done(err);
1145
+ }
1146
+ });
1147
+ } catch (error) {
1148
+ log.error(`Adapter Exception: ${error}`);
1149
+ done(error);
1150
+ }
1151
+ }).timeout(attemptTimeout);
1152
+ it('should get encrypted property', (done) => {
1153
+ try {
1154
+ a.encryptProperty('testing', 'encrypt', (data, error) => {
1155
+ try {
1156
+ assert.equal(undefined, error);
1157
+ assert.notEqual(undefined, data);
1158
+ assert.notEqual(null, data);
1159
+ assert.notEqual(undefined, data.response);
1160
+ assert.notEqual(null, data.response);
1161
+ assert.equal(0, data.response.indexOf('{crypt}'));
1162
+ done();
1163
+ } catch (err) {
1164
+ log.error(`Test Failure: ${err}`);
1165
+ done(err);
1166
+ }
1167
+ });
1168
+ } catch (error) {
1169
+ log.error(`Adapter Exception: ${error}`);
1170
+ done(error);
1171
+ }
1172
+ }).timeout(attemptTimeout);
1173
+ });
1174
+
1175
+ describe('#iapDeactivateTasks', () => {
1176
+ it('should have a iapDeactivateTasks function', (done) => {
1177
+ try {
1178
+ assert.equal(true, typeof a.iapDeactivateTasks === 'function');
1179
+ done();
1180
+ } catch (error) {
1181
+ log.error(`Test Failure: ${error}`);
1182
+ done(error);
1183
+ }
1184
+ });
1185
+ });
1186
+
1187
+ describe('#iapActivateTasks', () => {
1188
+ it('should have a iapActivateTasks function', (done) => {
1189
+ try {
1190
+ assert.equal(true, typeof a.iapActivateTasks === 'function');
1191
+ done();
1192
+ } catch (error) {
1193
+ log.error(`Test Failure: ${error}`);
1194
+ done(error);
1195
+ }
1196
+ });
1197
+ });
1198
+
1199
+ describe('#iapPopulateEntityCache', () => {
1200
+ it('should have a iapPopulateEntityCache function', (done) => {
1201
+ try {
1202
+ assert.equal(true, typeof a.iapPopulateEntityCache === 'function');
1203
+ done();
1204
+ } catch (error) {
1205
+ log.error(`Test Failure: ${error}`);
1206
+ done(error);
1207
+ }
1208
+ });
1209
+ });
1210
+
1211
+ describe('#iapRetrieveEntitiesCache', () => {
1212
+ it('should have a iapRetrieveEntitiesCache function', (done) => {
1213
+ try {
1214
+ assert.equal(true, typeof a.iapRetrieveEntitiesCache === 'function');
1215
+ done();
1216
+ } catch (error) {
1217
+ log.error(`Test Failure: ${error}`);
1218
+ done(error);
1219
+ }
1220
+ });
1221
+ });
1222
+
1223
+ describe('#hasEntities', () => {
1224
+ it('should have a hasEntities function', (done) => {
1225
+ try {
1226
+ assert.equal(true, typeof a.hasEntities === 'function');
1227
+ done();
1228
+ } catch (error) {
1229
+ log.error(`Test Failure: ${error}`);
1230
+ done(error);
1231
+ }
1232
+ });
1233
+ });
1234
+
1235
+ describe('#getDevice', () => {
1236
+ it('should have a getDevice function', (done) => {
1237
+ try {
1238
+ assert.equal(true, typeof a.getDevice === 'function');
1239
+ done();
1240
+ } catch (error) {
1241
+ log.error(`Test Failure: ${error}`);
1242
+ done(error);
1243
+ }
1244
+ });
1245
+ });
1246
+
1247
+ describe('#getDevicesFiltered', () => {
1248
+ it('should have a getDevicesFiltered function', (done) => {
1249
+ try {
1250
+ assert.equal(true, typeof a.getDevicesFiltered === 'function');
1251
+ done();
1252
+ } catch (error) {
1253
+ log.error(`Test Failure: ${error}`);
1254
+ done(error);
1255
+ }
1256
+ });
1257
+ });
1258
+
1259
+ describe('#isAlive', () => {
1260
+ it('should have a isAlive function', (done) => {
1261
+ try {
1262
+ assert.equal(true, typeof a.isAlive === 'function');
1263
+ done();
1264
+ } catch (error) {
1265
+ log.error(`Test Failure: ${error}`);
1266
+ done(error);
1267
+ }
1268
+ });
1269
+ });
1270
+
1271
+ describe('#getConfig', () => {
1272
+ it('should have a getConfig function', (done) => {
1273
+ try {
1274
+ assert.equal(true, typeof a.getConfig === 'function');
1275
+ done();
1276
+ } catch (error) {
1277
+ log.error(`Test Failure: ${error}`);
1278
+ done(error);
1279
+ }
1280
+ });
1281
+ });
1282
+
1283
+ describe('#iapGetDeviceCount', () => {
1284
+ it('should have a iapGetDeviceCount function', (done) => {
1285
+ try {
1286
+ assert.equal(true, typeof a.iapGetDeviceCount === 'function');
1287
+ done();
1288
+ } catch (error) {
1289
+ log.error(`Test Failure: ${error}`);
1290
+ done(error);
1291
+ }
1292
+ });
1293
+ });
1294
+
1295
+ describe('#iapExpandedGenericAdapterRequest', () => {
1296
+ it('should have a iapExpandedGenericAdapterRequest function', (done) => {
1297
+ try {
1298
+ assert.equal(true, typeof a.iapExpandedGenericAdapterRequest === 'function');
1299
+ done();
1300
+ } catch (error) {
1301
+ log.error(`Test Failure: ${error}`);
1302
+ done(error);
1303
+ }
1304
+ });
1305
+ });
1306
+
1307
+ describe('#genericAdapterRequest', () => {
1308
+ it('should have a genericAdapterRequest function', (done) => {
1309
+ try {
1310
+ assert.equal(true, typeof a.genericAdapterRequest === 'function');
1311
+ done();
1312
+ } catch (error) {
1313
+ log.error(`Test Failure: ${error}`);
1314
+ done(error);
1315
+ }
1316
+ });
1317
+ });
1318
+
1319
+ describe('#genericAdapterRequestNoBasePath', () => {
1320
+ it('should have a genericAdapterRequestNoBasePath function', (done) => {
1321
+ try {
1322
+ assert.equal(true, typeof a.genericAdapterRequestNoBasePath === 'function');
1323
+ done();
1324
+ } catch (error) {
1325
+ log.error(`Test Failure: ${error}`);
1326
+ done(error);
1327
+ }
1328
+ });
1329
+ });
1330
+
1331
+ describe('#iapRunAdapterLint', () => {
1332
+ it('should have a iapRunAdapterLint function', (done) => {
1333
+ try {
1334
+ assert.equal(true, typeof a.iapRunAdapterLint === 'function');
1335
+ done();
1336
+ } catch (error) {
1337
+ log.error(`Test Failure: ${error}`);
1338
+ done(error);
1339
+ }
1340
+ });
1341
+ it('retrieve the lint results', (done) => {
1342
+ try {
1343
+ a.iapRunAdapterLint((data, error) => {
1344
+ try {
1345
+ assert.equal(undefined, error);
1346
+ assert.notEqual(undefined, data);
1347
+ assert.notEqual(null, data);
1348
+ assert.notEqual(undefined, data.status);
1349
+ assert.notEqual(null, data.status);
1350
+ assert.equal('SUCCESS', data.status);
1351
+ done();
1352
+ } catch (err) {
1353
+ log.error(`Test Failure: ${err}`);
1354
+ done(err);
1355
+ }
1356
+ });
1357
+ } catch (error) {
1358
+ log.error(`Adapter Exception: ${error}`);
1359
+ done(error);
1360
+ }
1361
+ }).timeout(attemptTimeout);
1362
+ });
1363
+
1364
+ describe('#iapRunAdapterTests', () => {
1365
+ it('should have a iapRunAdapterTests function', (done) => {
1366
+ try {
1367
+ assert.equal(true, typeof a.iapRunAdapterTests === 'function');
1368
+ done();
1369
+ } catch (error) {
1370
+ log.error(`Test Failure: ${error}`);
1371
+ done(error);
1372
+ }
1373
+ });
1374
+ });
1375
+
1376
+ describe('#iapGetAdapterInventory', () => {
1377
+ it('should have a iapGetAdapterInventory function', (done) => {
1378
+ try {
1379
+ assert.equal(true, typeof a.iapGetAdapterInventory === 'function');
1380
+ done();
1381
+ } catch (error) {
1382
+ log.error(`Test Failure: ${error}`);
1383
+ done(error);
1384
+ }
1385
+ });
1386
+ it('retrieve the inventory', (done) => {
1387
+ try {
1388
+ a.iapGetAdapterInventory((data, error) => {
1389
+ try {
1390
+ assert.equal(undefined, error);
1391
+ assert.notEqual(undefined, data);
1392
+ assert.notEqual(null, data);
1393
+ done();
1394
+ } catch (err) {
1395
+ log.error(`Test Failure: ${err}`);
1396
+ done(err);
1397
+ }
1398
+ });
1399
+ } catch (error) {
1400
+ log.error(`Adapter Exception: ${error}`);
1401
+ done(error);
1402
+ }
1403
+ }).timeout(attemptTimeout);
1404
+ });
1405
+ describe('metadata.json', () => {
1406
+ it('should have a metadata.json', (done) => {
1407
+ try {
1408
+ fs.exists('metadata.json', (val) => {
1409
+ assert.equal(true, val);
1410
+ done();
1411
+ });
1412
+ } catch (error) {
1413
+ log.error(`Test Failure: ${error}`);
1414
+ done(error);
1415
+ }
1416
+ });
1417
+ it('metadata.json is customized', (done) => {
1418
+ try {
1419
+ const metadataDotJson = require('../../metadata.json');
1420
+ assert.equal('adapter-infoblox_universal_ddi', metadataDotJson.name);
1421
+ assert.notEqual(undefined, metadataDotJson.webName);
1422
+ assert.notEqual(null, metadataDotJson.webName);
1423
+ assert.notEqual('', metadataDotJson.webName);
1424
+ assert.equal('Adapter', metadataDotJson.type);
1425
+ done();
1426
+ } catch (error) {
1427
+ log.error(`Test Failure: ${error}`);
1428
+ done(error);
1429
+ }
1430
+ });
1431
+ it('metadata.json contains accurate documentation', (done) => {
1432
+ try {
1433
+ const metadataDotJson = require('../../metadata.json');
1434
+ assert.notEqual(undefined, metadataDotJson.documentation);
1435
+ assert.equal('https://www.npmjs.com/package/@itentialopensource/adapter-infoblox_universal_ddi', metadataDotJson.documentation.npmLink);
1436
+ assert.equal('https://docs.itential.com/opensource/docs/troubleshooting-an-adapter', metadataDotJson.documentation.faqLink);
1437
+ assert.equal('https://gitlab.com/itentialopensource/adapters/contributing-guide', metadataDotJson.documentation.contributeLink);
1438
+ assert.equal('https://itential.atlassian.net/servicedesk/customer/portals', metadataDotJson.documentation.issueLink);
1439
+ done();
1440
+ } catch (error) {
1441
+ log.error(`Test Failure: ${error}`);
1442
+ done(error);
1443
+ }
1444
+ });
1445
+ it('metadata.json has related items', (done) => {
1446
+ try {
1447
+ const metadataDotJson = require('../../metadata.json');
1448
+ assert.notEqual(undefined, metadataDotJson.relatedItems);
1449
+ assert.notEqual(undefined, metadataDotJson.relatedItems.adapters);
1450
+ assert.notEqual(undefined, metadataDotJson.relatedItems.integrations);
1451
+ assert.notEqual(undefined, metadataDotJson.relatedItems.ecosystemApplications);
1452
+ assert.notEqual(undefined, metadataDotJson.relatedItems.workflowProjects);
1453
+ assert.notEqual(undefined, metadataDotJson.relatedItems.transformationProjects);
1454
+ assert.notEqual(undefined, metadataDotJson.relatedItems.exampleProjects);
1455
+ done();
1456
+ } catch (error) {
1457
+ log.error(`Test Failure: ${error}`);
1458
+ done(error);
1459
+ }
1460
+ });
1461
+ });
1462
+ /*
1463
+ -----------------------------------------------------------------------
1464
+ -----------------------------------------------------------------------
1465
+ *** All code above this comment will be replaced during a migration ***
1466
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
1467
+ -----------------------------------------------------------------------
1468
+ -----------------------------------------------------------------------
1469
+ */
1470
+
1471
+ describe('#configProfileDisassociateObjectFromConfigProfiles - errors', () => {
1472
+ it('should have a configProfileDisassociateObjectFromConfigProfiles function', (done) => {
1473
+ try {
1474
+ assert.equal(true, typeof a.configProfileDisassociateObjectFromConfigProfiles === 'function');
1475
+ done();
1476
+ } catch (error) {
1477
+ log.error(`Test Failure: ${error}`);
1478
+ done(error);
1479
+ }
1480
+ }).timeout(attemptTimeout);
1481
+ it('should error if - missing body', (done) => {
1482
+ try {
1483
+ a.configProfileDisassociateObjectFromConfigProfiles(null, null, (data, error) => {
1484
+ try {
1485
+ const displayE = 'body is required';
1486
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-configProfileDisassociateObjectFromConfigProfiles', displayE);
1487
+ done();
1488
+ } catch (err) {
1489
+ log.error(`Test Failure: ${err}`);
1490
+ done(err);
1491
+ }
1492
+ });
1493
+ } catch (error) {
1494
+ log.error(`Adapter Exception: ${error}`);
1495
+ done(error);
1496
+ }
1497
+ }).timeout(attemptTimeout);
1498
+ });
1499
+
1500
+ describe('#configProfileDisassociateConfigProfileFromObjects - errors', () => {
1501
+ it('should have a configProfileDisassociateConfigProfileFromObjects function', (done) => {
1502
+ try {
1503
+ assert.equal(true, typeof a.configProfileDisassociateConfigProfileFromObjects === 'function');
1504
+ done();
1505
+ } catch (error) {
1506
+ log.error(`Test Failure: ${error}`);
1507
+ done(error);
1508
+ }
1509
+ }).timeout(attemptTimeout);
1510
+ it('should error if - missing body', (done) => {
1511
+ try {
1512
+ a.configProfileDisassociateConfigProfileFromObjects(null, null, (data, error) => {
1513
+ try {
1514
+ const displayE = 'body is required';
1515
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-configProfileDisassociateConfigProfileFromObjects', displayE);
1516
+ done();
1517
+ } catch (err) {
1518
+ log.error(`Test Failure: ${err}`);
1519
+ done(err);
1520
+ }
1521
+ });
1522
+ } catch (error) {
1523
+ log.error(`Adapter Exception: ${error}`);
1524
+ done(error);
1525
+ }
1526
+ }).timeout(attemptTimeout);
1527
+ });
1528
+
1529
+ describe('#configProfileAssociateObjectToConfigProfiles - errors', () => {
1530
+ it('should have a configProfileAssociateObjectToConfigProfiles function', (done) => {
1531
+ try {
1532
+ assert.equal(true, typeof a.configProfileAssociateObjectToConfigProfiles === 'function');
1533
+ done();
1534
+ } catch (error) {
1535
+ log.error(`Test Failure: ${error}`);
1536
+ done(error);
1537
+ }
1538
+ }).timeout(attemptTimeout);
1539
+ it('should error if - missing body', (done) => {
1540
+ try {
1541
+ a.configProfileAssociateObjectToConfigProfiles(null, null, (data, error) => {
1542
+ try {
1543
+ const displayE = 'body is required';
1544
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-configProfileAssociateObjectToConfigProfiles', displayE);
1545
+ done();
1546
+ } catch (err) {
1547
+ log.error(`Test Failure: ${err}`);
1548
+ done(err);
1549
+ }
1550
+ });
1551
+ } catch (error) {
1552
+ log.error(`Adapter Exception: ${error}`);
1553
+ done(error);
1554
+ }
1555
+ }).timeout(attemptTimeout);
1556
+ });
1557
+
1558
+ describe('#configProfileAssociateConfigProfileToObjects - errors', () => {
1559
+ it('should have a configProfileAssociateConfigProfileToObjects function', (done) => {
1560
+ try {
1561
+ assert.equal(true, typeof a.configProfileAssociateConfigProfileToObjects === 'function');
1562
+ done();
1563
+ } catch (error) {
1564
+ log.error(`Test Failure: ${error}`);
1565
+ done(error);
1566
+ }
1567
+ }).timeout(attemptTimeout);
1568
+ it('should error if - missing body', (done) => {
1569
+ try {
1570
+ a.configProfileAssociateConfigProfileToObjects(null, null, (data, error) => {
1571
+ try {
1572
+ const displayE = 'body is required';
1573
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-configProfileAssociateConfigProfileToObjects', displayE);
1574
+ done();
1575
+ } catch (err) {
1576
+ log.error(`Test Failure: ${err}`);
1577
+ done(err);
1578
+ }
1579
+ });
1580
+ } catch (error) {
1581
+ log.error(`Adapter Exception: ${error}`);
1582
+ done(error);
1583
+ }
1584
+ }).timeout(attemptTimeout);
1585
+ });
1586
+
1587
+ describe('#configProfileListConfigProfiles - errors', () => {
1588
+ it('should have a configProfileListConfigProfiles function', (done) => {
1589
+ try {
1590
+ assert.equal(true, typeof a.configProfileListConfigProfiles === 'function');
1591
+ done();
1592
+ } catch (error) {
1593
+ log.error(`Test Failure: ${error}`);
1594
+ done(error);
1595
+ }
1596
+ }).timeout(attemptTimeout);
1597
+ });
1598
+
1599
+ describe('#configProfileListSubnets - errors', () => {
1600
+ it('should have a configProfileListSubnets function', (done) => {
1601
+ try {
1602
+ assert.equal(true, typeof a.configProfileListSubnets === 'function');
1603
+ done();
1604
+ } catch (error) {
1605
+ log.error(`Test Failure: ${error}`);
1606
+ done(error);
1607
+ }
1608
+ }).timeout(attemptTimeout);
1609
+ });
1610
+
1611
+ describe('#filterList - errors', () => {
1612
+ it('should have a filterList function', (done) => {
1613
+ try {
1614
+ assert.equal(true, typeof a.filterList === 'function');
1615
+ done();
1616
+ } catch (error) {
1617
+ log.error(`Test Failure: ${error}`);
1618
+ done(error);
1619
+ }
1620
+ }).timeout(attemptTimeout);
1621
+ });
1622
+
1623
+ describe('#fixedAddressList - errors', () => {
1624
+ it('should have a fixedAddressList function', (done) => {
1625
+ try {
1626
+ assert.equal(true, typeof a.fixedAddressList === 'function');
1627
+ done();
1628
+ } catch (error) {
1629
+ log.error(`Test Failure: ${error}`);
1630
+ done(error);
1631
+ }
1632
+ }).timeout(attemptTimeout);
1633
+ });
1634
+
1635
+ describe('#fixedAddressCreate - errors', () => {
1636
+ it('should have a fixedAddressCreate function', (done) => {
1637
+ try {
1638
+ assert.equal(true, typeof a.fixedAddressCreate === 'function');
1639
+ done();
1640
+ } catch (error) {
1641
+ log.error(`Test Failure: ${error}`);
1642
+ done(error);
1643
+ }
1644
+ }).timeout(attemptTimeout);
1645
+ it('should error if - missing body', (done) => {
1646
+ try {
1647
+ a.fixedAddressCreate(null, null, (data, error) => {
1648
+ try {
1649
+ const displayE = 'body is required';
1650
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-fixedAddressCreate', displayE);
1651
+ done();
1652
+ } catch (err) {
1653
+ log.error(`Test Failure: ${err}`);
1654
+ done(err);
1655
+ }
1656
+ });
1657
+ } catch (error) {
1658
+ log.error(`Adapter Exception: ${error}`);
1659
+ done(error);
1660
+ }
1661
+ }).timeout(attemptTimeout);
1662
+ });
1663
+
1664
+ describe('#fixedAddressRead - errors', () => {
1665
+ it('should have a fixedAddressRead function', (done) => {
1666
+ try {
1667
+ assert.equal(true, typeof a.fixedAddressRead === 'function');
1668
+ done();
1669
+ } catch (error) {
1670
+ log.error(`Test Failure: ${error}`);
1671
+ done(error);
1672
+ }
1673
+ }).timeout(attemptTimeout);
1674
+ it('should error if - missing id', (done) => {
1675
+ try {
1676
+ a.fixedAddressRead(null, null, null, (data, error) => {
1677
+ try {
1678
+ const displayE = 'id is required';
1679
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-fixedAddressRead', displayE);
1680
+ done();
1681
+ } catch (err) {
1682
+ log.error(`Test Failure: ${err}`);
1683
+ done(err);
1684
+ }
1685
+ });
1686
+ } catch (error) {
1687
+ log.error(`Adapter Exception: ${error}`);
1688
+ done(error);
1689
+ }
1690
+ }).timeout(attemptTimeout);
1691
+ });
1692
+
1693
+ describe('#fixedAddressDelete - errors', () => {
1694
+ it('should have a fixedAddressDelete function', (done) => {
1695
+ try {
1696
+ assert.equal(true, typeof a.fixedAddressDelete === 'function');
1697
+ done();
1698
+ } catch (error) {
1699
+ log.error(`Test Failure: ${error}`);
1700
+ done(error);
1701
+ }
1702
+ }).timeout(attemptTimeout);
1703
+ it('should error if - missing id', (done) => {
1704
+ try {
1705
+ a.fixedAddressDelete(null, null, (data, error) => {
1706
+ try {
1707
+ const displayE = 'id is required';
1708
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-fixedAddressDelete', displayE);
1709
+ done();
1710
+ } catch (err) {
1711
+ log.error(`Test Failure: ${err}`);
1712
+ done(err);
1713
+ }
1714
+ });
1715
+ } catch (error) {
1716
+ log.error(`Adapter Exception: ${error}`);
1717
+ done(error);
1718
+ }
1719
+ }).timeout(attemptTimeout);
1720
+ });
1721
+
1722
+ describe('#fixedAddressUpdate - errors', () => {
1723
+ it('should have a fixedAddressUpdate function', (done) => {
1724
+ try {
1725
+ assert.equal(true, typeof a.fixedAddressUpdate === 'function');
1726
+ done();
1727
+ } catch (error) {
1728
+ log.error(`Test Failure: ${error}`);
1729
+ done(error);
1730
+ }
1731
+ }).timeout(attemptTimeout);
1732
+ it('should error if - missing id', (done) => {
1733
+ try {
1734
+ a.fixedAddressUpdate(null, null, null, (data, error) => {
1735
+ try {
1736
+ const displayE = 'id is required';
1737
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-fixedAddressUpdate', displayE);
1738
+ done();
1739
+ } catch (err) {
1740
+ log.error(`Test Failure: ${err}`);
1741
+ done(err);
1742
+ }
1743
+ });
1744
+ } catch (error) {
1745
+ log.error(`Adapter Exception: ${error}`);
1746
+ done(error);
1747
+ }
1748
+ }).timeout(attemptTimeout);
1749
+ it('should error if - missing body', (done) => {
1750
+ try {
1751
+ a.fixedAddressUpdate('fakeparam', null, null, (data, error) => {
1752
+ try {
1753
+ const displayE = 'body is required';
1754
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-fixedAddressUpdate', displayE);
1755
+ done();
1756
+ } catch (err) {
1757
+ log.error(`Test Failure: ${err}`);
1758
+ done(err);
1759
+ }
1760
+ });
1761
+ } catch (error) {
1762
+ log.error(`Adapter Exception: ${error}`);
1763
+ done(error);
1764
+ }
1765
+ }).timeout(attemptTimeout);
1766
+ });
1767
+
1768
+ describe('#globalRead - errors', () => {
1769
+ it('should have a globalRead function', (done) => {
1770
+ try {
1771
+ assert.equal(true, typeof a.globalRead === 'function');
1772
+ done();
1773
+ } catch (error) {
1774
+ log.error(`Test Failure: ${error}`);
1775
+ done(error);
1776
+ }
1777
+ }).timeout(attemptTimeout);
1778
+ });
1779
+
1780
+ describe('#globalUpdate - errors', () => {
1781
+ it('should have a globalUpdate function', (done) => {
1782
+ try {
1783
+ assert.equal(true, typeof a.globalUpdate === 'function');
1784
+ done();
1785
+ } catch (error) {
1786
+ log.error(`Test Failure: ${error}`);
1787
+ done(error);
1788
+ }
1789
+ }).timeout(attemptTimeout);
1790
+ it('should error if - missing body', (done) => {
1791
+ try {
1792
+ a.globalUpdate(null, null, (data, error) => {
1793
+ try {
1794
+ const displayE = 'body is required';
1795
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-globalUpdate', displayE);
1796
+ done();
1797
+ } catch (err) {
1798
+ log.error(`Test Failure: ${err}`);
1799
+ done(err);
1800
+ }
1801
+ });
1802
+ } catch (error) {
1803
+ log.error(`Adapter Exception: ${error}`);
1804
+ done(error);
1805
+ }
1806
+ }).timeout(attemptTimeout);
1807
+ });
1808
+
1809
+ describe('#globalRead2 - errors', () => {
1810
+ it('should have a globalRead2 function', (done) => {
1811
+ try {
1812
+ assert.equal(true, typeof a.globalRead2 === 'function');
1813
+ done();
1814
+ } catch (error) {
1815
+ log.error(`Test Failure: ${error}`);
1816
+ done(error);
1817
+ }
1818
+ }).timeout(attemptTimeout);
1819
+ it('should error if - missing id', (done) => {
1820
+ try {
1821
+ a.globalRead2(null, null, null, (data, error) => {
1822
+ try {
1823
+ const displayE = 'id is required';
1824
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-globalRead2', displayE);
1825
+ done();
1826
+ } catch (err) {
1827
+ log.error(`Test Failure: ${err}`);
1828
+ done(err);
1829
+ }
1830
+ });
1831
+ } catch (error) {
1832
+ log.error(`Adapter Exception: ${error}`);
1833
+ done(error);
1834
+ }
1835
+ }).timeout(attemptTimeout);
1836
+ });
1837
+
1838
+ describe('#globalUpdate2 - errors', () => {
1839
+ it('should have a globalUpdate2 function', (done) => {
1840
+ try {
1841
+ assert.equal(true, typeof a.globalUpdate2 === 'function');
1842
+ done();
1843
+ } catch (error) {
1844
+ log.error(`Test Failure: ${error}`);
1845
+ done(error);
1846
+ }
1847
+ }).timeout(attemptTimeout);
1848
+ it('should error if - missing id', (done) => {
1849
+ try {
1850
+ a.globalUpdate2(null, null, null, (data, error) => {
1851
+ try {
1852
+ const displayE = 'id is required';
1853
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-globalUpdate2', displayE);
1854
+ done();
1855
+ } catch (err) {
1856
+ log.error(`Test Failure: ${err}`);
1857
+ done(err);
1858
+ }
1859
+ });
1860
+ } catch (error) {
1861
+ log.error(`Adapter Exception: ${error}`);
1862
+ done(error);
1863
+ }
1864
+ }).timeout(attemptTimeout);
1865
+ it('should error if - missing body', (done) => {
1866
+ try {
1867
+ a.globalUpdate2('fakeparam', null, null, (data, error) => {
1868
+ try {
1869
+ const displayE = 'body is required';
1870
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-globalUpdate2', displayE);
1871
+ done();
1872
+ } catch (err) {
1873
+ log.error(`Test Failure: ${err}`);
1874
+ done(err);
1875
+ }
1876
+ });
1877
+ } catch (error) {
1878
+ log.error(`Adapter Exception: ${error}`);
1879
+ done(error);
1880
+ }
1881
+ }).timeout(attemptTimeout);
1882
+ });
1883
+
1884
+ describe('#haGroupList - errors', () => {
1885
+ it('should have a haGroupList function', (done) => {
1886
+ try {
1887
+ assert.equal(true, typeof a.haGroupList === 'function');
1888
+ done();
1889
+ } catch (error) {
1890
+ log.error(`Test Failure: ${error}`);
1891
+ done(error);
1892
+ }
1893
+ }).timeout(attemptTimeout);
1894
+ });
1895
+
1896
+ describe('#haGroupCreate - errors', () => {
1897
+ it('should have a haGroupCreate function', (done) => {
1898
+ try {
1899
+ assert.equal(true, typeof a.haGroupCreate === 'function');
1900
+ done();
1901
+ } catch (error) {
1902
+ log.error(`Test Failure: ${error}`);
1903
+ done(error);
1904
+ }
1905
+ }).timeout(attemptTimeout);
1906
+ it('should error if - missing body', (done) => {
1907
+ try {
1908
+ a.haGroupCreate(null, null, (data, error) => {
1909
+ try {
1910
+ const displayE = 'body is required';
1911
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-haGroupCreate', displayE);
1912
+ done();
1913
+ } catch (err) {
1914
+ log.error(`Test Failure: ${err}`);
1915
+ done(err);
1916
+ }
1917
+ });
1918
+ } catch (error) {
1919
+ log.error(`Adapter Exception: ${error}`);
1920
+ done(error);
1921
+ }
1922
+ }).timeout(attemptTimeout);
1923
+ });
1924
+
1925
+ describe('#haGroupRead - errors', () => {
1926
+ it('should have a haGroupRead function', (done) => {
1927
+ try {
1928
+ assert.equal(true, typeof a.haGroupRead === 'function');
1929
+ done();
1930
+ } catch (error) {
1931
+ log.error(`Test Failure: ${error}`);
1932
+ done(error);
1933
+ }
1934
+ }).timeout(attemptTimeout);
1935
+ it('should error if - missing id', (done) => {
1936
+ try {
1937
+ a.haGroupRead(null, null, null, null, (data, error) => {
1938
+ try {
1939
+ const displayE = 'id is required';
1940
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-haGroupRead', displayE);
1941
+ done();
1942
+ } catch (err) {
1943
+ log.error(`Test Failure: ${err}`);
1944
+ done(err);
1945
+ }
1946
+ });
1947
+ } catch (error) {
1948
+ log.error(`Adapter Exception: ${error}`);
1949
+ done(error);
1950
+ }
1951
+ }).timeout(attemptTimeout);
1952
+ });
1953
+
1954
+ describe('#haGroupDelete - errors', () => {
1955
+ it('should have a haGroupDelete function', (done) => {
1956
+ try {
1957
+ assert.equal(true, typeof a.haGroupDelete === 'function');
1958
+ done();
1959
+ } catch (error) {
1960
+ log.error(`Test Failure: ${error}`);
1961
+ done(error);
1962
+ }
1963
+ }).timeout(attemptTimeout);
1964
+ it('should error if - missing id', (done) => {
1965
+ try {
1966
+ a.haGroupDelete(null, null, (data, error) => {
1967
+ try {
1968
+ const displayE = 'id is required';
1969
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-haGroupDelete', displayE);
1970
+ done();
1971
+ } catch (err) {
1972
+ log.error(`Test Failure: ${err}`);
1973
+ done(err);
1974
+ }
1975
+ });
1976
+ } catch (error) {
1977
+ log.error(`Adapter Exception: ${error}`);
1978
+ done(error);
1979
+ }
1980
+ }).timeout(attemptTimeout);
1981
+ });
1982
+
1983
+ describe('#haGroupUpdate - errors', () => {
1984
+ it('should have a haGroupUpdate function', (done) => {
1985
+ try {
1986
+ assert.equal(true, typeof a.haGroupUpdate === 'function');
1987
+ done();
1988
+ } catch (error) {
1989
+ log.error(`Test Failure: ${error}`);
1990
+ done(error);
1991
+ }
1992
+ }).timeout(attemptTimeout);
1993
+ it('should error if - missing id', (done) => {
1994
+ try {
1995
+ a.haGroupUpdate(null, null, null, (data, error) => {
1996
+ try {
1997
+ const displayE = 'id is required';
1998
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-haGroupUpdate', displayE);
1999
+ done();
2000
+ } catch (err) {
2001
+ log.error(`Test Failure: ${err}`);
2002
+ done(err);
2003
+ }
2004
+ });
2005
+ } catch (error) {
2006
+ log.error(`Adapter Exception: ${error}`);
2007
+ done(error);
2008
+ }
2009
+ }).timeout(attemptTimeout);
2010
+ it('should error if - missing body', (done) => {
2011
+ try {
2012
+ a.haGroupUpdate('fakeparam', null, null, (data, error) => {
2013
+ try {
2014
+ const displayE = 'body is required';
2015
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-haGroupUpdate', displayE);
2016
+ done();
2017
+ } catch (err) {
2018
+ log.error(`Test Failure: ${err}`);
2019
+ done(err);
2020
+ }
2021
+ });
2022
+ } catch (error) {
2023
+ log.error(`Adapter Exception: ${error}`);
2024
+ done(error);
2025
+ }
2026
+ }).timeout(attemptTimeout);
2027
+ });
2028
+
2029
+ describe('#hardwareFilterList - errors', () => {
2030
+ it('should have a hardwareFilterList function', (done) => {
2031
+ try {
2032
+ assert.equal(true, typeof a.hardwareFilterList === 'function');
2033
+ done();
2034
+ } catch (error) {
2035
+ log.error(`Test Failure: ${error}`);
2036
+ done(error);
2037
+ }
2038
+ }).timeout(attemptTimeout);
2039
+ });
2040
+
2041
+ describe('#hardwareFilterCreate - errors', () => {
2042
+ it('should have a hardwareFilterCreate function', (done) => {
2043
+ try {
2044
+ assert.equal(true, typeof a.hardwareFilterCreate === 'function');
2045
+ done();
2046
+ } catch (error) {
2047
+ log.error(`Test Failure: ${error}`);
2048
+ done(error);
2049
+ }
2050
+ }).timeout(attemptTimeout);
2051
+ it('should error if - missing body', (done) => {
2052
+ try {
2053
+ a.hardwareFilterCreate(null, null, (data, error) => {
2054
+ try {
2055
+ const displayE = 'body is required';
2056
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-hardwareFilterCreate', displayE);
2057
+ done();
2058
+ } catch (err) {
2059
+ log.error(`Test Failure: ${err}`);
2060
+ done(err);
2061
+ }
2062
+ });
2063
+ } catch (error) {
2064
+ log.error(`Adapter Exception: ${error}`);
2065
+ done(error);
2066
+ }
2067
+ }).timeout(attemptTimeout);
2068
+ });
2069
+
2070
+ describe('#hardwareFilterRead - errors', () => {
2071
+ it('should have a hardwareFilterRead function', (done) => {
2072
+ try {
2073
+ assert.equal(true, typeof a.hardwareFilterRead === 'function');
2074
+ done();
2075
+ } catch (error) {
2076
+ log.error(`Test Failure: ${error}`);
2077
+ done(error);
2078
+ }
2079
+ }).timeout(attemptTimeout);
2080
+ it('should error if - missing id', (done) => {
2081
+ try {
2082
+ a.hardwareFilterRead(null, null, null, (data, error) => {
2083
+ try {
2084
+ const displayE = 'id is required';
2085
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-hardwareFilterRead', displayE);
2086
+ done();
2087
+ } catch (err) {
2088
+ log.error(`Test Failure: ${err}`);
2089
+ done(err);
2090
+ }
2091
+ });
2092
+ } catch (error) {
2093
+ log.error(`Adapter Exception: ${error}`);
2094
+ done(error);
2095
+ }
2096
+ }).timeout(attemptTimeout);
2097
+ });
2098
+
2099
+ describe('#hardwareFilterDelete - errors', () => {
2100
+ it('should have a hardwareFilterDelete function', (done) => {
2101
+ try {
2102
+ assert.equal(true, typeof a.hardwareFilterDelete === 'function');
2103
+ done();
2104
+ } catch (error) {
2105
+ log.error(`Test Failure: ${error}`);
2106
+ done(error);
2107
+ }
2108
+ }).timeout(attemptTimeout);
2109
+ it('should error if - missing id', (done) => {
2110
+ try {
2111
+ a.hardwareFilterDelete(null, null, (data, error) => {
2112
+ try {
2113
+ const displayE = 'id is required';
2114
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-hardwareFilterDelete', displayE);
2115
+ done();
2116
+ } catch (err) {
2117
+ log.error(`Test Failure: ${err}`);
2118
+ done(err);
2119
+ }
2120
+ });
2121
+ } catch (error) {
2122
+ log.error(`Adapter Exception: ${error}`);
2123
+ done(error);
2124
+ }
2125
+ }).timeout(attemptTimeout);
2126
+ });
2127
+
2128
+ describe('#hardwareFilterUpdate - errors', () => {
2129
+ it('should have a hardwareFilterUpdate function', (done) => {
2130
+ try {
2131
+ assert.equal(true, typeof a.hardwareFilterUpdate === 'function');
2132
+ done();
2133
+ } catch (error) {
2134
+ log.error(`Test Failure: ${error}`);
2135
+ done(error);
2136
+ }
2137
+ }).timeout(attemptTimeout);
2138
+ it('should error if - missing id', (done) => {
2139
+ try {
2140
+ a.hardwareFilterUpdate(null, null, null, (data, error) => {
2141
+ try {
2142
+ const displayE = 'id is required';
2143
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-hardwareFilterUpdate', displayE);
2144
+ done();
2145
+ } catch (err) {
2146
+ log.error(`Test Failure: ${err}`);
2147
+ done(err);
2148
+ }
2149
+ });
2150
+ } catch (error) {
2151
+ log.error(`Adapter Exception: ${error}`);
2152
+ done(error);
2153
+ }
2154
+ }).timeout(attemptTimeout);
2155
+ it('should error if - missing body', (done) => {
2156
+ try {
2157
+ a.hardwareFilterUpdate('fakeparam', null, null, (data, error) => {
2158
+ try {
2159
+ const displayE = 'body is required';
2160
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-hardwareFilterUpdate', displayE);
2161
+ done();
2162
+ } catch (err) {
2163
+ log.error(`Test Failure: ${err}`);
2164
+ done(err);
2165
+ }
2166
+ });
2167
+ } catch (error) {
2168
+ log.error(`Adapter Exception: ${error}`);
2169
+ done(error);
2170
+ }
2171
+ }).timeout(attemptTimeout);
2172
+ });
2173
+
2174
+ describe('#getDhcpHost - errors', () => {
2175
+ it('should have a getDhcpHost function', (done) => {
2176
+ try {
2177
+ assert.equal(true, typeof a.getDhcpHost === 'function');
2178
+ done();
2179
+ } catch (error) {
2180
+ log.error(`Test Failure: ${error}`);
2181
+ done(error);
2182
+ }
2183
+ }).timeout(attemptTimeout);
2184
+ });
2185
+
2186
+ describe('#getDhcpHostId - errors', () => {
2187
+ it('should have a getDhcpHostId function', (done) => {
2188
+ try {
2189
+ assert.equal(true, typeof a.getDhcpHostId === 'function');
2190
+ done();
2191
+ } catch (error) {
2192
+ log.error(`Test Failure: ${error}`);
2193
+ done(error);
2194
+ }
2195
+ }).timeout(attemptTimeout);
2196
+ it('should error if - missing id', (done) => {
2197
+ try {
2198
+ a.getDhcpHostId(null, null, null, (data, error) => {
2199
+ try {
2200
+ const displayE = 'id is required';
2201
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-getDhcpHostId', displayE);
2202
+ done();
2203
+ } catch (err) {
2204
+ log.error(`Test Failure: ${err}`);
2205
+ done(err);
2206
+ }
2207
+ });
2208
+ } catch (error) {
2209
+ log.error(`Adapter Exception: ${error}`);
2210
+ done(error);
2211
+ }
2212
+ }).timeout(attemptTimeout);
2213
+ });
2214
+
2215
+ describe('#patchDhcpHostId - errors', () => {
2216
+ it('should have a patchDhcpHostId function', (done) => {
2217
+ try {
2218
+ assert.equal(true, typeof a.patchDhcpHostId === 'function');
2219
+ done();
2220
+ } catch (error) {
2221
+ log.error(`Test Failure: ${error}`);
2222
+ done(error);
2223
+ }
2224
+ }).timeout(attemptTimeout);
2225
+ it('should error if - missing id', (done) => {
2226
+ try {
2227
+ a.patchDhcpHostId(null, null, null, (data, error) => {
2228
+ try {
2229
+ const displayE = 'id is required';
2230
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-patchDhcpHostId', displayE);
2231
+ done();
2232
+ } catch (err) {
2233
+ log.error(`Test Failure: ${err}`);
2234
+ done(err);
2235
+ }
2236
+ });
2237
+ } catch (error) {
2238
+ log.error(`Adapter Exception: ${error}`);
2239
+ done(error);
2240
+ }
2241
+ }).timeout(attemptTimeout);
2242
+ it('should error if - missing body', (done) => {
2243
+ try {
2244
+ a.patchDhcpHostId('fakeparam', null, null, (data, error) => {
2245
+ try {
2246
+ const displayE = 'body is required';
2247
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-patchDhcpHostId', displayE);
2248
+ done();
2249
+ } catch (err) {
2250
+ log.error(`Test Failure: ${err}`);
2251
+ done(err);
2252
+ }
2253
+ });
2254
+ } catch (error) {
2255
+ log.error(`Adapter Exception: ${error}`);
2256
+ done(error);
2257
+ }
2258
+ }).timeout(attemptTimeout);
2259
+ });
2260
+
2261
+ describe('#getDhcpHostIdAssociations - errors', () => {
2262
+ it('should have a getDhcpHostIdAssociations function', (done) => {
2263
+ try {
2264
+ assert.equal(true, typeof a.getDhcpHostIdAssociations === 'function');
2265
+ done();
2266
+ } catch (error) {
2267
+ log.error(`Test Failure: ${error}`);
2268
+ done(error);
2269
+ }
2270
+ }).timeout(attemptTimeout);
2271
+ it('should error if - missing id', (done) => {
2272
+ try {
2273
+ a.getDhcpHostIdAssociations(null, null, (data, error) => {
2274
+ try {
2275
+ const displayE = 'id is required';
2276
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-getDhcpHostIdAssociations', displayE);
2277
+ done();
2278
+ } catch (err) {
2279
+ log.error(`Test Failure: ${err}`);
2280
+ done(err);
2281
+ }
2282
+ });
2283
+ } catch (error) {
2284
+ log.error(`Adapter Exception: ${error}`);
2285
+ done(error);
2286
+ }
2287
+ }).timeout(attemptTimeout);
2288
+ });
2289
+
2290
+ describe('#leasesCommandCreate - errors', () => {
2291
+ it('should have a leasesCommandCreate function', (done) => {
2292
+ try {
2293
+ assert.equal(true, typeof a.leasesCommandCreate === 'function');
2294
+ done();
2295
+ } catch (error) {
2296
+ log.error(`Test Failure: ${error}`);
2297
+ done(error);
2298
+ }
2299
+ }).timeout(attemptTimeout);
2300
+ it('should error if - missing body', (done) => {
2301
+ try {
2302
+ a.leasesCommandCreate(null, null, (data, error) => {
2303
+ try {
2304
+ const displayE = 'body is required';
2305
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-leasesCommandCreate', displayE);
2306
+ done();
2307
+ } catch (err) {
2308
+ log.error(`Test Failure: ${err}`);
2309
+ done(err);
2310
+ }
2311
+ });
2312
+ } catch (error) {
2313
+ log.error(`Adapter Exception: ${error}`);
2314
+ done(error);
2315
+ }
2316
+ }).timeout(attemptTimeout);
2317
+ });
2318
+
2319
+ describe('#macAddressItemList - errors', () => {
2320
+ it('should have a macAddressItemList function', (done) => {
2321
+ try {
2322
+ assert.equal(true, typeof a.macAddressItemList === 'function');
2323
+ done();
2324
+ } catch (error) {
2325
+ log.error(`Test Failure: ${error}`);
2326
+ done(error);
2327
+ }
2328
+ }).timeout(attemptTimeout);
2329
+ });
2330
+
2331
+ describe('#macAddressItemCreate - errors', () => {
2332
+ it('should have a macAddressItemCreate function', (done) => {
2333
+ try {
2334
+ assert.equal(true, typeof a.macAddressItemCreate === 'function');
2335
+ done();
2336
+ } catch (error) {
2337
+ log.error(`Test Failure: ${error}`);
2338
+ done(error);
2339
+ }
2340
+ }).timeout(attemptTimeout);
2341
+ it('should error if - missing body', (done) => {
2342
+ try {
2343
+ a.macAddressItemCreate(null, null, (data, error) => {
2344
+ try {
2345
+ const displayE = 'body is required';
2346
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemCreate', displayE);
2347
+ done();
2348
+ } catch (err) {
2349
+ log.error(`Test Failure: ${err}`);
2350
+ done(err);
2351
+ }
2352
+ });
2353
+ } catch (error) {
2354
+ log.error(`Adapter Exception: ${error}`);
2355
+ done(error);
2356
+ }
2357
+ }).timeout(attemptTimeout);
2358
+ });
2359
+
2360
+ describe('#macAddressItemBulkCreate - errors', () => {
2361
+ it('should have a macAddressItemBulkCreate function', (done) => {
2362
+ try {
2363
+ assert.equal(true, typeof a.macAddressItemBulkCreate === 'function');
2364
+ done();
2365
+ } catch (error) {
2366
+ log.error(`Test Failure: ${error}`);
2367
+ done(error);
2368
+ }
2369
+ }).timeout(attemptTimeout);
2370
+ it('should error if - missing body', (done) => {
2371
+ try {
2372
+ a.macAddressItemBulkCreate(null, null, (data, error) => {
2373
+ try {
2374
+ const displayE = 'body is required';
2375
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemBulkCreate', displayE);
2376
+ done();
2377
+ } catch (err) {
2378
+ log.error(`Test Failure: ${err}`);
2379
+ done(err);
2380
+ }
2381
+ });
2382
+ } catch (error) {
2383
+ log.error(`Adapter Exception: ${error}`);
2384
+ done(error);
2385
+ }
2386
+ }).timeout(attemptTimeout);
2387
+ });
2388
+
2389
+ describe('#macAddressItemUpload - errors', () => {
2390
+ it('should have a macAddressItemUpload function', (done) => {
2391
+ try {
2392
+ assert.equal(true, typeof a.macAddressItemUpload === 'function');
2393
+ done();
2394
+ } catch (error) {
2395
+ log.error(`Test Failure: ${error}`);
2396
+ done(error);
2397
+ }
2398
+ }).timeout(attemptTimeout);
2399
+ it('should error if - missing body', (done) => {
2400
+ try {
2401
+ a.macAddressItemUpload(null, null, (data, error) => {
2402
+ try {
2403
+ const displayE = 'body is required';
2404
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemUpload', displayE);
2405
+ done();
2406
+ } catch (err) {
2407
+ log.error(`Test Failure: ${err}`);
2408
+ done(err);
2409
+ }
2410
+ });
2411
+ } catch (error) {
2412
+ log.error(`Adapter Exception: ${error}`);
2413
+ done(error);
2414
+ }
2415
+ }).timeout(attemptTimeout);
2416
+ });
2417
+
2418
+ describe('#macAddressItemRead - errors', () => {
2419
+ it('should have a macAddressItemRead function', (done) => {
2420
+ try {
2421
+ assert.equal(true, typeof a.macAddressItemRead === 'function');
2422
+ done();
2423
+ } catch (error) {
2424
+ log.error(`Test Failure: ${error}`);
2425
+ done(error);
2426
+ }
2427
+ }).timeout(attemptTimeout);
2428
+ it('should error if - missing id', (done) => {
2429
+ try {
2430
+ a.macAddressItemRead(null, null, null, (data, error) => {
2431
+ try {
2432
+ const displayE = 'id is required';
2433
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemRead', displayE);
2434
+ done();
2435
+ } catch (err) {
2436
+ log.error(`Test Failure: ${err}`);
2437
+ done(err);
2438
+ }
2439
+ });
2440
+ } catch (error) {
2441
+ log.error(`Adapter Exception: ${error}`);
2442
+ done(error);
2443
+ }
2444
+ }).timeout(attemptTimeout);
2445
+ });
2446
+
2447
+ describe('#macAddressItemDelete - errors', () => {
2448
+ it('should have a macAddressItemDelete function', (done) => {
2449
+ try {
2450
+ assert.equal(true, typeof a.macAddressItemDelete === 'function');
2451
+ done();
2452
+ } catch (error) {
2453
+ log.error(`Test Failure: ${error}`);
2454
+ done(error);
2455
+ }
2456
+ }).timeout(attemptTimeout);
2457
+ it('should error if - missing id', (done) => {
2458
+ try {
2459
+ a.macAddressItemDelete(null, null, (data, error) => {
2460
+ try {
2461
+ const displayE = 'id is required';
2462
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemDelete', displayE);
2463
+ done();
2464
+ } catch (err) {
2465
+ log.error(`Test Failure: ${err}`);
2466
+ done(err);
2467
+ }
2468
+ });
2469
+ } catch (error) {
2470
+ log.error(`Adapter Exception: ${error}`);
2471
+ done(error);
2472
+ }
2473
+ }).timeout(attemptTimeout);
2474
+ });
2475
+
2476
+ describe('#macAddressItemUpdate - errors', () => {
2477
+ it('should have a macAddressItemUpdate function', (done) => {
2478
+ try {
2479
+ assert.equal(true, typeof a.macAddressItemUpdate === 'function');
2480
+ done();
2481
+ } catch (error) {
2482
+ log.error(`Test Failure: ${error}`);
2483
+ done(error);
2484
+ }
2485
+ }).timeout(attemptTimeout);
2486
+ it('should error if - missing id', (done) => {
2487
+ try {
2488
+ a.macAddressItemUpdate(null, null, null, (data, error) => {
2489
+ try {
2490
+ const displayE = 'id is required';
2491
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemUpdate', displayE);
2492
+ done();
2493
+ } catch (err) {
2494
+ log.error(`Test Failure: ${err}`);
2495
+ done(err);
2496
+ }
2497
+ });
2498
+ } catch (error) {
2499
+ log.error(`Adapter Exception: ${error}`);
2500
+ done(error);
2501
+ }
2502
+ }).timeout(attemptTimeout);
2503
+ it('should error if - missing body', (done) => {
2504
+ try {
2505
+ a.macAddressItemUpdate('fakeparam', null, null, (data, error) => {
2506
+ try {
2507
+ const displayE = 'body is required';
2508
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-macAddressItemUpdate', displayE);
2509
+ done();
2510
+ } catch (err) {
2511
+ log.error(`Test Failure: ${err}`);
2512
+ done(err);
2513
+ }
2514
+ });
2515
+ } catch (error) {
2516
+ log.error(`Adapter Exception: ${error}`);
2517
+ done(error);
2518
+ }
2519
+ }).timeout(attemptTimeout);
2520
+ });
2521
+
2522
+ describe('#optionCodeList - errors', () => {
2523
+ it('should have a optionCodeList function', (done) => {
2524
+ try {
2525
+ assert.equal(true, typeof a.optionCodeList === 'function');
2526
+ done();
2527
+ } catch (error) {
2528
+ log.error(`Test Failure: ${error}`);
2529
+ done(error);
2530
+ }
2531
+ }).timeout(attemptTimeout);
2532
+ });
2533
+
2534
+ describe('#optionCodeCreate - errors', () => {
2535
+ it('should have a optionCodeCreate function', (done) => {
2536
+ try {
2537
+ assert.equal(true, typeof a.optionCodeCreate === 'function');
2538
+ done();
2539
+ } catch (error) {
2540
+ log.error(`Test Failure: ${error}`);
2541
+ done(error);
2542
+ }
2543
+ }).timeout(attemptTimeout);
2544
+ it('should error if - missing body', (done) => {
2545
+ try {
2546
+ a.optionCodeCreate(null, null, (data, error) => {
2547
+ try {
2548
+ const displayE = 'body is required';
2549
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionCodeCreate', displayE);
2550
+ done();
2551
+ } catch (err) {
2552
+ log.error(`Test Failure: ${err}`);
2553
+ done(err);
2554
+ }
2555
+ });
2556
+ } catch (error) {
2557
+ log.error(`Adapter Exception: ${error}`);
2558
+ done(error);
2559
+ }
2560
+ }).timeout(attemptTimeout);
2561
+ });
2562
+
2563
+ describe('#optionCodeRead - errors', () => {
2564
+ it('should have a optionCodeRead function', (done) => {
2565
+ try {
2566
+ assert.equal(true, typeof a.optionCodeRead === 'function');
2567
+ done();
2568
+ } catch (error) {
2569
+ log.error(`Test Failure: ${error}`);
2570
+ done(error);
2571
+ }
2572
+ }).timeout(attemptTimeout);
2573
+ it('should error if - missing id', (done) => {
2574
+ try {
2575
+ a.optionCodeRead(null, null, null, (data, error) => {
2576
+ try {
2577
+ const displayE = 'id is required';
2578
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionCodeRead', displayE);
2579
+ done();
2580
+ } catch (err) {
2581
+ log.error(`Test Failure: ${err}`);
2582
+ done(err);
2583
+ }
2584
+ });
2585
+ } catch (error) {
2586
+ log.error(`Adapter Exception: ${error}`);
2587
+ done(error);
2588
+ }
2589
+ }).timeout(attemptTimeout);
2590
+ });
2591
+
2592
+ describe('#optionCodeDelete - errors', () => {
2593
+ it('should have a optionCodeDelete function', (done) => {
2594
+ try {
2595
+ assert.equal(true, typeof a.optionCodeDelete === 'function');
2596
+ done();
2597
+ } catch (error) {
2598
+ log.error(`Test Failure: ${error}`);
2599
+ done(error);
2600
+ }
2601
+ }).timeout(attemptTimeout);
2602
+ it('should error if - missing id', (done) => {
2603
+ try {
2604
+ a.optionCodeDelete(null, null, (data, error) => {
2605
+ try {
2606
+ const displayE = 'id is required';
2607
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionCodeDelete', displayE);
2608
+ done();
2609
+ } catch (err) {
2610
+ log.error(`Test Failure: ${err}`);
2611
+ done(err);
2612
+ }
2613
+ });
2614
+ } catch (error) {
2615
+ log.error(`Adapter Exception: ${error}`);
2616
+ done(error);
2617
+ }
2618
+ }).timeout(attemptTimeout);
2619
+ });
2620
+
2621
+ describe('#optionCodeUpdate - errors', () => {
2622
+ it('should have a optionCodeUpdate function', (done) => {
2623
+ try {
2624
+ assert.equal(true, typeof a.optionCodeUpdate === 'function');
2625
+ done();
2626
+ } catch (error) {
2627
+ log.error(`Test Failure: ${error}`);
2628
+ done(error);
2629
+ }
2630
+ }).timeout(attemptTimeout);
2631
+ it('should error if - missing id', (done) => {
2632
+ try {
2633
+ a.optionCodeUpdate(null, null, null, (data, error) => {
2634
+ try {
2635
+ const displayE = 'id is required';
2636
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionCodeUpdate', displayE);
2637
+ done();
2638
+ } catch (err) {
2639
+ log.error(`Test Failure: ${err}`);
2640
+ done(err);
2641
+ }
2642
+ });
2643
+ } catch (error) {
2644
+ log.error(`Adapter Exception: ${error}`);
2645
+ done(error);
2646
+ }
2647
+ }).timeout(attemptTimeout);
2648
+ it('should error if - missing body', (done) => {
2649
+ try {
2650
+ a.optionCodeUpdate('fakeparam', null, null, (data, error) => {
2651
+ try {
2652
+ const displayE = 'body is required';
2653
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionCodeUpdate', displayE);
2654
+ done();
2655
+ } catch (err) {
2656
+ log.error(`Test Failure: ${err}`);
2657
+ done(err);
2658
+ }
2659
+ });
2660
+ } catch (error) {
2661
+ log.error(`Adapter Exception: ${error}`);
2662
+ done(error);
2663
+ }
2664
+ }).timeout(attemptTimeout);
2665
+ });
2666
+
2667
+ describe('#optionFilterList - errors', () => {
2668
+ it('should have a optionFilterList function', (done) => {
2669
+ try {
2670
+ assert.equal(true, typeof a.optionFilterList === 'function');
2671
+ done();
2672
+ } catch (error) {
2673
+ log.error(`Test Failure: ${error}`);
2674
+ done(error);
2675
+ }
2676
+ }).timeout(attemptTimeout);
2677
+ });
2678
+
2679
+ describe('#optionFilterCreate - errors', () => {
2680
+ it('should have a optionFilterCreate function', (done) => {
2681
+ try {
2682
+ assert.equal(true, typeof a.optionFilterCreate === 'function');
2683
+ done();
2684
+ } catch (error) {
2685
+ log.error(`Test Failure: ${error}`);
2686
+ done(error);
2687
+ }
2688
+ }).timeout(attemptTimeout);
2689
+ it('should error if - missing body', (done) => {
2690
+ try {
2691
+ a.optionFilterCreate(null, null, (data, error) => {
2692
+ try {
2693
+ const displayE = 'body is required';
2694
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionFilterCreate', displayE);
2695
+ done();
2696
+ } catch (err) {
2697
+ log.error(`Test Failure: ${err}`);
2698
+ done(err);
2699
+ }
2700
+ });
2701
+ } catch (error) {
2702
+ log.error(`Adapter Exception: ${error}`);
2703
+ done(error);
2704
+ }
2705
+ }).timeout(attemptTimeout);
2706
+ });
2707
+
2708
+ describe('#optionFilterRead - errors', () => {
2709
+ it('should have a optionFilterRead function', (done) => {
2710
+ try {
2711
+ assert.equal(true, typeof a.optionFilterRead === 'function');
2712
+ done();
2713
+ } catch (error) {
2714
+ log.error(`Test Failure: ${error}`);
2715
+ done(error);
2716
+ }
2717
+ }).timeout(attemptTimeout);
2718
+ it('should error if - missing id', (done) => {
2719
+ try {
2720
+ a.optionFilterRead(null, null, null, (data, error) => {
2721
+ try {
2722
+ const displayE = 'id is required';
2723
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionFilterRead', displayE);
2724
+ done();
2725
+ } catch (err) {
2726
+ log.error(`Test Failure: ${err}`);
2727
+ done(err);
2728
+ }
2729
+ });
2730
+ } catch (error) {
2731
+ log.error(`Adapter Exception: ${error}`);
2732
+ done(error);
2733
+ }
2734
+ }).timeout(attemptTimeout);
2735
+ });
2736
+
2737
+ describe('#optionFilterDelete - errors', () => {
2738
+ it('should have a optionFilterDelete function', (done) => {
2739
+ try {
2740
+ assert.equal(true, typeof a.optionFilterDelete === 'function');
2741
+ done();
2742
+ } catch (error) {
2743
+ log.error(`Test Failure: ${error}`);
2744
+ done(error);
2745
+ }
2746
+ }).timeout(attemptTimeout);
2747
+ it('should error if - missing id', (done) => {
2748
+ try {
2749
+ a.optionFilterDelete(null, null, (data, error) => {
2750
+ try {
2751
+ const displayE = 'id is required';
2752
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionFilterDelete', displayE);
2753
+ done();
2754
+ } catch (err) {
2755
+ log.error(`Test Failure: ${err}`);
2756
+ done(err);
2757
+ }
2758
+ });
2759
+ } catch (error) {
2760
+ log.error(`Adapter Exception: ${error}`);
2761
+ done(error);
2762
+ }
2763
+ }).timeout(attemptTimeout);
2764
+ });
2765
+
2766
+ describe('#optionFilterUpdate - errors', () => {
2767
+ it('should have a optionFilterUpdate function', (done) => {
2768
+ try {
2769
+ assert.equal(true, typeof a.optionFilterUpdate === 'function');
2770
+ done();
2771
+ } catch (error) {
2772
+ log.error(`Test Failure: ${error}`);
2773
+ done(error);
2774
+ }
2775
+ }).timeout(attemptTimeout);
2776
+ it('should error if - missing id', (done) => {
2777
+ try {
2778
+ a.optionFilterUpdate(null, null, null, (data, error) => {
2779
+ try {
2780
+ const displayE = 'id is required';
2781
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionFilterUpdate', displayE);
2782
+ done();
2783
+ } catch (err) {
2784
+ log.error(`Test Failure: ${err}`);
2785
+ done(err);
2786
+ }
2787
+ });
2788
+ } catch (error) {
2789
+ log.error(`Adapter Exception: ${error}`);
2790
+ done(error);
2791
+ }
2792
+ }).timeout(attemptTimeout);
2793
+ it('should error if - missing body', (done) => {
2794
+ try {
2795
+ a.optionFilterUpdate('fakeparam', null, null, (data, error) => {
2796
+ try {
2797
+ const displayE = 'body is required';
2798
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionFilterUpdate', displayE);
2799
+ done();
2800
+ } catch (err) {
2801
+ log.error(`Test Failure: ${err}`);
2802
+ done(err);
2803
+ }
2804
+ });
2805
+ } catch (error) {
2806
+ log.error(`Adapter Exception: ${error}`);
2807
+ done(error);
2808
+ }
2809
+ }).timeout(attemptTimeout);
2810
+ });
2811
+
2812
+ describe('#optionGroupList - errors', () => {
2813
+ it('should have a optionGroupList function', (done) => {
2814
+ try {
2815
+ assert.equal(true, typeof a.optionGroupList === 'function');
2816
+ done();
2817
+ } catch (error) {
2818
+ log.error(`Test Failure: ${error}`);
2819
+ done(error);
2820
+ }
2821
+ }).timeout(attemptTimeout);
2822
+ });
2823
+
2824
+ describe('#optionGroupCreate - errors', () => {
2825
+ it('should have a optionGroupCreate function', (done) => {
2826
+ try {
2827
+ assert.equal(true, typeof a.optionGroupCreate === 'function');
2828
+ done();
2829
+ } catch (error) {
2830
+ log.error(`Test Failure: ${error}`);
2831
+ done(error);
2832
+ }
2833
+ }).timeout(attemptTimeout);
2834
+ it('should error if - missing body', (done) => {
2835
+ try {
2836
+ a.optionGroupCreate(null, null, (data, error) => {
2837
+ try {
2838
+ const displayE = 'body is required';
2839
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionGroupCreate', displayE);
2840
+ done();
2841
+ } catch (err) {
2842
+ log.error(`Test Failure: ${err}`);
2843
+ done(err);
2844
+ }
2845
+ });
2846
+ } catch (error) {
2847
+ log.error(`Adapter Exception: ${error}`);
2848
+ done(error);
2849
+ }
2850
+ }).timeout(attemptTimeout);
2851
+ });
2852
+
2853
+ describe('#optionGroupRead - errors', () => {
2854
+ it('should have a optionGroupRead function', (done) => {
2855
+ try {
2856
+ assert.equal(true, typeof a.optionGroupRead === 'function');
2857
+ done();
2858
+ } catch (error) {
2859
+ log.error(`Test Failure: ${error}`);
2860
+ done(error);
2861
+ }
2862
+ }).timeout(attemptTimeout);
2863
+ it('should error if - missing id', (done) => {
2864
+ try {
2865
+ a.optionGroupRead(null, null, null, (data, error) => {
2866
+ try {
2867
+ const displayE = 'id is required';
2868
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionGroupRead', displayE);
2869
+ done();
2870
+ } catch (err) {
2871
+ log.error(`Test Failure: ${err}`);
2872
+ done(err);
2873
+ }
2874
+ });
2875
+ } catch (error) {
2876
+ log.error(`Adapter Exception: ${error}`);
2877
+ done(error);
2878
+ }
2879
+ }).timeout(attemptTimeout);
2880
+ });
2881
+
2882
+ describe('#optionGroupDelete - errors', () => {
2883
+ it('should have a optionGroupDelete function', (done) => {
2884
+ try {
2885
+ assert.equal(true, typeof a.optionGroupDelete === 'function');
2886
+ done();
2887
+ } catch (error) {
2888
+ log.error(`Test Failure: ${error}`);
2889
+ done(error);
2890
+ }
2891
+ }).timeout(attemptTimeout);
2892
+ it('should error if - missing id', (done) => {
2893
+ try {
2894
+ a.optionGroupDelete(null, null, (data, error) => {
2895
+ try {
2896
+ const displayE = 'id is required';
2897
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionGroupDelete', displayE);
2898
+ done();
2899
+ } catch (err) {
2900
+ log.error(`Test Failure: ${err}`);
2901
+ done(err);
2902
+ }
2903
+ });
2904
+ } catch (error) {
2905
+ log.error(`Adapter Exception: ${error}`);
2906
+ done(error);
2907
+ }
2908
+ }).timeout(attemptTimeout);
2909
+ });
2910
+
2911
+ describe('#optionGroupUpdate - errors', () => {
2912
+ it('should have a optionGroupUpdate function', (done) => {
2913
+ try {
2914
+ assert.equal(true, typeof a.optionGroupUpdate === 'function');
2915
+ done();
2916
+ } catch (error) {
2917
+ log.error(`Test Failure: ${error}`);
2918
+ done(error);
2919
+ }
2920
+ }).timeout(attemptTimeout);
2921
+ it('should error if - missing id', (done) => {
2922
+ try {
2923
+ a.optionGroupUpdate(null, null, null, (data, error) => {
2924
+ try {
2925
+ const displayE = 'id is required';
2926
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionGroupUpdate', displayE);
2927
+ done();
2928
+ } catch (err) {
2929
+ log.error(`Test Failure: ${err}`);
2930
+ done(err);
2931
+ }
2932
+ });
2933
+ } catch (error) {
2934
+ log.error(`Adapter Exception: ${error}`);
2935
+ done(error);
2936
+ }
2937
+ }).timeout(attemptTimeout);
2938
+ it('should error if - missing body', (done) => {
2939
+ try {
2940
+ a.optionGroupUpdate('fakeparam', null, null, (data, error) => {
2941
+ try {
2942
+ const displayE = 'body is required';
2943
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionGroupUpdate', displayE);
2944
+ done();
2945
+ } catch (err) {
2946
+ log.error(`Test Failure: ${err}`);
2947
+ done(err);
2948
+ }
2949
+ });
2950
+ } catch (error) {
2951
+ log.error(`Adapter Exception: ${error}`);
2952
+ done(error);
2953
+ }
2954
+ }).timeout(attemptTimeout);
2955
+ });
2956
+
2957
+ describe('#optionspaceList - errors', () => {
2958
+ it('should have a optionspaceList function', (done) => {
2959
+ try {
2960
+ assert.equal(true, typeof a.optionspaceList === 'function');
2961
+ done();
2962
+ } catch (error) {
2963
+ log.error(`Test Failure: ${error}`);
2964
+ done(error);
2965
+ }
2966
+ }).timeout(attemptTimeout);
2967
+ });
2968
+
2969
+ describe('#optionspaceCreate - errors', () => {
2970
+ it('should have a optionspaceCreate function', (done) => {
2971
+ try {
2972
+ assert.equal(true, typeof a.optionspaceCreate === 'function');
2973
+ done();
2974
+ } catch (error) {
2975
+ log.error(`Test Failure: ${error}`);
2976
+ done(error);
2977
+ }
2978
+ }).timeout(attemptTimeout);
2979
+ it('should error if - missing body', (done) => {
2980
+ try {
2981
+ a.optionspaceCreate(null, null, (data, error) => {
2982
+ try {
2983
+ const displayE = 'body is required';
2984
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionspaceCreate', displayE);
2985
+ done();
2986
+ } catch (err) {
2987
+ log.error(`Test Failure: ${err}`);
2988
+ done(err);
2989
+ }
2990
+ });
2991
+ } catch (error) {
2992
+ log.error(`Adapter Exception: ${error}`);
2993
+ done(error);
2994
+ }
2995
+ }).timeout(attemptTimeout);
2996
+ });
2997
+
2998
+ describe('#optionspaceRead - errors', () => {
2999
+ it('should have a optionspaceRead function', (done) => {
3000
+ try {
3001
+ assert.equal(true, typeof a.optionspaceRead === 'function');
3002
+ done();
3003
+ } catch (error) {
3004
+ log.error(`Test Failure: ${error}`);
3005
+ done(error);
3006
+ }
3007
+ }).timeout(attemptTimeout);
3008
+ it('should error if - missing id', (done) => {
3009
+ try {
3010
+ a.optionspaceRead(null, null, null, (data, error) => {
3011
+ try {
3012
+ const displayE = 'id is required';
3013
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionspaceRead', displayE);
3014
+ done();
3015
+ } catch (err) {
3016
+ log.error(`Test Failure: ${err}`);
3017
+ done(err);
3018
+ }
3019
+ });
3020
+ } catch (error) {
3021
+ log.error(`Adapter Exception: ${error}`);
3022
+ done(error);
3023
+ }
3024
+ }).timeout(attemptTimeout);
3025
+ });
3026
+
3027
+ describe('#optionspaceDelete - errors', () => {
3028
+ it('should have a optionspaceDelete function', (done) => {
3029
+ try {
3030
+ assert.equal(true, typeof a.optionspaceDelete === 'function');
3031
+ done();
3032
+ } catch (error) {
3033
+ log.error(`Test Failure: ${error}`);
3034
+ done(error);
3035
+ }
3036
+ }).timeout(attemptTimeout);
3037
+ it('should error if - missing id', (done) => {
3038
+ try {
3039
+ a.optionspaceDelete(null, null, (data, error) => {
3040
+ try {
3041
+ const displayE = 'id is required';
3042
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionspaceDelete', displayE);
3043
+ done();
3044
+ } catch (err) {
3045
+ log.error(`Test Failure: ${err}`);
3046
+ done(err);
3047
+ }
3048
+ });
3049
+ } catch (error) {
3050
+ log.error(`Adapter Exception: ${error}`);
3051
+ done(error);
3052
+ }
3053
+ }).timeout(attemptTimeout);
3054
+ });
3055
+
3056
+ describe('#optionspaceUpdate - errors', () => {
3057
+ it('should have a optionspaceUpdate function', (done) => {
3058
+ try {
3059
+ assert.equal(true, typeof a.optionspaceUpdate === 'function');
3060
+ done();
3061
+ } catch (error) {
3062
+ log.error(`Test Failure: ${error}`);
3063
+ done(error);
3064
+ }
3065
+ }).timeout(attemptTimeout);
3066
+ it('should error if - missing id', (done) => {
3067
+ try {
3068
+ a.optionspaceUpdate(null, null, null, (data, error) => {
3069
+ try {
3070
+ const displayE = 'id is required';
3071
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionspaceUpdate', displayE);
3072
+ done();
3073
+ } catch (err) {
3074
+ log.error(`Test Failure: ${err}`);
3075
+ done(err);
3076
+ }
3077
+ });
3078
+ } catch (error) {
3079
+ log.error(`Adapter Exception: ${error}`);
3080
+ done(error);
3081
+ }
3082
+ }).timeout(attemptTimeout);
3083
+ it('should error if - missing body', (done) => {
3084
+ try {
3085
+ a.optionspaceUpdate('fakeparam', null, null, (data, error) => {
3086
+ try {
3087
+ const displayE = 'body is required';
3088
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-optionspaceUpdate', displayE);
3089
+ done();
3090
+ } catch (err) {
3091
+ log.error(`Test Failure: ${err}`);
3092
+ done(err);
3093
+ }
3094
+ });
3095
+ } catch (error) {
3096
+ log.error(`Adapter Exception: ${error}`);
3097
+ done(error);
3098
+ }
3099
+ }).timeout(attemptTimeout);
3100
+ });
3101
+
3102
+ describe('#serverList - errors', () => {
3103
+ it('should have a serverList function', (done) => {
3104
+ try {
3105
+ assert.equal(true, typeof a.serverList === 'function');
3106
+ done();
3107
+ } catch (error) {
3108
+ log.error(`Test Failure: ${error}`);
3109
+ done(error);
3110
+ }
3111
+ }).timeout(attemptTimeout);
3112
+ });
3113
+
3114
+ describe('#serverCreate - errors', () => {
3115
+ it('should have a serverCreate function', (done) => {
3116
+ try {
3117
+ assert.equal(true, typeof a.serverCreate === 'function');
3118
+ done();
3119
+ } catch (error) {
3120
+ log.error(`Test Failure: ${error}`);
3121
+ done(error);
3122
+ }
3123
+ }).timeout(attemptTimeout);
3124
+ it('should error if - missing body', (done) => {
3125
+ try {
3126
+ a.serverCreate(null, null, (data, error) => {
3127
+ try {
3128
+ const displayE = 'body is required';
3129
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-serverCreate', displayE);
3130
+ done();
3131
+ } catch (err) {
3132
+ log.error(`Test Failure: ${err}`);
3133
+ done(err);
3134
+ }
3135
+ });
3136
+ } catch (error) {
3137
+ log.error(`Adapter Exception: ${error}`);
3138
+ done(error);
3139
+ }
3140
+ }).timeout(attemptTimeout);
3141
+ });
3142
+
3143
+ describe('#serverRead - errors', () => {
3144
+ it('should have a serverRead function', (done) => {
3145
+ try {
3146
+ assert.equal(true, typeof a.serverRead === 'function');
3147
+ done();
3148
+ } catch (error) {
3149
+ log.error(`Test Failure: ${error}`);
3150
+ done(error);
3151
+ }
3152
+ }).timeout(attemptTimeout);
3153
+ it('should error if - missing id', (done) => {
3154
+ try {
3155
+ a.serverRead(null, null, null, (data, error) => {
3156
+ try {
3157
+ const displayE = 'id is required';
3158
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-serverRead', displayE);
3159
+ done();
3160
+ } catch (err) {
3161
+ log.error(`Test Failure: ${err}`);
3162
+ done(err);
3163
+ }
3164
+ });
3165
+ } catch (error) {
3166
+ log.error(`Adapter Exception: ${error}`);
3167
+ done(error);
3168
+ }
3169
+ }).timeout(attemptTimeout);
3170
+ });
3171
+
3172
+ describe('#serverDelete - errors', () => {
3173
+ it('should have a serverDelete function', (done) => {
3174
+ try {
3175
+ assert.equal(true, typeof a.serverDelete === 'function');
3176
+ done();
3177
+ } catch (error) {
3178
+ log.error(`Test Failure: ${error}`);
3179
+ done(error);
3180
+ }
3181
+ }).timeout(attemptTimeout);
3182
+ it('should error if - missing id', (done) => {
3183
+ try {
3184
+ a.serverDelete(null, null, (data, error) => {
3185
+ try {
3186
+ const displayE = 'id is required';
3187
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-serverDelete', displayE);
3188
+ done();
3189
+ } catch (err) {
3190
+ log.error(`Test Failure: ${err}`);
3191
+ done(err);
3192
+ }
3193
+ });
3194
+ } catch (error) {
3195
+ log.error(`Adapter Exception: ${error}`);
3196
+ done(error);
3197
+ }
3198
+ }).timeout(attemptTimeout);
3199
+ });
3200
+
3201
+ describe('#serverUpdate - errors', () => {
3202
+ it('should have a serverUpdate function', (done) => {
3203
+ try {
3204
+ assert.equal(true, typeof a.serverUpdate === 'function');
3205
+ done();
3206
+ } catch (error) {
3207
+ log.error(`Test Failure: ${error}`);
3208
+ done(error);
3209
+ }
3210
+ }).timeout(attemptTimeout);
3211
+ it('should error if - missing id', (done) => {
3212
+ try {
3213
+ a.serverUpdate(null, null, null, (data, error) => {
3214
+ try {
3215
+ const displayE = 'id is required';
3216
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-serverUpdate', displayE);
3217
+ done();
3218
+ } catch (err) {
3219
+ log.error(`Test Failure: ${err}`);
3220
+ done(err);
3221
+ }
3222
+ });
3223
+ } catch (error) {
3224
+ log.error(`Adapter Exception: ${error}`);
3225
+ done(error);
3226
+ }
3227
+ }).timeout(attemptTimeout);
3228
+ it('should error if - missing body', (done) => {
3229
+ try {
3230
+ a.serverUpdate('fakeparam', null, null, (data, error) => {
3231
+ try {
3232
+ const displayE = 'body is required';
3233
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-serverUpdate', displayE);
3234
+ done();
3235
+ } catch (err) {
3236
+ log.error(`Test Failure: ${err}`);
3237
+ done(err);
3238
+ }
3239
+ });
3240
+ } catch (error) {
3241
+ log.error(`Adapter Exception: ${error}`);
3242
+ done(error);
3243
+ }
3244
+ }).timeout(attemptTimeout);
3245
+ });
3246
+
3247
+ describe('#serviceList - errors', () => {
3248
+ it('should have a serviceList function', (done) => {
3249
+ try {
3250
+ assert.equal(true, typeof a.serviceList === 'function');
3251
+ done();
3252
+ } catch (error) {
3253
+ log.error(`Test Failure: ${error}`);
3254
+ done(error);
3255
+ }
3256
+ }).timeout(attemptTimeout);
3257
+ });
3258
+
3259
+ describe('#serviceRead - errors', () => {
3260
+ it('should have a serviceRead function', (done) => {
3261
+ try {
3262
+ assert.equal(true, typeof a.serviceRead === 'function');
3263
+ done();
3264
+ } catch (error) {
3265
+ log.error(`Test Failure: ${error}`);
3266
+ done(error);
3267
+ }
3268
+ }).timeout(attemptTimeout);
3269
+ it('should error if - missing id', (done) => {
3270
+ try {
3271
+ a.serviceRead(null, null, null, (data, error) => {
3272
+ try {
3273
+ const displayE = 'id is required';
3274
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-serviceRead', displayE);
3275
+ done();
3276
+ } catch (err) {
3277
+ log.error(`Test Failure: ${err}`);
3278
+ done(err);
3279
+ }
3280
+ });
3281
+ } catch (error) {
3282
+ log.error(`Adapter Exception: ${error}`);
3283
+ done(error);
3284
+ }
3285
+ }).timeout(attemptTimeout);
3286
+ });
3287
+
3288
+ describe('#getDhcpUniversalServiceIdAssociations - errors', () => {
3289
+ it('should have a getDhcpUniversalServiceIdAssociations function', (done) => {
3290
+ try {
3291
+ assert.equal(true, typeof a.getDhcpUniversalServiceIdAssociations === 'function');
3292
+ done();
3293
+ } catch (error) {
3294
+ log.error(`Test Failure: ${error}`);
3295
+ done(error);
3296
+ }
3297
+ }).timeout(attemptTimeout);
3298
+ it('should error if - missing id', (done) => {
3299
+ try {
3300
+ a.getDhcpUniversalServiceIdAssociations(null, null, (data, error) => {
3301
+ try {
3302
+ const displayE = 'id is required';
3303
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-getDhcpUniversalServiceIdAssociations', displayE);
3304
+ done();
3305
+ } catch (err) {
3306
+ log.error(`Test Failure: ${err}`);
3307
+ done(err);
3308
+ }
3309
+ });
3310
+ } catch (error) {
3311
+ log.error(`Adapter Exception: ${error}`);
3312
+ done(error);
3313
+ }
3314
+ }).timeout(attemptTimeout);
3315
+ });
3316
+
3317
+ describe('#getDhcpUniversalServiceIdAssociationsCount - errors', () => {
3318
+ it('should have a getDhcpUniversalServiceIdAssociationsCount function', (done) => {
3319
+ try {
3320
+ assert.equal(true, typeof a.getDhcpUniversalServiceIdAssociationsCount === 'function');
3321
+ done();
3322
+ } catch (error) {
3323
+ log.error(`Test Failure: ${error}`);
3324
+ done(error);
3325
+ }
3326
+ }).timeout(attemptTimeout);
3327
+ it('should error if - missing id', (done) => {
3328
+ try {
3329
+ a.getDhcpUniversalServiceIdAssociationsCount(null, null, (data, error) => {
3330
+ try {
3331
+ const displayE = 'id is required';
3332
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-getDhcpUniversalServiceIdAssociationsCount', displayE);
3333
+ done();
3334
+ } catch (err) {
3335
+ log.error(`Test Failure: ${err}`);
3336
+ done(err);
3337
+ }
3338
+ });
3339
+ } catch (error) {
3340
+ log.error(`Adapter Exception: ${error}`);
3341
+ done(error);
3342
+ }
3343
+ }).timeout(attemptTimeout);
3344
+ });
3345
+
3346
+ describe('#addressList - errors', () => {
3347
+ it('should have a addressList function', (done) => {
3348
+ try {
3349
+ assert.equal(true, typeof a.addressList === 'function');
3350
+ done();
3351
+ } catch (error) {
3352
+ log.error(`Test Failure: ${error}`);
3353
+ done(error);
3354
+ }
3355
+ }).timeout(attemptTimeout);
3356
+ });
3357
+
3358
+ describe('#addressCreate - errors', () => {
3359
+ it('should have a addressCreate function', (done) => {
3360
+ try {
3361
+ assert.equal(true, typeof a.addressCreate === 'function');
3362
+ done();
3363
+ } catch (error) {
3364
+ log.error(`Test Failure: ${error}`);
3365
+ done(error);
3366
+ }
3367
+ }).timeout(attemptTimeout);
3368
+ it('should error if - missing body', (done) => {
3369
+ try {
3370
+ a.addressCreate(null, null, (data, error) => {
3371
+ try {
3372
+ const displayE = 'body is required';
3373
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressCreate', displayE);
3374
+ done();
3375
+ } catch (err) {
3376
+ log.error(`Test Failure: ${err}`);
3377
+ done(err);
3378
+ }
3379
+ });
3380
+ } catch (error) {
3381
+ log.error(`Adapter Exception: ${error}`);
3382
+ done(error);
3383
+ }
3384
+ }).timeout(attemptTimeout);
3385
+ });
3386
+
3387
+ describe('#addressRead - errors', () => {
3388
+ it('should have a addressRead function', (done) => {
3389
+ try {
3390
+ assert.equal(true, typeof a.addressRead === 'function');
3391
+ done();
3392
+ } catch (error) {
3393
+ log.error(`Test Failure: ${error}`);
3394
+ done(error);
3395
+ }
3396
+ }).timeout(attemptTimeout);
3397
+ it('should error if - missing id', (done) => {
3398
+ try {
3399
+ a.addressRead(null, null, null, (data, error) => {
3400
+ try {
3401
+ const displayE = 'id is required';
3402
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressRead', displayE);
3403
+ done();
3404
+ } catch (err) {
3405
+ log.error(`Test Failure: ${err}`);
3406
+ done(err);
3407
+ }
3408
+ });
3409
+ } catch (error) {
3410
+ log.error(`Adapter Exception: ${error}`);
3411
+ done(error);
3412
+ }
3413
+ }).timeout(attemptTimeout);
3414
+ });
3415
+
3416
+ describe('#addressDelete - errors', () => {
3417
+ it('should have a addressDelete function', (done) => {
3418
+ try {
3419
+ assert.equal(true, typeof a.addressDelete === 'function');
3420
+ done();
3421
+ } catch (error) {
3422
+ log.error(`Test Failure: ${error}`);
3423
+ done(error);
3424
+ }
3425
+ }).timeout(attemptTimeout);
3426
+ it('should error if - missing id', (done) => {
3427
+ try {
3428
+ a.addressDelete(null, null, (data, error) => {
3429
+ try {
3430
+ const displayE = 'id is required';
3431
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressDelete', displayE);
3432
+ done();
3433
+ } catch (err) {
3434
+ log.error(`Test Failure: ${err}`);
3435
+ done(err);
3436
+ }
3437
+ });
3438
+ } catch (error) {
3439
+ log.error(`Adapter Exception: ${error}`);
3440
+ done(error);
3441
+ }
3442
+ }).timeout(attemptTimeout);
3443
+ });
3444
+
3445
+ describe('#addressUpdate - errors', () => {
3446
+ it('should have a addressUpdate function', (done) => {
3447
+ try {
3448
+ assert.equal(true, typeof a.addressUpdate === 'function');
3449
+ done();
3450
+ } catch (error) {
3451
+ log.error(`Test Failure: ${error}`);
3452
+ done(error);
3453
+ }
3454
+ }).timeout(attemptTimeout);
3455
+ it('should error if - missing id', (done) => {
3456
+ try {
3457
+ a.addressUpdate(null, null, null, (data, error) => {
3458
+ try {
3459
+ const displayE = 'id is required';
3460
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressUpdate', displayE);
3461
+ done();
3462
+ } catch (err) {
3463
+ log.error(`Test Failure: ${err}`);
3464
+ done(err);
3465
+ }
3466
+ });
3467
+ } catch (error) {
3468
+ log.error(`Adapter Exception: ${error}`);
3469
+ done(error);
3470
+ }
3471
+ }).timeout(attemptTimeout);
3472
+ it('should error if - missing body', (done) => {
3473
+ try {
3474
+ a.addressUpdate('fakeparam', null, null, (data, error) => {
3475
+ try {
3476
+ const displayE = 'body is required';
3477
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressUpdate', displayE);
3478
+ done();
3479
+ } catch (err) {
3480
+ log.error(`Test Failure: ${err}`);
3481
+ done(err);
3482
+ }
3483
+ });
3484
+ } catch (error) {
3485
+ log.error(`Adapter Exception: ${error}`);
3486
+ done(error);
3487
+ }
3488
+ }).timeout(attemptTimeout);
3489
+ });
3490
+
3491
+ describe('#addressBlockList - errors', () => {
3492
+ it('should have a addressBlockList function', (done) => {
3493
+ try {
3494
+ assert.equal(true, typeof a.addressBlockList === 'function');
3495
+ done();
3496
+ } catch (error) {
3497
+ log.error(`Test Failure: ${error}`);
3498
+ done(error);
3499
+ }
3500
+ }).timeout(attemptTimeout);
3501
+ });
3502
+
3503
+ describe('#addressBlockCreate - errors', () => {
3504
+ it('should have a addressBlockCreate function', (done) => {
3505
+ try {
3506
+ assert.equal(true, typeof a.addressBlockCreate === 'function');
3507
+ done();
3508
+ } catch (error) {
3509
+ log.error(`Test Failure: ${error}`);
3510
+ done(error);
3511
+ }
3512
+ }).timeout(attemptTimeout);
3513
+ it('should error if - missing body', (done) => {
3514
+ try {
3515
+ a.addressBlockCreate(null, null, (data, error) => {
3516
+ try {
3517
+ const displayE = 'body is required';
3518
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockCreate', displayE);
3519
+ done();
3520
+ } catch (err) {
3521
+ log.error(`Test Failure: ${err}`);
3522
+ done(err);
3523
+ }
3524
+ });
3525
+ } catch (error) {
3526
+ log.error(`Adapter Exception: ${error}`);
3527
+ done(error);
3528
+ }
3529
+ }).timeout(attemptTimeout);
3530
+ });
3531
+
3532
+ describe('#addressBlockRead - errors', () => {
3533
+ it('should have a addressBlockRead function', (done) => {
3534
+ try {
3535
+ assert.equal(true, typeof a.addressBlockRead === 'function');
3536
+ done();
3537
+ } catch (error) {
3538
+ log.error(`Test Failure: ${error}`);
3539
+ done(error);
3540
+ }
3541
+ }).timeout(attemptTimeout);
3542
+ it('should error if - missing id', (done) => {
3543
+ try {
3544
+ a.addressBlockRead(null, null, null, (data, error) => {
3545
+ try {
3546
+ const displayE = 'id is required';
3547
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockRead', displayE);
3548
+ done();
3549
+ } catch (err) {
3550
+ log.error(`Test Failure: ${err}`);
3551
+ done(err);
3552
+ }
3553
+ });
3554
+ } catch (error) {
3555
+ log.error(`Adapter Exception: ${error}`);
3556
+ done(error);
3557
+ }
3558
+ }).timeout(attemptTimeout);
3559
+ });
3560
+
3561
+ describe('#addressBlockDelete - errors', () => {
3562
+ it('should have a addressBlockDelete function', (done) => {
3563
+ try {
3564
+ assert.equal(true, typeof a.addressBlockDelete === 'function');
3565
+ done();
3566
+ } catch (error) {
3567
+ log.error(`Test Failure: ${error}`);
3568
+ done(error);
3569
+ }
3570
+ }).timeout(attemptTimeout);
3571
+ it('should error if - missing id', (done) => {
3572
+ try {
3573
+ a.addressBlockDelete(null, null, (data, error) => {
3574
+ try {
3575
+ const displayE = 'id is required';
3576
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockDelete', displayE);
3577
+ done();
3578
+ } catch (err) {
3579
+ log.error(`Test Failure: ${err}`);
3580
+ done(err);
3581
+ }
3582
+ });
3583
+ } catch (error) {
3584
+ log.error(`Adapter Exception: ${error}`);
3585
+ done(error);
3586
+ }
3587
+ }).timeout(attemptTimeout);
3588
+ });
3589
+
3590
+ describe('#addressBlockUpdate - errors', () => {
3591
+ it('should have a addressBlockUpdate function', (done) => {
3592
+ try {
3593
+ assert.equal(true, typeof a.addressBlockUpdate === 'function');
3594
+ done();
3595
+ } catch (error) {
3596
+ log.error(`Test Failure: ${error}`);
3597
+ done(error);
3598
+ }
3599
+ }).timeout(attemptTimeout);
3600
+ it('should error if - missing id', (done) => {
3601
+ try {
3602
+ a.addressBlockUpdate(null, null, null, (data, error) => {
3603
+ try {
3604
+ const displayE = 'id is required';
3605
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockUpdate', displayE);
3606
+ done();
3607
+ } catch (err) {
3608
+ log.error(`Test Failure: ${err}`);
3609
+ done(err);
3610
+ }
3611
+ });
3612
+ } catch (error) {
3613
+ log.error(`Adapter Exception: ${error}`);
3614
+ done(error);
3615
+ }
3616
+ }).timeout(attemptTimeout);
3617
+ it('should error if - missing body', (done) => {
3618
+ try {
3619
+ a.addressBlockUpdate('fakeparam', null, null, (data, error) => {
3620
+ try {
3621
+ const displayE = 'body is required';
3622
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockUpdate', displayE);
3623
+ done();
3624
+ } catch (err) {
3625
+ log.error(`Test Failure: ${err}`);
3626
+ done(err);
3627
+ }
3628
+ });
3629
+ } catch (error) {
3630
+ log.error(`Adapter Exception: ${error}`);
3631
+ done(error);
3632
+ }
3633
+ }).timeout(attemptTimeout);
3634
+ });
3635
+
3636
+ describe('#addressBlockListAncestor - errors', () => {
3637
+ it('should have a addressBlockListAncestor function', (done) => {
3638
+ try {
3639
+ assert.equal(true, typeof a.addressBlockListAncestor === 'function');
3640
+ done();
3641
+ } catch (error) {
3642
+ log.error(`Test Failure: ${error}`);
3643
+ done(error);
3644
+ }
3645
+ }).timeout(attemptTimeout);
3646
+ it('should error if - missing id', (done) => {
3647
+ try {
3648
+ a.addressBlockListAncestor(null, null, (data, error) => {
3649
+ try {
3650
+ const displayE = 'id is required';
3651
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockListAncestor', displayE);
3652
+ done();
3653
+ } catch (err) {
3654
+ log.error(`Test Failure: ${err}`);
3655
+ done(err);
3656
+ }
3657
+ });
3658
+ } catch (error) {
3659
+ log.error(`Adapter Exception: ${error}`);
3660
+ done(error);
3661
+ }
3662
+ }).timeout(attemptTimeout);
3663
+ });
3664
+
3665
+ describe('#addressBlockCopy - errors', () => {
3666
+ it('should have a addressBlockCopy function', (done) => {
3667
+ try {
3668
+ assert.equal(true, typeof a.addressBlockCopy === 'function');
3669
+ done();
3670
+ } catch (error) {
3671
+ log.error(`Test Failure: ${error}`);
3672
+ done(error);
3673
+ }
3674
+ }).timeout(attemptTimeout);
3675
+ it('should error if - missing id', (done) => {
3676
+ try {
3677
+ a.addressBlockCopy(null, null, null, (data, error) => {
3678
+ try {
3679
+ const displayE = 'id is required';
3680
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockCopy', displayE);
3681
+ done();
3682
+ } catch (err) {
3683
+ log.error(`Test Failure: ${err}`);
3684
+ done(err);
3685
+ }
3686
+ });
3687
+ } catch (error) {
3688
+ log.error(`Adapter Exception: ${error}`);
3689
+ done(error);
3690
+ }
3691
+ }).timeout(attemptTimeout);
3692
+ it('should error if - missing body', (done) => {
3693
+ try {
3694
+ a.addressBlockCopy('fakeparam', null, null, (data, error) => {
3695
+ try {
3696
+ const displayE = 'body is required';
3697
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockCopy', displayE);
3698
+ done();
3699
+ } catch (err) {
3700
+ log.error(`Test Failure: ${err}`);
3701
+ done(err);
3702
+ }
3703
+ });
3704
+ } catch (error) {
3705
+ log.error(`Adapter Exception: ${error}`);
3706
+ done(error);
3707
+ }
3708
+ }).timeout(attemptTimeout);
3709
+ });
3710
+
3711
+ describe('#addressBlockListNextAvailableAB - errors', () => {
3712
+ it('should have a addressBlockListNextAvailableAB function', (done) => {
3713
+ try {
3714
+ assert.equal(true, typeof a.addressBlockListNextAvailableAB === 'function');
3715
+ done();
3716
+ } catch (error) {
3717
+ log.error(`Test Failure: ${error}`);
3718
+ done(error);
3719
+ }
3720
+ }).timeout(attemptTimeout);
3721
+ it('should error if - missing id', (done) => {
3722
+ try {
3723
+ a.addressBlockListNextAvailableAB(null, null, null, null, null, null, null, null, (data, error) => {
3724
+ try {
3725
+ const displayE = 'id is required';
3726
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockListNextAvailableAB', displayE);
3727
+ done();
3728
+ } catch (err) {
3729
+ log.error(`Test Failure: ${err}`);
3730
+ done(err);
3731
+ }
3732
+ });
3733
+ } catch (error) {
3734
+ log.error(`Adapter Exception: ${error}`);
3735
+ done(error);
3736
+ }
3737
+ }).timeout(attemptTimeout);
3738
+ });
3739
+
3740
+ describe('#addressBlockCreateNextAvailableAB - errors', () => {
3741
+ it('should have a addressBlockCreateNextAvailableAB function', (done) => {
3742
+ try {
3743
+ assert.equal(true, typeof a.addressBlockCreateNextAvailableAB === 'function');
3744
+ done();
3745
+ } catch (error) {
3746
+ log.error(`Test Failure: ${error}`);
3747
+ done(error);
3748
+ }
3749
+ }).timeout(attemptTimeout);
3750
+ it('should error if - missing id', (done) => {
3751
+ try {
3752
+ a.addressBlockCreateNextAvailableAB(null, null, (data, error) => {
3753
+ try {
3754
+ const displayE = 'id is required';
3755
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockCreateNextAvailableAB', displayE);
3756
+ done();
3757
+ } catch (err) {
3758
+ log.error(`Test Failure: ${err}`);
3759
+ done(err);
3760
+ }
3761
+ });
3762
+ } catch (error) {
3763
+ log.error(`Adapter Exception: ${error}`);
3764
+ done(error);
3765
+ }
3766
+ }).timeout(attemptTimeout);
3767
+ });
3768
+
3769
+ describe('#addressBlockListNextAvailableIP - errors', () => {
3770
+ it('should have a addressBlockListNextAvailableIP function', (done) => {
3771
+ try {
3772
+ assert.equal(true, typeof a.addressBlockListNextAvailableIP === 'function');
3773
+ done();
3774
+ } catch (error) {
3775
+ log.error(`Test Failure: ${error}`);
3776
+ done(error);
3777
+ }
3778
+ }).timeout(attemptTimeout);
3779
+ it('should error if - missing id', (done) => {
3780
+ try {
3781
+ a.addressBlockListNextAvailableIP(null, null, null, null, (data, error) => {
3782
+ try {
3783
+ const displayE = 'id is required';
3784
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockListNextAvailableIP', displayE);
3785
+ done();
3786
+ } catch (err) {
3787
+ log.error(`Test Failure: ${err}`);
3788
+ done(err);
3789
+ }
3790
+ });
3791
+ } catch (error) {
3792
+ log.error(`Adapter Exception: ${error}`);
3793
+ done(error);
3794
+ }
3795
+ }).timeout(attemptTimeout);
3796
+ });
3797
+
3798
+ describe('#addressBlockCreateNextAvailableIP - errors', () => {
3799
+ it('should have a addressBlockCreateNextAvailableIP function', (done) => {
3800
+ try {
3801
+ assert.equal(true, typeof a.addressBlockCreateNextAvailableIP === 'function');
3802
+ done();
3803
+ } catch (error) {
3804
+ log.error(`Test Failure: ${error}`);
3805
+ done(error);
3806
+ }
3807
+ }).timeout(attemptTimeout);
3808
+ it('should error if - missing id', (done) => {
3809
+ try {
3810
+ a.addressBlockCreateNextAvailableIP(null, null, (data, error) => {
3811
+ try {
3812
+ const displayE = 'id is required';
3813
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockCreateNextAvailableIP', displayE);
3814
+ done();
3815
+ } catch (err) {
3816
+ log.error(`Test Failure: ${err}`);
3817
+ done(err);
3818
+ }
3819
+ });
3820
+ } catch (error) {
3821
+ log.error(`Adapter Exception: ${error}`);
3822
+ done(error);
3823
+ }
3824
+ }).timeout(attemptTimeout);
3825
+ });
3826
+
3827
+ describe('#addressBlockListNextAvailableSubnet - errors', () => {
3828
+ it('should have a addressBlockListNextAvailableSubnet function', (done) => {
3829
+ try {
3830
+ assert.equal(true, typeof a.addressBlockListNextAvailableSubnet === 'function');
3831
+ done();
3832
+ } catch (error) {
3833
+ log.error(`Test Failure: ${error}`);
3834
+ done(error);
3835
+ }
3836
+ }).timeout(attemptTimeout);
3837
+ it('should error if - missing id', (done) => {
3838
+ try {
3839
+ a.addressBlockListNextAvailableSubnet(null, null, null, null, null, null, null, null, (data, error) => {
3840
+ try {
3841
+ const displayE = 'id is required';
3842
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockListNextAvailableSubnet', displayE);
3843
+ done();
3844
+ } catch (err) {
3845
+ log.error(`Test Failure: ${err}`);
3846
+ done(err);
3847
+ }
3848
+ });
3849
+ } catch (error) {
3850
+ log.error(`Adapter Exception: ${error}`);
3851
+ done(error);
3852
+ }
3853
+ }).timeout(attemptTimeout);
3854
+ });
3855
+
3856
+ describe('#addressBlockCreateNextAvailableSubnet - errors', () => {
3857
+ it('should have a addressBlockCreateNextAvailableSubnet function', (done) => {
3858
+ try {
3859
+ assert.equal(true, typeof a.addressBlockCreateNextAvailableSubnet === 'function');
3860
+ done();
3861
+ } catch (error) {
3862
+ log.error(`Test Failure: ${error}`);
3863
+ done(error);
3864
+ }
3865
+ }).timeout(attemptTimeout);
3866
+ it('should error if - missing id', (done) => {
3867
+ try {
3868
+ a.addressBlockCreateNextAvailableSubnet(null, null, (data, error) => {
3869
+ try {
3870
+ const displayE = 'id is required';
3871
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-addressBlockCreateNextAvailableSubnet', displayE);
3872
+ done();
3873
+ } catch (err) {
3874
+ log.error(`Test Failure: ${err}`);
3875
+ done(err);
3876
+ }
3877
+ });
3878
+ } catch (error) {
3879
+ log.error(`Adapter Exception: ${error}`);
3880
+ done(error);
3881
+ }
3882
+ }).timeout(attemptTimeout);
3883
+ });
3884
+
3885
+ describe('#asmList - errors', () => {
3886
+ it('should have a asmList function', (done) => {
3887
+ try {
3888
+ assert.equal(true, typeof a.asmList === 'function');
3889
+ done();
3890
+ } catch (error) {
3891
+ log.error(`Test Failure: ${error}`);
3892
+ done(error);
3893
+ }
3894
+ }).timeout(attemptTimeout);
3895
+ });
3896
+
3897
+ describe('#asmCreate - errors', () => {
3898
+ it('should have a asmCreate function', (done) => {
3899
+ try {
3900
+ assert.equal(true, typeof a.asmCreate === 'function');
3901
+ done();
3902
+ } catch (error) {
3903
+ log.error(`Test Failure: ${error}`);
3904
+ done(error);
3905
+ }
3906
+ }).timeout(attemptTimeout);
3907
+ it('should error if - missing body', (done) => {
3908
+ try {
3909
+ a.asmCreate(null, null, (data, error) => {
3910
+ try {
3911
+ const displayE = 'body is required';
3912
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-asmCreate', displayE);
3913
+ done();
3914
+ } catch (err) {
3915
+ log.error(`Test Failure: ${err}`);
3916
+ done(err);
3917
+ }
3918
+ });
3919
+ } catch (error) {
3920
+ log.error(`Adapter Exception: ${error}`);
3921
+ done(error);
3922
+ }
3923
+ }).timeout(attemptTimeout);
3924
+ });
3925
+
3926
+ describe('#asmRead - errors', () => {
3927
+ it('should have a asmRead function', (done) => {
3928
+ try {
3929
+ assert.equal(true, typeof a.asmRead === 'function');
3930
+ done();
3931
+ } catch (error) {
3932
+ log.error(`Test Failure: ${error}`);
3933
+ done(error);
3934
+ }
3935
+ }).timeout(attemptTimeout);
3936
+ it('should error if - missing id', (done) => {
3937
+ try {
3938
+ a.asmRead(null, null, null, (data, error) => {
3939
+ try {
3940
+ const displayE = 'id is required';
3941
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-asmRead', displayE);
3942
+ done();
3943
+ } catch (err) {
3944
+ log.error(`Test Failure: ${err}`);
3945
+ done(err);
3946
+ }
3947
+ });
3948
+ } catch (error) {
3949
+ log.error(`Adapter Exception: ${error}`);
3950
+ done(error);
3951
+ }
3952
+ }).timeout(attemptTimeout);
3953
+ });
3954
+
3955
+ describe('#dnsUsageList - errors', () => {
3956
+ it('should have a dnsUsageList function', (done) => {
3957
+ try {
3958
+ assert.equal(true, typeof a.dnsUsageList === 'function');
3959
+ done();
3960
+ } catch (error) {
3961
+ log.error(`Test Failure: ${error}`);
3962
+ done(error);
3963
+ }
3964
+ }).timeout(attemptTimeout);
3965
+ });
3966
+
3967
+ describe('#dnsUsageRead - errors', () => {
3968
+ it('should have a dnsUsageRead function', (done) => {
3969
+ try {
3970
+ assert.equal(true, typeof a.dnsUsageRead === 'function');
3971
+ done();
3972
+ } catch (error) {
3973
+ log.error(`Test Failure: ${error}`);
3974
+ done(error);
3975
+ }
3976
+ }).timeout(attemptTimeout);
3977
+ it('should error if - missing id', (done) => {
3978
+ try {
3979
+ a.dnsUsageRead(null, null, null, (data, error) => {
3980
+ try {
3981
+ const displayE = 'id is required';
3982
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-dnsUsageRead', displayE);
3983
+ done();
3984
+ } catch (err) {
3985
+ log.error(`Test Failure: ${err}`);
3986
+ done(err);
3987
+ }
3988
+ });
3989
+ } catch (error) {
3990
+ log.error(`Adapter Exception: ${error}`);
3991
+ done(error);
3992
+ }
3993
+ }).timeout(attemptTimeout);
3994
+ });
3995
+
3996
+ describe('#getIpamHost - errors', () => {
3997
+ it('should have a getIpamHost function', (done) => {
3998
+ try {
3999
+ assert.equal(true, typeof a.getIpamHost === 'function');
4000
+ done();
4001
+ } catch (error) {
4002
+ log.error(`Test Failure: ${error}`);
4003
+ done(error);
4004
+ }
4005
+ }).timeout(attemptTimeout);
4006
+ });
4007
+
4008
+ describe('#postIpamHost - errors', () => {
4009
+ it('should have a postIpamHost function', (done) => {
4010
+ try {
4011
+ assert.equal(true, typeof a.postIpamHost === 'function');
4012
+ done();
4013
+ } catch (error) {
4014
+ log.error(`Test Failure: ${error}`);
4015
+ done(error);
4016
+ }
4017
+ }).timeout(attemptTimeout);
4018
+ it('should error if - missing body', (done) => {
4019
+ try {
4020
+ a.postIpamHost(null, null, (data, error) => {
4021
+ try {
4022
+ const displayE = 'body is required';
4023
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-postIpamHost', displayE);
4024
+ done();
4025
+ } catch (err) {
4026
+ log.error(`Test Failure: ${err}`);
4027
+ done(err);
4028
+ }
4029
+ });
4030
+ } catch (error) {
4031
+ log.error(`Adapter Exception: ${error}`);
4032
+ done(error);
4033
+ }
4034
+ }).timeout(attemptTimeout);
4035
+ });
4036
+
4037
+ describe('#getIpamHostId - errors', () => {
4038
+ it('should have a getIpamHostId function', (done) => {
4039
+ try {
4040
+ assert.equal(true, typeof a.getIpamHostId === 'function');
4041
+ done();
4042
+ } catch (error) {
4043
+ log.error(`Test Failure: ${error}`);
4044
+ done(error);
4045
+ }
4046
+ }).timeout(attemptTimeout);
4047
+ it('should error if - missing id', (done) => {
4048
+ try {
4049
+ a.getIpamHostId(null, null, null, null, (data, error) => {
4050
+ try {
4051
+ const displayE = 'id is required';
4052
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-getIpamHostId', displayE);
4053
+ done();
4054
+ } catch (err) {
4055
+ log.error(`Test Failure: ${err}`);
4056
+ done(err);
4057
+ }
4058
+ });
4059
+ } catch (error) {
4060
+ log.error(`Adapter Exception: ${error}`);
4061
+ done(error);
4062
+ }
4063
+ }).timeout(attemptTimeout);
4064
+ });
4065
+
4066
+ describe('#deleteIpamHostId - errors', () => {
4067
+ it('should have a deleteIpamHostId function', (done) => {
4068
+ try {
4069
+ assert.equal(true, typeof a.deleteIpamHostId === 'function');
4070
+ done();
4071
+ } catch (error) {
4072
+ log.error(`Test Failure: ${error}`);
4073
+ done(error);
4074
+ }
4075
+ }).timeout(attemptTimeout);
4076
+ it('should error if - missing id', (done) => {
4077
+ try {
4078
+ a.deleteIpamHostId(null, null, (data, error) => {
4079
+ try {
4080
+ const displayE = 'id is required';
4081
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-deleteIpamHostId', displayE);
4082
+ done();
4083
+ } catch (err) {
4084
+ log.error(`Test Failure: ${err}`);
4085
+ done(err);
4086
+ }
4087
+ });
4088
+ } catch (error) {
4089
+ log.error(`Adapter Exception: ${error}`);
4090
+ done(error);
4091
+ }
4092
+ }).timeout(attemptTimeout);
4093
+ });
4094
+
4095
+ describe('#patchIpamHostId - errors', () => {
4096
+ it('should have a patchIpamHostId function', (done) => {
4097
+ try {
4098
+ assert.equal(true, typeof a.patchIpamHostId === 'function');
4099
+ done();
4100
+ } catch (error) {
4101
+ log.error(`Test Failure: ${error}`);
4102
+ done(error);
4103
+ }
4104
+ }).timeout(attemptTimeout);
4105
+ it('should error if - missing id', (done) => {
4106
+ try {
4107
+ a.patchIpamHostId(null, null, null, (data, error) => {
4108
+ try {
4109
+ const displayE = 'id is required';
4110
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-patchIpamHostId', displayE);
4111
+ done();
4112
+ } catch (err) {
4113
+ log.error(`Test Failure: ${err}`);
4114
+ done(err);
4115
+ }
4116
+ });
4117
+ } catch (error) {
4118
+ log.error(`Adapter Exception: ${error}`);
4119
+ done(error);
4120
+ }
4121
+ }).timeout(attemptTimeout);
4122
+ it('should error if - missing body', (done) => {
4123
+ try {
4124
+ a.patchIpamHostId('fakeparam', null, null, (data, error) => {
4125
+ try {
4126
+ const displayE = 'body is required';
4127
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-patchIpamHostId', displayE);
4128
+ done();
4129
+ } catch (err) {
4130
+ log.error(`Test Failure: ${err}`);
4131
+ done(err);
4132
+ }
4133
+ });
4134
+ } catch (error) {
4135
+ log.error(`Adapter Exception: ${error}`);
4136
+ done(error);
4137
+ }
4138
+ }).timeout(attemptTimeout);
4139
+ });
4140
+
4141
+ describe('#ipSpaceList - errors', () => {
4142
+ it('should have a ipSpaceList function', (done) => {
4143
+ try {
4144
+ assert.equal(true, typeof a.ipSpaceList === 'function');
4145
+ done();
4146
+ } catch (error) {
4147
+ log.error(`Test Failure: ${error}`);
4148
+ done(error);
4149
+ }
4150
+ }).timeout(attemptTimeout);
4151
+ });
4152
+
4153
+ describe('#ipSpaceCreate - errors', () => {
4154
+ it('should have a ipSpaceCreate function', (done) => {
4155
+ try {
4156
+ assert.equal(true, typeof a.ipSpaceCreate === 'function');
4157
+ done();
4158
+ } catch (error) {
4159
+ log.error(`Test Failure: ${error}`);
4160
+ done(error);
4161
+ }
4162
+ }).timeout(attemptTimeout);
4163
+ it('should error if - missing body', (done) => {
4164
+ try {
4165
+ a.ipSpaceCreate(null, null, (data, error) => {
4166
+ try {
4167
+ const displayE = 'body is required';
4168
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceCreate', displayE);
4169
+ done();
4170
+ } catch (err) {
4171
+ log.error(`Test Failure: ${err}`);
4172
+ done(err);
4173
+ }
4174
+ });
4175
+ } catch (error) {
4176
+ log.error(`Adapter Exception: ${error}`);
4177
+ done(error);
4178
+ }
4179
+ }).timeout(attemptTimeout);
4180
+ });
4181
+
4182
+ describe('#ipSpaceBulkCopy - errors', () => {
4183
+ it('should have a ipSpaceBulkCopy function', (done) => {
4184
+ try {
4185
+ assert.equal(true, typeof a.ipSpaceBulkCopy === 'function');
4186
+ done();
4187
+ } catch (error) {
4188
+ log.error(`Test Failure: ${error}`);
4189
+ done(error);
4190
+ }
4191
+ }).timeout(attemptTimeout);
4192
+ it('should error if - missing body', (done) => {
4193
+ try {
4194
+ a.ipSpaceBulkCopy(null, null, (data, error) => {
4195
+ try {
4196
+ const displayE = 'body is required';
4197
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceBulkCopy', displayE);
4198
+ done();
4199
+ } catch (err) {
4200
+ log.error(`Test Failure: ${err}`);
4201
+ done(err);
4202
+ }
4203
+ });
4204
+ } catch (error) {
4205
+ log.error(`Adapter Exception: ${error}`);
4206
+ done(error);
4207
+ }
4208
+ }).timeout(attemptTimeout);
4209
+ });
4210
+
4211
+ describe('#ipSpaceRead - errors', () => {
4212
+ it('should have a ipSpaceRead function', (done) => {
4213
+ try {
4214
+ assert.equal(true, typeof a.ipSpaceRead === 'function');
4215
+ done();
4216
+ } catch (error) {
4217
+ log.error(`Test Failure: ${error}`);
4218
+ done(error);
4219
+ }
4220
+ }).timeout(attemptTimeout);
4221
+ it('should error if - missing id', (done) => {
4222
+ try {
4223
+ a.ipSpaceRead(null, null, null, (data, error) => {
4224
+ try {
4225
+ const displayE = 'id is required';
4226
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceRead', displayE);
4227
+ done();
4228
+ } catch (err) {
4229
+ log.error(`Test Failure: ${err}`);
4230
+ done(err);
4231
+ }
4232
+ });
4233
+ } catch (error) {
4234
+ log.error(`Adapter Exception: ${error}`);
4235
+ done(error);
4236
+ }
4237
+ }).timeout(attemptTimeout);
4238
+ });
4239
+
4240
+ describe('#ipSpaceDelete - errors', () => {
4241
+ it('should have a ipSpaceDelete function', (done) => {
4242
+ try {
4243
+ assert.equal(true, typeof a.ipSpaceDelete === 'function');
4244
+ done();
4245
+ } catch (error) {
4246
+ log.error(`Test Failure: ${error}`);
4247
+ done(error);
4248
+ }
4249
+ }).timeout(attemptTimeout);
4250
+ it('should error if - missing id', (done) => {
4251
+ try {
4252
+ a.ipSpaceDelete(null, null, (data, error) => {
4253
+ try {
4254
+ const displayE = 'id is required';
4255
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceDelete', displayE);
4256
+ done();
4257
+ } catch (err) {
4258
+ log.error(`Test Failure: ${err}`);
4259
+ done(err);
4260
+ }
4261
+ });
4262
+ } catch (error) {
4263
+ log.error(`Adapter Exception: ${error}`);
4264
+ done(error);
4265
+ }
4266
+ }).timeout(attemptTimeout);
4267
+ });
4268
+
4269
+ describe('#ipSpaceUpdate - errors', () => {
4270
+ it('should have a ipSpaceUpdate function', (done) => {
4271
+ try {
4272
+ assert.equal(true, typeof a.ipSpaceUpdate === 'function');
4273
+ done();
4274
+ } catch (error) {
4275
+ log.error(`Test Failure: ${error}`);
4276
+ done(error);
4277
+ }
4278
+ }).timeout(attemptTimeout);
4279
+ it('should error if - missing id', (done) => {
4280
+ try {
4281
+ a.ipSpaceUpdate(null, null, null, (data, error) => {
4282
+ try {
4283
+ const displayE = 'id is required';
4284
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceUpdate', displayE);
4285
+ done();
4286
+ } catch (err) {
4287
+ log.error(`Test Failure: ${err}`);
4288
+ done(err);
4289
+ }
4290
+ });
4291
+ } catch (error) {
4292
+ log.error(`Adapter Exception: ${error}`);
4293
+ done(error);
4294
+ }
4295
+ }).timeout(attemptTimeout);
4296
+ it('should error if - missing body', (done) => {
4297
+ try {
4298
+ a.ipSpaceUpdate('fakeparam', null, null, (data, error) => {
4299
+ try {
4300
+ const displayE = 'body is required';
4301
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceUpdate', displayE);
4302
+ done();
4303
+ } catch (err) {
4304
+ log.error(`Test Failure: ${err}`);
4305
+ done(err);
4306
+ }
4307
+ });
4308
+ } catch (error) {
4309
+ log.error(`Adapter Exception: ${error}`);
4310
+ done(error);
4311
+ }
4312
+ }).timeout(attemptTimeout);
4313
+ });
4314
+
4315
+ describe('#ipSpaceGetConflicts - errors', () => {
4316
+ it('should have a ipSpaceGetConflicts function', (done) => {
4317
+ try {
4318
+ assert.equal(true, typeof a.ipSpaceGetConflicts === 'function');
4319
+ done();
4320
+ } catch (error) {
4321
+ log.error(`Test Failure: ${error}`);
4322
+ done(error);
4323
+ }
4324
+ }).timeout(attemptTimeout);
4325
+ it('should error if - missing id', (done) => {
4326
+ try {
4327
+ a.ipSpaceGetConflicts(null, null, null, (data, error) => {
4328
+ try {
4329
+ const displayE = 'id is required';
4330
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceGetConflicts', displayE);
4331
+ done();
4332
+ } catch (err) {
4333
+ log.error(`Test Failure: ${err}`);
4334
+ done(err);
4335
+ }
4336
+ });
4337
+ } catch (error) {
4338
+ log.error(`Adapter Exception: ${error}`);
4339
+ done(error);
4340
+ }
4341
+ }).timeout(attemptTimeout);
4342
+ });
4343
+
4344
+ describe('#ipSpaceCopy - errors', () => {
4345
+ it('should have a ipSpaceCopy function', (done) => {
4346
+ try {
4347
+ assert.equal(true, typeof a.ipSpaceCopy === 'function');
4348
+ done();
4349
+ } catch (error) {
4350
+ log.error(`Test Failure: ${error}`);
4351
+ done(error);
4352
+ }
4353
+ }).timeout(attemptTimeout);
4354
+ it('should error if - missing id', (done) => {
4355
+ try {
4356
+ a.ipSpaceCopy(null, null, null, (data, error) => {
4357
+ try {
4358
+ const displayE = 'id is required';
4359
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceCopy', displayE);
4360
+ done();
4361
+ } catch (err) {
4362
+ log.error(`Test Failure: ${err}`);
4363
+ done(err);
4364
+ }
4365
+ });
4366
+ } catch (error) {
4367
+ log.error(`Adapter Exception: ${error}`);
4368
+ done(error);
4369
+ }
4370
+ }).timeout(attemptTimeout);
4371
+ it('should error if - missing body', (done) => {
4372
+ try {
4373
+ a.ipSpaceCopy('fakeparam', null, null, (data, error) => {
4374
+ try {
4375
+ const displayE = 'body is required';
4376
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-ipSpaceCopy', displayE);
4377
+ done();
4378
+ } catch (err) {
4379
+ log.error(`Test Failure: ${err}`);
4380
+ done(err);
4381
+ }
4382
+ });
4383
+ } catch (error) {
4384
+ log.error(`Adapter Exception: ${error}`);
4385
+ done(error);
4386
+ }
4387
+ }).timeout(attemptTimeout);
4388
+ });
4389
+
4390
+ describe('#rangeList - errors', () => {
4391
+ it('should have a rangeList function', (done) => {
4392
+ try {
4393
+ assert.equal(true, typeof a.rangeList === 'function');
4394
+ done();
4395
+ } catch (error) {
4396
+ log.error(`Test Failure: ${error}`);
4397
+ done(error);
4398
+ }
4399
+ }).timeout(attemptTimeout);
4400
+ });
4401
+
4402
+ describe('#rangeCreate - errors', () => {
4403
+ it('should have a rangeCreate function', (done) => {
4404
+ try {
4405
+ assert.equal(true, typeof a.rangeCreate === 'function');
4406
+ done();
4407
+ } catch (error) {
4408
+ log.error(`Test Failure: ${error}`);
4409
+ done(error);
4410
+ }
4411
+ }).timeout(attemptTimeout);
4412
+ it('should error if - missing body', (done) => {
4413
+ try {
4414
+ a.rangeCreate(null, null, (data, error) => {
4415
+ try {
4416
+ const displayE = 'body is required';
4417
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeCreate', displayE);
4418
+ done();
4419
+ } catch (err) {
4420
+ log.error(`Test Failure: ${err}`);
4421
+ done(err);
4422
+ }
4423
+ });
4424
+ } catch (error) {
4425
+ log.error(`Adapter Exception: ${error}`);
4426
+ done(error);
4427
+ }
4428
+ }).timeout(attemptTimeout);
4429
+ });
4430
+
4431
+ describe('#rangeRead - errors', () => {
4432
+ it('should have a rangeRead function', (done) => {
4433
+ try {
4434
+ assert.equal(true, typeof a.rangeRead === 'function');
4435
+ done();
4436
+ } catch (error) {
4437
+ log.error(`Test Failure: ${error}`);
4438
+ done(error);
4439
+ }
4440
+ }).timeout(attemptTimeout);
4441
+ it('should error if - missing id', (done) => {
4442
+ try {
4443
+ a.rangeRead(null, null, null, (data, error) => {
4444
+ try {
4445
+ const displayE = 'id is required';
4446
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeRead', displayE);
4447
+ done();
4448
+ } catch (err) {
4449
+ log.error(`Test Failure: ${err}`);
4450
+ done(err);
4451
+ }
4452
+ });
4453
+ } catch (error) {
4454
+ log.error(`Adapter Exception: ${error}`);
4455
+ done(error);
4456
+ }
4457
+ }).timeout(attemptTimeout);
4458
+ });
4459
+
4460
+ describe('#rangeDelete - errors', () => {
4461
+ it('should have a rangeDelete function', (done) => {
4462
+ try {
4463
+ assert.equal(true, typeof a.rangeDelete === 'function');
4464
+ done();
4465
+ } catch (error) {
4466
+ log.error(`Test Failure: ${error}`);
4467
+ done(error);
4468
+ }
4469
+ }).timeout(attemptTimeout);
4470
+ it('should error if - missing id', (done) => {
4471
+ try {
4472
+ a.rangeDelete(null, null, (data, error) => {
4473
+ try {
4474
+ const displayE = 'id is required';
4475
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeDelete', displayE);
4476
+ done();
4477
+ } catch (err) {
4478
+ log.error(`Test Failure: ${err}`);
4479
+ done(err);
4480
+ }
4481
+ });
4482
+ } catch (error) {
4483
+ log.error(`Adapter Exception: ${error}`);
4484
+ done(error);
4485
+ }
4486
+ }).timeout(attemptTimeout);
4487
+ });
4488
+
4489
+ describe('#rangeUpdate - errors', () => {
4490
+ it('should have a rangeUpdate function', (done) => {
4491
+ try {
4492
+ assert.equal(true, typeof a.rangeUpdate === 'function');
4493
+ done();
4494
+ } catch (error) {
4495
+ log.error(`Test Failure: ${error}`);
4496
+ done(error);
4497
+ }
4498
+ }).timeout(attemptTimeout);
4499
+ it('should error if - missing id', (done) => {
4500
+ try {
4501
+ a.rangeUpdate(null, null, null, (data, error) => {
4502
+ try {
4503
+ const displayE = 'id is required';
4504
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeUpdate', displayE);
4505
+ done();
4506
+ } catch (err) {
4507
+ log.error(`Test Failure: ${err}`);
4508
+ done(err);
4509
+ }
4510
+ });
4511
+ } catch (error) {
4512
+ log.error(`Adapter Exception: ${error}`);
4513
+ done(error);
4514
+ }
4515
+ }).timeout(attemptTimeout);
4516
+ it('should error if - missing body', (done) => {
4517
+ try {
4518
+ a.rangeUpdate('fakeparam', null, null, (data, error) => {
4519
+ try {
4520
+ const displayE = 'body is required';
4521
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeUpdate', displayE);
4522
+ done();
4523
+ } catch (err) {
4524
+ log.error(`Test Failure: ${err}`);
4525
+ done(err);
4526
+ }
4527
+ });
4528
+ } catch (error) {
4529
+ log.error(`Adapter Exception: ${error}`);
4530
+ done(error);
4531
+ }
4532
+ }).timeout(attemptTimeout);
4533
+ });
4534
+
4535
+ describe('#rangeListNextAvailableIP - errors', () => {
4536
+ it('should have a rangeListNextAvailableIP function', (done) => {
4537
+ try {
4538
+ assert.equal(true, typeof a.rangeListNextAvailableIP === 'function');
4539
+ done();
4540
+ } catch (error) {
4541
+ log.error(`Test Failure: ${error}`);
4542
+ done(error);
4543
+ }
4544
+ }).timeout(attemptTimeout);
4545
+ it('should error if - missing id', (done) => {
4546
+ try {
4547
+ a.rangeListNextAvailableIP(null, null, null, null, (data, error) => {
4548
+ try {
4549
+ const displayE = 'id is required';
4550
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeListNextAvailableIP', displayE);
4551
+ done();
4552
+ } catch (err) {
4553
+ log.error(`Test Failure: ${err}`);
4554
+ done(err);
4555
+ }
4556
+ });
4557
+ } catch (error) {
4558
+ log.error(`Adapter Exception: ${error}`);
4559
+ done(error);
4560
+ }
4561
+ }).timeout(attemptTimeout);
4562
+ });
4563
+
4564
+ describe('#rangeCreateNextAvailableIP - errors', () => {
4565
+ it('should have a rangeCreateNextAvailableIP function', (done) => {
4566
+ try {
4567
+ assert.equal(true, typeof a.rangeCreateNextAvailableIP === 'function');
4568
+ done();
4569
+ } catch (error) {
4570
+ log.error(`Test Failure: ${error}`);
4571
+ done(error);
4572
+ }
4573
+ }).timeout(attemptTimeout);
4574
+ it('should error if - missing id', (done) => {
4575
+ try {
4576
+ a.rangeCreateNextAvailableIP(null, null, (data, error) => {
4577
+ try {
4578
+ const displayE = 'id is required';
4579
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-rangeCreateNextAvailableIP', displayE);
4580
+ done();
4581
+ } catch (err) {
4582
+ log.error(`Test Failure: ${err}`);
4583
+ done(err);
4584
+ }
4585
+ });
4586
+ } catch (error) {
4587
+ log.error(`Adapter Exception: ${error}`);
4588
+ done(error);
4589
+ }
4590
+ }).timeout(attemptTimeout);
4591
+ });
4592
+
4593
+ describe('#subnetList - errors', () => {
4594
+ it('should have a subnetList function', (done) => {
4595
+ try {
4596
+ assert.equal(true, typeof a.subnetList === 'function');
4597
+ done();
4598
+ } catch (error) {
4599
+ log.error(`Test Failure: ${error}`);
4600
+ done(error);
4601
+ }
4602
+ }).timeout(attemptTimeout);
4603
+ });
4604
+
4605
+ describe('#subnetCreate - errors', () => {
4606
+ it('should have a subnetCreate function', (done) => {
4607
+ try {
4608
+ assert.equal(true, typeof a.subnetCreate === 'function');
4609
+ done();
4610
+ } catch (error) {
4611
+ log.error(`Test Failure: ${error}`);
4612
+ done(error);
4613
+ }
4614
+ }).timeout(attemptTimeout);
4615
+ it('should error if - missing body', (done) => {
4616
+ try {
4617
+ a.subnetCreate(null, null, (data, error) => {
4618
+ try {
4619
+ const displayE = 'body is required';
4620
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetCreate', displayE);
4621
+ done();
4622
+ } catch (err) {
4623
+ log.error(`Test Failure: ${err}`);
4624
+ done(err);
4625
+ }
4626
+ });
4627
+ } catch (error) {
4628
+ log.error(`Adapter Exception: ${error}`);
4629
+ done(error);
4630
+ }
4631
+ }).timeout(attemptTimeout);
4632
+ });
4633
+
4634
+ describe('#subnetRead - errors', () => {
4635
+ it('should have a subnetRead function', (done) => {
4636
+ try {
4637
+ assert.equal(true, typeof a.subnetRead === 'function');
4638
+ done();
4639
+ } catch (error) {
4640
+ log.error(`Test Failure: ${error}`);
4641
+ done(error);
4642
+ }
4643
+ }).timeout(attemptTimeout);
4644
+ it('should error if - missing id', (done) => {
4645
+ try {
4646
+ a.subnetRead(null, null, null, (data, error) => {
4647
+ try {
4648
+ const displayE = 'id is required';
4649
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetRead', displayE);
4650
+ done();
4651
+ } catch (err) {
4652
+ log.error(`Test Failure: ${err}`);
4653
+ done(err);
4654
+ }
4655
+ });
4656
+ } catch (error) {
4657
+ log.error(`Adapter Exception: ${error}`);
4658
+ done(error);
4659
+ }
4660
+ }).timeout(attemptTimeout);
4661
+ });
4662
+
4663
+ describe('#subnetDelete - errors', () => {
4664
+ it('should have a subnetDelete function', (done) => {
4665
+ try {
4666
+ assert.equal(true, typeof a.subnetDelete === 'function');
4667
+ done();
4668
+ } catch (error) {
4669
+ log.error(`Test Failure: ${error}`);
4670
+ done(error);
4671
+ }
4672
+ }).timeout(attemptTimeout);
4673
+ it('should error if - missing id', (done) => {
4674
+ try {
4675
+ a.subnetDelete(null, null, (data, error) => {
4676
+ try {
4677
+ const displayE = 'id is required';
4678
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetDelete', displayE);
4679
+ done();
4680
+ } catch (err) {
4681
+ log.error(`Test Failure: ${err}`);
4682
+ done(err);
4683
+ }
4684
+ });
4685
+ } catch (error) {
4686
+ log.error(`Adapter Exception: ${error}`);
4687
+ done(error);
4688
+ }
4689
+ }).timeout(attemptTimeout);
4690
+ });
4691
+
4692
+ describe('#subnetUpdate - errors', () => {
4693
+ it('should have a subnetUpdate function', (done) => {
4694
+ try {
4695
+ assert.equal(true, typeof a.subnetUpdate === 'function');
4696
+ done();
4697
+ } catch (error) {
4698
+ log.error(`Test Failure: ${error}`);
4699
+ done(error);
4700
+ }
4701
+ }).timeout(attemptTimeout);
4702
+ it('should error if - missing id', (done) => {
4703
+ try {
4704
+ a.subnetUpdate(null, null, null, (data, error) => {
4705
+ try {
4706
+ const displayE = 'id is required';
4707
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetUpdate', displayE);
4708
+ done();
4709
+ } catch (err) {
4710
+ log.error(`Test Failure: ${err}`);
4711
+ done(err);
4712
+ }
4713
+ });
4714
+ } catch (error) {
4715
+ log.error(`Adapter Exception: ${error}`);
4716
+ done(error);
4717
+ }
4718
+ }).timeout(attemptTimeout);
4719
+ it('should error if - missing body', (done) => {
4720
+ try {
4721
+ a.subnetUpdate('fakeparam', null, null, (data, error) => {
4722
+ try {
4723
+ const displayE = 'body is required';
4724
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetUpdate', displayE);
4725
+ done();
4726
+ } catch (err) {
4727
+ log.error(`Test Failure: ${err}`);
4728
+ done(err);
4729
+ }
4730
+ });
4731
+ } catch (error) {
4732
+ log.error(`Adapter Exception: ${error}`);
4733
+ done(error);
4734
+ }
4735
+ }).timeout(attemptTimeout);
4736
+ });
4737
+
4738
+ describe('#subnetListAncestor - errors', () => {
4739
+ it('should have a subnetListAncestor function', (done) => {
4740
+ try {
4741
+ assert.equal(true, typeof a.subnetListAncestor === 'function');
4742
+ done();
4743
+ } catch (error) {
4744
+ log.error(`Test Failure: ${error}`);
4745
+ done(error);
4746
+ }
4747
+ }).timeout(attemptTimeout);
4748
+ it('should error if - missing id', (done) => {
4749
+ try {
4750
+ a.subnetListAncestor(null, null, (data, error) => {
4751
+ try {
4752
+ const displayE = 'id is required';
4753
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetListAncestor', displayE);
4754
+ done();
4755
+ } catch (err) {
4756
+ log.error(`Test Failure: ${err}`);
4757
+ done(err);
4758
+ }
4759
+ });
4760
+ } catch (error) {
4761
+ log.error(`Adapter Exception: ${error}`);
4762
+ done(error);
4763
+ }
4764
+ }).timeout(attemptTimeout);
4765
+ });
4766
+
4767
+ describe('#subnetCopy - errors', () => {
4768
+ it('should have a subnetCopy function', (done) => {
4769
+ try {
4770
+ assert.equal(true, typeof a.subnetCopy === 'function');
4771
+ done();
4772
+ } catch (error) {
4773
+ log.error(`Test Failure: ${error}`);
4774
+ done(error);
4775
+ }
4776
+ }).timeout(attemptTimeout);
4777
+ it('should error if - missing id', (done) => {
4778
+ try {
4779
+ a.subnetCopy(null, null, null, (data, error) => {
4780
+ try {
4781
+ const displayE = 'id is required';
4782
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetCopy', displayE);
4783
+ done();
4784
+ } catch (err) {
4785
+ log.error(`Test Failure: ${err}`);
4786
+ done(err);
4787
+ }
4788
+ });
4789
+ } catch (error) {
4790
+ log.error(`Adapter Exception: ${error}`);
4791
+ done(error);
4792
+ }
4793
+ }).timeout(attemptTimeout);
4794
+ it('should error if - missing body', (done) => {
4795
+ try {
4796
+ a.subnetCopy('fakeparam', null, null, (data, error) => {
4797
+ try {
4798
+ const displayE = 'body is required';
4799
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetCopy', displayE);
4800
+ done();
4801
+ } catch (err) {
4802
+ log.error(`Test Failure: ${err}`);
4803
+ done(err);
4804
+ }
4805
+ });
4806
+ } catch (error) {
4807
+ log.error(`Adapter Exception: ${error}`);
4808
+ done(error);
4809
+ }
4810
+ }).timeout(attemptTimeout);
4811
+ });
4812
+
4813
+ describe('#subnetListNextAvailableIP - errors', () => {
4814
+ it('should have a subnetListNextAvailableIP function', (done) => {
4815
+ try {
4816
+ assert.equal(true, typeof a.subnetListNextAvailableIP === 'function');
4817
+ done();
4818
+ } catch (error) {
4819
+ log.error(`Test Failure: ${error}`);
4820
+ done(error);
4821
+ }
4822
+ }).timeout(attemptTimeout);
4823
+ it('should error if - missing id', (done) => {
4824
+ try {
4825
+ a.subnetListNextAvailableIP(null, null, null, null, (data, error) => {
4826
+ try {
4827
+ const displayE = 'id is required';
4828
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetListNextAvailableIP', displayE);
4829
+ done();
4830
+ } catch (err) {
4831
+ log.error(`Test Failure: ${err}`);
4832
+ done(err);
4833
+ }
4834
+ });
4835
+ } catch (error) {
4836
+ log.error(`Adapter Exception: ${error}`);
4837
+ done(error);
4838
+ }
4839
+ }).timeout(attemptTimeout);
4840
+ });
4841
+
4842
+ describe('#subnetCreateNextAvailableIP - errors', () => {
4843
+ it('should have a subnetCreateNextAvailableIP function', (done) => {
4844
+ try {
4845
+ assert.equal(true, typeof a.subnetCreateNextAvailableIP === 'function');
4846
+ done();
4847
+ } catch (error) {
4848
+ log.error(`Test Failure: ${error}`);
4849
+ done(error);
4850
+ }
4851
+ }).timeout(attemptTimeout);
4852
+ it('should error if - missing id', (done) => {
4853
+ try {
4854
+ a.subnetCreateNextAvailableIP(null, null, (data, error) => {
4855
+ try {
4856
+ const displayE = 'id is required';
4857
+ runErrorAsserts(data, error, 'AD.300', 'Test-infoblox_universal_ddi-adapter-subnetCreateNextAvailableIP', displayE);
4858
+ done();
4859
+ } catch (err) {
4860
+ log.error(`Test Failure: ${err}`);
4861
+ done(err);
4862
+ }
4863
+ });
4864
+ } catch (error) {
4865
+ log.error(`Adapter Exception: ${error}`);
4866
+ done(error);
4867
+ }
4868
+ }).timeout(attemptTimeout);
4869
+ });
4870
+ });
4871
+ });