@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,3484 @@
1
+ /* @copyright Itential, LLC 2019 (pre-modifications) */
2
+
3
+ // Set globals
4
+ /* global describe it log pronghornProps */
5
+ /* eslint no-unused-vars: warn */
6
+ /* eslint no-underscore-dangle: warn */
7
+ /* eslint import/no-dynamic-require:warn */
8
+
9
+ // include required items for testing & logging
10
+ const assert = require('assert');
11
+ const fs = require('fs');
12
+ const path = require('path');
13
+ const util = require('util');
14
+ const mocha = require('mocha');
15
+ const winston = require('winston');
16
+ const { expect } = require('chai');
17
+ const { use } = require('chai');
18
+ const td = require('testdouble');
19
+ const log = require('../../utils/logger');
20
+
21
+ const anything = td.matchers.anything();
22
+
23
+ // stub and attemptTimeout are used throughout the code so set them here
24
+ const isRapidFail = false;
25
+ const isSaveMockData = 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
+ if (samProps.request.attempt_timeout < 30000) {
51
+ samProps.request.attempt_timeout = 30000;
52
+ }
53
+ samProps.devicebroker.enabled = true;
54
+ const attemptTimeout = samProps.request.attempt_timeout;
55
+ const { stub } = samProps;
56
+
57
+ // these are the adapter properties. You generally should not need to alter
58
+ // any of these after they are initially set up
59
+ global.pronghornProps = {
60
+ pathProps: {
61
+ encrypted: false
62
+ },
63
+ adapterProps: {
64
+ adapters: [{
65
+ id: 'Test-infoblox_universal_ddi',
66
+ type: 'InfobloxUniversalDdi',
67
+ properties: samProps
68
+ }]
69
+ }
70
+ };
71
+
72
+ global.$HOME = `${__dirname}/../..`;
73
+
74
+ /**
75
+ * Runs the common asserts for test
76
+ */
77
+ function runCommonAsserts(data, error) {
78
+ assert.equal(undefined, error);
79
+ assert.notEqual(undefined, data);
80
+ assert.notEqual(null, data);
81
+ assert.notEqual(undefined, data.response);
82
+ assert.notEqual(null, data.response);
83
+ }
84
+
85
+ /**
86
+ * Runs the error asserts for the test
87
+ */
88
+ function runErrorAsserts(data, error, code, origin, displayStr) {
89
+ assert.equal(null, data);
90
+ assert.notEqual(undefined, error);
91
+ assert.notEqual(null, error);
92
+ assert.notEqual(undefined, error.IAPerror);
93
+ assert.notEqual(null, error.IAPerror);
94
+ assert.notEqual(undefined, error.IAPerror.displayString);
95
+ assert.notEqual(null, error.IAPerror.displayString);
96
+ assert.equal(code, error.icode);
97
+ assert.equal(origin, error.IAPerror.origin);
98
+ assert.equal(displayStr, error.IAPerror.displayString);
99
+ }
100
+
101
+ /**
102
+ * @function saveMockData
103
+ * Attempts to take data from responses and place them in MockDataFiles to help create Mockdata.
104
+ * Note, this was built based on entity file structure for Adapter-Engine 1.6.x
105
+ * @param {string} entityName - Name of the entity saving mock data for
106
+ * @param {string} actionName - Name of the action saving mock data for
107
+ * @param {string} descriptor - Something to describe this test (used as a type)
108
+ * @param {string or object} responseData - The data to put in the mock file.
109
+ */
110
+ function saveMockData(entityName, actionName, descriptor, responseData) {
111
+ // do not need to save mockdata if we are running in stub mode (already has mock data) or if told not to save
112
+ if (stub || !isSaveMockData) {
113
+ return false;
114
+ }
115
+
116
+ // must have a response in order to store the response
117
+ if (responseData && responseData.response) {
118
+ let data = responseData.response;
119
+
120
+ // if there was a raw response that one is better as it is untranslated
121
+ if (responseData.raw) {
122
+ data = responseData.raw;
123
+
124
+ try {
125
+ const temp = JSON.parse(data);
126
+ data = temp;
127
+ } catch (pex) {
128
+ // do not care if it did not parse as we will just use data
129
+ }
130
+ }
131
+
132
+ try {
133
+ const base = path.join(__dirname, `../../entities/${entityName}/`);
134
+ const mockdatafolder = 'mockdatafiles';
135
+ const filename = `mockdatafiles/${actionName}-${descriptor}.json`;
136
+
137
+ if (!fs.existsSync(base + mockdatafolder)) {
138
+ fs.mkdirSync(base + mockdatafolder);
139
+ }
140
+
141
+ // write the data we retrieved
142
+ fs.writeFile(base + filename, JSON.stringify(data, null, 2), 'utf8', (errWritingMock) => {
143
+ if (errWritingMock) throw errWritingMock;
144
+
145
+ // update the action file to reflect the changes. Note: We're replacing the default object for now!
146
+ fs.readFile(`${base}action.json`, (errRead, content) => {
147
+ if (errRead) throw errRead;
148
+
149
+ // parse the action file into JSON
150
+ const parsedJson = JSON.parse(content);
151
+
152
+ // The object update we'll write in.
153
+ const responseObj = {
154
+ type: descriptor,
155
+ key: '',
156
+ mockFile: filename
157
+ };
158
+
159
+ // get the object for method we're trying to change.
160
+ const currentMethodAction = parsedJson.actions.find((obj) => obj.name === actionName);
161
+
162
+ // if the method was not found - should never happen but...
163
+ if (!currentMethodAction) {
164
+ throw Error('Can\'t find an action for this method in the provided entity.');
165
+ }
166
+
167
+ // if there is a response object, we want to replace the Response object. Otherwise we'll create one.
168
+ const actionResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === descriptor);
169
+
170
+ // Add the action responseObj back into the array of response objects.
171
+ if (!actionResponseObj) {
172
+ // if there is a default response object, we want to get the key.
173
+ const defaultResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === 'default');
174
+
175
+ // save the default key into the new response object
176
+ if (defaultResponseObj) {
177
+ responseObj.key = defaultResponseObj.key;
178
+ }
179
+
180
+ // save the new response object
181
+ currentMethodAction.responseObjects = [responseObj];
182
+ } else {
183
+ // update the location of the mock data file
184
+ actionResponseObj.mockFile = responseObj.mockFile;
185
+ }
186
+
187
+ // Save results
188
+ fs.writeFile(`${base}action.json`, JSON.stringify(parsedJson, null, 2), (err) => {
189
+ if (err) throw err;
190
+ });
191
+ });
192
+ });
193
+ } catch (e) {
194
+ log.debug(`Failed to save mock data for ${actionName}. ${e.message}`);
195
+ return false;
196
+ }
197
+ }
198
+
199
+ // no response to save
200
+ log.debug(`No data passed to save into mockdata for ${actionName}`);
201
+ return false;
202
+ }
203
+
204
+ // require the adapter that we are going to be using
205
+ const InfobloxUniversalDdi = require('../../adapter');
206
+
207
+ // begin the testing - these should be pretty well defined between the describe and the it!
208
+ describe('[integration] Infoblox_universal_ddi Adapter Test', () => {
209
+ describe('InfobloxUniversalDdi Class Tests', () => {
210
+ const a = new InfobloxUniversalDdi(
211
+ pronghornProps.adapterProps.adapters[0].id,
212
+ pronghornProps.adapterProps.adapters[0].properties
213
+ );
214
+
215
+ if (isRapidFail) {
216
+ const state = {};
217
+ state.passed = true;
218
+
219
+ mocha.afterEach(function x() {
220
+ state.passed = state.passed
221
+ && (this.currentTest.state === 'passed');
222
+ });
223
+ mocha.beforeEach(function x() {
224
+ if (!state.passed) {
225
+ return this.currentTest.skip();
226
+ }
227
+ return true;
228
+ });
229
+ }
230
+
231
+ describe('#class instance created', () => {
232
+ it('should be a class with properties', (done) => {
233
+ try {
234
+ assert.notEqual(null, a);
235
+ assert.notEqual(undefined, a);
236
+ const checkId = global.pronghornProps.adapterProps.adapters[0].id;
237
+ assert.equal(checkId, a.id);
238
+ assert.notEqual(null, a.allProps);
239
+ const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
240
+ assert.equal(check, a.healthcheckType);
241
+ done();
242
+ } catch (error) {
243
+ log.error(`Test Failure: ${error}`);
244
+ done(error);
245
+ }
246
+ }).timeout(attemptTimeout);
247
+ });
248
+
249
+ describe('#connect', () => {
250
+ it('should get connected - no healthcheck', (done) => {
251
+ try {
252
+ a.healthcheckType = 'none';
253
+ a.connect();
254
+
255
+ try {
256
+ assert.equal(true, a.alive);
257
+ done();
258
+ } catch (error) {
259
+ log.error(`Test Failure: ${error}`);
260
+ done(error);
261
+ }
262
+ } catch (error) {
263
+ log.error(`Adapter Exception: ${error}`);
264
+ done(error);
265
+ }
266
+ });
267
+ it('should get connected - startup healthcheck', (done) => {
268
+ try {
269
+ a.healthcheckType = 'startup';
270
+ a.connect();
271
+
272
+ try {
273
+ assert.equal(true, a.alive);
274
+ done();
275
+ } catch (error) {
276
+ log.error(`Test Failure: ${error}`);
277
+ done(error);
278
+ }
279
+ } catch (error) {
280
+ log.error(`Adapter Exception: ${error}`);
281
+ done(error);
282
+ }
283
+ });
284
+ });
285
+
286
+ describe('#healthCheck', () => {
287
+ it('should be healthy', (done) => {
288
+ try {
289
+ a.healthCheck(null, (data) => {
290
+ try {
291
+ assert.equal(true, a.healthy);
292
+ saveMockData('system', 'healthcheck', 'default', data);
293
+ done();
294
+ } catch (err) {
295
+ log.error(`Test Failure: ${err}`);
296
+ done(err);
297
+ }
298
+ });
299
+ } catch (error) {
300
+ log.error(`Adapter Exception: ${error}`);
301
+ done(error);
302
+ }
303
+ }).timeout(attemptTimeout);
304
+ });
305
+
306
+ // broker tests
307
+ describe('#getDevicesFiltered - errors', () => {
308
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
309
+ try {
310
+ const opts = {
311
+ filter: {
312
+ name: 'deviceName'
313
+ }
314
+ };
315
+ a.getDevicesFiltered(opts, (data, error) => {
316
+ try {
317
+ if (stub) {
318
+ if (samProps.devicebroker.getDevicesFiltered[0].handleFailure === 'ignore') {
319
+ assert.equal(null, error);
320
+ assert.notEqual(undefined, data);
321
+ assert.notEqual(null, data);
322
+ assert.equal(0, data.total);
323
+ assert.equal(0, data.list.length);
324
+ } else {
325
+ const displayE = 'Error 400 received on request';
326
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
327
+ }
328
+ } else {
329
+ runCommonAsserts(data, error);
330
+ }
331
+ done();
332
+ } catch (err) {
333
+ log.error(`Test Failure: ${err}`);
334
+ done(err);
335
+ }
336
+ });
337
+ } catch (error) {
338
+ log.error(`Adapter Exception: ${error}`);
339
+ done(error);
340
+ }
341
+ }).timeout(attemptTimeout);
342
+ });
343
+
344
+ describe('#iapGetDeviceCount - errors', () => {
345
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
346
+ try {
347
+ const opts = {
348
+ filter: {
349
+ name: 'deviceName'
350
+ }
351
+ };
352
+ a.iapGetDeviceCount((data, error) => {
353
+ try {
354
+ if (stub) {
355
+ if (samProps.devicebroker.getDevicesFiltered[0].handleFailure === 'ignore') {
356
+ assert.equal(null, error);
357
+ assert.notEqual(undefined, data);
358
+ assert.notEqual(null, data);
359
+ assert.equal(0, data.count);
360
+ } else {
361
+ const displayE = 'Error 400 received on request';
362
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
363
+ }
364
+ } else {
365
+ runCommonAsserts(data, error);
366
+ }
367
+ done();
368
+ } catch (err) {
369
+ log.error(`Test Failure: ${err}`);
370
+ done(err);
371
+ }
372
+ });
373
+ } catch (error) {
374
+ log.error(`Adapter Exception: ${error}`);
375
+ done(error);
376
+ }
377
+ }).timeout(attemptTimeout);
378
+ });
379
+
380
+ // exposed cache tests
381
+ describe('#iapPopulateEntityCache - errors', () => {
382
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
383
+ try {
384
+ a.iapPopulateEntityCache('Device', (data, error) => {
385
+ try {
386
+ if (stub) {
387
+ assert.equal(null, data);
388
+ assert.notEqual(undefined, error);
389
+ assert.notEqual(null, error);
390
+ done();
391
+ } else {
392
+ assert.equal(undefined, error);
393
+ assert.equal('success', data[0]);
394
+ done();
395
+ }
396
+ } catch (err) {
397
+ log.error(`Test Failure: ${err}`);
398
+ done(err);
399
+ }
400
+ });
401
+ } catch (error) {
402
+ log.error(`Adapter Exception: ${error}`);
403
+ done(error);
404
+ }
405
+ }).timeout(attemptTimeout);
406
+ });
407
+
408
+ describe('#iapRetrieveEntitiesCache - errors', () => {
409
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
410
+ try {
411
+ a.iapRetrieveEntitiesCache('Device', {}, (data, error) => {
412
+ try {
413
+ if (stub) {
414
+ assert.equal(null, data);
415
+ assert.notEqual(null, error);
416
+ assert.notEqual(undefined, error);
417
+ } else {
418
+ assert.equal(undefined, error);
419
+ assert.notEqual(null, data);
420
+ assert.notEqual(undefined, data);
421
+ }
422
+ done();
423
+ } catch (err) {
424
+ log.error(`Test Failure: ${err}`);
425
+ done(err);
426
+ }
427
+ });
428
+ } catch (error) {
429
+ log.error(`Adapter Exception: ${error}`);
430
+ done(error);
431
+ }
432
+ }).timeout(attemptTimeout);
433
+ });
434
+ /*
435
+ -----------------------------------------------------------------------
436
+ -----------------------------------------------------------------------
437
+ *** All code above this comment will be replaced during a migration ***
438
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
439
+ -----------------------------------------------------------------------
440
+ -----------------------------------------------------------------------
441
+ */
442
+
443
+ const configProfileConfigProfileDisassociateObjectFromConfigProfilesBodyParam = {};
444
+ describe('#configProfileDisassociateObjectFromConfigProfiles - errors', () => {
445
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
446
+ try {
447
+ a.configProfileDisassociateObjectFromConfigProfiles(configProfileConfigProfileDisassociateObjectFromConfigProfilesBodyParam, null, (data, error) => {
448
+ try {
449
+ if (stub) {
450
+ const displayE = 'Error 400 received on request';
451
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
452
+ } else {
453
+ runCommonAsserts(data, error);
454
+ }
455
+ saveMockData('ConfigProfile', 'configProfileDisassociateObjectFromConfigProfiles', 'default', data);
456
+ done();
457
+ } catch (err) {
458
+ log.error(`Test Failure: ${err}`);
459
+ done(err);
460
+ }
461
+ });
462
+ } catch (error) {
463
+ log.error(`Adapter Exception: ${error}`);
464
+ done(error);
465
+ }
466
+ }).timeout(attemptTimeout);
467
+ });
468
+
469
+ const configProfileConfigProfileDisassociateConfigProfileFromObjectsBodyParam = {};
470
+ describe('#configProfileDisassociateConfigProfileFromObjects - errors', () => {
471
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
472
+ try {
473
+ a.configProfileDisassociateConfigProfileFromObjects(configProfileConfigProfileDisassociateConfigProfileFromObjectsBodyParam, null, (data, error) => {
474
+ try {
475
+ if (stub) {
476
+ const displayE = 'Error 400 received on request';
477
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
478
+ } else {
479
+ runCommonAsserts(data, error);
480
+ }
481
+ saveMockData('ConfigProfile', 'configProfileDisassociateConfigProfileFromObjects', 'default', data);
482
+ done();
483
+ } catch (err) {
484
+ log.error(`Test Failure: ${err}`);
485
+ done(err);
486
+ }
487
+ });
488
+ } catch (error) {
489
+ log.error(`Adapter Exception: ${error}`);
490
+ done(error);
491
+ }
492
+ }).timeout(attemptTimeout);
493
+ });
494
+
495
+ const configProfileConfigProfileAssociateObjectToConfigProfilesBodyParam = {};
496
+ describe('#configProfileAssociateObjectToConfigProfiles - errors', () => {
497
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
498
+ try {
499
+ a.configProfileAssociateObjectToConfigProfiles(configProfileConfigProfileAssociateObjectToConfigProfilesBodyParam, null, (data, error) => {
500
+ try {
501
+ if (stub) {
502
+ const displayE = 'Error 400 received on request';
503
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
504
+ } else {
505
+ runCommonAsserts(data, error);
506
+ }
507
+ saveMockData('ConfigProfile', 'configProfileAssociateObjectToConfigProfiles', 'default', data);
508
+ done();
509
+ } catch (err) {
510
+ log.error(`Test Failure: ${err}`);
511
+ done(err);
512
+ }
513
+ });
514
+ } catch (error) {
515
+ log.error(`Adapter Exception: ${error}`);
516
+ done(error);
517
+ }
518
+ }).timeout(attemptTimeout);
519
+ });
520
+
521
+ const configProfileConfigProfileAssociateConfigProfileToObjectsBodyParam = {};
522
+ describe('#configProfileAssociateConfigProfileToObjects - errors', () => {
523
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
524
+ try {
525
+ a.configProfileAssociateConfigProfileToObjects(configProfileConfigProfileAssociateConfigProfileToObjectsBodyParam, null, (data, error) => {
526
+ try {
527
+ if (stub) {
528
+ const displayE = 'Error 400 received on request';
529
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
530
+ } else {
531
+ runCommonAsserts(data, error);
532
+ }
533
+ saveMockData('ConfigProfile', 'configProfileAssociateConfigProfileToObjects', 'default', data);
534
+ done();
535
+ } catch (err) {
536
+ log.error(`Test Failure: ${err}`);
537
+ done(err);
538
+ }
539
+ });
540
+ } catch (error) {
541
+ log.error(`Adapter Exception: ${error}`);
542
+ done(error);
543
+ }
544
+ }).timeout(attemptTimeout);
545
+ });
546
+
547
+ describe('#configProfileListConfigProfiles - errors', () => {
548
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
549
+ try {
550
+ a.configProfileListConfigProfiles(null, null, (data, error) => {
551
+ try {
552
+ if (stub) {
553
+ const displayE = 'Error 400 received on request';
554
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
555
+ } else {
556
+ runCommonAsserts(data, error);
557
+ }
558
+ saveMockData('ConfigProfile', 'configProfileListConfigProfiles', 'default', data);
559
+ done();
560
+ } catch (err) {
561
+ log.error(`Test Failure: ${err}`);
562
+ done(err);
563
+ }
564
+ });
565
+ } catch (error) {
566
+ log.error(`Adapter Exception: ${error}`);
567
+ done(error);
568
+ }
569
+ }).timeout(attemptTimeout);
570
+ });
571
+
572
+ describe('#configProfileListSubnets - errors', () => {
573
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
574
+ try {
575
+ a.configProfileListSubnets(null, null, null, null, null, null, (data, error) => {
576
+ try {
577
+ if (stub) {
578
+ const displayE = 'Error 400 received on request';
579
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
580
+ } else {
581
+ runCommonAsserts(data, error);
582
+ }
583
+ saveMockData('ConfigProfile', 'configProfileListSubnets', 'default', data);
584
+ done();
585
+ } catch (err) {
586
+ log.error(`Test Failure: ${err}`);
587
+ done(err);
588
+ }
589
+ });
590
+ } catch (error) {
591
+ log.error(`Adapter Exception: ${error}`);
592
+ done(error);
593
+ }
594
+ }).timeout(attemptTimeout);
595
+ });
596
+
597
+ describe('#filterList - errors', () => {
598
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
599
+ try {
600
+ a.filterList(null, null, null, null, null, null, null, null, null, (data, error) => {
601
+ try {
602
+ if (stub) {
603
+ const displayE = 'Error 400 received on request';
604
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
605
+ } else {
606
+ runCommonAsserts(data, error);
607
+ }
608
+ saveMockData('Filter', 'filterList', 'default', data);
609
+ done();
610
+ } catch (err) {
611
+ log.error(`Test Failure: ${err}`);
612
+ done(err);
613
+ }
614
+ });
615
+ } catch (error) {
616
+ log.error(`Adapter Exception: ${error}`);
617
+ done(error);
618
+ }
619
+ }).timeout(attemptTimeout);
620
+ });
621
+
622
+ const fixedAddressFixedAddressCreateBodyParam = {};
623
+ describe('#fixedAddressCreate - errors', () => {
624
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
625
+ try {
626
+ a.fixedAddressCreate(fixedAddressFixedAddressCreateBodyParam, null, (data, error) => {
627
+ try {
628
+ if (stub) {
629
+ const displayE = 'Error 400 received on request';
630
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
631
+ } else {
632
+ runCommonAsserts(data, error);
633
+ }
634
+ saveMockData('FixedAddress', 'fixedAddressCreate', 'default', data);
635
+ done();
636
+ } catch (err) {
637
+ log.error(`Test Failure: ${err}`);
638
+ done(err);
639
+ }
640
+ });
641
+ } catch (error) {
642
+ log.error(`Adapter Exception: ${error}`);
643
+ done(error);
644
+ }
645
+ }).timeout(attemptTimeout);
646
+ });
647
+
648
+ describe('#fixedAddressList - errors', () => {
649
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
650
+ try {
651
+ a.fixedAddressList(null, null, null, null, null, null, null, null, null, (data, error) => {
652
+ try {
653
+ if (stub) {
654
+ const displayE = 'Error 400 received on request';
655
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
656
+ } else {
657
+ runCommonAsserts(data, error);
658
+ }
659
+ saveMockData('FixedAddress', 'fixedAddressList', 'default', data);
660
+ done();
661
+ } catch (err) {
662
+ log.error(`Test Failure: ${err}`);
663
+ done(err);
664
+ }
665
+ });
666
+ } catch (error) {
667
+ log.error(`Adapter Exception: ${error}`);
668
+ done(error);
669
+ }
670
+ }).timeout(attemptTimeout);
671
+ });
672
+
673
+ const fixedAddressId = 'fakedata';
674
+ const fixedAddressFixedAddressUpdateBodyParam = {};
675
+ describe('#fixedAddressUpdate - errors', () => {
676
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
677
+ try {
678
+ a.fixedAddressUpdate(fixedAddressId, fixedAddressFixedAddressUpdateBodyParam, null, (data, error) => {
679
+ try {
680
+ if (stub) {
681
+ const displayE = 'Error 400 received on request';
682
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
683
+ } else {
684
+ runCommonAsserts(data, error);
685
+ }
686
+ saveMockData('FixedAddress', 'fixedAddressUpdate', 'default', data);
687
+ done();
688
+ } catch (err) {
689
+ log.error(`Test Failure: ${err}`);
690
+ done(err);
691
+ }
692
+ });
693
+ } catch (error) {
694
+ log.error(`Adapter Exception: ${error}`);
695
+ done(error);
696
+ }
697
+ }).timeout(attemptTimeout);
698
+ });
699
+
700
+ describe('#fixedAddressRead - errors', () => {
701
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
702
+ try {
703
+ a.fixedAddressRead(fixedAddressId, null, null, (data, error) => {
704
+ try {
705
+ if (stub) {
706
+ const displayE = 'Error 400 received on request';
707
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
708
+ } else {
709
+ runCommonAsserts(data, error);
710
+ }
711
+ saveMockData('FixedAddress', 'fixedAddressRead', 'default', data);
712
+ done();
713
+ } catch (err) {
714
+ log.error(`Test Failure: ${err}`);
715
+ done(err);
716
+ }
717
+ });
718
+ } catch (error) {
719
+ log.error(`Adapter Exception: ${error}`);
720
+ done(error);
721
+ }
722
+ }).timeout(attemptTimeout);
723
+ });
724
+
725
+ const globalGlobalUpdateBodyParam = {};
726
+ describe('#globalUpdate - errors', () => {
727
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
728
+ try {
729
+ a.globalUpdate(globalGlobalUpdateBodyParam, null, (data, error) => {
730
+ try {
731
+ if (stub) {
732
+ const displayE = 'Error 400 received on request';
733
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
734
+ } else {
735
+ runCommonAsserts(data, error);
736
+ }
737
+ saveMockData('Global', 'globalUpdate', 'default', data);
738
+ done();
739
+ } catch (err) {
740
+ log.error(`Test Failure: ${err}`);
741
+ done(err);
742
+ }
743
+ });
744
+ } catch (error) {
745
+ log.error(`Adapter Exception: ${error}`);
746
+ done(error);
747
+ }
748
+ }).timeout(attemptTimeout);
749
+ });
750
+
751
+ describe('#globalRead - errors', () => {
752
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
753
+ try {
754
+ a.globalRead(null, null, (data, error) => {
755
+ try {
756
+ if (stub) {
757
+ const displayE = 'Error 400 received on request';
758
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
759
+ } else {
760
+ runCommonAsserts(data, error);
761
+ }
762
+ saveMockData('Global', 'globalRead', 'default', data);
763
+ done();
764
+ } catch (err) {
765
+ log.error(`Test Failure: ${err}`);
766
+ done(err);
767
+ }
768
+ });
769
+ } catch (error) {
770
+ log.error(`Adapter Exception: ${error}`);
771
+ done(error);
772
+ }
773
+ }).timeout(attemptTimeout);
774
+ });
775
+
776
+ const globalId = 'fakedata';
777
+ const globalGlobalUpdate2BodyParam = {};
778
+ describe('#globalUpdate2 - errors', () => {
779
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
780
+ try {
781
+ a.globalUpdate2(globalId, globalGlobalUpdate2BodyParam, null, (data, error) => {
782
+ try {
783
+ if (stub) {
784
+ const displayE = 'Error 400 received on request';
785
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
786
+ } else {
787
+ runCommonAsserts(data, error);
788
+ }
789
+ saveMockData('Global', 'globalUpdate2', 'default', data);
790
+ done();
791
+ } catch (err) {
792
+ log.error(`Test Failure: ${err}`);
793
+ done(err);
794
+ }
795
+ });
796
+ } catch (error) {
797
+ log.error(`Adapter Exception: ${error}`);
798
+ done(error);
799
+ }
800
+ }).timeout(attemptTimeout);
801
+ });
802
+
803
+ describe('#globalRead2 - errors', () => {
804
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
805
+ try {
806
+ a.globalRead2(globalId, null, null, (data, error) => {
807
+ try {
808
+ if (stub) {
809
+ const displayE = 'Error 400 received on request';
810
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
811
+ } else {
812
+ runCommonAsserts(data, error);
813
+ }
814
+ saveMockData('Global', 'globalRead2', 'default', data);
815
+ done();
816
+ } catch (err) {
817
+ log.error(`Test Failure: ${err}`);
818
+ done(err);
819
+ }
820
+ });
821
+ } catch (error) {
822
+ log.error(`Adapter Exception: ${error}`);
823
+ done(error);
824
+ }
825
+ }).timeout(attemptTimeout);
826
+ });
827
+
828
+ const haGroupHaGroupCreateBodyParam = {};
829
+ describe('#haGroupCreate - errors', () => {
830
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
831
+ try {
832
+ a.haGroupCreate(haGroupHaGroupCreateBodyParam, null, (data, error) => {
833
+ try {
834
+ if (stub) {
835
+ const displayE = 'Error 400 received on request';
836
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
837
+ } else {
838
+ runCommonAsserts(data, error);
839
+ }
840
+ saveMockData('HaGroup', 'haGroupCreate', 'default', data);
841
+ done();
842
+ } catch (err) {
843
+ log.error(`Test Failure: ${err}`);
844
+ done(err);
845
+ }
846
+ });
847
+ } catch (error) {
848
+ log.error(`Adapter Exception: ${error}`);
849
+ done(error);
850
+ }
851
+ }).timeout(attemptTimeout);
852
+ });
853
+
854
+ describe('#haGroupList - errors', () => {
855
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
856
+ try {
857
+ a.haGroupList(null, null, null, null, null, null, null, null, null, null, (data, error) => {
858
+ try {
859
+ if (stub) {
860
+ const displayE = 'Error 400 received on request';
861
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
862
+ } else {
863
+ runCommonAsserts(data, error);
864
+ }
865
+ saveMockData('HaGroup', 'haGroupList', 'default', data);
866
+ done();
867
+ } catch (err) {
868
+ log.error(`Test Failure: ${err}`);
869
+ done(err);
870
+ }
871
+ });
872
+ } catch (error) {
873
+ log.error(`Adapter Exception: ${error}`);
874
+ done(error);
875
+ }
876
+ }).timeout(attemptTimeout);
877
+ });
878
+
879
+ const haGroupId = 'fakedata';
880
+ const haGroupHaGroupUpdateBodyParam = {};
881
+ describe('#haGroupUpdate - errors', () => {
882
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
883
+ try {
884
+ a.haGroupUpdate(haGroupId, haGroupHaGroupUpdateBodyParam, null, (data, error) => {
885
+ try {
886
+ if (stub) {
887
+ const displayE = 'Error 400 received on request';
888
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
889
+ } else {
890
+ runCommonAsserts(data, error);
891
+ }
892
+ saveMockData('HaGroup', 'haGroupUpdate', 'default', data);
893
+ done();
894
+ } catch (err) {
895
+ log.error(`Test Failure: ${err}`);
896
+ done(err);
897
+ }
898
+ });
899
+ } catch (error) {
900
+ log.error(`Adapter Exception: ${error}`);
901
+ done(error);
902
+ }
903
+ }).timeout(attemptTimeout);
904
+ });
905
+
906
+ describe('#haGroupRead - errors', () => {
907
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
908
+ try {
909
+ a.haGroupRead(haGroupId, null, null, null, (data, error) => {
910
+ try {
911
+ if (stub) {
912
+ const displayE = 'Error 400 received on request';
913
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
914
+ } else {
915
+ runCommonAsserts(data, error);
916
+ }
917
+ saveMockData('HaGroup', 'haGroupRead', 'default', data);
918
+ done();
919
+ } catch (err) {
920
+ log.error(`Test Failure: ${err}`);
921
+ done(err);
922
+ }
923
+ });
924
+ } catch (error) {
925
+ log.error(`Adapter Exception: ${error}`);
926
+ done(error);
927
+ }
928
+ }).timeout(attemptTimeout);
929
+ });
930
+
931
+ const hardwareFilterHardwareFilterCreateBodyParam = {};
932
+ describe('#hardwareFilterCreate - errors', () => {
933
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
934
+ try {
935
+ a.hardwareFilterCreate(hardwareFilterHardwareFilterCreateBodyParam, null, (data, error) => {
936
+ try {
937
+ if (stub) {
938
+ const displayE = 'Error 400 received on request';
939
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
940
+ } else {
941
+ runCommonAsserts(data, error);
942
+ }
943
+ saveMockData('HardwareFilter', 'hardwareFilterCreate', 'default', data);
944
+ done();
945
+ } catch (err) {
946
+ log.error(`Test Failure: ${err}`);
947
+ done(err);
948
+ }
949
+ });
950
+ } catch (error) {
951
+ log.error(`Adapter Exception: ${error}`);
952
+ done(error);
953
+ }
954
+ }).timeout(attemptTimeout);
955
+ });
956
+
957
+ describe('#hardwareFilterList - errors', () => {
958
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
959
+ try {
960
+ a.hardwareFilterList(null, null, null, null, null, null, null, null, null, (data, error) => {
961
+ try {
962
+ if (stub) {
963
+ const displayE = 'Error 400 received on request';
964
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
965
+ } else {
966
+ runCommonAsserts(data, error);
967
+ }
968
+ saveMockData('HardwareFilter', 'hardwareFilterList', 'default', data);
969
+ done();
970
+ } catch (err) {
971
+ log.error(`Test Failure: ${err}`);
972
+ done(err);
973
+ }
974
+ });
975
+ } catch (error) {
976
+ log.error(`Adapter Exception: ${error}`);
977
+ done(error);
978
+ }
979
+ }).timeout(attemptTimeout);
980
+ });
981
+
982
+ const hardwareFilterId = 'fakedata';
983
+ const hardwareFilterHardwareFilterUpdateBodyParam = {};
984
+ describe('#hardwareFilterUpdate - errors', () => {
985
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
986
+ try {
987
+ a.hardwareFilterUpdate(hardwareFilterId, hardwareFilterHardwareFilterUpdateBodyParam, null, (data, error) => {
988
+ try {
989
+ if (stub) {
990
+ const displayE = 'Error 400 received on request';
991
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
992
+ } else {
993
+ runCommonAsserts(data, error);
994
+ }
995
+ saveMockData('HardwareFilter', 'hardwareFilterUpdate', 'default', data);
996
+ done();
997
+ } catch (err) {
998
+ log.error(`Test Failure: ${err}`);
999
+ done(err);
1000
+ }
1001
+ });
1002
+ } catch (error) {
1003
+ log.error(`Adapter Exception: ${error}`);
1004
+ done(error);
1005
+ }
1006
+ }).timeout(attemptTimeout);
1007
+ });
1008
+
1009
+ describe('#hardwareFilterRead - errors', () => {
1010
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1011
+ try {
1012
+ a.hardwareFilterRead(hardwareFilterId, null, null, (data, error) => {
1013
+ try {
1014
+ if (stub) {
1015
+ const displayE = 'Error 400 received on request';
1016
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1017
+ } else {
1018
+ runCommonAsserts(data, error);
1019
+ }
1020
+ saveMockData('HardwareFilter', 'hardwareFilterRead', 'default', data);
1021
+ done();
1022
+ } catch (err) {
1023
+ log.error(`Test Failure: ${err}`);
1024
+ done(err);
1025
+ }
1026
+ });
1027
+ } catch (error) {
1028
+ log.error(`Adapter Exception: ${error}`);
1029
+ done(error);
1030
+ }
1031
+ }).timeout(attemptTimeout);
1032
+ });
1033
+
1034
+ describe('#getDhcpHost - errors', () => {
1035
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1036
+ try {
1037
+ a.getDhcpHost(null, null, null, null, null, null, null, null, null, (data, error) => {
1038
+ try {
1039
+ if (stub) {
1040
+ const displayE = 'Error 400 received on request';
1041
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1042
+ } else {
1043
+ runCommonAsserts(data, error);
1044
+ }
1045
+ saveMockData('DhcpHost', 'getDhcpHost', 'default', data);
1046
+ done();
1047
+ } catch (err) {
1048
+ log.error(`Test Failure: ${err}`);
1049
+ done(err);
1050
+ }
1051
+ });
1052
+ } catch (error) {
1053
+ log.error(`Adapter Exception: ${error}`);
1054
+ done(error);
1055
+ }
1056
+ }).timeout(attemptTimeout);
1057
+ });
1058
+
1059
+ const dhcpHostId = 'fakedata';
1060
+ const dhcpHostPatchDhcpHostIdBodyParam = {};
1061
+ describe('#patchDhcpHostId - errors', () => {
1062
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1063
+ try {
1064
+ a.patchDhcpHostId(dhcpHostId, dhcpHostPatchDhcpHostIdBodyParam, null, (data, error) => {
1065
+ try {
1066
+ if (stub) {
1067
+ const displayE = 'Error 400 received on request';
1068
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1069
+ } else {
1070
+ runCommonAsserts(data, error);
1071
+ }
1072
+ saveMockData('DhcpHost', 'patchDhcpHostId', 'default', data);
1073
+ done();
1074
+ } catch (err) {
1075
+ log.error(`Test Failure: ${err}`);
1076
+ done(err);
1077
+ }
1078
+ });
1079
+ } catch (error) {
1080
+ log.error(`Adapter Exception: ${error}`);
1081
+ done(error);
1082
+ }
1083
+ }).timeout(attemptTimeout);
1084
+ });
1085
+
1086
+ describe('#getDhcpHostId - errors', () => {
1087
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1088
+ try {
1089
+ a.getDhcpHostId(dhcpHostId, null, null, (data, error) => {
1090
+ try {
1091
+ if (stub) {
1092
+ const displayE = 'Error 400 received on request';
1093
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1094
+ } else {
1095
+ runCommonAsserts(data, error);
1096
+ }
1097
+ saveMockData('DhcpHost', 'getDhcpHostId', 'default', data);
1098
+ done();
1099
+ } catch (err) {
1100
+ log.error(`Test Failure: ${err}`);
1101
+ done(err);
1102
+ }
1103
+ });
1104
+ } catch (error) {
1105
+ log.error(`Adapter Exception: ${error}`);
1106
+ done(error);
1107
+ }
1108
+ }).timeout(attemptTimeout);
1109
+ });
1110
+
1111
+ describe('#getDhcpHostIdAssociations - errors', () => {
1112
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1113
+ try {
1114
+ a.getDhcpHostIdAssociations(dhcpHostId, null, (data, error) => {
1115
+ try {
1116
+ if (stub) {
1117
+ const displayE = 'Error 400 received on request';
1118
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1119
+ } else {
1120
+ runCommonAsserts(data, error);
1121
+ }
1122
+ saveMockData('DhcpHost', 'getDhcpHostIdAssociations', 'default', data);
1123
+ done();
1124
+ } catch (err) {
1125
+ log.error(`Test Failure: ${err}`);
1126
+ done(err);
1127
+ }
1128
+ });
1129
+ } catch (error) {
1130
+ log.error(`Adapter Exception: ${error}`);
1131
+ done(error);
1132
+ }
1133
+ }).timeout(attemptTimeout);
1134
+ });
1135
+
1136
+ const leasesCommandLeasesCommandCreateBodyParam = {};
1137
+ describe('#leasesCommandCreate - errors', () => {
1138
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1139
+ try {
1140
+ a.leasesCommandCreate(leasesCommandLeasesCommandCreateBodyParam, null, (data, error) => {
1141
+ try {
1142
+ if (stub) {
1143
+ const displayE = 'Error 400 received on request';
1144
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1145
+ } else {
1146
+ runCommonAsserts(data, error);
1147
+ }
1148
+ saveMockData('LeasesCommand', 'leasesCommandCreate', 'default', data);
1149
+ done();
1150
+ } catch (err) {
1151
+ log.error(`Test Failure: ${err}`);
1152
+ done(err);
1153
+ }
1154
+ });
1155
+ } catch (error) {
1156
+ log.error(`Adapter Exception: ${error}`);
1157
+ done(error);
1158
+ }
1159
+ }).timeout(attemptTimeout);
1160
+ });
1161
+
1162
+ const macAddressItemMacAddressItemCreateBodyParam = {};
1163
+ describe('#macAddressItemCreate - errors', () => {
1164
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1165
+ try {
1166
+ a.macAddressItemCreate(macAddressItemMacAddressItemCreateBodyParam, null, (data, error) => {
1167
+ try {
1168
+ if (stub) {
1169
+ const displayE = 'Error 400 received on request';
1170
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1171
+ } else {
1172
+ runCommonAsserts(data, error);
1173
+ }
1174
+ saveMockData('MacAddressItem', 'macAddressItemCreate', 'default', data);
1175
+ done();
1176
+ } catch (err) {
1177
+ log.error(`Test Failure: ${err}`);
1178
+ done(err);
1179
+ }
1180
+ });
1181
+ } catch (error) {
1182
+ log.error(`Adapter Exception: ${error}`);
1183
+ done(error);
1184
+ }
1185
+ }).timeout(attemptTimeout);
1186
+ });
1187
+
1188
+ const macAddressItemMacAddressItemBulkCreateBodyParam = {};
1189
+ describe('#macAddressItemBulkCreate - errors', () => {
1190
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1191
+ try {
1192
+ a.macAddressItemBulkCreate(macAddressItemMacAddressItemBulkCreateBodyParam, null, (data, error) => {
1193
+ try {
1194
+ if (stub) {
1195
+ const displayE = 'Error 400 received on request';
1196
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1197
+ } else {
1198
+ runCommonAsserts(data, error);
1199
+ }
1200
+ saveMockData('MacAddressItem', 'macAddressItemBulkCreate', 'default', data);
1201
+ done();
1202
+ } catch (err) {
1203
+ log.error(`Test Failure: ${err}`);
1204
+ done(err);
1205
+ }
1206
+ });
1207
+ } catch (error) {
1208
+ log.error(`Adapter Exception: ${error}`);
1209
+ done(error);
1210
+ }
1211
+ }).timeout(attemptTimeout);
1212
+ });
1213
+
1214
+ const macAddressItemMacAddressItemUploadBodyParam = {};
1215
+ describe('#macAddressItemUpload - errors', () => {
1216
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1217
+ try {
1218
+ a.macAddressItemUpload(macAddressItemMacAddressItemUploadBodyParam, null, (data, error) => {
1219
+ try {
1220
+ if (stub) {
1221
+ const displayE = 'Error 400 received on request';
1222
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1223
+ } else {
1224
+ runCommonAsserts(data, error);
1225
+ }
1226
+ saveMockData('MacAddressItem', 'macAddressItemUpload', 'default', data);
1227
+ done();
1228
+ } catch (err) {
1229
+ log.error(`Test Failure: ${err}`);
1230
+ done(err);
1231
+ }
1232
+ });
1233
+ } catch (error) {
1234
+ log.error(`Adapter Exception: ${error}`);
1235
+ done(error);
1236
+ }
1237
+ }).timeout(attemptTimeout);
1238
+ });
1239
+
1240
+ describe('#macAddressItemList - errors', () => {
1241
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1242
+ try {
1243
+ a.macAddressItemList(null, null, null, null, null, null, null, (data, error) => {
1244
+ try {
1245
+ if (stub) {
1246
+ const displayE = 'Error 400 received on request';
1247
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1248
+ } else {
1249
+ runCommonAsserts(data, error);
1250
+ }
1251
+ saveMockData('MacAddressItem', 'macAddressItemList', 'default', data);
1252
+ done();
1253
+ } catch (err) {
1254
+ log.error(`Test Failure: ${err}`);
1255
+ done(err);
1256
+ }
1257
+ });
1258
+ } catch (error) {
1259
+ log.error(`Adapter Exception: ${error}`);
1260
+ done(error);
1261
+ }
1262
+ }).timeout(attemptTimeout);
1263
+ });
1264
+
1265
+ const macAddressItemId = 'fakedata';
1266
+ const macAddressItemMacAddressItemUpdateBodyParam = {};
1267
+ describe('#macAddressItemUpdate - errors', () => {
1268
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1269
+ try {
1270
+ a.macAddressItemUpdate(macAddressItemId, macAddressItemMacAddressItemUpdateBodyParam, null, (data, error) => {
1271
+ try {
1272
+ if (stub) {
1273
+ const displayE = 'Error 400 received on request';
1274
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1275
+ } else {
1276
+ runCommonAsserts(data, error);
1277
+ }
1278
+ saveMockData('MacAddressItem', 'macAddressItemUpdate', 'default', data);
1279
+ done();
1280
+ } catch (err) {
1281
+ log.error(`Test Failure: ${err}`);
1282
+ done(err);
1283
+ }
1284
+ });
1285
+ } catch (error) {
1286
+ log.error(`Adapter Exception: ${error}`);
1287
+ done(error);
1288
+ }
1289
+ }).timeout(attemptTimeout);
1290
+ });
1291
+
1292
+ describe('#macAddressItemRead - errors', () => {
1293
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1294
+ try {
1295
+ a.macAddressItemRead(macAddressItemId, null, null, (data, error) => {
1296
+ try {
1297
+ if (stub) {
1298
+ const displayE = 'Error 400 received on request';
1299
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1300
+ } else {
1301
+ runCommonAsserts(data, error);
1302
+ }
1303
+ saveMockData('MacAddressItem', 'macAddressItemRead', 'default', data);
1304
+ done();
1305
+ } catch (err) {
1306
+ log.error(`Test Failure: ${err}`);
1307
+ done(err);
1308
+ }
1309
+ });
1310
+ } catch (error) {
1311
+ log.error(`Adapter Exception: ${error}`);
1312
+ done(error);
1313
+ }
1314
+ }).timeout(attemptTimeout);
1315
+ });
1316
+
1317
+ const optionCodeOptionCodeCreateBodyParam = {};
1318
+ describe('#optionCodeCreate - errors', () => {
1319
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1320
+ try {
1321
+ a.optionCodeCreate(optionCodeOptionCodeCreateBodyParam, null, (data, error) => {
1322
+ try {
1323
+ if (stub) {
1324
+ const displayE = 'Error 400 received on request';
1325
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1326
+ } else {
1327
+ runCommonAsserts(data, error);
1328
+ }
1329
+ saveMockData('OptionCode', 'optionCodeCreate', 'default', data);
1330
+ done();
1331
+ } catch (err) {
1332
+ log.error(`Test Failure: ${err}`);
1333
+ done(err);
1334
+ }
1335
+ });
1336
+ } catch (error) {
1337
+ log.error(`Adapter Exception: ${error}`);
1338
+ done(error);
1339
+ }
1340
+ }).timeout(attemptTimeout);
1341
+ });
1342
+
1343
+ describe('#optionCodeList - errors', () => {
1344
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1345
+ try {
1346
+ a.optionCodeList(null, null, null, null, null, null, null, (data, error) => {
1347
+ try {
1348
+ if (stub) {
1349
+ const displayE = 'Error 400 received on request';
1350
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1351
+ } else {
1352
+ runCommonAsserts(data, error);
1353
+ }
1354
+ saveMockData('OptionCode', 'optionCodeList', 'default', data);
1355
+ done();
1356
+ } catch (err) {
1357
+ log.error(`Test Failure: ${err}`);
1358
+ done(err);
1359
+ }
1360
+ });
1361
+ } catch (error) {
1362
+ log.error(`Adapter Exception: ${error}`);
1363
+ done(error);
1364
+ }
1365
+ }).timeout(attemptTimeout);
1366
+ });
1367
+
1368
+ const optionCodeId = 'fakedata';
1369
+ const optionCodeOptionCodeUpdateBodyParam = {};
1370
+ describe('#optionCodeUpdate - errors', () => {
1371
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1372
+ try {
1373
+ a.optionCodeUpdate(optionCodeId, optionCodeOptionCodeUpdateBodyParam, null, (data, error) => {
1374
+ try {
1375
+ if (stub) {
1376
+ const displayE = 'Error 400 received on request';
1377
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1378
+ } else {
1379
+ runCommonAsserts(data, error);
1380
+ }
1381
+ saveMockData('OptionCode', 'optionCodeUpdate', 'default', data);
1382
+ done();
1383
+ } catch (err) {
1384
+ log.error(`Test Failure: ${err}`);
1385
+ done(err);
1386
+ }
1387
+ });
1388
+ } catch (error) {
1389
+ log.error(`Adapter Exception: ${error}`);
1390
+ done(error);
1391
+ }
1392
+ }).timeout(attemptTimeout);
1393
+ });
1394
+
1395
+ describe('#optionCodeRead - errors', () => {
1396
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1397
+ try {
1398
+ a.optionCodeRead(optionCodeId, null, null, (data, error) => {
1399
+ try {
1400
+ if (stub) {
1401
+ const displayE = 'Error 400 received on request';
1402
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1403
+ } else {
1404
+ runCommonAsserts(data, error);
1405
+ }
1406
+ saveMockData('OptionCode', 'optionCodeRead', 'default', data);
1407
+ done();
1408
+ } catch (err) {
1409
+ log.error(`Test Failure: ${err}`);
1410
+ done(err);
1411
+ }
1412
+ });
1413
+ } catch (error) {
1414
+ log.error(`Adapter Exception: ${error}`);
1415
+ done(error);
1416
+ }
1417
+ }).timeout(attemptTimeout);
1418
+ });
1419
+
1420
+ const optionFilterOptionFilterCreateBodyParam = {};
1421
+ describe('#optionFilterCreate - errors', () => {
1422
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1423
+ try {
1424
+ a.optionFilterCreate(optionFilterOptionFilterCreateBodyParam, null, (data, error) => {
1425
+ try {
1426
+ if (stub) {
1427
+ const displayE = 'Error 400 received on request';
1428
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1429
+ } else {
1430
+ runCommonAsserts(data, error);
1431
+ }
1432
+ saveMockData('OptionFilter', 'optionFilterCreate', 'default', data);
1433
+ done();
1434
+ } catch (err) {
1435
+ log.error(`Test Failure: ${err}`);
1436
+ done(err);
1437
+ }
1438
+ });
1439
+ } catch (error) {
1440
+ log.error(`Adapter Exception: ${error}`);
1441
+ done(error);
1442
+ }
1443
+ }).timeout(attemptTimeout);
1444
+ });
1445
+
1446
+ describe('#optionFilterList - errors', () => {
1447
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1448
+ try {
1449
+ a.optionFilterList(null, null, null, null, null, null, null, null, null, (data, error) => {
1450
+ try {
1451
+ if (stub) {
1452
+ const displayE = 'Error 400 received on request';
1453
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1454
+ } else {
1455
+ runCommonAsserts(data, error);
1456
+ }
1457
+ saveMockData('OptionFilter', 'optionFilterList', 'default', data);
1458
+ done();
1459
+ } catch (err) {
1460
+ log.error(`Test Failure: ${err}`);
1461
+ done(err);
1462
+ }
1463
+ });
1464
+ } catch (error) {
1465
+ log.error(`Adapter Exception: ${error}`);
1466
+ done(error);
1467
+ }
1468
+ }).timeout(attemptTimeout);
1469
+ });
1470
+
1471
+ const optionFilterId = 'fakedata';
1472
+ const optionFilterOptionFilterUpdateBodyParam = {};
1473
+ describe('#optionFilterUpdate - errors', () => {
1474
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1475
+ try {
1476
+ a.optionFilterUpdate(optionFilterId, optionFilterOptionFilterUpdateBodyParam, null, (data, error) => {
1477
+ try {
1478
+ if (stub) {
1479
+ const displayE = 'Error 400 received on request';
1480
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1481
+ } else {
1482
+ runCommonAsserts(data, error);
1483
+ }
1484
+ saveMockData('OptionFilter', 'optionFilterUpdate', 'default', data);
1485
+ done();
1486
+ } catch (err) {
1487
+ log.error(`Test Failure: ${err}`);
1488
+ done(err);
1489
+ }
1490
+ });
1491
+ } catch (error) {
1492
+ log.error(`Adapter Exception: ${error}`);
1493
+ done(error);
1494
+ }
1495
+ }).timeout(attemptTimeout);
1496
+ });
1497
+
1498
+ describe('#optionFilterRead - errors', () => {
1499
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1500
+ try {
1501
+ a.optionFilterRead(optionFilterId, null, null, (data, error) => {
1502
+ try {
1503
+ if (stub) {
1504
+ const displayE = 'Error 400 received on request';
1505
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1506
+ } else {
1507
+ runCommonAsserts(data, error);
1508
+ }
1509
+ saveMockData('OptionFilter', 'optionFilterRead', 'default', data);
1510
+ done();
1511
+ } catch (err) {
1512
+ log.error(`Test Failure: ${err}`);
1513
+ done(err);
1514
+ }
1515
+ });
1516
+ } catch (error) {
1517
+ log.error(`Adapter Exception: ${error}`);
1518
+ done(error);
1519
+ }
1520
+ }).timeout(attemptTimeout);
1521
+ });
1522
+
1523
+ const optionGroupOptionGroupCreateBodyParam = {};
1524
+ describe('#optionGroupCreate - errors', () => {
1525
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1526
+ try {
1527
+ a.optionGroupCreate(optionGroupOptionGroupCreateBodyParam, null, (data, error) => {
1528
+ try {
1529
+ if (stub) {
1530
+ const displayE = 'Error 400 received on request';
1531
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1532
+ } else {
1533
+ runCommonAsserts(data, error);
1534
+ }
1535
+ saveMockData('OptionGroup', 'optionGroupCreate', 'default', data);
1536
+ done();
1537
+ } catch (err) {
1538
+ log.error(`Test Failure: ${err}`);
1539
+ done(err);
1540
+ }
1541
+ });
1542
+ } catch (error) {
1543
+ log.error(`Adapter Exception: ${error}`);
1544
+ done(error);
1545
+ }
1546
+ }).timeout(attemptTimeout);
1547
+ });
1548
+
1549
+ describe('#optionGroupList - errors', () => {
1550
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1551
+ try {
1552
+ a.optionGroupList(null, null, null, null, null, null, null, null, null, (data, error) => {
1553
+ try {
1554
+ if (stub) {
1555
+ const displayE = 'Error 400 received on request';
1556
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1557
+ } else {
1558
+ runCommonAsserts(data, error);
1559
+ }
1560
+ saveMockData('OptionGroup', 'optionGroupList', 'default', data);
1561
+ done();
1562
+ } catch (err) {
1563
+ log.error(`Test Failure: ${err}`);
1564
+ done(err);
1565
+ }
1566
+ });
1567
+ } catch (error) {
1568
+ log.error(`Adapter Exception: ${error}`);
1569
+ done(error);
1570
+ }
1571
+ }).timeout(attemptTimeout);
1572
+ });
1573
+
1574
+ const optionGroupId = 'fakedata';
1575
+ const optionGroupOptionGroupUpdateBodyParam = {};
1576
+ describe('#optionGroupUpdate - errors', () => {
1577
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1578
+ try {
1579
+ a.optionGroupUpdate(optionGroupId, optionGroupOptionGroupUpdateBodyParam, null, (data, error) => {
1580
+ try {
1581
+ if (stub) {
1582
+ const displayE = 'Error 400 received on request';
1583
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1584
+ } else {
1585
+ runCommonAsserts(data, error);
1586
+ }
1587
+ saveMockData('OptionGroup', 'optionGroupUpdate', 'default', data);
1588
+ done();
1589
+ } catch (err) {
1590
+ log.error(`Test Failure: ${err}`);
1591
+ done(err);
1592
+ }
1593
+ });
1594
+ } catch (error) {
1595
+ log.error(`Adapter Exception: ${error}`);
1596
+ done(error);
1597
+ }
1598
+ }).timeout(attemptTimeout);
1599
+ });
1600
+
1601
+ describe('#optionGroupRead - errors', () => {
1602
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1603
+ try {
1604
+ a.optionGroupRead(optionGroupId, null, null, (data, error) => {
1605
+ try {
1606
+ if (stub) {
1607
+ const displayE = 'Error 400 received on request';
1608
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1609
+ } else {
1610
+ runCommonAsserts(data, error);
1611
+ }
1612
+ saveMockData('OptionGroup', 'optionGroupRead', 'default', data);
1613
+ done();
1614
+ } catch (err) {
1615
+ log.error(`Test Failure: ${err}`);
1616
+ done(err);
1617
+ }
1618
+ });
1619
+ } catch (error) {
1620
+ log.error(`Adapter Exception: ${error}`);
1621
+ done(error);
1622
+ }
1623
+ }).timeout(attemptTimeout);
1624
+ });
1625
+
1626
+ const optionSpaceOptionspaceCreateBodyParam = {};
1627
+ describe('#optionspaceCreate - errors', () => {
1628
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1629
+ try {
1630
+ a.optionspaceCreate(optionSpaceOptionspaceCreateBodyParam, null, (data, error) => {
1631
+ try {
1632
+ if (stub) {
1633
+ const displayE = 'Error 400 received on request';
1634
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1635
+ } else {
1636
+ runCommonAsserts(data, error);
1637
+ }
1638
+ saveMockData('OptionSpace', 'optionspaceCreate', 'default', data);
1639
+ done();
1640
+ } catch (err) {
1641
+ log.error(`Test Failure: ${err}`);
1642
+ done(err);
1643
+ }
1644
+ });
1645
+ } catch (error) {
1646
+ log.error(`Adapter Exception: ${error}`);
1647
+ done(error);
1648
+ }
1649
+ }).timeout(attemptTimeout);
1650
+ });
1651
+
1652
+ describe('#optionspaceList - errors', () => {
1653
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1654
+ try {
1655
+ a.optionspaceList(null, null, null, null, null, null, null, null, null, (data, error) => {
1656
+ try {
1657
+ if (stub) {
1658
+ const displayE = 'Error 400 received on request';
1659
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1660
+ } else {
1661
+ runCommonAsserts(data, error);
1662
+ }
1663
+ saveMockData('OptionSpace', 'optionspaceList', 'default', data);
1664
+ done();
1665
+ } catch (err) {
1666
+ log.error(`Test Failure: ${err}`);
1667
+ done(err);
1668
+ }
1669
+ });
1670
+ } catch (error) {
1671
+ log.error(`Adapter Exception: ${error}`);
1672
+ done(error);
1673
+ }
1674
+ }).timeout(attemptTimeout);
1675
+ });
1676
+
1677
+ const optionSpaceId = 'fakedata';
1678
+ const optionSpaceOptionspaceUpdateBodyParam = {};
1679
+ describe('#optionspaceUpdate - errors', () => {
1680
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1681
+ try {
1682
+ a.optionspaceUpdate(optionSpaceId, optionSpaceOptionspaceUpdateBodyParam, null, (data, error) => {
1683
+ try {
1684
+ if (stub) {
1685
+ const displayE = 'Error 400 received on request';
1686
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1687
+ } else {
1688
+ runCommonAsserts(data, error);
1689
+ }
1690
+ saveMockData('OptionSpace', 'optionspaceUpdate', 'default', data);
1691
+ done();
1692
+ } catch (err) {
1693
+ log.error(`Test Failure: ${err}`);
1694
+ done(err);
1695
+ }
1696
+ });
1697
+ } catch (error) {
1698
+ log.error(`Adapter Exception: ${error}`);
1699
+ done(error);
1700
+ }
1701
+ }).timeout(attemptTimeout);
1702
+ });
1703
+
1704
+ describe('#optionspaceRead - errors', () => {
1705
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1706
+ try {
1707
+ a.optionspaceRead(optionSpaceId, null, null, (data, error) => {
1708
+ try {
1709
+ if (stub) {
1710
+ const displayE = 'Error 400 received on request';
1711
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1712
+ } else {
1713
+ runCommonAsserts(data, error);
1714
+ }
1715
+ saveMockData('OptionSpace', 'optionspaceRead', 'default', data);
1716
+ done();
1717
+ } catch (err) {
1718
+ log.error(`Test Failure: ${err}`);
1719
+ done(err);
1720
+ }
1721
+ });
1722
+ } catch (error) {
1723
+ log.error(`Adapter Exception: ${error}`);
1724
+ done(error);
1725
+ }
1726
+ }).timeout(attemptTimeout);
1727
+ });
1728
+
1729
+ const serverServerCreateBodyParam = {};
1730
+ describe('#serverCreate - errors', () => {
1731
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1732
+ try {
1733
+ a.serverCreate(serverServerCreateBodyParam, null, (data, error) => {
1734
+ try {
1735
+ if (stub) {
1736
+ const displayE = 'Error 400 received on request';
1737
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1738
+ } else {
1739
+ runCommonAsserts(data, error);
1740
+ }
1741
+ saveMockData('Server', 'serverCreate', 'default', data);
1742
+ done();
1743
+ } catch (err) {
1744
+ log.error(`Test Failure: ${err}`);
1745
+ done(err);
1746
+ }
1747
+ });
1748
+ } catch (error) {
1749
+ log.error(`Adapter Exception: ${error}`);
1750
+ done(error);
1751
+ }
1752
+ }).timeout(attemptTimeout);
1753
+ });
1754
+
1755
+ describe('#serverList - errors', () => {
1756
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1757
+ try {
1758
+ a.serverList(null, null, null, null, null, null, null, null, null, (data, error) => {
1759
+ try {
1760
+ if (stub) {
1761
+ const displayE = 'Error 400 received on request';
1762
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1763
+ } else {
1764
+ runCommonAsserts(data, error);
1765
+ }
1766
+ saveMockData('Server', 'serverList', 'default', data);
1767
+ done();
1768
+ } catch (err) {
1769
+ log.error(`Test Failure: ${err}`);
1770
+ done(err);
1771
+ }
1772
+ });
1773
+ } catch (error) {
1774
+ log.error(`Adapter Exception: ${error}`);
1775
+ done(error);
1776
+ }
1777
+ }).timeout(attemptTimeout);
1778
+ });
1779
+
1780
+ const serverId = 'fakedata';
1781
+ const serverServerUpdateBodyParam = {};
1782
+ describe('#serverUpdate - errors', () => {
1783
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1784
+ try {
1785
+ a.serverUpdate(serverId, serverServerUpdateBodyParam, null, (data, error) => {
1786
+ try {
1787
+ if (stub) {
1788
+ const displayE = 'Error 400 received on request';
1789
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1790
+ } else {
1791
+ runCommonAsserts(data, error);
1792
+ }
1793
+ saveMockData('Server', 'serverUpdate', 'default', data);
1794
+ done();
1795
+ } catch (err) {
1796
+ log.error(`Test Failure: ${err}`);
1797
+ done(err);
1798
+ }
1799
+ });
1800
+ } catch (error) {
1801
+ log.error(`Adapter Exception: ${error}`);
1802
+ done(error);
1803
+ }
1804
+ }).timeout(attemptTimeout);
1805
+ });
1806
+
1807
+ describe('#serverRead - errors', () => {
1808
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1809
+ try {
1810
+ a.serverRead(serverId, null, null, (data, error) => {
1811
+ try {
1812
+ if (stub) {
1813
+ const displayE = 'Error 400 received on request';
1814
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1815
+ } else {
1816
+ runCommonAsserts(data, error);
1817
+ }
1818
+ saveMockData('Server', 'serverRead', 'default', data);
1819
+ done();
1820
+ } catch (err) {
1821
+ log.error(`Test Failure: ${err}`);
1822
+ done(err);
1823
+ }
1824
+ });
1825
+ } catch (error) {
1826
+ log.error(`Adapter Exception: ${error}`);
1827
+ done(error);
1828
+ }
1829
+ }).timeout(attemptTimeout);
1830
+ });
1831
+
1832
+ describe('#serviceList - errors', () => {
1833
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1834
+ try {
1835
+ a.serviceList(null, null, null, null, null, null, null, null, null, (data, error) => {
1836
+ try {
1837
+ if (stub) {
1838
+ const displayE = 'Error 400 received on request';
1839
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1840
+ } else {
1841
+ runCommonAsserts(data, error);
1842
+ }
1843
+ saveMockData('Service', 'serviceList', 'default', data);
1844
+ done();
1845
+ } catch (err) {
1846
+ log.error(`Test Failure: ${err}`);
1847
+ done(err);
1848
+ }
1849
+ });
1850
+ } catch (error) {
1851
+ log.error(`Adapter Exception: ${error}`);
1852
+ done(error);
1853
+ }
1854
+ }).timeout(attemptTimeout);
1855
+ });
1856
+
1857
+ const serviceId = 'fakedata';
1858
+ describe('#serviceRead - errors', () => {
1859
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1860
+ try {
1861
+ a.serviceRead(serviceId, null, null, (data, error) => {
1862
+ try {
1863
+ if (stub) {
1864
+ const displayE = 'Error 400 received on request';
1865
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1866
+ } else {
1867
+ runCommonAsserts(data, error);
1868
+ }
1869
+ saveMockData('Service', 'serviceRead', 'default', data);
1870
+ done();
1871
+ } catch (err) {
1872
+ log.error(`Test Failure: ${err}`);
1873
+ done(err);
1874
+ }
1875
+ });
1876
+ } catch (error) {
1877
+ log.error(`Adapter Exception: ${error}`);
1878
+ done(error);
1879
+ }
1880
+ }).timeout(attemptTimeout);
1881
+ });
1882
+
1883
+ const dhcpUniversalServiceId = 'fakedata';
1884
+ describe('#getDhcpUniversalServiceIdAssociations - errors', () => {
1885
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1886
+ try {
1887
+ a.getDhcpUniversalServiceIdAssociations(dhcpUniversalServiceId, null, (data, error) => {
1888
+ try {
1889
+ if (stub) {
1890
+ const displayE = 'Error 400 received on request';
1891
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1892
+ } else {
1893
+ runCommonAsserts(data, error);
1894
+ }
1895
+ saveMockData('DhcpUniversalService', 'getDhcpUniversalServiceIdAssociations', 'default', data);
1896
+ done();
1897
+ } catch (err) {
1898
+ log.error(`Test Failure: ${err}`);
1899
+ done(err);
1900
+ }
1901
+ });
1902
+ } catch (error) {
1903
+ log.error(`Adapter Exception: ${error}`);
1904
+ done(error);
1905
+ }
1906
+ }).timeout(attemptTimeout);
1907
+ });
1908
+
1909
+ describe('#getDhcpUniversalServiceIdAssociationsCount - errors', () => {
1910
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1911
+ try {
1912
+ a.getDhcpUniversalServiceIdAssociationsCount(dhcpUniversalServiceId, null, (data, error) => {
1913
+ try {
1914
+ if (stub) {
1915
+ const displayE = 'Error 400 received on request';
1916
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1917
+ } else {
1918
+ runCommonAsserts(data, error);
1919
+ }
1920
+ saveMockData('DhcpUniversalService', 'getDhcpUniversalServiceIdAssociationsCount', 'default', data);
1921
+ done();
1922
+ } catch (err) {
1923
+ log.error(`Test Failure: ${err}`);
1924
+ done(err);
1925
+ }
1926
+ });
1927
+ } catch (error) {
1928
+ log.error(`Adapter Exception: ${error}`);
1929
+ done(error);
1930
+ }
1931
+ }).timeout(attemptTimeout);
1932
+ });
1933
+
1934
+ const addressAddressCreateBodyParam = {};
1935
+ describe('#addressCreate - errors', () => {
1936
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1937
+ try {
1938
+ a.addressCreate(addressAddressCreateBodyParam, null, (data, error) => {
1939
+ try {
1940
+ if (stub) {
1941
+ const displayE = 'Error 400 received on request';
1942
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1943
+ } else {
1944
+ runCommonAsserts(data, error);
1945
+ }
1946
+ saveMockData('Address', 'addressCreate', 'default', data);
1947
+ done();
1948
+ } catch (err) {
1949
+ log.error(`Test Failure: ${err}`);
1950
+ done(err);
1951
+ }
1952
+ });
1953
+ } catch (error) {
1954
+ log.error(`Adapter Exception: ${error}`);
1955
+ done(error);
1956
+ }
1957
+ }).timeout(attemptTimeout);
1958
+ });
1959
+
1960
+ describe('#addressList - errors', () => {
1961
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1962
+ try {
1963
+ a.addressList(null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
1964
+ try {
1965
+ if (stub) {
1966
+ const displayE = 'Error 400 received on request';
1967
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1968
+ } else {
1969
+ runCommonAsserts(data, error);
1970
+ }
1971
+ saveMockData('Address', 'addressList', 'default', data);
1972
+ done();
1973
+ } catch (err) {
1974
+ log.error(`Test Failure: ${err}`);
1975
+ done(err);
1976
+ }
1977
+ });
1978
+ } catch (error) {
1979
+ log.error(`Adapter Exception: ${error}`);
1980
+ done(error);
1981
+ }
1982
+ }).timeout(attemptTimeout);
1983
+ });
1984
+
1985
+ const addressId = 'fakedata';
1986
+ const addressAddressUpdateBodyParam = {};
1987
+ describe('#addressUpdate - errors', () => {
1988
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1989
+ try {
1990
+ a.addressUpdate(addressId, addressAddressUpdateBodyParam, null, (data, error) => {
1991
+ try {
1992
+ if (stub) {
1993
+ const displayE = 'Error 400 received on request';
1994
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
1995
+ } else {
1996
+ runCommonAsserts(data, error);
1997
+ }
1998
+ saveMockData('Address', 'addressUpdate', 'default', data);
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
+ });
2011
+
2012
+ describe('#addressRead - errors', () => {
2013
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2014
+ try {
2015
+ a.addressRead(addressId, null, null, (data, error) => {
2016
+ try {
2017
+ if (stub) {
2018
+ const displayE = 'Error 400 received on request';
2019
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2020
+ } else {
2021
+ runCommonAsserts(data, error);
2022
+ }
2023
+ saveMockData('Address', 'addressRead', 'default', data);
2024
+ done();
2025
+ } catch (err) {
2026
+ log.error(`Test Failure: ${err}`);
2027
+ done(err);
2028
+ }
2029
+ });
2030
+ } catch (error) {
2031
+ log.error(`Adapter Exception: ${error}`);
2032
+ done(error);
2033
+ }
2034
+ }).timeout(attemptTimeout);
2035
+ });
2036
+
2037
+ const addressBlockAddressBlockCreateBodyParam = {};
2038
+ describe('#addressBlockCreate - errors', () => {
2039
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2040
+ try {
2041
+ a.addressBlockCreate(addressBlockAddressBlockCreateBodyParam, null, (data, error) => {
2042
+ try {
2043
+ if (stub) {
2044
+ const displayE = 'Error 400 received on request';
2045
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2046
+ } else {
2047
+ runCommonAsserts(data, error);
2048
+ }
2049
+ saveMockData('AddressBlock', 'addressBlockCreate', 'default', data);
2050
+ done();
2051
+ } catch (err) {
2052
+ log.error(`Test Failure: ${err}`);
2053
+ done(err);
2054
+ }
2055
+ });
2056
+ } catch (error) {
2057
+ log.error(`Adapter Exception: ${error}`);
2058
+ done(error);
2059
+ }
2060
+ }).timeout(attemptTimeout);
2061
+ });
2062
+
2063
+ const addressBlockId = 'fakedata';
2064
+ const addressBlockAddressBlockCopyBodyParam = {};
2065
+ describe('#addressBlockCopy - errors', () => {
2066
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2067
+ try {
2068
+ a.addressBlockCopy(addressBlockId, addressBlockAddressBlockCopyBodyParam, null, (data, error) => {
2069
+ try {
2070
+ if (stub) {
2071
+ const displayE = 'Error 400 received on request';
2072
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2073
+ } else {
2074
+ runCommonAsserts(data, error);
2075
+ }
2076
+ saveMockData('AddressBlock', 'addressBlockCopy', 'default', data);
2077
+ done();
2078
+ } catch (err) {
2079
+ log.error(`Test Failure: ${err}`);
2080
+ done(err);
2081
+ }
2082
+ });
2083
+ } catch (error) {
2084
+ log.error(`Adapter Exception: ${error}`);
2085
+ done(error);
2086
+ }
2087
+ }).timeout(attemptTimeout);
2088
+ });
2089
+
2090
+ describe('#addressBlockCreateNextAvailableAB - errors', () => {
2091
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2092
+ try {
2093
+ a.addressBlockCreateNextAvailableAB(addressBlockId, null, (data, error) => {
2094
+ try {
2095
+ if (stub) {
2096
+ const displayE = 'Error 400 received on request';
2097
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2098
+ } else {
2099
+ runCommonAsserts(data, error);
2100
+ }
2101
+ saveMockData('AddressBlock', 'addressBlockCreateNextAvailableAB', 'default', data);
2102
+ done();
2103
+ } catch (err) {
2104
+ log.error(`Test Failure: ${err}`);
2105
+ done(err);
2106
+ }
2107
+ });
2108
+ } catch (error) {
2109
+ log.error(`Adapter Exception: ${error}`);
2110
+ done(error);
2111
+ }
2112
+ }).timeout(attemptTimeout);
2113
+ });
2114
+
2115
+ describe('#addressBlockCreateNextAvailableIP - errors', () => {
2116
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2117
+ try {
2118
+ a.addressBlockCreateNextAvailableIP(addressBlockId, null, (data, error) => {
2119
+ try {
2120
+ if (stub) {
2121
+ const displayE = 'Error 400 received on request';
2122
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2123
+ } else {
2124
+ runCommonAsserts(data, error);
2125
+ }
2126
+ saveMockData('AddressBlock', 'addressBlockCreateNextAvailableIP', 'default', data);
2127
+ done();
2128
+ } catch (err) {
2129
+ log.error(`Test Failure: ${err}`);
2130
+ done(err);
2131
+ }
2132
+ });
2133
+ } catch (error) {
2134
+ log.error(`Adapter Exception: ${error}`);
2135
+ done(error);
2136
+ }
2137
+ }).timeout(attemptTimeout);
2138
+ });
2139
+
2140
+ describe('#addressBlockCreateNextAvailableSubnet - errors', () => {
2141
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2142
+ try {
2143
+ a.addressBlockCreateNextAvailableSubnet(addressBlockId, null, (data, error) => {
2144
+ try {
2145
+ if (stub) {
2146
+ const displayE = 'Error 400 received on request';
2147
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2148
+ } else {
2149
+ runCommonAsserts(data, error);
2150
+ }
2151
+ saveMockData('AddressBlock', 'addressBlockCreateNextAvailableSubnet', 'default', data);
2152
+ done();
2153
+ } catch (err) {
2154
+ log.error(`Test Failure: ${err}`);
2155
+ done(err);
2156
+ }
2157
+ });
2158
+ } catch (error) {
2159
+ log.error(`Adapter Exception: ${error}`);
2160
+ done(error);
2161
+ }
2162
+ }).timeout(attemptTimeout);
2163
+ });
2164
+
2165
+ describe('#addressBlockList - errors', () => {
2166
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2167
+ try {
2168
+ a.addressBlockList(null, null, null, null, null, null, null, null, null, null, (data, error) => {
2169
+ try {
2170
+ if (stub) {
2171
+ const displayE = 'Error 400 received on request';
2172
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2173
+ } else {
2174
+ runCommonAsserts(data, error);
2175
+ }
2176
+ saveMockData('AddressBlock', 'addressBlockList', 'default', data);
2177
+ done();
2178
+ } catch (err) {
2179
+ log.error(`Test Failure: ${err}`);
2180
+ done(err);
2181
+ }
2182
+ });
2183
+ } catch (error) {
2184
+ log.error(`Adapter Exception: ${error}`);
2185
+ done(error);
2186
+ }
2187
+ }).timeout(attemptTimeout);
2188
+ });
2189
+
2190
+ const addressBlockAddressBlockUpdateBodyParam = {};
2191
+ describe('#addressBlockUpdate - errors', () => {
2192
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2193
+ try {
2194
+ a.addressBlockUpdate(addressBlockId, addressBlockAddressBlockUpdateBodyParam, null, (data, error) => {
2195
+ try {
2196
+ if (stub) {
2197
+ const displayE = 'Error 400 received on request';
2198
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2199
+ } else {
2200
+ runCommonAsserts(data, error);
2201
+ }
2202
+ saveMockData('AddressBlock', 'addressBlockUpdate', 'default', data);
2203
+ done();
2204
+ } catch (err) {
2205
+ log.error(`Test Failure: ${err}`);
2206
+ done(err);
2207
+ }
2208
+ });
2209
+ } catch (error) {
2210
+ log.error(`Adapter Exception: ${error}`);
2211
+ done(error);
2212
+ }
2213
+ }).timeout(attemptTimeout);
2214
+ });
2215
+
2216
+ describe('#addressBlockRead - errors', () => {
2217
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2218
+ try {
2219
+ a.addressBlockRead(addressBlockId, null, null, (data, error) => {
2220
+ try {
2221
+ if (stub) {
2222
+ const displayE = 'Error 400 received on request';
2223
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2224
+ } else {
2225
+ runCommonAsserts(data, error);
2226
+ }
2227
+ saveMockData('AddressBlock', 'addressBlockRead', 'default', data);
2228
+ done();
2229
+ } catch (err) {
2230
+ log.error(`Test Failure: ${err}`);
2231
+ done(err);
2232
+ }
2233
+ });
2234
+ } catch (error) {
2235
+ log.error(`Adapter Exception: ${error}`);
2236
+ done(error);
2237
+ }
2238
+ }).timeout(attemptTimeout);
2239
+ });
2240
+
2241
+ describe('#addressBlockListAncestor - errors', () => {
2242
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2243
+ try {
2244
+ a.addressBlockListAncestor(addressBlockId, null, (data, error) => {
2245
+ try {
2246
+ if (stub) {
2247
+ const displayE = 'Error 400 received on request';
2248
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2249
+ } else {
2250
+ runCommonAsserts(data, error);
2251
+ }
2252
+ saveMockData('AddressBlock', 'addressBlockListAncestor', 'default', data);
2253
+ done();
2254
+ } catch (err) {
2255
+ log.error(`Test Failure: ${err}`);
2256
+ done(err);
2257
+ }
2258
+ });
2259
+ } catch (error) {
2260
+ log.error(`Adapter Exception: ${error}`);
2261
+ done(error);
2262
+ }
2263
+ }).timeout(attemptTimeout);
2264
+ });
2265
+
2266
+ describe('#addressBlockListNextAvailableAB - errors', () => {
2267
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2268
+ try {
2269
+ a.addressBlockListNextAvailableAB(addressBlockId, null, null, null, null, null, null, null, (data, error) => {
2270
+ try {
2271
+ if (stub) {
2272
+ const displayE = 'Error 400 received on request';
2273
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2274
+ } else {
2275
+ runCommonAsserts(data, error);
2276
+ }
2277
+ saveMockData('AddressBlock', 'addressBlockListNextAvailableAB', 'default', data);
2278
+ done();
2279
+ } catch (err) {
2280
+ log.error(`Test Failure: ${err}`);
2281
+ done(err);
2282
+ }
2283
+ });
2284
+ } catch (error) {
2285
+ log.error(`Adapter Exception: ${error}`);
2286
+ done(error);
2287
+ }
2288
+ }).timeout(attemptTimeout);
2289
+ });
2290
+
2291
+ describe('#addressBlockListNextAvailableIP - errors', () => {
2292
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2293
+ try {
2294
+ a.addressBlockListNextAvailableIP(addressBlockId, null, null, null, (data, error) => {
2295
+ try {
2296
+ if (stub) {
2297
+ const displayE = 'Error 400 received on request';
2298
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2299
+ } else {
2300
+ runCommonAsserts(data, error);
2301
+ }
2302
+ saveMockData('AddressBlock', 'addressBlockListNextAvailableIP', 'default', data);
2303
+ done();
2304
+ } catch (err) {
2305
+ log.error(`Test Failure: ${err}`);
2306
+ done(err);
2307
+ }
2308
+ });
2309
+ } catch (error) {
2310
+ log.error(`Adapter Exception: ${error}`);
2311
+ done(error);
2312
+ }
2313
+ }).timeout(attemptTimeout);
2314
+ });
2315
+
2316
+ describe('#addressBlockListNextAvailableSubnet - errors', () => {
2317
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2318
+ try {
2319
+ a.addressBlockListNextAvailableSubnet(addressBlockId, null, null, null, null, null, null, null, (data, error) => {
2320
+ try {
2321
+ if (stub) {
2322
+ const displayE = 'Error 400 received on request';
2323
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2324
+ } else {
2325
+ runCommonAsserts(data, error);
2326
+ }
2327
+ saveMockData('AddressBlock', 'addressBlockListNextAvailableSubnet', 'default', data);
2328
+ done();
2329
+ } catch (err) {
2330
+ log.error(`Test Failure: ${err}`);
2331
+ done(err);
2332
+ }
2333
+ });
2334
+ } catch (error) {
2335
+ log.error(`Adapter Exception: ${error}`);
2336
+ done(error);
2337
+ }
2338
+ }).timeout(attemptTimeout);
2339
+ });
2340
+
2341
+ const asmAsmCreateBodyParam = {};
2342
+ describe('#asmCreate - errors', () => {
2343
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2344
+ try {
2345
+ a.asmCreate(asmAsmCreateBodyParam, null, (data, error) => {
2346
+ try {
2347
+ if (stub) {
2348
+ const displayE = 'Error 400 received on request';
2349
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2350
+ } else {
2351
+ runCommonAsserts(data, error);
2352
+ }
2353
+ saveMockData('Asm', 'asmCreate', 'default', data);
2354
+ done();
2355
+ } catch (err) {
2356
+ log.error(`Test Failure: ${err}`);
2357
+ done(err);
2358
+ }
2359
+ });
2360
+ } catch (error) {
2361
+ log.error(`Adapter Exception: ${error}`);
2362
+ done(error);
2363
+ }
2364
+ }).timeout(attemptTimeout);
2365
+ });
2366
+
2367
+ describe('#asmList - errors', () => {
2368
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2369
+ try {
2370
+ a.asmList(null, null, null, (data, error) => {
2371
+ try {
2372
+ if (stub) {
2373
+ const displayE = 'Error 400 received on request';
2374
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2375
+ } else {
2376
+ runCommonAsserts(data, error);
2377
+ }
2378
+ saveMockData('Asm', 'asmList', 'default', data);
2379
+ done();
2380
+ } catch (err) {
2381
+ log.error(`Test Failure: ${err}`);
2382
+ done(err);
2383
+ }
2384
+ });
2385
+ } catch (error) {
2386
+ log.error(`Adapter Exception: ${error}`);
2387
+ done(error);
2388
+ }
2389
+ }).timeout(attemptTimeout);
2390
+ });
2391
+
2392
+ const asmId = 'fakedata';
2393
+ describe('#asmRead - errors', () => {
2394
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2395
+ try {
2396
+ a.asmRead(asmId, null, null, (data, error) => {
2397
+ try {
2398
+ if (stub) {
2399
+ const displayE = 'Error 400 received on request';
2400
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2401
+ } else {
2402
+ runCommonAsserts(data, error);
2403
+ }
2404
+ saveMockData('Asm', 'asmRead', 'default', data);
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('#dnsUsageList - errors', () => {
2419
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2420
+ try {
2421
+ a.dnsUsageList(null, null, null, null, null, null, null, (data, error) => {
2422
+ try {
2423
+ if (stub) {
2424
+ const displayE = 'Error 400 received on request';
2425
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2426
+ } else {
2427
+ runCommonAsserts(data, error);
2428
+ }
2429
+ saveMockData('DnsUsage', 'dnsUsageList', 'default', data);
2430
+ done();
2431
+ } catch (err) {
2432
+ log.error(`Test Failure: ${err}`);
2433
+ done(err);
2434
+ }
2435
+ });
2436
+ } catch (error) {
2437
+ log.error(`Adapter Exception: ${error}`);
2438
+ done(error);
2439
+ }
2440
+ }).timeout(attemptTimeout);
2441
+ });
2442
+
2443
+ const dnsUsageId = 'fakedata';
2444
+ describe('#dnsUsageRead - errors', () => {
2445
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2446
+ try {
2447
+ a.dnsUsageRead(dnsUsageId, null, null, (data, error) => {
2448
+ try {
2449
+ if (stub) {
2450
+ const displayE = 'Error 400 received on request';
2451
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2452
+ } else {
2453
+ runCommonAsserts(data, error);
2454
+ }
2455
+ saveMockData('DnsUsage', 'dnsUsageRead', 'default', data);
2456
+ done();
2457
+ } catch (err) {
2458
+ log.error(`Test Failure: ${err}`);
2459
+ done(err);
2460
+ }
2461
+ });
2462
+ } catch (error) {
2463
+ log.error(`Adapter Exception: ${error}`);
2464
+ done(error);
2465
+ }
2466
+ }).timeout(attemptTimeout);
2467
+ });
2468
+
2469
+ const ipamHostPostIpamHostBodyParam = {};
2470
+ describe('#postIpamHost - errors', () => {
2471
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2472
+ try {
2473
+ a.postIpamHost(ipamHostPostIpamHostBodyParam, null, (data, error) => {
2474
+ try {
2475
+ if (stub) {
2476
+ const displayE = 'Error 400 received on request';
2477
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2478
+ } else {
2479
+ runCommonAsserts(data, error);
2480
+ }
2481
+ saveMockData('IpamHost', 'postIpamHost', 'default', data);
2482
+ done();
2483
+ } catch (err) {
2484
+ log.error(`Test Failure: ${err}`);
2485
+ done(err);
2486
+ }
2487
+ });
2488
+ } catch (error) {
2489
+ log.error(`Adapter Exception: ${error}`);
2490
+ done(error);
2491
+ }
2492
+ }).timeout(attemptTimeout);
2493
+ });
2494
+
2495
+ describe('#getIpamHost - errors', () => {
2496
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2497
+ try {
2498
+ a.getIpamHost(null, null, null, null, null, null, null, null, null, (data, error) => {
2499
+ try {
2500
+ if (stub) {
2501
+ const displayE = 'Error 400 received on request';
2502
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2503
+ } else {
2504
+ runCommonAsserts(data, error);
2505
+ }
2506
+ saveMockData('IpamHost', 'getIpamHost', 'default', data);
2507
+ done();
2508
+ } catch (err) {
2509
+ log.error(`Test Failure: ${err}`);
2510
+ done(err);
2511
+ }
2512
+ });
2513
+ } catch (error) {
2514
+ log.error(`Adapter Exception: ${error}`);
2515
+ done(error);
2516
+ }
2517
+ }).timeout(attemptTimeout);
2518
+ });
2519
+
2520
+ const ipamHostId = 'fakedata';
2521
+ const ipamHostPatchIpamHostIdBodyParam = {};
2522
+ describe('#patchIpamHostId - errors', () => {
2523
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2524
+ try {
2525
+ a.patchIpamHostId(ipamHostId, ipamHostPatchIpamHostIdBodyParam, null, (data, error) => {
2526
+ try {
2527
+ if (stub) {
2528
+ const displayE = 'Error 400 received on request';
2529
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2530
+ } else {
2531
+ runCommonAsserts(data, error);
2532
+ }
2533
+ saveMockData('IpamHost', 'patchIpamHostId', 'default', data);
2534
+ done();
2535
+ } catch (err) {
2536
+ log.error(`Test Failure: ${err}`);
2537
+ done(err);
2538
+ }
2539
+ });
2540
+ } catch (error) {
2541
+ log.error(`Adapter Exception: ${error}`);
2542
+ done(error);
2543
+ }
2544
+ }).timeout(attemptTimeout);
2545
+ });
2546
+
2547
+ describe('#getIpamHostId - errors', () => {
2548
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2549
+ try {
2550
+ a.getIpamHostId(ipamHostId, null, null, null, (data, error) => {
2551
+ try {
2552
+ if (stub) {
2553
+ const displayE = 'Error 400 received on request';
2554
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2555
+ } else {
2556
+ runCommonAsserts(data, error);
2557
+ }
2558
+ saveMockData('IpamHost', 'getIpamHostId', 'default', data);
2559
+ done();
2560
+ } catch (err) {
2561
+ log.error(`Test Failure: ${err}`);
2562
+ done(err);
2563
+ }
2564
+ });
2565
+ } catch (error) {
2566
+ log.error(`Adapter Exception: ${error}`);
2567
+ done(error);
2568
+ }
2569
+ }).timeout(attemptTimeout);
2570
+ });
2571
+
2572
+ const ipSpaceIpSpaceCreateBodyParam = {};
2573
+ describe('#ipSpaceCreate - errors', () => {
2574
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2575
+ try {
2576
+ a.ipSpaceCreate(ipSpaceIpSpaceCreateBodyParam, null, (data, error) => {
2577
+ try {
2578
+ if (stub) {
2579
+ const displayE = 'Error 400 received on request';
2580
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2581
+ } else {
2582
+ runCommonAsserts(data, error);
2583
+ }
2584
+ saveMockData('IpSpace', 'ipSpaceCreate', 'default', data);
2585
+ done();
2586
+ } catch (err) {
2587
+ log.error(`Test Failure: ${err}`);
2588
+ done(err);
2589
+ }
2590
+ });
2591
+ } catch (error) {
2592
+ log.error(`Adapter Exception: ${error}`);
2593
+ done(error);
2594
+ }
2595
+ }).timeout(attemptTimeout);
2596
+ });
2597
+
2598
+ const ipSpaceIpSpaceBulkCopyBodyParam = {};
2599
+ describe('#ipSpaceBulkCopy - errors', () => {
2600
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2601
+ try {
2602
+ a.ipSpaceBulkCopy(ipSpaceIpSpaceBulkCopyBodyParam, null, (data, error) => {
2603
+ try {
2604
+ if (stub) {
2605
+ const displayE = 'Error 400 received on request';
2606
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2607
+ } else {
2608
+ runCommonAsserts(data, error);
2609
+ }
2610
+ saveMockData('IpSpace', 'ipSpaceBulkCopy', 'default', data);
2611
+ done();
2612
+ } catch (err) {
2613
+ log.error(`Test Failure: ${err}`);
2614
+ done(err);
2615
+ }
2616
+ });
2617
+ } catch (error) {
2618
+ log.error(`Adapter Exception: ${error}`);
2619
+ done(error);
2620
+ }
2621
+ }).timeout(attemptTimeout);
2622
+ });
2623
+
2624
+ const ipSpaceId = 'fakedata';
2625
+ const ipSpaceIpSpaceCopyBodyParam = {};
2626
+ describe('#ipSpaceCopy - errors', () => {
2627
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2628
+ try {
2629
+ a.ipSpaceCopy(ipSpaceId, ipSpaceIpSpaceCopyBodyParam, null, (data, error) => {
2630
+ try {
2631
+ if (stub) {
2632
+ const displayE = 'Error 400 received on request';
2633
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2634
+ } else {
2635
+ runCommonAsserts(data, error);
2636
+ }
2637
+ saveMockData('IpSpace', 'ipSpaceCopy', 'default', data);
2638
+ done();
2639
+ } catch (err) {
2640
+ log.error(`Test Failure: ${err}`);
2641
+ done(err);
2642
+ }
2643
+ });
2644
+ } catch (error) {
2645
+ log.error(`Adapter Exception: ${error}`);
2646
+ done(error);
2647
+ }
2648
+ }).timeout(attemptTimeout);
2649
+ });
2650
+
2651
+ describe('#ipSpaceList - errors', () => {
2652
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2653
+ try {
2654
+ a.ipSpaceList(null, null, null, null, null, null, null, null, null, null, (data, error) => {
2655
+ try {
2656
+ if (stub) {
2657
+ const displayE = 'Error 400 received on request';
2658
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2659
+ } else {
2660
+ runCommonAsserts(data, error);
2661
+ }
2662
+ saveMockData('IpSpace', 'ipSpaceList', 'default', data);
2663
+ done();
2664
+ } catch (err) {
2665
+ log.error(`Test Failure: ${err}`);
2666
+ done(err);
2667
+ }
2668
+ });
2669
+ } catch (error) {
2670
+ log.error(`Adapter Exception: ${error}`);
2671
+ done(error);
2672
+ }
2673
+ }).timeout(attemptTimeout);
2674
+ });
2675
+
2676
+ const ipSpaceIpSpaceUpdateBodyParam = {};
2677
+ describe('#ipSpaceUpdate - errors', () => {
2678
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2679
+ try {
2680
+ a.ipSpaceUpdate(ipSpaceId, ipSpaceIpSpaceUpdateBodyParam, null, (data, error) => {
2681
+ try {
2682
+ if (stub) {
2683
+ const displayE = 'Error 400 received on request';
2684
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2685
+ } else {
2686
+ runCommonAsserts(data, error);
2687
+ }
2688
+ saveMockData('IpSpace', 'ipSpaceUpdate', 'default', data);
2689
+ done();
2690
+ } catch (err) {
2691
+ log.error(`Test Failure: ${err}`);
2692
+ done(err);
2693
+ }
2694
+ });
2695
+ } catch (error) {
2696
+ log.error(`Adapter Exception: ${error}`);
2697
+ done(error);
2698
+ }
2699
+ }).timeout(attemptTimeout);
2700
+ });
2701
+
2702
+ describe('#ipSpaceRead - errors', () => {
2703
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2704
+ try {
2705
+ a.ipSpaceRead(ipSpaceId, null, null, (data, error) => {
2706
+ try {
2707
+ if (stub) {
2708
+ const displayE = 'Error 400 received on request';
2709
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2710
+ } else {
2711
+ runCommonAsserts(data, error);
2712
+ }
2713
+ saveMockData('IpSpace', 'ipSpaceRead', 'default', data);
2714
+ done();
2715
+ } catch (err) {
2716
+ log.error(`Test Failure: ${err}`);
2717
+ done(err);
2718
+ }
2719
+ });
2720
+ } catch (error) {
2721
+ log.error(`Adapter Exception: ${error}`);
2722
+ done(error);
2723
+ }
2724
+ }).timeout(attemptTimeout);
2725
+ });
2726
+
2727
+ describe('#ipSpaceGetConflicts - errors', () => {
2728
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2729
+ try {
2730
+ a.ipSpaceGetConflicts(ipSpaceId, null, null, (data, error) => {
2731
+ try {
2732
+ if (stub) {
2733
+ const displayE = 'Error 400 received on request';
2734
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2735
+ } else {
2736
+ runCommonAsserts(data, error);
2737
+ }
2738
+ saveMockData('IpSpace', 'ipSpaceGetConflicts', 'default', data);
2739
+ done();
2740
+ } catch (err) {
2741
+ log.error(`Test Failure: ${err}`);
2742
+ done(err);
2743
+ }
2744
+ });
2745
+ } catch (error) {
2746
+ log.error(`Adapter Exception: ${error}`);
2747
+ done(error);
2748
+ }
2749
+ }).timeout(attemptTimeout);
2750
+ });
2751
+
2752
+ const rangeRangeCreateBodyParam = {};
2753
+ describe('#rangeCreate - errors', () => {
2754
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2755
+ try {
2756
+ a.rangeCreate(rangeRangeCreateBodyParam, null, (data, error) => {
2757
+ try {
2758
+ if (stub) {
2759
+ const displayE = 'Error 400 received on request';
2760
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2761
+ } else {
2762
+ runCommonAsserts(data, error);
2763
+ }
2764
+ saveMockData('Range', 'rangeCreate', 'default', data);
2765
+ done();
2766
+ } catch (err) {
2767
+ log.error(`Test Failure: ${err}`);
2768
+ done(err);
2769
+ }
2770
+ });
2771
+ } catch (error) {
2772
+ log.error(`Adapter Exception: ${error}`);
2773
+ done(error);
2774
+ }
2775
+ }).timeout(attemptTimeout);
2776
+ });
2777
+
2778
+ const rangeId = 'fakedata';
2779
+ describe('#rangeCreateNextAvailableIP - errors', () => {
2780
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2781
+ try {
2782
+ a.rangeCreateNextAvailableIP(rangeId, null, (data, error) => {
2783
+ try {
2784
+ if (stub) {
2785
+ const displayE = 'Error 400 received on request';
2786
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2787
+ } else {
2788
+ runCommonAsserts(data, error);
2789
+ }
2790
+ saveMockData('Range', 'rangeCreateNextAvailableIP', 'default', data);
2791
+ done();
2792
+ } catch (err) {
2793
+ log.error(`Test Failure: ${err}`);
2794
+ done(err);
2795
+ }
2796
+ });
2797
+ } catch (error) {
2798
+ log.error(`Adapter Exception: ${error}`);
2799
+ done(error);
2800
+ }
2801
+ }).timeout(attemptTimeout);
2802
+ });
2803
+
2804
+ describe('#rangeList - errors', () => {
2805
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2806
+ try {
2807
+ a.rangeList(null, null, null, null, null, null, null, null, null, (data, error) => {
2808
+ try {
2809
+ if (stub) {
2810
+ const displayE = 'Error 400 received on request';
2811
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2812
+ } else {
2813
+ runCommonAsserts(data, error);
2814
+ }
2815
+ saveMockData('Range', 'rangeList', 'default', data);
2816
+ done();
2817
+ } catch (err) {
2818
+ log.error(`Test Failure: ${err}`);
2819
+ done(err);
2820
+ }
2821
+ });
2822
+ } catch (error) {
2823
+ log.error(`Adapter Exception: ${error}`);
2824
+ done(error);
2825
+ }
2826
+ }).timeout(attemptTimeout);
2827
+ });
2828
+
2829
+ const rangeRangeUpdateBodyParam = {};
2830
+ describe('#rangeUpdate - errors', () => {
2831
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2832
+ try {
2833
+ a.rangeUpdate(rangeId, rangeRangeUpdateBodyParam, null, (data, error) => {
2834
+ try {
2835
+ if (stub) {
2836
+ const displayE = 'Error 400 received on request';
2837
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2838
+ } else {
2839
+ runCommonAsserts(data, error);
2840
+ }
2841
+ saveMockData('Range', 'rangeUpdate', 'default', data);
2842
+ done();
2843
+ } catch (err) {
2844
+ log.error(`Test Failure: ${err}`);
2845
+ done(err);
2846
+ }
2847
+ });
2848
+ } catch (error) {
2849
+ log.error(`Adapter Exception: ${error}`);
2850
+ done(error);
2851
+ }
2852
+ }).timeout(attemptTimeout);
2853
+ });
2854
+
2855
+ describe('#rangeRead - errors', () => {
2856
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2857
+ try {
2858
+ a.rangeRead(rangeId, null, null, (data, error) => {
2859
+ try {
2860
+ if (stub) {
2861
+ const displayE = 'Error 400 received on request';
2862
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2863
+ } else {
2864
+ runCommonAsserts(data, error);
2865
+ }
2866
+ saveMockData('Range', 'rangeRead', 'default', data);
2867
+ done();
2868
+ } catch (err) {
2869
+ log.error(`Test Failure: ${err}`);
2870
+ done(err);
2871
+ }
2872
+ });
2873
+ } catch (error) {
2874
+ log.error(`Adapter Exception: ${error}`);
2875
+ done(error);
2876
+ }
2877
+ }).timeout(attemptTimeout);
2878
+ });
2879
+
2880
+ describe('#rangeListNextAvailableIP - errors', () => {
2881
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2882
+ try {
2883
+ a.rangeListNextAvailableIP(rangeId, null, null, null, (data, error) => {
2884
+ try {
2885
+ if (stub) {
2886
+ const displayE = 'Error 400 received on request';
2887
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2888
+ } else {
2889
+ runCommonAsserts(data, error);
2890
+ }
2891
+ saveMockData('Range', 'rangeListNextAvailableIP', 'default', data);
2892
+ done();
2893
+ } catch (err) {
2894
+ log.error(`Test Failure: ${err}`);
2895
+ done(err);
2896
+ }
2897
+ });
2898
+ } catch (error) {
2899
+ log.error(`Adapter Exception: ${error}`);
2900
+ done(error);
2901
+ }
2902
+ }).timeout(attemptTimeout);
2903
+ });
2904
+
2905
+ const subnetSubnetCreateBodyParam = {};
2906
+ describe('#subnetCreate - errors', () => {
2907
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2908
+ try {
2909
+ a.subnetCreate(subnetSubnetCreateBodyParam, null, (data, error) => {
2910
+ try {
2911
+ if (stub) {
2912
+ const displayE = 'Error 400 received on request';
2913
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2914
+ } else {
2915
+ runCommonAsserts(data, error);
2916
+ }
2917
+ saveMockData('Subnet', 'subnetCreate', 'default', data);
2918
+ done();
2919
+ } catch (err) {
2920
+ log.error(`Test Failure: ${err}`);
2921
+ done(err);
2922
+ }
2923
+ });
2924
+ } catch (error) {
2925
+ log.error(`Adapter Exception: ${error}`);
2926
+ done(error);
2927
+ }
2928
+ }).timeout(attemptTimeout);
2929
+ });
2930
+
2931
+ const subnetId = 'fakedata';
2932
+ const subnetSubnetCopyBodyParam = {};
2933
+ describe('#subnetCopy - errors', () => {
2934
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2935
+ try {
2936
+ a.subnetCopy(subnetId, subnetSubnetCopyBodyParam, null, (data, error) => {
2937
+ try {
2938
+ if (stub) {
2939
+ const displayE = 'Error 400 received on request';
2940
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2941
+ } else {
2942
+ runCommonAsserts(data, error);
2943
+ }
2944
+ saveMockData('Subnet', 'subnetCopy', 'default', data);
2945
+ done();
2946
+ } catch (err) {
2947
+ log.error(`Test Failure: ${err}`);
2948
+ done(err);
2949
+ }
2950
+ });
2951
+ } catch (error) {
2952
+ log.error(`Adapter Exception: ${error}`);
2953
+ done(error);
2954
+ }
2955
+ }).timeout(attemptTimeout);
2956
+ });
2957
+
2958
+ describe('#subnetCreateNextAvailableIP - errors', () => {
2959
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2960
+ try {
2961
+ a.subnetCreateNextAvailableIP(subnetId, null, (data, error) => {
2962
+ try {
2963
+ if (stub) {
2964
+ const displayE = 'Error 400 received on request';
2965
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2966
+ } else {
2967
+ runCommonAsserts(data, error);
2968
+ }
2969
+ saveMockData('Subnet', 'subnetCreateNextAvailableIP', 'default', data);
2970
+ done();
2971
+ } catch (err) {
2972
+ log.error(`Test Failure: ${err}`);
2973
+ done(err);
2974
+ }
2975
+ });
2976
+ } catch (error) {
2977
+ log.error(`Adapter Exception: ${error}`);
2978
+ done(error);
2979
+ }
2980
+ }).timeout(attemptTimeout);
2981
+ });
2982
+
2983
+ describe('#subnetList - errors', () => {
2984
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2985
+ try {
2986
+ a.subnetList(null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
2987
+ try {
2988
+ if (stub) {
2989
+ const displayE = 'Error 400 received on request';
2990
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
2991
+ } else {
2992
+ runCommonAsserts(data, error);
2993
+ }
2994
+ saveMockData('Subnet', 'subnetList', 'default', data);
2995
+ done();
2996
+ } catch (err) {
2997
+ log.error(`Test Failure: ${err}`);
2998
+ done(err);
2999
+ }
3000
+ });
3001
+ } catch (error) {
3002
+ log.error(`Adapter Exception: ${error}`);
3003
+ done(error);
3004
+ }
3005
+ }).timeout(attemptTimeout);
3006
+ });
3007
+
3008
+ const subnetSubnetUpdateBodyParam = {};
3009
+ describe('#subnetUpdate - errors', () => {
3010
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3011
+ try {
3012
+ a.subnetUpdate(subnetId, subnetSubnetUpdateBodyParam, null, (data, error) => {
3013
+ try {
3014
+ if (stub) {
3015
+ const displayE = 'Error 400 received on request';
3016
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3017
+ } else {
3018
+ runCommonAsserts(data, error);
3019
+ }
3020
+ saveMockData('Subnet', 'subnetUpdate', 'default', data);
3021
+ done();
3022
+ } catch (err) {
3023
+ log.error(`Test Failure: ${err}`);
3024
+ done(err);
3025
+ }
3026
+ });
3027
+ } catch (error) {
3028
+ log.error(`Adapter Exception: ${error}`);
3029
+ done(error);
3030
+ }
3031
+ }).timeout(attemptTimeout);
3032
+ });
3033
+
3034
+ describe('#subnetRead - errors', () => {
3035
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3036
+ try {
3037
+ a.subnetRead(subnetId, null, null, (data, error) => {
3038
+ try {
3039
+ if (stub) {
3040
+ const displayE = 'Error 400 received on request';
3041
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3042
+ } else {
3043
+ runCommonAsserts(data, error);
3044
+ }
3045
+ saveMockData('Subnet', 'subnetRead', 'default', data);
3046
+ done();
3047
+ } catch (err) {
3048
+ log.error(`Test Failure: ${err}`);
3049
+ done(err);
3050
+ }
3051
+ });
3052
+ } catch (error) {
3053
+ log.error(`Adapter Exception: ${error}`);
3054
+ done(error);
3055
+ }
3056
+ }).timeout(attemptTimeout);
3057
+ });
3058
+
3059
+ describe('#subnetListAncestor - errors', () => {
3060
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3061
+ try {
3062
+ a.subnetListAncestor(subnetId, null, (data, error) => {
3063
+ try {
3064
+ if (stub) {
3065
+ const displayE = 'Error 400 received on request';
3066
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3067
+ } else {
3068
+ runCommonAsserts(data, error);
3069
+ }
3070
+ saveMockData('Subnet', 'subnetListAncestor', 'default', data);
3071
+ done();
3072
+ } catch (err) {
3073
+ log.error(`Test Failure: ${err}`);
3074
+ done(err);
3075
+ }
3076
+ });
3077
+ } catch (error) {
3078
+ log.error(`Adapter Exception: ${error}`);
3079
+ done(error);
3080
+ }
3081
+ }).timeout(attemptTimeout);
3082
+ });
3083
+
3084
+ describe('#subnetListNextAvailableIP - errors', () => {
3085
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3086
+ try {
3087
+ a.subnetListNextAvailableIP(subnetId, null, null, null, (data, error) => {
3088
+ try {
3089
+ if (stub) {
3090
+ const displayE = 'Error 400 received on request';
3091
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3092
+ } else {
3093
+ runCommonAsserts(data, error);
3094
+ }
3095
+ saveMockData('Subnet', 'subnetListNextAvailableIP', 'default', data);
3096
+ done();
3097
+ } catch (err) {
3098
+ log.error(`Test Failure: ${err}`);
3099
+ done(err);
3100
+ }
3101
+ });
3102
+ } catch (error) {
3103
+ log.error(`Adapter Exception: ${error}`);
3104
+ done(error);
3105
+ }
3106
+ }).timeout(attemptTimeout);
3107
+ });
3108
+
3109
+ describe('#fixedAddressDelete - errors', () => {
3110
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3111
+ try {
3112
+ a.fixedAddressDelete(fixedAddressId, null, (data, error) => {
3113
+ try {
3114
+ if (stub) {
3115
+ const displayE = 'Error 400 received on request';
3116
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3117
+ } else {
3118
+ runCommonAsserts(data, error);
3119
+ }
3120
+ saveMockData('FixedAddress', 'fixedAddressDelete', 'default', data);
3121
+ done();
3122
+ } catch (err) {
3123
+ log.error(`Test Failure: ${err}`);
3124
+ done(err);
3125
+ }
3126
+ });
3127
+ } catch (error) {
3128
+ log.error(`Adapter Exception: ${error}`);
3129
+ done(error);
3130
+ }
3131
+ }).timeout(attemptTimeout);
3132
+ });
3133
+
3134
+ describe('#haGroupDelete - errors', () => {
3135
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3136
+ try {
3137
+ a.haGroupDelete(haGroupId, null, (data, error) => {
3138
+ try {
3139
+ if (stub) {
3140
+ const displayE = 'Error 400 received on request';
3141
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3142
+ } else {
3143
+ runCommonAsserts(data, error);
3144
+ }
3145
+ saveMockData('HaGroup', 'haGroupDelete', 'default', data);
3146
+ done();
3147
+ } catch (err) {
3148
+ log.error(`Test Failure: ${err}`);
3149
+ done(err);
3150
+ }
3151
+ });
3152
+ } catch (error) {
3153
+ log.error(`Adapter Exception: ${error}`);
3154
+ done(error);
3155
+ }
3156
+ }).timeout(attemptTimeout);
3157
+ });
3158
+
3159
+ describe('#hardwareFilterDelete - errors', () => {
3160
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3161
+ try {
3162
+ a.hardwareFilterDelete(hardwareFilterId, null, (data, error) => {
3163
+ try {
3164
+ if (stub) {
3165
+ const displayE = 'Error 400 received on request';
3166
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3167
+ } else {
3168
+ runCommonAsserts(data, error);
3169
+ }
3170
+ saveMockData('HardwareFilter', 'hardwareFilterDelete', 'default', data);
3171
+ done();
3172
+ } catch (err) {
3173
+ log.error(`Test Failure: ${err}`);
3174
+ done(err);
3175
+ }
3176
+ });
3177
+ } catch (error) {
3178
+ log.error(`Adapter Exception: ${error}`);
3179
+ done(error);
3180
+ }
3181
+ }).timeout(attemptTimeout);
3182
+ });
3183
+
3184
+ describe('#macAddressItemDelete - errors', () => {
3185
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3186
+ try {
3187
+ a.macAddressItemDelete(macAddressItemId, null, (data, error) => {
3188
+ try {
3189
+ if (stub) {
3190
+ const displayE = 'Error 400 received on request';
3191
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3192
+ } else {
3193
+ runCommonAsserts(data, error);
3194
+ }
3195
+ saveMockData('MacAddressItem', 'macAddressItemDelete', 'default', data);
3196
+ done();
3197
+ } catch (err) {
3198
+ log.error(`Test Failure: ${err}`);
3199
+ done(err);
3200
+ }
3201
+ });
3202
+ } catch (error) {
3203
+ log.error(`Adapter Exception: ${error}`);
3204
+ done(error);
3205
+ }
3206
+ }).timeout(attemptTimeout);
3207
+ });
3208
+
3209
+ describe('#optionCodeDelete - errors', () => {
3210
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3211
+ try {
3212
+ a.optionCodeDelete(optionCodeId, null, (data, error) => {
3213
+ try {
3214
+ if (stub) {
3215
+ const displayE = 'Error 400 received on request';
3216
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3217
+ } else {
3218
+ runCommonAsserts(data, error);
3219
+ }
3220
+ saveMockData('OptionCode', 'optionCodeDelete', 'default', data);
3221
+ done();
3222
+ } catch (err) {
3223
+ log.error(`Test Failure: ${err}`);
3224
+ done(err);
3225
+ }
3226
+ });
3227
+ } catch (error) {
3228
+ log.error(`Adapter Exception: ${error}`);
3229
+ done(error);
3230
+ }
3231
+ }).timeout(attemptTimeout);
3232
+ });
3233
+
3234
+ describe('#optionFilterDelete - errors', () => {
3235
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3236
+ try {
3237
+ a.optionFilterDelete(optionFilterId, null, (data, error) => {
3238
+ try {
3239
+ if (stub) {
3240
+ const displayE = 'Error 400 received on request';
3241
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3242
+ } else {
3243
+ runCommonAsserts(data, error);
3244
+ }
3245
+ saveMockData('OptionFilter', 'optionFilterDelete', 'default', data);
3246
+ done();
3247
+ } catch (err) {
3248
+ log.error(`Test Failure: ${err}`);
3249
+ done(err);
3250
+ }
3251
+ });
3252
+ } catch (error) {
3253
+ log.error(`Adapter Exception: ${error}`);
3254
+ done(error);
3255
+ }
3256
+ }).timeout(attemptTimeout);
3257
+ });
3258
+
3259
+ describe('#optionGroupDelete - errors', () => {
3260
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3261
+ try {
3262
+ a.optionGroupDelete(optionGroupId, null, (data, error) => {
3263
+ try {
3264
+ if (stub) {
3265
+ const displayE = 'Error 400 received on request';
3266
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3267
+ } else {
3268
+ runCommonAsserts(data, error);
3269
+ }
3270
+ saveMockData('OptionGroup', 'optionGroupDelete', 'default', data);
3271
+ done();
3272
+ } catch (err) {
3273
+ log.error(`Test Failure: ${err}`);
3274
+ done(err);
3275
+ }
3276
+ });
3277
+ } catch (error) {
3278
+ log.error(`Adapter Exception: ${error}`);
3279
+ done(error);
3280
+ }
3281
+ }).timeout(attemptTimeout);
3282
+ });
3283
+
3284
+ describe('#optionspaceDelete - errors', () => {
3285
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3286
+ try {
3287
+ a.optionspaceDelete(optionSpaceId, null, (data, error) => {
3288
+ try {
3289
+ if (stub) {
3290
+ const displayE = 'Error 400 received on request';
3291
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3292
+ } else {
3293
+ runCommonAsserts(data, error);
3294
+ }
3295
+ saveMockData('OptionSpace', 'optionspaceDelete', 'default', data);
3296
+ done();
3297
+ } catch (err) {
3298
+ log.error(`Test Failure: ${err}`);
3299
+ done(err);
3300
+ }
3301
+ });
3302
+ } catch (error) {
3303
+ log.error(`Adapter Exception: ${error}`);
3304
+ done(error);
3305
+ }
3306
+ }).timeout(attemptTimeout);
3307
+ });
3308
+
3309
+ describe('#serverDelete - errors', () => {
3310
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3311
+ try {
3312
+ a.serverDelete(serverId, null, (data, error) => {
3313
+ try {
3314
+ if (stub) {
3315
+ const displayE = 'Error 400 received on request';
3316
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3317
+ } else {
3318
+ runCommonAsserts(data, error);
3319
+ }
3320
+ saveMockData('Server', 'serverDelete', 'default', data);
3321
+ done();
3322
+ } catch (err) {
3323
+ log.error(`Test Failure: ${err}`);
3324
+ done(err);
3325
+ }
3326
+ });
3327
+ } catch (error) {
3328
+ log.error(`Adapter Exception: ${error}`);
3329
+ done(error);
3330
+ }
3331
+ }).timeout(attemptTimeout);
3332
+ });
3333
+
3334
+ describe('#addressDelete - errors', () => {
3335
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3336
+ try {
3337
+ a.addressDelete(addressId, null, (data, error) => {
3338
+ try {
3339
+ if (stub) {
3340
+ const displayE = 'Error 400 received on request';
3341
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3342
+ } else {
3343
+ runCommonAsserts(data, error);
3344
+ }
3345
+ saveMockData('Address', 'addressDelete', 'default', data);
3346
+ done();
3347
+ } catch (err) {
3348
+ log.error(`Test Failure: ${err}`);
3349
+ done(err);
3350
+ }
3351
+ });
3352
+ } catch (error) {
3353
+ log.error(`Adapter Exception: ${error}`);
3354
+ done(error);
3355
+ }
3356
+ }).timeout(attemptTimeout);
3357
+ });
3358
+
3359
+ describe('#addressBlockDelete - errors', () => {
3360
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3361
+ try {
3362
+ a.addressBlockDelete(addressBlockId, null, (data, error) => {
3363
+ try {
3364
+ if (stub) {
3365
+ const displayE = 'Error 400 received on request';
3366
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3367
+ } else {
3368
+ runCommonAsserts(data, error);
3369
+ }
3370
+ saveMockData('AddressBlock', 'addressBlockDelete', 'default', data);
3371
+ done();
3372
+ } catch (err) {
3373
+ log.error(`Test Failure: ${err}`);
3374
+ done(err);
3375
+ }
3376
+ });
3377
+ } catch (error) {
3378
+ log.error(`Adapter Exception: ${error}`);
3379
+ done(error);
3380
+ }
3381
+ }).timeout(attemptTimeout);
3382
+ });
3383
+
3384
+ describe('#deleteIpamHostId - errors', () => {
3385
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3386
+ try {
3387
+ a.deleteIpamHostId(ipamHostId, null, (data, error) => {
3388
+ try {
3389
+ if (stub) {
3390
+ const displayE = 'Error 400 received on request';
3391
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3392
+ } else {
3393
+ runCommonAsserts(data, error);
3394
+ }
3395
+ saveMockData('IpamHost', 'deleteIpamHostId', 'default', data);
3396
+ done();
3397
+ } catch (err) {
3398
+ log.error(`Test Failure: ${err}`);
3399
+ done(err);
3400
+ }
3401
+ });
3402
+ } catch (error) {
3403
+ log.error(`Adapter Exception: ${error}`);
3404
+ done(error);
3405
+ }
3406
+ }).timeout(attemptTimeout);
3407
+ });
3408
+
3409
+ describe('#ipSpaceDelete - errors', () => {
3410
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3411
+ try {
3412
+ a.ipSpaceDelete(ipSpaceId, null, (data, error) => {
3413
+ try {
3414
+ if (stub) {
3415
+ const displayE = 'Error 400 received on request';
3416
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3417
+ } else {
3418
+ runCommonAsserts(data, error);
3419
+ }
3420
+ saveMockData('IpSpace', 'ipSpaceDelete', 'default', data);
3421
+ done();
3422
+ } catch (err) {
3423
+ log.error(`Test Failure: ${err}`);
3424
+ done(err);
3425
+ }
3426
+ });
3427
+ } catch (error) {
3428
+ log.error(`Adapter Exception: ${error}`);
3429
+ done(error);
3430
+ }
3431
+ }).timeout(attemptTimeout);
3432
+ });
3433
+
3434
+ describe('#rangeDelete - errors', () => {
3435
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3436
+ try {
3437
+ a.rangeDelete(rangeId, null, (data, error) => {
3438
+ try {
3439
+ if (stub) {
3440
+ const displayE = 'Error 400 received on request';
3441
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3442
+ } else {
3443
+ runCommonAsserts(data, error);
3444
+ }
3445
+ saveMockData('Range', 'rangeDelete', 'default', data);
3446
+ done();
3447
+ } catch (err) {
3448
+ log.error(`Test Failure: ${err}`);
3449
+ done(err);
3450
+ }
3451
+ });
3452
+ } catch (error) {
3453
+ log.error(`Adapter Exception: ${error}`);
3454
+ done(error);
3455
+ }
3456
+ }).timeout(attemptTimeout);
3457
+ });
3458
+
3459
+ describe('#subnetDelete - errors', () => {
3460
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3461
+ try {
3462
+ a.subnetDelete(subnetId, null, (data, error) => {
3463
+ try {
3464
+ if (stub) {
3465
+ const displayE = 'Error 400 received on request';
3466
+ runErrorAsserts(data, error, 'AD.500', 'Test-infoblox_universal_ddi-connectorRest-handleEndResponse', displayE);
3467
+ } else {
3468
+ runCommonAsserts(data, error);
3469
+ }
3470
+ saveMockData('Subnet', 'subnetDelete', 'default', data);
3471
+ done();
3472
+ } catch (err) {
3473
+ log.error(`Test Failure: ${err}`);
3474
+ done(err);
3475
+ }
3476
+ });
3477
+ } catch (error) {
3478
+ log.error(`Adapter Exception: ${error}`);
3479
+ done(error);
3480
+ }
3481
+ }).timeout(attemptTimeout);
3482
+ });
3483
+ });
3484
+ });