@itentialopensource/adapter-infoblox 1.9.3 → 1.10.0

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 (54) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +55 -52
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +225 -502
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +1261 -149
  14. package/adapterBase.js +1022 -246
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/DNSProperties/action.json +1 -1
  18. package/entities/DNSProperties/mockdatafiles/getGridDnsData.json +3 -0
  19. package/entities/ExtensibleAttributes/action.json +63 -0
  20. package/entities/ExtensibleAttributes/schema.json +4 -1
  21. package/entities/NetworkViewsAndDNSViews/action.json +63 -0
  22. package/entities/NetworkViewsAndDNSViews/schema.json +4 -1
  23. package/entities/Networks/action.json +42 -0
  24. package/entities/Networks/requestSchema.json +3 -1
  25. package/entities/Networks/responseSchema.json +3 -1
  26. package/entities/Services/action.json +21 -0
  27. package/entities/Services/schema.json +1 -0
  28. package/error.json +12 -0
  29. package/package.json +20 -13
  30. package/pronghorn.json +1201 -500
  31. package/propertiesDecorators.json +14 -0
  32. package/propertiesSchema.json +436 -0
  33. package/refs?service=git-upload-pack +0 -0
  34. package/report/adapterInfo.json +10 -0
  35. package/report/updateReport1646675873230.json +95 -0
  36. package/report/updateReport1653911824054.json +120 -0
  37. package/sampleProperties.json +94 -2
  38. package/test/integration/adapterTestBasicGet.js +2 -2
  39. package/test/integration/adapterTestIntegration.js +390 -191
  40. package/test/unit/adapterBaseTestUnit.js +35 -27
  41. package/test/unit/adapterTestUnit.js +1112 -214
  42. package/utils/adapterInfo.js +206 -0
  43. package/utils/addAuth.js +94 -0
  44. package/utils/basicGet.js +1 -14
  45. package/utils/entitiesToDB.js +179 -0
  46. package/utils/modify.js +1 -1
  47. package/utils/packModificationScript.js +1 -1
  48. package/utils/patches2bundledDeps.js +90 -0
  49. package/utils/pre-commit.sh +3 -0
  50. package/utils/removeHooks.js +20 -0
  51. package/utils/tbScript.js +43 -22
  52. package/utils/tbUtils.js +126 -29
  53. package/utils/testRunner.js +16 -16
  54. package/utils/troubleshootingAdapter.js +2 -26
package/adapter.js CHANGED
@@ -85,10 +85,18 @@ class Infoblox extends AdapterBaseCl {
85
85
  }
86
86
 
87
87
  /**
88
- * @getWorkflowFunctions
89
- */
90
- getWorkflowFunctions(inIgnore) {
91
- let myIgnore = [];
88
+ * @iapGetAdapterWorkflowFunctions
89
+ */
90
+ iapGetAdapterWorkflowFunctions(inIgnore) {
91
+ let myIgnore = [
92
+ 'healthCheck',
93
+ 'iapGetAdapterWorkflowFunctions',
94
+ 'iapHasAdapterEntity',
95
+ 'iapVerifyAdapterCapability',
96
+ 'iapUpdateAdapterEntityCache',
97
+ 'hasEntities',
98
+ 'getAuthorization'
99
+ ];
92
100
  if (!inIgnore && Array.isArray(inIgnore)) {
93
101
  myIgnore = inIgnore;
94
102
  } else if (!inIgnore && typeof inIgnore === 'string') {
@@ -99,15 +107,15 @@ class Infoblox extends AdapterBaseCl {
99
107
  // you can add specific methods that you do not want to be workflow functions to ignore like below
100
108
  // myIgnore.push('myMethodNotInWorkflow');
101
109
 
102
- return super.getWorkflowFunctions(myIgnore);
110
+ return super.iapGetAdapterWorkflowFunctions(myIgnore);
103
111
  }
104
112
 
105
113
  /**
106
- * updateAdapterConfiguration is used to update any of the adapter configuration files. This
114
+ * iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
107
115
  * allows customers to make changes to adapter configuration without having to be on the
108
116
  * file system.
109
117
  *
110
- * @function updateAdapterConfiguration
118
+ * @function iapUpdateAdapterConfiguration
111
119
  * @param {string} configFile - the name of the file being updated (required)
112
120
  * @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
113
121
  * @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
@@ -115,36 +123,42 @@ class Infoblox extends AdapterBaseCl {
115
123
  * @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
116
124
  * @param {Callback} callback - The results of the call
117
125
  */
118
- updateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
119
- const origin = `${this.id}-adapter-updateAdapterConfiguration`;
126
+ iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
127
+ const meth = 'adapter-iapUpdateAdapterConfiguration';
128
+ const origin = `${this.id}-${meth}`;
120
129
  log.trace(origin);
121
- super.updateAdapterConfiguration(configFile, changes, entity, type, action, callback);
130
+
131
+ super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
122
132
  }
123
133
 
124
134
  /**
125
135
  * See if the API path provided is found in this adapter
126
136
  *
127
- * @function findPath
137
+ * @function iapFindAdapterPath
128
138
  * @param {string} apiPath - the api path to check on
129
139
  * @param {Callback} callback - The results of the call
130
140
  */
131
- findPath(apiPath, callback) {
132
- const origin = `${this.id}-adapter-findPath`;
141
+ iapFindAdapterPath(apiPath, callback) {
142
+ const meth = 'adapter-iapFindAdapterPath';
143
+ const origin = `${this.id}-${meth}`;
133
144
  log.trace(origin);
134
- super.findPath(apiPath, callback);
145
+
146
+ super.iapFindAdapterPath(apiPath, callback);
135
147
  }
136
148
 
137
149
  /**
138
150
  * @summary Suspends adapter
139
151
  *
140
- * @function suspend
152
+ * @function iapSuspendAdapter
141
153
  * @param {Callback} callback - callback function
142
154
  */
143
- suspend(mode, callback) {
144
- const origin = `${this.id}-adapter-suspend`;
155
+ iapSuspendAdapter(mode, callback) {
156
+ const meth = 'adapter-iapSuspendAdapter';
157
+ const origin = `${this.id}-${meth}`;
145
158
  log.trace(origin);
159
+
146
160
  try {
147
- return super.suspend(mode, callback);
161
+ return super.iapSuspendAdapter(mode, callback);
148
162
  } catch (error) {
149
163
  log.error(`${origin}: ${error}`);
150
164
  return callback(null, error);
@@ -154,14 +168,16 @@ class Infoblox extends AdapterBaseCl {
154
168
  /**
155
169
  * @summary Unsuspends adapter
156
170
  *
157
- * @function unsuspend
171
+ * @function iapUnsuspendAdapter
158
172
  * @param {Callback} callback - callback function
159
173
  */
160
- unsuspend(callback) {
161
- const origin = `${this.id}-adapter-unsuspend`;
174
+ iapUnsuspendAdapter(callback) {
175
+ const meth = 'adapter-iapUnsuspendAdapter';
176
+ const origin = `${this.id}-${meth}`;
162
177
  log.trace(origin);
178
+
163
179
  try {
164
- return super.unsuspend(callback);
180
+ return super.iapUnsuspendAdapter(callback);
165
181
  } catch (error) {
166
182
  log.error(`${origin}: ${error}`);
167
183
  return callback(null, error);
@@ -171,29 +187,33 @@ class Infoblox extends AdapterBaseCl {
171
187
  /**
172
188
  * @summary Get the Adaoter Queue
173
189
  *
174
- * @function getQueue
190
+ * @function iapGetAdapterQueue
175
191
  * @param {Callback} callback - callback function
176
192
  */
177
- getQueue(callback) {
178
- const origin = `${this.id}-adapter-getQueue`;
193
+ iapGetAdapterQueue(callback) {
194
+ const meth = 'adapter-iapGetAdapterQueue';
195
+ const origin = `${this.id}-${meth}`;
179
196
  log.trace(origin);
180
- return super.getQueue(callback);
197
+
198
+ return super.iapGetAdapterQueue(callback);
181
199
  }
182
200
 
183
201
  /**
184
202
  * @summary Runs troubleshoot scripts for adapter
185
203
  *
186
- * @function troubleshoot
204
+ * @function iapTroubleshootAdapter
187
205
  * @param {Object} props - the connection, healthcheck and authentication properties
188
206
  *
189
207
  * @param {boolean} persistFlag - whether the adapter properties should be updated
190
208
  * @param {Callback} callback - The results of the call
191
209
  */
192
- troubleshoot(props, persistFlag, callback) {
193
- const origin = `${this.id}-adapter-troubleshoot`;
210
+ iapTroubleshootAdapter(props, persistFlag, callback) {
211
+ const meth = 'adapter-iapTroubleshootAdapter';
212
+ const origin = `${this.id}-${meth}`;
194
213
  log.trace(origin);
214
+
195
215
  try {
196
- return super.troubleshoot(props, persistFlag, this, callback);
216
+ return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
197
217
  } catch (error) {
198
218
  log.error(`${origin}: ${error}`);
199
219
  return callback(null, error);
@@ -203,15 +223,17 @@ class Infoblox extends AdapterBaseCl {
203
223
  /**
204
224
  * @summary runs healthcheck script for adapter
205
225
  *
206
- * @function runHealthcheck
226
+ * @function iapRunAdapterHealthcheck
207
227
  * @param {Adapter} adapter - adapter instance to troubleshoot
208
228
  * @param {Callback} callback - callback function
209
229
  */
210
- runHealthcheck(callback) {
211
- const origin = `${this.id}-adapter-runHealthcheck`;
230
+ iapRunAdapterHealthcheck(callback) {
231
+ const meth = 'adapter-iapRunAdapterHealthcheck';
232
+ const origin = `${this.id}-${meth}`;
212
233
  log.trace(origin);
234
+
213
235
  try {
214
- return super.runHealthcheck(this, callback);
236
+ return super.iapRunAdapterHealthcheck(this, callback);
215
237
  } catch (error) {
216
238
  log.error(`${origin}: ${error}`);
217
239
  return callback(null, error);
@@ -221,14 +243,16 @@ class Infoblox extends AdapterBaseCl {
221
243
  /**
222
244
  * @summary runs connectivity check script for adapter
223
245
  *
224
- * @function runConnectivity
246
+ * @function iapRunAdapterConnectivity
225
247
  * @param {Callback} callback - callback function
226
248
  */
227
- runConnectivity(callback) {
228
- const origin = `${this.id}-adapter-runConnectivity`;
249
+ iapRunAdapterConnectivity(callback) {
250
+ const meth = 'adapter-iapRunAdapterConnectivity';
251
+ const origin = `${this.id}-${meth}`;
229
252
  log.trace(origin);
253
+
230
254
  try {
231
- return super.runConnectivity(callback);
255
+ return super.iapRunAdapterConnectivity(callback);
232
256
  } catch (error) {
233
257
  log.error(`${origin}: ${error}`);
234
258
  return callback(null, error);
@@ -238,44 +262,67 @@ class Infoblox extends AdapterBaseCl {
238
262
  /**
239
263
  * @summary runs basicGet script for adapter
240
264
  *
241
- * @function runBasicGet
265
+ * @function iapRunAdapterBasicGet
242
266
  * @param {Callback} callback - callback function
243
267
  */
244
- runBasicGet(callback) {
245
- const origin = `${this.id}-adapter-runBasicGet`;
268
+ iapRunAdapterBasicGet(callback) {
269
+ const meth = 'adapter-iapRunAdapterBasicGet';
270
+ const origin = `${this.id}-${meth}`;
246
271
  log.trace(origin);
272
+
247
273
  try {
248
- return super.runBasicGet(callback);
274
+ return super.iapRunAdapterBasicGet(callback);
249
275
  } catch (error) {
250
276
  log.error(`${origin}: ${error}`);
251
277
  return callback(null, error);
252
278
  }
253
279
  }
254
280
 
281
+ /**
282
+ * @summary moves entites into Mongo DB
283
+ *
284
+ * @function iapMoveAdapterEntitiesToDB
285
+ * @param {getCallback} callback - a callback function to return the result (Generics)
286
+ * or the error
287
+ */
288
+ iapMoveAdapterEntitiesToDB(callback) {
289
+ const meth = 'adapter-iapMoveAdapterEntitiesToDB';
290
+ const origin = `${this.id}-${meth}`;
291
+ log.trace(origin);
292
+
293
+ try {
294
+ return super.iapMoveAdapterEntitiesToDB(callback);
295
+ } catch (err) {
296
+ log.error(`${origin}: ${err}`);
297
+ return callback(null, err);
298
+ }
299
+ }
300
+
301
+ /* BROKER CALLS */
255
302
  /**
256
303
  * @summary Determines if this adapter supports the specific entity
257
304
  *
258
- * @function hasEntity
305
+ * @function iapHasAdapterEntity
259
306
  * @param {String} entityType - the entity type to check for
260
307
  * @param {String/Array} entityId - the specific entity we are looking for
261
308
  *
262
309
  * @param {Callback} callback - An array of whether the adapter can has the
263
310
  * desired capability or an error
264
311
  */
265
- hasEntity(entityType, entityId, callback) {
266
- const origin = `${this.id}-adapter-hasEntity`;
312
+ iapHasAdapterEntity(entityType, entityId, callback) {
313
+ const origin = `${this.id}-adapter-iapHasAdapterEntity`;
267
314
  log.trace(origin);
268
315
 
269
316
  // Make the call -
270
- // verifyCapability(entityType, actionType, entityId, callback)
271
- return this.verifyCapability(entityType, null, entityId, callback);
317
+ // iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
318
+ return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
272
319
  }
273
320
 
274
321
  /**
275
322
  * @summary Provides a way for the adapter to tell north bound integrations
276
323
  * whether the adapter supports type, action and specific entity
277
324
  *
278
- * @function verifyCapability
325
+ * @function iapVerifyAdapterCapability
279
326
  * @param {String} entityType - the entity type to check for
280
327
  * @param {String} actionType - the action type to check for
281
328
  * @param {String/Array} entityId - the specific entity we are looking for
@@ -283,15 +330,15 @@ class Infoblox extends AdapterBaseCl {
283
330
  * @param {Callback} callback - An array of whether the adapter can has the
284
331
  * desired capability or an error
285
332
  */
286
- verifyCapability(entityType, actionType, entityId, callback) {
287
- const meth = 'adapterBase-verifyCapability';
333
+ iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
334
+ const meth = 'adapterBase-iapVerifyAdapterCapability';
288
335
  const origin = `${this.id}-${meth}`;
289
336
  log.trace(origin);
290
337
 
291
338
  // if caching
292
339
  if (this.caching) {
293
- // Make the call - verifyCapability(entityType, actionType, entityId, callback)
294
- return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (results, error) => {
340
+ // Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
341
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
295
342
  if (error) {
296
343
  return callback(null, error);
297
344
  }
@@ -309,7 +356,7 @@ class Infoblox extends AdapterBaseCl {
309
356
  }
310
357
 
311
358
  // need to check the cache again since it has been updated
312
- return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (vcapable, verror) => {
359
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
313
360
  if (verror) {
314
361
  return callback(null, verror);
315
362
  }
@@ -342,7 +389,7 @@ class Infoblox extends AdapterBaseCl {
342
389
  // if no entity id
343
390
  if (!entityId) {
344
391
  // need to check the cache again since it has been updated
345
- return this.requestHandlerInst.verifyCapability(entityType, actionType, null, (vcapable, verror) => {
392
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
346
393
  if (verror) {
347
394
  return callback(null, verror);
348
395
  }
@@ -363,7 +410,7 @@ class Infoblox extends AdapterBaseCl {
363
410
  }
364
411
 
365
412
  // need to check the cache again since it has been updated
366
- return this.requestHandlerInst.verifyCapability(entityType, actionType, null, (vcapable, verror) => {
413
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
367
414
  if (verror) {
368
415
  return callback(null, verror);
369
416
  }
@@ -404,11 +451,11 @@ class Infoblox extends AdapterBaseCl {
404
451
  /**
405
452
  * @summary Updates the cache for all entities by call the get All entity method
406
453
  *
407
- * @function updateEntityCache
454
+ * @function iapUpdateAdapterEntityCache
408
455
  *
409
456
  */
410
- updateEntityCache() {
411
- const origin = `${this.id}-adapter-updateEntityCache`;
457
+ iapUpdateAdapterEntityCache() {
458
+ const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
412
459
  log.trace(origin);
413
460
 
414
461
  if (this.caching) {
@@ -421,6 +468,140 @@ class Infoblox extends AdapterBaseCl {
421
468
  }
422
469
  }
423
470
 
471
+ /**
472
+ * @summary Determines if this adapter supports any in a list of entities
473
+ *
474
+ * @function hasEntities
475
+ * @param {String} entityType - the entity type to check for
476
+ * @param {Array} entityList - the list of entities we are looking for
477
+ *
478
+ * @param {Callback} callback - A map where the entity is the key and the
479
+ * value is true or false
480
+ */
481
+ hasEntities(entityType, entityList, callback) {
482
+ const meth = 'adapter-hasEntities';
483
+ const origin = `${this.id}-${meth}`;
484
+ log.trace(origin);
485
+
486
+ try {
487
+ return super.hasEntities(entityType, entityList, callback);
488
+ } catch (err) {
489
+ log.error(`${origin}: ${err}`);
490
+ return callback(null, err);
491
+ }
492
+ }
493
+
494
+ /**
495
+ * @summary Get Appliance that match the deviceName
496
+ *
497
+ * @function getDevice
498
+ * @param {String} deviceName - the deviceName to find (required)
499
+ *
500
+ * @param {getCallback} callback - a callback function to return the result
501
+ * (appliance) or the error
502
+ */
503
+ getDevice(deviceName, callback) {
504
+ const meth = 'adapter-getDevice';
505
+ const origin = `${this.id}-${meth}`;
506
+ log.trace(origin);
507
+
508
+ try {
509
+ return super.getDevice(deviceName, callback);
510
+ } catch (err) {
511
+ log.error(`${origin}: ${err}`);
512
+ return callback(null, err);
513
+ }
514
+ }
515
+
516
+ /**
517
+ * @summary Get Appliances that match the filter
518
+ *
519
+ * @function getDevicesFiltered
520
+ * @param {Object} options - the data to use to filter the appliances (optional)
521
+ *
522
+ * @param {getCallback} callback - a callback function to return the result
523
+ * (appliances) or the error
524
+ */
525
+ getDevicesFiltered(options, callback) {
526
+ const meth = 'adapter-getDevicesFiltered';
527
+ const origin = `${this.id}-${meth}`;
528
+ log.trace(origin);
529
+
530
+ try {
531
+ return super.getDevicesFiltered(options, callback);
532
+ } catch (err) {
533
+ log.error(`${origin}: ${err}`);
534
+ return callback(null, err);
535
+ }
536
+ }
537
+
538
+ /**
539
+ * @summary Gets the status for the provided appliance
540
+ *
541
+ * @function isAlive
542
+ * @param {String} deviceName - the deviceName of the appliance. (required)
543
+ *
544
+ * @param {configCallback} callback - callback function to return the result
545
+ * (appliance isAlive) or the error
546
+ */
547
+ isAlive(deviceName, callback) {
548
+ const meth = 'adapter-isAlive';
549
+ const origin = `${this.id}-${meth}`;
550
+ log.trace(origin);
551
+
552
+ try {
553
+ return super.isAlive(deviceName, callback);
554
+ } catch (err) {
555
+ log.error(`${origin}: ${err}`);
556
+ return callback(null, err);
557
+ }
558
+ }
559
+
560
+ /**
561
+ * @summary Gets a config for the provided Appliance
562
+ *
563
+ * @function getConfig
564
+ * @param {String} deviceName - the deviceName of the appliance. (required)
565
+ * @param {String} format - the desired format of the config. (optional)
566
+ *
567
+ * @param {configCallback} callback - callback function to return the result
568
+ * (appliance config) or the error
569
+ */
570
+ getConfig(deviceName, format, callback) {
571
+ const meth = 'adapter-getConfig';
572
+ const origin = `${this.id}-${meth}`;
573
+ log.trace(origin);
574
+
575
+ try {
576
+ return super.getConfig(deviceName, format, callback);
577
+ } catch (err) {
578
+ log.error(`${origin}: ${err}`);
579
+ return callback(null, err);
580
+ }
581
+ }
582
+
583
+ /**
584
+ * @summary Gets the device count from the system
585
+ *
586
+ * @function iapGetDeviceCount
587
+ *
588
+ * @param {getCallback} callback - callback function to return the result
589
+ * (count) or the error
590
+ */
591
+ iapGetDeviceCount(callback) {
592
+ const meth = 'adapter-iapGetDeviceCount';
593
+ const origin = `${this.id}-${meth}`;
594
+ log.trace(origin);
595
+
596
+ try {
597
+ return super.iapGetDeviceCount(callback);
598
+ } catch (err) {
599
+ log.error(`${origin}: ${err}`);
600
+ return callback(null, err);
601
+ }
602
+ }
603
+
604
+ /* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
424
605
  /**
425
606
  * Makes the requested generic call
426
607
  *
@@ -531,6 +712,116 @@ class Infoblox extends AdapterBaseCl {
531
712
  }
532
713
  }
533
714
 
715
+ /**
716
+ * Makes the requested generic call with no base path or version
717
+ *
718
+ * @function genericAdapterRequestNoBasePath
719
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
720
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
721
+ * @param {Object} queryData - the parameters to be put on the url (optional).
722
+ * Can be a stringified Object.
723
+ * @param {Object} requestBody - the body to add to the request (optional).
724
+ * Can be a stringified Object.
725
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
726
+ * Can be a stringified Object.
727
+ * @param {getCallback} callback - a callback function to return the result (Generics)
728
+ * or the error
729
+ */
730
+ genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
731
+ const meth = 'adapter-genericAdapterRequestNoBasePath';
732
+ const origin = `${this.id}-${meth}`;
733
+ log.trace(origin);
734
+
735
+ if (this.suspended && this.suspendMode === 'error') {
736
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
737
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
738
+ return callback(null, errorObj);
739
+ }
740
+
741
+ /* HERE IS WHERE YOU VALIDATE DATA */
742
+ if (uriPath === undefined || uriPath === null || uriPath === '') {
743
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
744
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
745
+ return callback(null, errorObj);
746
+ }
747
+ if (restMethod === undefined || restMethod === null || restMethod === '') {
748
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
749
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
750
+ return callback(null, errorObj);
751
+ }
752
+
753
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
754
+ // remove any leading / and split the uripath into path variables
755
+ let myPath = uriPath;
756
+ while (myPath.indexOf('/') === 0) {
757
+ myPath = myPath.substring(1);
758
+ }
759
+ const pathVars = myPath.split('/');
760
+ const queryParamsAvailable = queryData;
761
+ const queryParams = {};
762
+ const bodyVars = requestBody;
763
+
764
+ // loop in template. long callback arg name to avoid identifier conflicts
765
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
766
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
767
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
768
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
769
+ }
770
+ });
771
+
772
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
773
+ const reqObj = {
774
+ payload: bodyVars,
775
+ uriPathVars: pathVars,
776
+ uriQuery: queryParams,
777
+ uriOptions: {}
778
+ };
779
+ // add headers if provided
780
+ if (addlHeaders) {
781
+ reqObj.addlHeaders = addlHeaders;
782
+ }
783
+
784
+ // determine the call and return flag
785
+ let action = 'getGenericsNoBase';
786
+ let returnF = true;
787
+ if (restMethod.toUpperCase() === 'POST') {
788
+ action = 'createGenericNoBase';
789
+ } else if (restMethod.toUpperCase() === 'PUT') {
790
+ action = 'updateGenericNoBase';
791
+ } else if (restMethod.toUpperCase() === 'PATCH') {
792
+ action = 'patchGenericNoBase';
793
+ } else if (restMethod.toUpperCase() === 'DELETE') {
794
+ action = 'deleteGenericNoBase';
795
+ returnF = false;
796
+ }
797
+
798
+ try {
799
+ // Make the call -
800
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
801
+ return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
802
+ // if we received an error or their is no response on the results
803
+ // return an error
804
+ if (irReturnError) {
805
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
806
+ return callback(null, irReturnError);
807
+ }
808
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
809
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
810
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
811
+ return callback(null, errorObj);
812
+ }
813
+
814
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
815
+ // return the response
816
+ return callback(irReturnData, null);
817
+ });
818
+ } catch (ex) {
819
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
820
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
821
+ return callback(null, errorObj);
822
+ }
823
+ }
824
+
534
825
  /**
535
826
  * @callback healthCallback
536
827
  * @param {Object} result - the result of the get request (contains an id and a status)
@@ -2282,15 +2573,18 @@ class Infoblox extends AdapterBaseCl {
2282
2573
  }
2283
2574
 
2284
2575
  /**
2285
- * @summary This function will delete the registered ip-address
2576
+ * @summary This function will get the next network ips from the container
2286
2577
  *
2287
- * @function deleteHostRecordByHostName
2288
- * @param {String} hostName - The hostname of the registered IP address (required)
2578
+ * @function getNetworkContainerNextNetworkIps
2579
+ * @param {string} networkId - The network key of the registered network block (required)
2580
+ * @param {string} containerId - The container key of the registered network container (required)
2581
+ * @param {object} body - body param (required)
2582
+ * @param {object} query - query param (required)
2289
2583
  * @param {getCallback} callback - a callback function to return the result
2290
2584
  * (entities) or the error
2291
2585
  */
2292
- deleteHostRecordByHostName(hostName, callback) {
2293
- const meth = 'adapter-deleteHostRecordByHostName';
2586
+ getNetworkContainerNextNetworkIps(networkId, containerId, body, query, callback) {
2587
+ const meth = 'adapter-getNetworkContainerNextNetworkIps';
2294
2588
  const origin = `${this.id}-${meth}`;
2295
2589
  log.trace(origin);
2296
2590
 
@@ -2301,17 +2595,32 @@ class Infoblox extends AdapterBaseCl {
2301
2595
  }
2302
2596
 
2303
2597
  /* HERE IS WHERE YOU VALIDATE DATA */
2304
- if (hostName === undefined || hostName === null || hostName === '') {
2305
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['hostName'], null, null, null);
2598
+ if (networkId === undefined || networkId === null || networkId === '') {
2599
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['networkId'], null, null, null);
2600
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2601
+ return callback(null, errorObj);
2602
+ }
2603
+ if (containerId === undefined || containerId === null || containerId === '') {
2604
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['containerId'], null, null, null);
2605
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2606
+ return callback(null, errorObj);
2607
+ }
2608
+ if (body === undefined || body === null || body === '') {
2609
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
2610
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2611
+ return callback(null, errorObj);
2612
+ }
2613
+ if (query === undefined || query === null || query === '') {
2614
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['query'], null, null, null);
2306
2615
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2307
2616
  return callback(null, errorObj);
2308
2617
  }
2309
2618
 
2310
2619
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2311
- const queryParamsAvailable = {};
2620
+ const queryParamsAvailable = query;
2312
2621
  const queryParams = {};
2313
- const pathVars = [];
2314
- const bodyVars = {};
2622
+ const pathVars = [networkId, containerId];
2623
+ const bodyVars = body;
2315
2624
 
2316
2625
  // loop in template. long callback arg name to avoid identifier conflicts
2317
2626
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -2326,34 +2635,202 @@ class Infoblox extends AdapterBaseCl {
2326
2635
  const reqObj = {
2327
2636
  payload: bodyVars,
2328
2637
  uriPathVars: pathVars,
2329
- uriQuery: queryParams,
2330
- uriOptions: {
2331
- _return_as_object: 1
2332
- }
2638
+ uriQuery: queryParams
2333
2639
  };
2334
2640
 
2335
2641
  try {
2336
- return this.getHostKeyByHostName(hostName, (result, err) => {
2337
- if (err) {
2338
- return callback(null, err);
2642
+ // Make the call -
2643
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2644
+ return this.requestHandlerInst.identifyRequest('Networks', 'getNetworkContainerNextNetworkIps', reqObj, true, (irReturnData, irReturnError) => {
2645
+ // if we received an error or their is no response on the results
2646
+ // return an error
2647
+ if (irReturnError) {
2648
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
2649
+ return callback(null, irReturnError);
2339
2650
  }
2340
- let hostKeyadj = result.response[0]._ref;
2341
- const hostKeykPath = 'record:host/';
2342
-
2343
- if (hostKeyadj !== null && hostKeyadj.indexOf(hostKeykPath) === 0) {
2344
- hostKeyadj = hostKeyadj.substring(hostKeykPath.length);
2651
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
2652
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getNetworkContainerNextNetworkIps'], null, null, null);
2653
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2654
+ return callback(null, errorObj);
2345
2655
  }
2346
2656
 
2347
- reqObj.uriPathVars = [hostKeyadj];
2348
-
2349
- // Make the call -
2350
- // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2351
- return this.requestHandlerInst.identifyRequest('Records', 'deleteHostRecordByHostName', reqObj, true, (irReturnData, irReturnError) => {
2352
- // if we received an error or their is no response on the results
2353
- // return an error
2354
- if (irReturnError) {
2355
- /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
2356
- return callback(null, irReturnError);
2657
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
2658
+ // return the response
2659
+ return callback(irReturnData, null);
2660
+ });
2661
+ } catch (ex) {
2662
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
2663
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2664
+ return callback(null, errorObj);
2665
+ }
2666
+ }
2667
+
2668
+ /**
2669
+ * @summary This function will get the next network ips from the container
2670
+ *
2671
+ * @function getIpv6NetworkContainerNextNetworkIps
2672
+ * @param {string} networkId - The network key of the registered network block (required)
2673
+ * @param {string} containerId - The container key of the registered network container (required)
2674
+ * @param {object} body - body param (required)
2675
+ * @param {object} query - query param (required)
2676
+ * @param {getCallback} callback - a callback function to return the result
2677
+ * (entities) or the error
2678
+ */
2679
+ getIpv6NetworkContainerNextNetworkIps(networkId, containerId, body, query, callback) {
2680
+ const meth = 'adapter-getIpv6NetworkContainerNextNetworkIps';
2681
+ const origin = `${this.id}-${meth}`;
2682
+ log.trace(origin);
2683
+
2684
+ if (this.suspended && this.suspendMode === 'error') {
2685
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2686
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2687
+ return callback(null, errorObj);
2688
+ }
2689
+
2690
+ /* HERE IS WHERE YOU VALIDATE DATA */
2691
+ if (networkId === undefined || networkId === null || networkId === '') {
2692
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['networkId'], null, null, null);
2693
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2694
+ return callback(null, errorObj);
2695
+ }
2696
+ if (containerId === undefined || containerId === null || containerId === '') {
2697
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['containerId'], null, null, null);
2698
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2699
+ return callback(null, errorObj);
2700
+ }
2701
+ if (body === undefined || body === null || body === '') {
2702
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
2703
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2704
+ return callback(null, errorObj);
2705
+ }
2706
+ if (query === undefined || query === null || query === '') {
2707
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['query'], null, null, null);
2708
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2709
+ return callback(null, errorObj);
2710
+ }
2711
+
2712
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2713
+ const queryParamsAvailable = query;
2714
+ const queryParams = {};
2715
+ const pathVars = [networkId, containerId];
2716
+ const bodyVars = body;
2717
+
2718
+ // loop in template. long callback arg name to avoid identifier conflicts
2719
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
2720
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
2721
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
2722
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
2723
+ }
2724
+ });
2725
+
2726
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2727
+ // see adapter code documentation for more information on the request object's fields
2728
+ const reqObj = {
2729
+ payload: bodyVars,
2730
+ uriPathVars: pathVars,
2731
+ uriQuery: queryParams
2732
+ };
2733
+
2734
+ try {
2735
+ // Make the call -
2736
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2737
+ return this.requestHandlerInst.identifyRequest('Networks', 'getIpv6NetworkContainerNextNetworkIps', reqObj, true, (irReturnData, irReturnError) => {
2738
+ // if we received an error or their is no response on the results
2739
+ // return an error
2740
+ if (irReturnError) {
2741
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
2742
+ return callback(null, irReturnError);
2743
+ }
2744
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
2745
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getIpv6NetworkContainerNextNetworkIps'], null, null, null);
2746
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2747
+ return callback(null, errorObj);
2748
+ }
2749
+
2750
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
2751
+ // return the response
2752
+ return callback(irReturnData, null);
2753
+ });
2754
+ } catch (ex) {
2755
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
2756
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2757
+ return callback(null, errorObj);
2758
+ }
2759
+ }
2760
+
2761
+ /**
2762
+ * @summary This function will delete the registered ip-address
2763
+ *
2764
+ * @function deleteHostRecordByHostName
2765
+ * @param {String} hostName - The hostname of the registered IP address (required)
2766
+ * @param {getCallback} callback - a callback function to return the result
2767
+ * (entities) or the error
2768
+ */
2769
+ deleteHostRecordByHostName(hostName, callback) {
2770
+ const meth = 'adapter-deleteHostRecordByHostName';
2771
+ const origin = `${this.id}-${meth}`;
2772
+ log.trace(origin);
2773
+
2774
+ if (this.suspended && this.suspendMode === 'error') {
2775
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2776
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2777
+ return callback(null, errorObj);
2778
+ }
2779
+
2780
+ /* HERE IS WHERE YOU VALIDATE DATA */
2781
+ if (hostName === undefined || hostName === null || hostName === '') {
2782
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['hostName'], null, null, null);
2783
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2784
+ return callback(null, errorObj);
2785
+ }
2786
+
2787
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2788
+ const queryParamsAvailable = {};
2789
+ const queryParams = {};
2790
+ const pathVars = [];
2791
+ const bodyVars = {};
2792
+
2793
+ // loop in template. long callback arg name to avoid identifier conflicts
2794
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
2795
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
2796
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
2797
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
2798
+ }
2799
+ });
2800
+
2801
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2802
+ // see adapter code documentation for more information on the request object's fields
2803
+ const reqObj = {
2804
+ payload: bodyVars,
2805
+ uriPathVars: pathVars,
2806
+ uriQuery: queryParams,
2807
+ uriOptions: {
2808
+ _return_as_object: 1
2809
+ }
2810
+ };
2811
+
2812
+ try {
2813
+ return this.getHostKeyByHostName(hostName, (result, err) => {
2814
+ if (err) {
2815
+ return callback(null, err);
2816
+ }
2817
+ let hostKeyadj = result.response[0]._ref;
2818
+ const hostKeykPath = 'record:host/';
2819
+
2820
+ if (hostKeyadj !== null && hostKeyadj.indexOf(hostKeykPath) === 0) {
2821
+ hostKeyadj = hostKeyadj.substring(hostKeykPath.length);
2822
+ }
2823
+
2824
+ reqObj.uriPathVars = [hostKeyadj];
2825
+
2826
+ // Make the call -
2827
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2828
+ return this.requestHandlerInst.identifyRequest('Records', 'deleteHostRecordByHostName', reqObj, true, (irReturnData, irReturnError) => {
2829
+ // if we received an error or their is no response on the results
2830
+ // return an error
2831
+ if (irReturnError) {
2832
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
2833
+ return callback(null, irReturnError);
2357
2834
  }
2358
2835
 
2359
2836
  /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
@@ -7341,15 +7818,15 @@ class Infoblox extends AdapterBaseCl {
7341
7818
  }
7342
7819
 
7343
7820
  /**
7344
- * @summary Creates (POST) Network View
7821
+ * @summary GET Network view with Query
7345
7822
  *
7346
- * @function createNetworkView
7347
- * @param {object} body - body param
7823
+ * @function getNetworkViewWithQuery
7824
+ * @param {object} query - query param
7348
7825
  * @param {getCallback} callback - a callback function to return the result
7349
7826
  */
7350
7827
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
7351
- createNetworkView(body, callback) {
7352
- const meth = 'adapter-createNetworkView';
7828
+ getNetworkViewWithQuery(query, callback) {
7829
+ const meth = 'adapter-getNetworkViewWithQuery';
7353
7830
  const origin = `${this.id}-${meth}`;
7354
7831
  log.trace(origin);
7355
7832
 
@@ -7360,17 +7837,12 @@ class Infoblox extends AdapterBaseCl {
7360
7837
  }
7361
7838
 
7362
7839
  /* HERE IS WHERE YOU VALIDATE DATA */
7363
- if (body === undefined || body === null || body === '') {
7364
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
7365
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7366
- return callback(null, errorObj);
7367
- }
7368
7840
 
7369
7841
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7370
- const queryParamsAvailable = {};
7842
+ const queryParamsAvailable = query;
7371
7843
  const queryParams = {};
7372
7844
  const pathVars = [];
7373
- const bodyVars = body;
7845
+ const bodyVars = {};
7374
7846
 
7375
7847
  // loop in template. long callback arg name to avoid identifier conflicts
7376
7848
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -7390,7 +7862,7 @@ class Infoblox extends AdapterBaseCl {
7390
7862
  try {
7391
7863
  // Make the call -
7392
7864
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7393
- return this.requestHandlerInst.identifyRequest('NetworkViewsAndDNSViews', 'createNetworkView', reqObj, true, (irReturnData, irReturnError) => {
7865
+ return this.requestHandlerInst.identifyRequest('NetworkViewsAndDNSViews', 'getNetworkView', reqObj, true, (irReturnData, irReturnError) => {
7394
7866
  // if we received an error or their is no response on the results
7395
7867
  // return an error
7396
7868
  if (irReturnError) {
@@ -7398,7 +7870,7 @@ class Infoblox extends AdapterBaseCl {
7398
7870
  return callback(null, irReturnError);
7399
7871
  }
7400
7872
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
7401
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['createNetworkView'], null, null, null);
7873
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getNetworkViewWithQuery'], null, null, null);
7402
7874
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7403
7875
  return callback(null, errorObj);
7404
7876
  }
@@ -7415,15 +7887,15 @@ class Infoblox extends AdapterBaseCl {
7415
7887
  }
7416
7888
 
7417
7889
  /**
7418
- * @summary GET Fixed address MAC
7890
+ * @summary Creates (POST) Network View
7419
7891
  *
7420
- * @function getFixedAddressMac
7421
- * @param {string} mac - mac param
7892
+ * @function createNetworkView
7893
+ * @param {object} body - body param
7422
7894
  * @param {getCallback} callback - a callback function to return the result
7423
7895
  */
7424
7896
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
7425
- getFixedAddressMac(mac, callback) {
7426
- const meth = 'adapter-getFixedAddressMac';
7897
+ createNetworkView(body, callback) {
7898
+ const meth = 'adapter-createNetworkView';
7427
7899
  const origin = `${this.id}-${meth}`;
7428
7900
  log.trace(origin);
7429
7901
 
@@ -7434,17 +7906,17 @@ class Infoblox extends AdapterBaseCl {
7434
7906
  }
7435
7907
 
7436
7908
  /* HERE IS WHERE YOU VALIDATE DATA */
7437
- if (mac === undefined || mac === null || mac === '') {
7438
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['mac'], null, null, null);
7909
+ if (body === undefined || body === null || body === '') {
7910
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
7439
7911
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7440
7912
  return callback(null, errorObj);
7441
7913
  }
7442
7914
 
7443
7915
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7444
- const queryParamsAvailable = { mac };
7916
+ const queryParamsAvailable = {};
7445
7917
  const queryParams = {};
7446
7918
  const pathVars = [];
7447
- const bodyVars = {};
7919
+ const bodyVars = body;
7448
7920
 
7449
7921
  // loop in template. long callback arg name to avoid identifier conflicts
7450
7922
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -7464,7 +7936,7 @@ class Infoblox extends AdapterBaseCl {
7464
7936
  try {
7465
7937
  // Make the call -
7466
7938
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7467
- return this.requestHandlerInst.identifyRequest('FixedAddresses', 'getFixedAddressMac', reqObj, true, (irReturnData, irReturnError) => {
7939
+ return this.requestHandlerInst.identifyRequest('NetworkViewsAndDNSViews', 'createNetworkView', reqObj, true, (irReturnData, irReturnError) => {
7468
7940
  // if we received an error or their is no response on the results
7469
7941
  // return an error
7470
7942
  if (irReturnError) {
@@ -7472,7 +7944,7 @@ class Infoblox extends AdapterBaseCl {
7472
7944
  return callback(null, irReturnError);
7473
7945
  }
7474
7946
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
7475
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getFixedAddressMac'], null, null, null);
7947
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['createNetworkView'], null, null, null);
7476
7948
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7477
7949
  return callback(null, errorObj);
7478
7950
  }
@@ -7489,15 +7961,16 @@ class Infoblox extends AdapterBaseCl {
7489
7961
  }
7490
7962
 
7491
7963
  /**
7492
- * @summary Creates (POST) Fixed Address
7964
+ * @summary GET Network view By Id
7493
7965
  *
7494
- * @function createFixedAddress
7495
- * @param {object} body - body param
7966
+ * @function getNetworkViewById
7967
+ * @param {string} viewId - network view id
7968
+ * @param {object} query - query param
7496
7969
  * @param {getCallback} callback - a callback function to return the result
7497
7970
  */
7498
7971
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
7499
- createFixedAddress(body, callback) {
7500
- const meth = 'adapter-createFixedAddress';
7972
+ getNetworkViewById(viewId, query, callback) {
7973
+ const meth = 'adapter-getNetworkViewById';
7501
7974
  const origin = `${this.id}-${meth}`;
7502
7975
  log.trace(origin);
7503
7976
 
@@ -7508,17 +7981,17 @@ class Infoblox extends AdapterBaseCl {
7508
7981
  }
7509
7982
 
7510
7983
  /* HERE IS WHERE YOU VALIDATE DATA */
7511
- if (body === undefined || body === null || body === '') {
7512
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
7984
+ if (viewId === undefined || viewId === null || viewId === '') {
7985
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['viewId'], null, null, null);
7513
7986
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7514
7987
  return callback(null, errorObj);
7515
7988
  }
7516
7989
 
7517
7990
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7518
- const queryParamsAvailable = {};
7991
+ const queryParamsAvailable = query;
7519
7992
  const queryParams = {};
7520
- const pathVars = [];
7521
- const bodyVars = body;
7993
+ const pathVars = [viewId];
7994
+ const bodyVars = {};
7522
7995
 
7523
7996
  // loop in template. long callback arg name to avoid identifier conflicts
7524
7997
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -7538,7 +8011,7 @@ class Infoblox extends AdapterBaseCl {
7538
8011
  try {
7539
8012
  // Make the call -
7540
8013
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7541
- return this.requestHandlerInst.identifyRequest('FixedAddresses', 'createFixedAddress', reqObj, true, (irReturnData, irReturnError) => {
8014
+ return this.requestHandlerInst.identifyRequest('NetworkViewsAndDNSViews', 'getNetworkViewById', reqObj, true, (irReturnData, irReturnError) => {
7542
8015
  // if we received an error or their is no response on the results
7543
8016
  // return an error
7544
8017
  if (irReturnError) {
@@ -7546,7 +8019,7 @@ class Infoblox extends AdapterBaseCl {
7546
8019
  return callback(null, irReturnError);
7547
8020
  }
7548
8021
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
7549
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['createFixedAddress'], null, null, null);
8022
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getNetworkViewById'], null, null, null);
7550
8023
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7551
8024
  return callback(null, errorObj);
7552
8025
  }
@@ -7563,14 +8036,15 @@ class Infoblox extends AdapterBaseCl {
7563
8036
  }
7564
8037
 
7565
8038
  /**
7566
- * @summary GET Members
8039
+ * @summary Update Network view
7567
8040
  *
7568
- * @function getMembers
8041
+ * @function updateNetworkView
8042
+ * @param {string} viewId - network view id
7569
8043
  * @param {getCallback} callback - a callback function to return the result
7570
8044
  */
7571
8045
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
7572
- getMembers(callback) {
7573
- const meth = 'adapter-getMembers';
8046
+ updateNetworkView(viewId, callback) {
8047
+ const meth = 'adapter-updateNetworkView';
7574
8048
  const origin = `${this.id}-${meth}`;
7575
8049
  log.trace(origin);
7576
8050
 
@@ -7581,15 +8055,37 @@ class Infoblox extends AdapterBaseCl {
7581
8055
  }
7582
8056
 
7583
8057
  /* HERE IS WHERE YOU VALIDATE DATA */
8058
+ if (viewId === undefined || viewId === null || viewId === '') {
8059
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['viewId'], null, null, null);
8060
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8061
+ return callback(null, errorObj);
8062
+ }
7584
8063
 
7585
8064
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8065
+ const queryParamsAvailable = {};
8066
+ const queryParams = {};
8067
+ const pathVars = [viewId];
8068
+ const bodyVars = {};
8069
+
8070
+ // loop in template. long callback arg name to avoid identifier conflicts
8071
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
8072
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
8073
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
8074
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
8075
+ }
8076
+ });
8077
+
7586
8078
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
7587
- const reqObj = null;
8079
+ const reqObj = {
8080
+ payload: bodyVars,
8081
+ uriPathVars: pathVars,
8082
+ uriQuery: queryParams
8083
+ };
7588
8084
 
7589
8085
  try {
7590
8086
  // Make the call -
7591
8087
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7592
- return this.requestHandlerInst.identifyRequest('Members', 'getMembers', reqObj, true, (irReturnData, irReturnError) => {
8088
+ return this.requestHandlerInst.identifyRequest('NetworkViewsAndDNSViews', 'updateNetworkView', reqObj, true, (irReturnData, irReturnError) => {
7593
8089
  // if we received an error or their is no response on the results
7594
8090
  // return an error
7595
8091
  if (irReturnError) {
@@ -7597,7 +8093,7 @@ class Infoblox extends AdapterBaseCl {
7597
8093
  return callback(null, irReturnError);
7598
8094
  }
7599
8095
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
7600
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getMembers'], null, null, null);
8096
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['updateNetworkView'], null, null, null);
7601
8097
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7602
8098
  return callback(null, errorObj);
7603
8099
  }
@@ -7614,15 +8110,15 @@ class Infoblox extends AdapterBaseCl {
7614
8110
  }
7615
8111
 
7616
8112
  /**
7617
- * @summary Creates (POST) Member
8113
+ * @summary Delete Network view
7618
8114
  *
7619
- * @function createMember
7620
- * @param {object} body - body param
8115
+ * @function deleteNetworkView
8116
+ * @param {string} viewId - network view id
7621
8117
  * @param {getCallback} callback - a callback function to return the result
7622
8118
  */
7623
8119
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
7624
- createMember(body, callback) {
7625
- const meth = 'adapter-createMember';
8120
+ deleteNetworkView(viewId, callback) {
8121
+ const meth = 'adapter-deleteNetworkView';
7626
8122
  const origin = `${this.id}-${meth}`;
7627
8123
  log.trace(origin);
7628
8124
 
@@ -7633,8 +8129,8 @@ class Infoblox extends AdapterBaseCl {
7633
8129
  }
7634
8130
 
7635
8131
  /* HERE IS WHERE YOU VALIDATE DATA */
7636
- if (body === undefined || body === null || body === '') {
7637
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
8132
+ if (viewId === undefined || viewId === null || viewId === '') {
8133
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['viewId'], null, null, null);
7638
8134
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7639
8135
  return callback(null, errorObj);
7640
8136
  }
@@ -7642,8 +8138,8 @@ class Infoblox extends AdapterBaseCl {
7642
8138
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7643
8139
  const queryParamsAvailable = {};
7644
8140
  const queryParams = {};
7645
- const pathVars = [];
7646
- const bodyVars = body;
8141
+ const pathVars = [viewId];
8142
+ const bodyVars = {};
7647
8143
 
7648
8144
  // loop in template. long callback arg name to avoid identifier conflicts
7649
8145
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -7663,7 +8159,7 @@ class Infoblox extends AdapterBaseCl {
7663
8159
  try {
7664
8160
  // Make the call -
7665
8161
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7666
- return this.requestHandlerInst.identifyRequest('Members', 'createMember', reqObj, true, (irReturnData, irReturnError) => {
8162
+ return this.requestHandlerInst.identifyRequest('NetworkViewsAndDNSViews', 'deleteNetworkView', reqObj, true, (irReturnData, irReturnError) => {
7667
8163
  // if we received an error or their is no response on the results
7668
8164
  // return an error
7669
8165
  if (irReturnError) {
@@ -7671,7 +8167,7 @@ class Infoblox extends AdapterBaseCl {
7671
8167
  return callback(null, irReturnError);
7672
8168
  }
7673
8169
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
7674
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['createMember'], null, null, null);
8170
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['deleteNetworkView'], null, null, null);
7675
8171
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7676
8172
  return callback(null, errorObj);
7677
8173
  }
@@ -7688,9 +8184,282 @@ class Infoblox extends AdapterBaseCl {
7688
8184
  }
7689
8185
 
7690
8186
  /**
7691
- * @summary GET grid
8187
+ * @summary GET Fixed address MAC
7692
8188
  *
7693
- * @function getGrid
8189
+ * @function getFixedAddressMac
8190
+ * @param {string} mac - mac param
8191
+ * @param {getCallback} callback - a callback function to return the result
8192
+ */
8193
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
8194
+ getFixedAddressMac(mac, callback) {
8195
+ const meth = 'adapter-getFixedAddressMac';
8196
+ const origin = `${this.id}-${meth}`;
8197
+ log.trace(origin);
8198
+
8199
+ if (this.suspended && this.suspendMode === 'error') {
8200
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8201
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8202
+ return callback(null, errorObj);
8203
+ }
8204
+
8205
+ /* HERE IS WHERE YOU VALIDATE DATA */
8206
+ if (mac === undefined || mac === null || mac === '') {
8207
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['mac'], null, null, null);
8208
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8209
+ return callback(null, errorObj);
8210
+ }
8211
+
8212
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8213
+ const queryParamsAvailable = { mac };
8214
+ const queryParams = {};
8215
+ const pathVars = [];
8216
+ const bodyVars = {};
8217
+
8218
+ // loop in template. long callback arg name to avoid identifier conflicts
8219
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
8220
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
8221
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
8222
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
8223
+ }
8224
+ });
8225
+
8226
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
8227
+ const reqObj = {
8228
+ payload: bodyVars,
8229
+ uriPathVars: pathVars,
8230
+ uriQuery: queryParams
8231
+ };
8232
+
8233
+ try {
8234
+ // Make the call -
8235
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8236
+ return this.requestHandlerInst.identifyRequest('FixedAddresses', 'getFixedAddressMac', reqObj, true, (irReturnData, irReturnError) => {
8237
+ // if we received an error or their is no response on the results
8238
+ // return an error
8239
+ if (irReturnError) {
8240
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
8241
+ return callback(null, irReturnError);
8242
+ }
8243
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
8244
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getFixedAddressMac'], null, null, null);
8245
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8246
+ return callback(null, errorObj);
8247
+ }
8248
+
8249
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
8250
+ // return the response
8251
+ return callback(irReturnData, null);
8252
+ });
8253
+ } catch (ex) {
8254
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
8255
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8256
+ return callback(null, errorObj);
8257
+ }
8258
+ }
8259
+
8260
+ /**
8261
+ * @summary Creates (POST) Fixed Address
8262
+ *
8263
+ * @function createFixedAddress
8264
+ * @param {object} body - body param
8265
+ * @param {getCallback} callback - a callback function to return the result
8266
+ */
8267
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
8268
+ createFixedAddress(body, callback) {
8269
+ const meth = 'adapter-createFixedAddress';
8270
+ const origin = `${this.id}-${meth}`;
8271
+ log.trace(origin);
8272
+
8273
+ if (this.suspended && this.suspendMode === 'error') {
8274
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8275
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8276
+ return callback(null, errorObj);
8277
+ }
8278
+
8279
+ /* HERE IS WHERE YOU VALIDATE DATA */
8280
+ if (body === undefined || body === null || body === '') {
8281
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
8282
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8283
+ return callback(null, errorObj);
8284
+ }
8285
+
8286
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8287
+ const queryParamsAvailable = {};
8288
+ const queryParams = {};
8289
+ const pathVars = [];
8290
+ const bodyVars = body;
8291
+
8292
+ // loop in template. long callback arg name to avoid identifier conflicts
8293
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
8294
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
8295
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
8296
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
8297
+ }
8298
+ });
8299
+
8300
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
8301
+ const reqObj = {
8302
+ payload: bodyVars,
8303
+ uriPathVars: pathVars,
8304
+ uriQuery: queryParams
8305
+ };
8306
+
8307
+ try {
8308
+ // Make the call -
8309
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8310
+ return this.requestHandlerInst.identifyRequest('FixedAddresses', 'createFixedAddress', reqObj, true, (irReturnData, irReturnError) => {
8311
+ // if we received an error or their is no response on the results
8312
+ // return an error
8313
+ if (irReturnError) {
8314
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
8315
+ return callback(null, irReturnError);
8316
+ }
8317
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
8318
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['createFixedAddress'], null, null, null);
8319
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8320
+ return callback(null, errorObj);
8321
+ }
8322
+
8323
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
8324
+ // return the response
8325
+ return callback(irReturnData, null);
8326
+ });
8327
+ } catch (ex) {
8328
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
8329
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8330
+ return callback(null, errorObj);
8331
+ }
8332
+ }
8333
+
8334
+ /**
8335
+ * @summary GET Members
8336
+ *
8337
+ * @function getMembers
8338
+ * @param {getCallback} callback - a callback function to return the result
8339
+ */
8340
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
8341
+ getMembers(callback) {
8342
+ const meth = 'adapter-getMembers';
8343
+ const origin = `${this.id}-${meth}`;
8344
+ log.trace(origin);
8345
+
8346
+ if (this.suspended && this.suspendMode === 'error') {
8347
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8348
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8349
+ return callback(null, errorObj);
8350
+ }
8351
+
8352
+ /* HERE IS WHERE YOU VALIDATE DATA */
8353
+
8354
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8355
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
8356
+ const reqObj = null;
8357
+
8358
+ try {
8359
+ // Make the call -
8360
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8361
+ return this.requestHandlerInst.identifyRequest('Members', 'getMembers', reqObj, true, (irReturnData, irReturnError) => {
8362
+ // if we received an error or their is no response on the results
8363
+ // return an error
8364
+ if (irReturnError) {
8365
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
8366
+ return callback(null, irReturnError);
8367
+ }
8368
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
8369
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getMembers'], null, null, null);
8370
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8371
+ return callback(null, errorObj);
8372
+ }
8373
+
8374
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
8375
+ // return the response
8376
+ return callback(irReturnData, null);
8377
+ });
8378
+ } catch (ex) {
8379
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
8380
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8381
+ return callback(null, errorObj);
8382
+ }
8383
+ }
8384
+
8385
+ /**
8386
+ * @summary Creates (POST) Member
8387
+ *
8388
+ * @function createMember
8389
+ * @param {object} body - body param
8390
+ * @param {getCallback} callback - a callback function to return the result
8391
+ */
8392
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
8393
+ createMember(body, callback) {
8394
+ const meth = 'adapter-createMember';
8395
+ const origin = `${this.id}-${meth}`;
8396
+ log.trace(origin);
8397
+
8398
+ if (this.suspended && this.suspendMode === 'error') {
8399
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8400
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8401
+ return callback(null, errorObj);
8402
+ }
8403
+
8404
+ /* HERE IS WHERE YOU VALIDATE DATA */
8405
+ if (body === undefined || body === null || body === '') {
8406
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
8407
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8408
+ return callback(null, errorObj);
8409
+ }
8410
+
8411
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8412
+ const queryParamsAvailable = {};
8413
+ const queryParams = {};
8414
+ const pathVars = [];
8415
+ const bodyVars = body;
8416
+
8417
+ // loop in template. long callback arg name to avoid identifier conflicts
8418
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
8419
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
8420
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
8421
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
8422
+ }
8423
+ });
8424
+
8425
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
8426
+ const reqObj = {
8427
+ payload: bodyVars,
8428
+ uriPathVars: pathVars,
8429
+ uriQuery: queryParams
8430
+ };
8431
+
8432
+ try {
8433
+ // Make the call -
8434
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8435
+ return this.requestHandlerInst.identifyRequest('Members', 'createMember', reqObj, true, (irReturnData, irReturnError) => {
8436
+ // if we received an error or their is no response on the results
8437
+ // return an error
8438
+ if (irReturnError) {
8439
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
8440
+ return callback(null, irReturnError);
8441
+ }
8442
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
8443
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['createMember'], null, null, null);
8444
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8445
+ return callback(null, errorObj);
8446
+ }
8447
+
8448
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
8449
+ // return the response
8450
+ return callback(irReturnData, null);
8451
+ });
8452
+ } catch (ex) {
8453
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
8454
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8455
+ return callback(null, errorObj);
8456
+ }
8457
+ }
8458
+
8459
+ /**
8460
+ * @summary GET grid
8461
+ *
8462
+ * @function getGrid
7694
8463
  * @param {getCallback} callback - a callback function to return the result
7695
8464
  */
7696
8465
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
@@ -7714,7 +8483,58 @@ class Infoblox extends AdapterBaseCl {
7714
8483
  try {
7715
8484
  // Make the call -
7716
8485
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7717
- return this.requestHandlerInst.identifyRequest('Services', 'getGrid', reqObj, true, (irReturnData, irReturnError) => {
8486
+ return this.requestHandlerInst.identifyRequest('Services', 'getGrid', reqObj, true, (irReturnData, irReturnError) => {
8487
+ // if we received an error or their is no response on the results
8488
+ // return an error
8489
+ if (irReturnError) {
8490
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
8491
+ return callback(null, irReturnError);
8492
+ }
8493
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
8494
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getGrid'], null, null, null);
8495
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8496
+ return callback(null, errorObj);
8497
+ }
8498
+
8499
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
8500
+ // return the response
8501
+ return callback(irReturnData, null);
8502
+ });
8503
+ } catch (ex) {
8504
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
8505
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8506
+ return callback(null, errorObj);
8507
+ }
8508
+ }
8509
+
8510
+ /**
8511
+ * @summary GET grid status
8512
+ *
8513
+ * @function getGridStatus
8514
+ * @param {getCallback} callback - a callback function to return the result
8515
+ */
8516
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
8517
+ getGridStatus(callback) {
8518
+ const meth = 'adapter-getGridStatus';
8519
+ const origin = `${this.id}-${meth}`;
8520
+ log.trace(origin);
8521
+
8522
+ if (this.suspended && this.suspendMode === 'error') {
8523
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8524
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8525
+ return callback(null, errorObj);
8526
+ }
8527
+
8528
+ /* HERE IS WHERE YOU VALIDATE DATA */
8529
+
8530
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8531
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
8532
+ const reqObj = null;
8533
+
8534
+ try {
8535
+ // Make the call -
8536
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8537
+ return this.requestHandlerInst.identifyRequest('Services', 'getGridStatus', reqObj, true, (irReturnData, irReturnError) => {
7718
8538
  // if we received an error or their is no response on the results
7719
8539
  // return an error
7720
8540
  if (irReturnError) {
@@ -7722,7 +8542,7 @@ class Infoblox extends AdapterBaseCl {
7722
8542
  return callback(null, irReturnError);
7723
8543
  }
7724
8544
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
7725
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getGrid'], null, null, null);
8545
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getGridStatus'], null, null, null);
7726
8546
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7727
8547
  return callback(null, errorObj);
7728
8548
  }
@@ -8187,6 +9007,75 @@ class Infoblox extends AdapterBaseCl {
8187
9007
  }
8188
9008
  }
8189
9009
 
9010
+ /**
9011
+ * @summary GET Extensible Attribute definition With Query
9012
+ *
9013
+ * @function getExtensibleAttributeDefinitionWithQuery
9014
+ * @param {object} query - query param
9015
+ * @param {getCallback} callback - a callback function to return the result
9016
+ */
9017
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
9018
+ getExtensibleAttributeDefinitionWithQuery(query, callback) {
9019
+ const meth = 'adapter-getExtensibleAttributeDefinitionWithQuery';
9020
+ const origin = `${this.id}-${meth}`;
9021
+ log.trace(origin);
9022
+
9023
+ if (this.suspended && this.suspendMode === 'error') {
9024
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9025
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9026
+ return callback(null, errorObj);
9027
+ }
9028
+
9029
+ /* HERE IS WHERE YOU VALIDATE DATA */
9030
+
9031
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
9032
+ const queryParamsAvailable = query;
9033
+ const queryParams = {};
9034
+ const pathVars = [];
9035
+ const bodyVars = {};
9036
+
9037
+ // loop in template. long callback arg name to avoid identifier conflicts
9038
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
9039
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
9040
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
9041
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
9042
+ }
9043
+ });
9044
+
9045
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
9046
+ const reqObj = {
9047
+ payload: bodyVars,
9048
+ uriPathVars: pathVars,
9049
+ uriQuery: queryParams
9050
+ };
9051
+
9052
+ try {
9053
+ // Make the call -
9054
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
9055
+ return this.requestHandlerInst.identifyRequest('ExtensibleAttributes', 'getExtensibleAttributeDefinition', reqObj, true, (irReturnData, irReturnError) => {
9056
+ // if we received an error or their is no response on the results
9057
+ // return an error
9058
+ if (irReturnError) {
9059
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
9060
+ return callback(null, irReturnError);
9061
+ }
9062
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
9063
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getExtensibleAttributeDefinitionWithQuery'], null, null, null);
9064
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9065
+ return callback(null, errorObj);
9066
+ }
9067
+
9068
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
9069
+ // return the response
9070
+ return callback(irReturnData, null);
9071
+ });
9072
+ } catch (ex) {
9073
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
9074
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9075
+ return callback(null, errorObj);
9076
+ }
9077
+ }
9078
+
8190
9079
  /**
8191
9080
  * @summary Creates (POST) Extensible Attribute Definition
8192
9081
  *
@@ -8261,6 +9150,229 @@ class Infoblox extends AdapterBaseCl {
8261
9150
  }
8262
9151
  }
8263
9152
 
9153
+ /**
9154
+ * @summary GET Extensible Attribute definition By Id
9155
+ *
9156
+ * @function getExtensibleAttributeDefinitionById
9157
+ * @param {string} eaId - extensible attribute id
9158
+ * @param {object} query - query param
9159
+ * @param {getCallback} callback - a callback function to return the result
9160
+ */
9161
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
9162
+ getExtensibleAttributeDefinitionById(eaId, query, callback) {
9163
+ const meth = 'adapter-getExtensibleAttributeDefinitionById';
9164
+ const origin = `${this.id}-${meth}`;
9165
+ log.trace(origin);
9166
+
9167
+ if (this.suspended && this.suspendMode === 'error') {
9168
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9169
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9170
+ return callback(null, errorObj);
9171
+ }
9172
+
9173
+ /* HERE IS WHERE YOU VALIDATE DATA */
9174
+ if (!eaId) {
9175
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['eaId'], null, null, null);
9176
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9177
+ return callback(null, errorObj);
9178
+ }
9179
+
9180
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
9181
+ const queryParamsAvailable = query;
9182
+ const queryParams = {};
9183
+ const pathVars = [eaId];
9184
+ const bodyVars = {};
9185
+
9186
+ // loop in template. long callback arg name to avoid identifier conflicts
9187
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
9188
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
9189
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
9190
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
9191
+ }
9192
+ });
9193
+
9194
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
9195
+ const reqObj = {
9196
+ payload: bodyVars,
9197
+ uriPathVars: pathVars,
9198
+ uriQuery: queryParams
9199
+ };
9200
+
9201
+ try {
9202
+ // Make the call -
9203
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
9204
+ return this.requestHandlerInst.identifyRequest('ExtensibleAttributes', 'getExtensibleAttributeDefinitionById', reqObj, true, (irReturnData, irReturnError) => {
9205
+ // if we received an error or their is no response on the results
9206
+ // return an error
9207
+ if (irReturnError) {
9208
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
9209
+ return callback(null, irReturnError);
9210
+ }
9211
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
9212
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getExtensibleAttributeDefinitionById'], null, null, null);
9213
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9214
+ return callback(null, errorObj);
9215
+ }
9216
+
9217
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
9218
+ // return the response
9219
+ return callback(irReturnData, null);
9220
+ });
9221
+ } catch (ex) {
9222
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
9223
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9224
+ return callback(null, errorObj);
9225
+ }
9226
+ }
9227
+
9228
+ /**
9229
+ * @summary Update Extensible Attribute definition
9230
+ *
9231
+ * @function updateExtensibleAttributeDefinition
9232
+ * @param {string} eaId - extensible attribute id
9233
+ * @param {getCallback} callback - a callback function to return the result
9234
+ */
9235
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
9236
+ updateExtensibleAttributeDefinition(eaId, callback) {
9237
+ const meth = 'adapter-updateExtensibleAttributeDefinition';
9238
+ const origin = `${this.id}-${meth}`;
9239
+ log.trace(origin);
9240
+
9241
+ if (this.suspended && this.suspendMode === 'error') {
9242
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9243
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9244
+ return callback(null, errorObj);
9245
+ }
9246
+
9247
+ /* HERE IS WHERE YOU VALIDATE DATA */
9248
+ if (!eaId) {
9249
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['eaId'], null, null, null);
9250
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9251
+ return callback(null, errorObj);
9252
+ }
9253
+
9254
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
9255
+ const queryParamsAvailable = {};
9256
+ const queryParams = {};
9257
+ const pathVars = [eaId];
9258
+ const bodyVars = {};
9259
+
9260
+ // loop in template. long callback arg name to avoid identifier conflicts
9261
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
9262
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
9263
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
9264
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
9265
+ }
9266
+ });
9267
+
9268
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
9269
+ const reqObj = {
9270
+ payload: bodyVars,
9271
+ uriPathVars: pathVars,
9272
+ uriQuery: queryParams
9273
+ };
9274
+
9275
+ try {
9276
+ // Make the call -
9277
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
9278
+ return this.requestHandlerInst.identifyRequest('ExtensibleAttributes', 'updateExtensibleAttributeDefinition', reqObj, true, (irReturnData, irReturnError) => {
9279
+ // if we received an error or their is no response on the results
9280
+ // return an error
9281
+ if (irReturnError) {
9282
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
9283
+ return callback(null, irReturnError);
9284
+ }
9285
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
9286
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['updateExtensibleAttributeDefinition'], null, null, null);
9287
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9288
+ return callback(null, errorObj);
9289
+ }
9290
+
9291
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
9292
+ // return the response
9293
+ return callback(irReturnData, null);
9294
+ });
9295
+ } catch (ex) {
9296
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
9297
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9298
+ return callback(null, errorObj);
9299
+ }
9300
+ }
9301
+
9302
+ /**
9303
+ * @summary Delete Extensible Attribute definition
9304
+ *
9305
+ * @function deleteExtensibleAttributeDefinition
9306
+ * @param {string} eaId - extensible attribute id
9307
+ * @param {getCallback} callback - a callback function to return the result
9308
+ */
9309
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
9310
+ deleteExtensibleAttributeDefinition(eaId, callback) {
9311
+ const meth = 'adapter-deleteExtensibleAttributeDefinition';
9312
+ const origin = `${this.id}-${meth}`;
9313
+ log.trace(origin);
9314
+
9315
+ if (this.suspended && this.suspendMode === 'error') {
9316
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9317
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9318
+ return callback(null, errorObj);
9319
+ }
9320
+
9321
+ /* HERE IS WHERE YOU VALIDATE DATA */
9322
+ if (!eaId) {
9323
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['eaId'], null, null, null);
9324
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9325
+ return callback(null, errorObj);
9326
+ }
9327
+
9328
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
9329
+ const queryParamsAvailable = {};
9330
+ const queryParams = {};
9331
+ const pathVars = [eaId];
9332
+ const bodyVars = {};
9333
+
9334
+ // loop in template. long callback arg name to avoid identifier conflicts
9335
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
9336
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
9337
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
9338
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
9339
+ }
9340
+ });
9341
+
9342
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
9343
+ const reqObj = {
9344
+ payload: bodyVars,
9345
+ uriPathVars: pathVars,
9346
+ uriQuery: queryParams
9347
+ };
9348
+
9349
+ try {
9350
+ // Make the call -
9351
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
9352
+ return this.requestHandlerInst.identifyRequest('ExtensibleAttributes', 'deleteExtensibleAttributeDefinition', reqObj, true, (irReturnData, irReturnError) => {
9353
+ // if we received an error or their is no response on the results
9354
+ // return an error
9355
+ if (irReturnError) {
9356
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
9357
+ return callback(null, irReturnError);
9358
+ }
9359
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
9360
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['deleteExtensibleAttributeDefinition'], null, null, null);
9361
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9362
+ return callback(null, errorObj);
9363
+ }
9364
+
9365
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
9366
+ // return the response
9367
+ return callback(irReturnData, null);
9368
+ });
9369
+ } catch (ex) {
9370
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
9371
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9372
+ return callback(null, errorObj);
9373
+ }
9374
+ }
9375
+
8264
9376
  // generic object manipulation
8265
9377
 
8266
9378
  /**