@itentialopensource/adapter-phpipam 2.0.2 → 2.1.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 (49) hide show
  1. package/.eslintignore +1 -0
  2. package/AUTH.md +39 -0
  3. package/BROKER.md +199 -0
  4. package/CALLS.md +169 -0
  5. package/CHANGELOG.md +55 -21
  6. package/CODE_OF_CONDUCT.md +12 -17
  7. package/CONTRIBUTING.md +88 -74
  8. package/ENHANCE.md +69 -0
  9. package/PROPERTIES.md +641 -0
  10. package/README.md +228 -420
  11. package/SUMMARY.md +9 -0
  12. package/SYSTEMINFO.md +11 -0
  13. package/TROUBLESHOOT.md +47 -0
  14. package/adapter.js +1193 -47
  15. package/adapterBase.js +1270 -238
  16. package/entities/.generic/action.json +214 -0
  17. package/entities/.generic/schema.json +28 -0
  18. package/entities/.system/schemaTokenReq.json +0 -4
  19. package/error.json +12 -0
  20. package/package.json +44 -20
  21. package/pronghorn.json +656 -78
  22. package/propertiesDecorators.json +14 -0
  23. package/propertiesSchema.json +472 -4
  24. package/refs?service=git-upload-pack +0 -0
  25. package/report/adapterInfo.json +10 -0
  26. package/report/updateReport1615500653949.json +95 -0
  27. package/report/updateReport1653302326761.json +120 -0
  28. package/sampleProperties.json +102 -5
  29. package/test/integration/adapterTestBasicGet.js +85 -0
  30. package/test/integration/adapterTestConnectivity.js +93 -0
  31. package/test/integration/adapterTestIntegration.js +36 -105
  32. package/test/unit/adapterBaseTestUnit.js +949 -0
  33. package/test/unit/adapterTestUnit.js +667 -117
  34. package/utils/adapterInfo.js +206 -0
  35. package/utils/addAuth.js +94 -0
  36. package/utils/basicGet.js +50 -0
  37. package/utils/checkMigrate.js +63 -0
  38. package/utils/entitiesToDB.js +179 -0
  39. package/utils/findPath.js +74 -0
  40. package/utils/modify.js +154 -0
  41. package/utils/packModificationScript.js +1 -1
  42. package/utils/patches2bundledDeps.js +90 -0
  43. package/utils/pre-commit.sh +3 -0
  44. package/utils/removeHooks.js +20 -0
  45. package/utils/tbScript.js +184 -0
  46. package/utils/tbUtils.js +469 -0
  47. package/utils/testRunner.js +16 -16
  48. package/utils/troubleshootingAdapter.js +190 -0
  49. package/img/adapter.png +0 -0
package/adapter.js CHANGED
@@ -80,11 +80,37 @@ class Phpipam extends AdapterBaseCl {
80
80
  }
81
81
 
82
82
  /**
83
- * updateAdapterConfiguration is used to update any of the adapter configuration files. This
83
+ * @iapGetAdapterWorkflowFunctions
84
+ */
85
+ iapGetAdapterWorkflowFunctions(inIgnore) {
86
+ let myIgnore = [
87
+ 'healthCheck',
88
+ 'iapGetAdapterWorkflowFunctions',
89
+ 'iapHasAdapterEntity',
90
+ 'iapVerifyAdapterCapability',
91
+ 'iapUpdateAdapterEntityCache',
92
+ 'hasEntities',
93
+ 'getAuthorization'
94
+ ];
95
+ if (!inIgnore && Array.isArray(inIgnore)) {
96
+ myIgnore = inIgnore;
97
+ } else if (!inIgnore && typeof inIgnore === 'string') {
98
+ myIgnore = [inIgnore];
99
+ }
100
+
101
+ // The generic adapter functions should already be ignored (e.g. healthCheck)
102
+ // you can add specific methods that you do not want to be workflow functions to ignore like below
103
+ // myIgnore.push('myMethodNotInWorkflow');
104
+
105
+ return super.iapGetAdapterWorkflowFunctions(myIgnore);
106
+ }
107
+
108
+ /**
109
+ * iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
84
110
  * allows customers to make changes to adapter configuration without having to be on the
85
111
  * file system.
86
112
  *
87
- * @function updateAdapterConfiguration
113
+ * @function iapUpdateAdapterConfiguration
88
114
  * @param {string} configFile - the name of the file being updated (required)
89
115
  * @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
90
116
  * @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
@@ -92,59 +118,206 @@ class Phpipam extends AdapterBaseCl {
92
118
  * @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
93
119
  * @param {Callback} callback - The results of the call
94
120
  */
95
- updateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
96
- super.updateAdapterConfiguration(configFile, changes, entity, type, action, callback);
121
+ iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
122
+ const meth = 'adapter-iapUpdateAdapterConfiguration';
123
+ const origin = `${this.id}-${meth}`;
124
+ log.trace(origin);
125
+
126
+ super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
97
127
  }
98
128
 
99
129
  /**
100
- * @callback healthCallback
101
- * @param {Object} result - the result of the get request (contains an id and a status)
130
+ * See if the API path provided is found in this adapter
131
+ *
132
+ * @function iapFindAdapterPath
133
+ * @param {string} apiPath - the api path to check on
134
+ * @param {Callback} callback - The results of the call
102
135
  */
136
+ iapFindAdapterPath(apiPath, callback) {
137
+ const meth = 'adapter-iapFindAdapterPath';
138
+ const origin = `${this.id}-${meth}`;
139
+ log.trace(origin);
140
+
141
+ super.iapFindAdapterPath(apiPath, callback);
142
+ }
143
+
103
144
  /**
104
- * @callback getCallback
105
- * @param {Object} result - the result of the get request (entity/ies)
106
- * @param {String} error - any error that occurred
107
- */
145
+ * @summary Suspends adapter
146
+ *
147
+ * @function iapSuspendAdapter
148
+ * @param {Callback} callback - callback function
149
+ */
150
+ iapSuspendAdapter(mode, callback) {
151
+ const meth = 'adapter-iapSuspendAdapter';
152
+ const origin = `${this.id}-${meth}`;
153
+ log.trace(origin);
154
+
155
+ try {
156
+ return super.iapSuspendAdapter(mode, callback);
157
+ } catch (error) {
158
+ log.error(`${origin}: ${error}`);
159
+ return callback(null, error);
160
+ }
161
+ }
162
+
108
163
  /**
109
- * @callback createCallback
110
- * @param {Object} item - the newly created entity
111
- * @param {String} error - any error that occurred
112
- */
164
+ * @summary Unsuspends adapter
165
+ *
166
+ * @function iapUnsuspendAdapter
167
+ * @param {Callback} callback - callback function
168
+ */
169
+ iapUnsuspendAdapter(callback) {
170
+ const meth = 'adapter-iapUnsuspendAdapter';
171
+ const origin = `${this.id}-${meth}`;
172
+ log.trace(origin);
173
+
174
+ try {
175
+ return super.iapUnsuspendAdapter(callback);
176
+ } catch (error) {
177
+ log.error(`${origin}: ${error}`);
178
+ return callback(null, error);
179
+ }
180
+ }
181
+
113
182
  /**
114
- * @callback updateCallback
115
- * @param {String} status - the status of the update action
116
- * @param {String} error - any error that occurred
117
- */
183
+ * @summary Get the Adaoter Queue
184
+ *
185
+ * @function iapGetAdapterQueue
186
+ * @param {Callback} callback - callback function
187
+ */
188
+ iapGetAdapterQueue(callback) {
189
+ const meth = 'adapter-iapGetAdapterQueue';
190
+ const origin = `${this.id}-${meth}`;
191
+ log.trace(origin);
192
+
193
+ return super.iapGetAdapterQueue(callback);
194
+ }
195
+
118
196
  /**
119
- * @callback deleteCallback
120
- * @param {String} status - the status of the delete action
121
- * @param {String} error - any error that occurred
197
+ * @summary Runs troubleshoot scripts for adapter
198
+ *
199
+ * @function iapTroubleshootAdapter
200
+ * @param {Object} props - the connection, healthcheck and authentication properties
201
+ *
202
+ * @param {boolean} persistFlag - whether the adapter properties should be updated
203
+ * @param {Callback} callback - The results of the call
204
+ */
205
+ iapTroubleshootAdapter(props, persistFlag, callback) {
206
+ const meth = 'adapter-iapTroubleshootAdapter';
207
+ const origin = `${this.id}-${meth}`;
208
+ log.trace(origin);
209
+
210
+ try {
211
+ return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
212
+ } catch (error) {
213
+ log.error(`${origin}: ${error}`);
214
+ return callback(null, error);
215
+ }
216
+ }
217
+
218
+ /**
219
+ * @summary runs healthcheck script for adapter
220
+ *
221
+ * @function iapRunAdapterHealthcheck
222
+ * @param {Adapter} adapter - adapter instance to troubleshoot
223
+ * @param {Callback} callback - callback function
224
+ */
225
+ iapRunAdapterHealthcheck(callback) {
226
+ const meth = 'adapter-iapRunAdapterHealthcheck';
227
+ const origin = `${this.id}-${meth}`;
228
+ log.trace(origin);
229
+
230
+ try {
231
+ return super.iapRunAdapterHealthcheck(this, callback);
232
+ } catch (error) {
233
+ log.error(`${origin}: ${error}`);
234
+ return callback(null, error);
235
+ }
236
+ }
237
+
238
+ /**
239
+ * @summary runs connectivity check script for adapter
240
+ *
241
+ * @function iapRunAdapterConnectivity
242
+ * @param {Callback} callback - callback function
243
+ */
244
+ iapRunAdapterConnectivity(callback) {
245
+ const meth = 'adapter-iapRunAdapterConnectivity';
246
+ const origin = `${this.id}-${meth}`;
247
+ log.trace(origin);
248
+
249
+ try {
250
+ return super.iapRunAdapterConnectivity(callback);
251
+ } catch (error) {
252
+ log.error(`${origin}: ${error}`);
253
+ return callback(null, error);
254
+ }
255
+ }
256
+
257
+ /**
258
+ * @summary runs basicGet script for adapter
259
+ *
260
+ * @function iapRunAdapterBasicGet
261
+ * @param {Callback} callback - callback function
262
+ */
263
+ iapRunAdapterBasicGet(callback) {
264
+ const meth = 'adapter-iapRunAdapterBasicGet';
265
+ const origin = `${this.id}-${meth}`;
266
+ log.trace(origin);
267
+
268
+ try {
269
+ return super.iapRunAdapterBasicGet(callback);
270
+ } catch (error) {
271
+ log.error(`${origin}: ${error}`);
272
+ return callback(null, error);
273
+ }
274
+ }
275
+
276
+ /**
277
+ * @summary moves entites into Mongo DB
278
+ *
279
+ * @function iapMoveAdapterEntitiesToDB
280
+ * @param {getCallback} callback - a callback function to return the result (Generics)
281
+ * or the error
122
282
  */
283
+ iapMoveAdapterEntitiesToDB(callback) {
284
+ const meth = 'adapter-iapMoveAdapterEntitiesToDB';
285
+ const origin = `${this.id}-${meth}`;
286
+ log.trace(origin);
123
287
 
288
+ try {
289
+ return super.iapMoveAdapterEntitiesToDB(callback);
290
+ } catch (err) {
291
+ log.error(`${origin}: ${err}`);
292
+ return callback(null, err);
293
+ }
294
+ }
295
+
296
+ /* BROKER CALLS */
124
297
  /**
125
298
  * @summary Determines if this adapter supports the specific entity
126
299
  *
127
- * @function hasEntity
300
+ * @function iapHasAdapterEntity
128
301
  * @param {String} entityType - the entity type to check for
129
302
  * @param {String/Array} entityId - the specific entity we are looking for
130
303
  *
131
304
  * @param {Callback} callback - An array of whether the adapter can has the
132
305
  * desired capability or an error
133
306
  */
134
- hasEntity(entityType, entityId, callback) {
135
- const origin = `${this.id}-adapter-hasEntity`;
307
+ iapHasAdapterEntity(entityType, entityId, callback) {
308
+ const origin = `${this.id}-adapter-iapHasAdapterEntity`;
136
309
  log.trace(origin);
137
310
 
138
311
  // Make the call -
139
- // verifyCapability(entityType, actionType, entityId, callback)
140
- return this.verifyCapability(entityType, null, entityId, callback);
312
+ // iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
313
+ return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
141
314
  }
142
315
 
143
316
  /**
144
317
  * @summary Provides a way for the adapter to tell north bound integrations
145
318
  * whether the adapter supports type, action and specific entity
146
319
  *
147
- * @function verifyCapability
320
+ * @function iapVerifyAdapterCapability
148
321
  * @param {String} entityType - the entity type to check for
149
322
  * @param {String} actionType - the action type to check for
150
323
  * @param {String/Array} entityId - the specific entity we are looking for
@@ -152,15 +325,15 @@ class Phpipam extends AdapterBaseCl {
152
325
  * @param {Callback} callback - An array of whether the adapter can has the
153
326
  * desired capability or an error
154
327
  */
155
- verifyCapability(entityType, actionType, entityId, callback) {
156
- const meth = 'adapterBase-verifyCapability';
328
+ iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
329
+ const meth = 'adapterBase-iapVerifyAdapterCapability';
157
330
  const origin = `${this.id}-${meth}`;
158
331
  log.trace(origin);
159
332
 
160
333
  // if caching
161
334
  if (this.caching) {
162
- // Make the call - verifyCapability(entityType, actionType, entityId, callback)
163
- return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (results, error) => {
335
+ // Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
336
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
164
337
  if (error) {
165
338
  return callback(null, error);
166
339
  }
@@ -178,7 +351,7 @@ class Phpipam extends AdapterBaseCl {
178
351
  }
179
352
 
180
353
  // need to check the cache again since it has been updated
181
- return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (vcapable, verror) => {
354
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
182
355
  if (verror) {
183
356
  return callback(null, verror);
184
357
  }
@@ -211,7 +384,7 @@ class Phpipam extends AdapterBaseCl {
211
384
  // if no entity id
212
385
  if (!entityId) {
213
386
  // need to check the cache again since it has been updated
214
- return this.requestHandlerInst.verifyCapability(entityType, actionType, null, (vcapable, verror) => {
387
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
215
388
  if (verror) {
216
389
  return callback(null, verror);
217
390
  }
@@ -232,7 +405,7 @@ class Phpipam extends AdapterBaseCl {
232
405
  }
233
406
 
234
407
  // need to check the cache again since it has been updated
235
- return this.requestHandlerInst.verifyCapability(entityType, actionType, null, (vcapable, verror) => {
408
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
236
409
  if (verror) {
237
410
  return callback(null, verror);
238
411
  }
@@ -273,11 +446,11 @@ class Phpipam extends AdapterBaseCl {
273
446
  /**
274
447
  * @summary Updates the cache for all entities by call the get All entity method
275
448
  *
276
- * @function updateEntityCache
449
+ * @function iapUpdateAdapterEntityCache
277
450
  *
278
451
  */
279
- updateEntityCache() {
280
- const origin = `${this.id}-adapter-updateEntityCache`;
452
+ iapUpdateAdapterEntityCache() {
453
+ const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
281
454
  log.trace(origin);
282
455
 
283
456
  if (this.caching) {
@@ -290,6 +463,385 @@ class Phpipam extends AdapterBaseCl {
290
463
  }
291
464
  }
292
465
 
466
+ /**
467
+ * @summary Determines if this adapter supports any in a list of entities
468
+ *
469
+ * @function hasEntities
470
+ * @param {String} entityType - the entity type to check for
471
+ * @param {Array} entityList - the list of entities we are looking for
472
+ *
473
+ * @param {Callback} callback - A map where the entity is the key and the
474
+ * value is true or false
475
+ */
476
+ hasEntities(entityType, entityList, callback) {
477
+ const meth = 'adapter-hasEntities';
478
+ const origin = `${this.id}-${meth}`;
479
+ log.trace(origin);
480
+
481
+ try {
482
+ return super.hasEntities(entityType, entityList, callback);
483
+ } catch (err) {
484
+ log.error(`${origin}: ${err}`);
485
+ return callback(null, err);
486
+ }
487
+ }
488
+
489
+ /**
490
+ * @summary Get Appliance that match the deviceName
491
+ *
492
+ * @function getDevice
493
+ * @param {String} deviceName - the deviceName to find (required)
494
+ *
495
+ * @param {getCallback} callback - a callback function to return the result
496
+ * (appliance) or the error
497
+ */
498
+ getDevice(deviceName, callback) {
499
+ const meth = 'adapter-getDevice';
500
+ const origin = `${this.id}-${meth}`;
501
+ log.trace(origin);
502
+
503
+ try {
504
+ return super.getDevice(deviceName, callback);
505
+ } catch (err) {
506
+ log.error(`${origin}: ${err}`);
507
+ return callback(null, err);
508
+ }
509
+ }
510
+
511
+ /**
512
+ * @summary Get Appliances that match the filter
513
+ *
514
+ * @function getDevicesFiltered
515
+ * @param {Object} options - the data to use to filter the appliances (optional)
516
+ *
517
+ * @param {getCallback} callback - a callback function to return the result
518
+ * (appliances) or the error
519
+ */
520
+ getDevicesFiltered(options, callback) {
521
+ const meth = 'adapter-getDevicesFiltered';
522
+ const origin = `${this.id}-${meth}`;
523
+ log.trace(origin);
524
+
525
+ try {
526
+ return super.getDevicesFiltered(options, callback);
527
+ } catch (err) {
528
+ log.error(`${origin}: ${err}`);
529
+ return callback(null, err);
530
+ }
531
+ }
532
+
533
+ /**
534
+ * @summary Gets the status for the provided appliance
535
+ *
536
+ * @function isAlive
537
+ * @param {String} deviceName - the deviceName of the appliance. (required)
538
+ *
539
+ * @param {configCallback} callback - callback function to return the result
540
+ * (appliance isAlive) or the error
541
+ */
542
+ isAlive(deviceName, callback) {
543
+ const meth = 'adapter-isAlive';
544
+ const origin = `${this.id}-${meth}`;
545
+ log.trace(origin);
546
+
547
+ try {
548
+ return super.isAlive(deviceName, callback);
549
+ } catch (err) {
550
+ log.error(`${origin}: ${err}`);
551
+ return callback(null, err);
552
+ }
553
+ }
554
+
555
+ /**
556
+ * @summary Gets a config for the provided Appliance
557
+ *
558
+ * @function getConfig
559
+ * @param {String} deviceName - the deviceName of the appliance. (required)
560
+ * @param {String} format - the desired format of the config. (optional)
561
+ *
562
+ * @param {configCallback} callback - callback function to return the result
563
+ * (appliance config) or the error
564
+ */
565
+ getConfig(deviceName, format, callback) {
566
+ const meth = 'adapter-getConfig';
567
+ const origin = `${this.id}-${meth}`;
568
+ log.trace(origin);
569
+
570
+ try {
571
+ return super.getConfig(deviceName, format, callback);
572
+ } catch (err) {
573
+ log.error(`${origin}: ${err}`);
574
+ return callback(null, err);
575
+ }
576
+ }
577
+
578
+ /**
579
+ * @summary Gets the device count from the system
580
+ *
581
+ * @function iapGetDeviceCount
582
+ *
583
+ * @param {getCallback} callback - callback function to return the result
584
+ * (count) or the error
585
+ */
586
+ iapGetDeviceCount(callback) {
587
+ const meth = 'adapter-iapGetDeviceCount';
588
+ const origin = `${this.id}-${meth}`;
589
+ log.trace(origin);
590
+
591
+ try {
592
+ return super.iapGetDeviceCount(callback);
593
+ } catch (err) {
594
+ log.error(`${origin}: ${err}`);
595
+ return callback(null, err);
596
+ }
597
+ }
598
+
599
+ /* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
600
+ /**
601
+ * Makes the requested generic call
602
+ *
603
+ * @function genericAdapterRequest
604
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
605
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
606
+ * @param {Object} queryData - the parameters to be put on the url (optional).
607
+ * Can be a stringified Object.
608
+ * @param {Object} requestBody - the body to add to the request (optional).
609
+ * Can be a stringified Object.
610
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
611
+ * Can be a stringified Object.
612
+ * @param {getCallback} callback - a callback function to return the result (Generics)
613
+ * or the error
614
+ */
615
+ genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
616
+ const meth = 'adapter-genericAdapterRequest';
617
+ const origin = `${this.id}-${meth}`;
618
+ log.trace(origin);
619
+
620
+ if (this.suspended && this.suspendMode === 'error') {
621
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
622
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
623
+ return callback(null, errorObj);
624
+ }
625
+
626
+ /* HERE IS WHERE YOU VALIDATE DATA */
627
+ if (uriPath === undefined || uriPath === null || uriPath === '') {
628
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
629
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
630
+ return callback(null, errorObj);
631
+ }
632
+ if (restMethod === undefined || restMethod === null || restMethod === '') {
633
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
634
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
635
+ return callback(null, errorObj);
636
+ }
637
+
638
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
639
+ // remove any leading / and split the uripath into path variables
640
+ let myPath = uriPath;
641
+ while (myPath.indexOf('/') === 0) {
642
+ myPath = myPath.substring(1);
643
+ }
644
+ const pathVars = myPath.split('/');
645
+ const queryParamsAvailable = queryData;
646
+ const queryParams = {};
647
+ const bodyVars = requestBody;
648
+
649
+ // loop in template. long callback arg name to avoid identifier conflicts
650
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
651
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
652
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
653
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
654
+ }
655
+ });
656
+
657
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
658
+ const reqObj = {
659
+ payload: bodyVars,
660
+ uriPathVars: pathVars,
661
+ uriQuery: queryParams,
662
+ uriOptions: {}
663
+ };
664
+ // add headers if provided
665
+ if (addlHeaders) {
666
+ reqObj.addlHeaders = addlHeaders;
667
+ }
668
+
669
+ // determine the call and return flag
670
+ let action = 'getGenerics';
671
+ let returnF = true;
672
+ if (restMethod.toUpperCase() === 'POST') {
673
+ action = 'createGeneric';
674
+ } else if (restMethod.toUpperCase() === 'PUT') {
675
+ action = 'updateGeneric';
676
+ } else if (restMethod.toUpperCase() === 'PATCH') {
677
+ action = 'patchGeneric';
678
+ } else if (restMethod.toUpperCase() === 'DELETE') {
679
+ action = 'deleteGeneric';
680
+ returnF = false;
681
+ }
682
+
683
+ try {
684
+ // Make the call -
685
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
686
+ return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
687
+ // if we received an error or their is no response on the results
688
+ // return an error
689
+ if (irReturnError) {
690
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
691
+ return callback(null, irReturnError);
692
+ }
693
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
694
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
695
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
696
+ return callback(null, errorObj);
697
+ }
698
+
699
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
700
+ // return the response
701
+ return callback(irReturnData, null);
702
+ });
703
+ } catch (ex) {
704
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
705
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
706
+ return callback(null, errorObj);
707
+ }
708
+ }
709
+
710
+ /**
711
+ * Makes the requested generic call with no base path or version
712
+ *
713
+ * @function genericAdapterRequestNoBasePath
714
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
715
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
716
+ * @param {Object} queryData - the parameters to be put on the url (optional).
717
+ * Can be a stringified Object.
718
+ * @param {Object} requestBody - the body to add to the request (optional).
719
+ * Can be a stringified Object.
720
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
721
+ * Can be a stringified Object.
722
+ * @param {getCallback} callback - a callback function to return the result (Generics)
723
+ * or the error
724
+ */
725
+ genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
726
+ const meth = 'adapter-genericAdapterRequestNoBasePath';
727
+ const origin = `${this.id}-${meth}`;
728
+ log.trace(origin);
729
+
730
+ if (this.suspended && this.suspendMode === 'error') {
731
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
732
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
733
+ return callback(null, errorObj);
734
+ }
735
+
736
+ /* HERE IS WHERE YOU VALIDATE DATA */
737
+ if (uriPath === undefined || uriPath === null || uriPath === '') {
738
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
739
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
740
+ return callback(null, errorObj);
741
+ }
742
+ if (restMethod === undefined || restMethod === null || restMethod === '') {
743
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
744
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
745
+ return callback(null, errorObj);
746
+ }
747
+
748
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
749
+ // remove any leading / and split the uripath into path variables
750
+ let myPath = uriPath;
751
+ while (myPath.indexOf('/') === 0) {
752
+ myPath = myPath.substring(1);
753
+ }
754
+ const pathVars = myPath.split('/');
755
+ const queryParamsAvailable = queryData;
756
+ const queryParams = {};
757
+ const bodyVars = requestBody;
758
+
759
+ // loop in template. long callback arg name to avoid identifier conflicts
760
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
761
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
762
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
763
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
764
+ }
765
+ });
766
+
767
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
768
+ const reqObj = {
769
+ payload: bodyVars,
770
+ uriPathVars: pathVars,
771
+ uriQuery: queryParams,
772
+ uriOptions: {}
773
+ };
774
+ // add headers if provided
775
+ if (addlHeaders) {
776
+ reqObj.addlHeaders = addlHeaders;
777
+ }
778
+
779
+ // determine the call and return flag
780
+ let action = 'getGenericsNoBase';
781
+ let returnF = true;
782
+ if (restMethod.toUpperCase() === 'POST') {
783
+ action = 'createGenericNoBase';
784
+ } else if (restMethod.toUpperCase() === 'PUT') {
785
+ action = 'updateGenericNoBase';
786
+ } else if (restMethod.toUpperCase() === 'PATCH') {
787
+ action = 'patchGenericNoBase';
788
+ } else if (restMethod.toUpperCase() === 'DELETE') {
789
+ action = 'deleteGenericNoBase';
790
+ returnF = false;
791
+ }
792
+
793
+ try {
794
+ // Make the call -
795
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
796
+ return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
797
+ // if we received an error or their is no response on the results
798
+ // return an error
799
+ if (irReturnError) {
800
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
801
+ return callback(null, irReturnError);
802
+ }
803
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
804
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
805
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
806
+ return callback(null, errorObj);
807
+ }
808
+
809
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
810
+ // return the response
811
+ return callback(irReturnData, null);
812
+ });
813
+ } catch (ex) {
814
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
815
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
816
+ return callback(null, errorObj);
817
+ }
818
+ }
819
+
820
+ /**
821
+ * @callback healthCallback
822
+ * @param {Object} result - the result of the get request (contains an id and a status)
823
+ */
824
+ /**
825
+ * @callback getCallback
826
+ * @param {Object} result - the result of the get request (entity/ies)
827
+ * @param {String} error - any error that occurred
828
+ */
829
+ /**
830
+ * @callback createCallback
831
+ * @param {Object} item - the newly created entity
832
+ * @param {String} error - any error that occurred
833
+ */
834
+ /**
835
+ * @callback updateCallback
836
+ * @param {String} status - the status of the update action
837
+ * @param {String} error - any error that occurred
838
+ */
839
+ /**
840
+ * @callback deleteCallback
841
+ * @param {String} status - the status of the delete action
842
+ * @param {String} error - any error that occurred
843
+ */
844
+
293
845
  /**
294
846
  * @summary Returns all sections
295
847
  *
@@ -303,6 +855,12 @@ class Phpipam extends AdapterBaseCl {
303
855
  const origin = `${this.id}-${meth}`;
304
856
  log.trace(origin);
305
857
 
858
+ if (this.suspended && this.suspendMode === 'error') {
859
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
860
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
861
+ return callback(null, errorObj);
862
+ }
863
+
306
864
  /* HERE IS WHERE YOU VALIDATE DATA */
307
865
 
308
866
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -370,6 +928,12 @@ class Phpipam extends AdapterBaseCl {
370
928
  const origin = `${this.id}-${meth}`;
371
929
  log.trace(origin);
372
930
 
931
+ if (this.suspended && this.suspendMode === 'error') {
932
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
933
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
934
+ return callback(null, errorObj);
935
+ }
936
+
373
937
  /* HERE IS WHERE YOU VALIDATE DATA */
374
938
 
375
939
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -434,6 +998,12 @@ class Phpipam extends AdapterBaseCl {
434
998
  const origin = `${this.id}-${meth}`;
435
999
  log.trace(origin);
436
1000
 
1001
+ if (this.suspended && this.suspendMode === 'error') {
1002
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1003
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1004
+ return callback(null, errorObj);
1005
+ }
1006
+
437
1007
  /* HERE IS WHERE YOU VALIDATE DATA */
438
1008
 
439
1009
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -499,6 +1069,12 @@ class Phpipam extends AdapterBaseCl {
499
1069
  const origin = `${this.id}-${meth}`;
500
1070
  log.trace(origin);
501
1071
 
1072
+ if (this.suspended && this.suspendMode === 'error') {
1073
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1074
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1075
+ return callback(null, errorObj);
1076
+ }
1077
+
502
1078
  /* HERE IS WHERE YOU VALIDATE DATA */
503
1079
  if (id === undefined || id === null || id === '') {
504
1080
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -571,6 +1147,12 @@ class Phpipam extends AdapterBaseCl {
571
1147
  const origin = `${this.id}-${meth}`;
572
1148
  log.trace(origin);
573
1149
 
1150
+ if (this.suspended && this.suspendMode === 'error') {
1151
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1152
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1153
+ return callback(null, errorObj);
1154
+ }
1155
+
574
1156
  /* HERE IS WHERE YOU VALIDATE DATA */
575
1157
  if (id === undefined || id === null || id === '') {
576
1158
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -641,6 +1223,12 @@ class Phpipam extends AdapterBaseCl {
641
1223
  const origin = `${this.id}-${meth}`;
642
1224
  log.trace(origin);
643
1225
 
1226
+ if (this.suspended && this.suspendMode === 'error') {
1227
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1228
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1229
+ return callback(null, errorObj);
1230
+ }
1231
+
644
1232
  /* HERE IS WHERE YOU VALIDATE DATA */
645
1233
  if (id === undefined || id === null || id === '') {
646
1234
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -714,6 +1302,12 @@ class Phpipam extends AdapterBaseCl {
714
1302
  const origin = `${this.id}-${meth}`;
715
1303
  log.trace(origin);
716
1304
 
1305
+ if (this.suspended && this.suspendMode === 'error') {
1306
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1307
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1308
+ return callback(null, errorObj);
1309
+ }
1310
+
717
1311
  /* HERE IS WHERE YOU VALIDATE DATA */
718
1312
  if (name === undefined || name === null || name === '') {
719
1313
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['name'], null, null, null);
@@ -786,6 +1380,12 @@ class Phpipam extends AdapterBaseCl {
786
1380
  const origin = `${this.id}-${meth}`;
787
1381
  log.trace(origin);
788
1382
 
1383
+ if (this.suspended && this.suspendMode === 'error') {
1384
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1385
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1386
+ return callback(null, errorObj);
1387
+ }
1388
+
789
1389
  /* HERE IS WHERE YOU VALIDATE DATA */
790
1390
 
791
1391
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -854,6 +1454,12 @@ class Phpipam extends AdapterBaseCl {
854
1454
  const origin = `${this.id}-${meth}`;
855
1455
  log.trace(origin);
856
1456
 
1457
+ if (this.suspended && this.suspendMode === 'error') {
1458
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1459
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1460
+ return callback(null, errorObj);
1461
+ }
1462
+
857
1463
  /* HERE IS WHERE YOU VALIDATE DATA */
858
1464
  if (id === undefined || id === null || id === '') {
859
1465
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -926,6 +1532,12 @@ class Phpipam extends AdapterBaseCl {
926
1532
  const origin = `${this.id}-${meth}`;
927
1533
  log.trace(origin);
928
1534
 
1535
+ if (this.suspended && this.suspendMode === 'error') {
1536
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1537
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1538
+ return callback(null, errorObj);
1539
+ }
1540
+
929
1541
  /* HERE IS WHERE YOU VALIDATE DATA */
930
1542
  if (id === undefined || id === null || id === '') {
931
1543
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -996,6 +1608,12 @@ class Phpipam extends AdapterBaseCl {
996
1608
  const origin = `${this.id}-${meth}`;
997
1609
  log.trace(origin);
998
1610
 
1611
+ if (this.suspended && this.suspendMode === 'error') {
1612
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1613
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1614
+ return callback(null, errorObj);
1615
+ }
1616
+
999
1617
  /* HERE IS WHERE YOU VALIDATE DATA */
1000
1618
  if (id === undefined || id === null || id === '') {
1001
1619
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1069,6 +1687,12 @@ class Phpipam extends AdapterBaseCl {
1069
1687
  const origin = `${this.id}-${meth}`;
1070
1688
  log.trace(origin);
1071
1689
 
1690
+ if (this.suspended && this.suspendMode === 'error') {
1691
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1692
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1693
+ return callback(null, errorObj);
1694
+ }
1695
+
1072
1696
  /* HERE IS WHERE YOU VALIDATE DATA */
1073
1697
  if (id === undefined || id === null || id === '') {
1074
1698
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1142,6 +1766,12 @@ class Phpipam extends AdapterBaseCl {
1142
1766
  const origin = `${this.id}-${meth}`;
1143
1767
  log.trace(origin);
1144
1768
 
1769
+ if (this.suspended && this.suspendMode === 'error') {
1770
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1771
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1772
+ return callback(null, errorObj);
1773
+ }
1774
+
1145
1775
  /* HERE IS WHERE YOU VALIDATE DATA */
1146
1776
  if (id === undefined || id === null || id === '') {
1147
1777
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1215,6 +1845,12 @@ class Phpipam extends AdapterBaseCl {
1215
1845
  const origin = `${this.id}-${meth}`;
1216
1846
  log.trace(origin);
1217
1847
 
1848
+ if (this.suspended && this.suspendMode === 'error') {
1849
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1850
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1851
+ return callback(null, errorObj);
1852
+ }
1853
+
1218
1854
  /* HERE IS WHERE YOU VALIDATE DATA */
1219
1855
  if (id === undefined || id === null || id === '') {
1220
1856
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1288,6 +1924,12 @@ class Phpipam extends AdapterBaseCl {
1288
1924
  const origin = `${this.id}-${meth}`;
1289
1925
  log.trace(origin);
1290
1926
 
1927
+ if (this.suspended && this.suspendMode === 'error') {
1928
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1929
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1930
+ return callback(null, errorObj);
1931
+ }
1932
+
1291
1933
  /* HERE IS WHERE YOU VALIDATE DATA */
1292
1934
  if (id === undefined || id === null || id === '') {
1293
1935
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1362,6 +2004,12 @@ class Phpipam extends AdapterBaseCl {
1362
2004
  const origin = `${this.id}-${meth}`;
1363
2005
  log.trace(origin);
1364
2006
 
2007
+ if (this.suspended && this.suspendMode === 'error') {
2008
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2009
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2010
+ return callback(null, errorObj);
2011
+ }
2012
+
1365
2013
  /* HERE IS WHERE YOU VALIDATE DATA */
1366
2014
  if (id === undefined || id === null || id === '') {
1367
2015
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1441,6 +2089,12 @@ class Phpipam extends AdapterBaseCl {
1441
2089
  const origin = `${this.id}-${meth}`;
1442
2090
  log.trace(origin);
1443
2091
 
2092
+ if (this.suspended && this.suspendMode === 'error') {
2093
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2094
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2095
+ return callback(null, errorObj);
2096
+ }
2097
+
1444
2098
  /* HERE IS WHERE YOU VALIDATE DATA */
1445
2099
  if (id === undefined || id === null || id === '') {
1446
2100
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1520,6 +2174,12 @@ class Phpipam extends AdapterBaseCl {
1520
2174
  const origin = `${this.id}-${meth}`;
1521
2175
  log.trace(origin);
1522
2176
 
2177
+ if (this.suspended && this.suspendMode === 'error') {
2178
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2179
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2180
+ return callback(null, errorObj);
2181
+ }
2182
+
1523
2183
  /* HERE IS WHERE YOU VALIDATE DATA */
1524
2184
  if (id === undefined || id === null || id === '') {
1525
2185
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1596,6 +2256,12 @@ class Phpipam extends AdapterBaseCl {
1596
2256
  const origin = `${this.id}-${meth}`;
1597
2257
  log.trace(origin);
1598
2258
 
2259
+ if (this.suspended && this.suspendMode === 'error') {
2260
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2261
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2262
+ return callback(null, errorObj);
2263
+ }
2264
+
1599
2265
  /* HERE IS WHERE YOU VALIDATE DATA */
1600
2266
  if (id === undefined || id === null || id === '') {
1601
2267
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -1673,6 +2339,12 @@ class Phpipam extends AdapterBaseCl {
1673
2339
  const origin = `${this.id}-${meth}`;
1674
2340
  log.trace(origin);
1675
2341
 
2342
+ if (this.suspended && this.suspendMode === 'error') {
2343
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2344
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2345
+ return callback(null, errorObj);
2346
+ }
2347
+
1676
2348
  /* HERE IS WHERE YOU VALIDATE DATA */
1677
2349
 
1678
2350
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -1741,6 +2413,12 @@ class Phpipam extends AdapterBaseCl {
1741
2413
  const origin = `${this.id}-${meth}`;
1742
2414
  log.trace(origin);
1743
2415
 
2416
+ if (this.suspended && this.suspendMode === 'error') {
2417
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2418
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2419
+ return callback(null, errorObj);
2420
+ }
2421
+
1744
2422
  /* HERE IS WHERE YOU VALIDATE DATA */
1745
2423
  if (subnet === undefined || subnet === null || subnet === '') {
1746
2424
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subnet'], null, null, null);
@@ -1814,6 +2492,12 @@ class Phpipam extends AdapterBaseCl {
1814
2492
  const origin = `${this.id}-${meth}`;
1815
2493
  log.trace(origin);
1816
2494
 
2495
+ if (this.suspended && this.suspendMode === 'error') {
2496
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2497
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2498
+ return callback(null, errorObj);
2499
+ }
2500
+
1817
2501
  /* HERE IS WHERE YOU VALIDATE DATA */
1818
2502
  if (subnet === undefined || subnet === null || subnet === '') {
1819
2503
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subnet'], null, null, null);
@@ -1886,6 +2570,12 @@ class Phpipam extends AdapterBaseCl {
1886
2570
  const origin = `${this.id}-${meth}`;
1887
2571
  log.trace(origin);
1888
2572
 
2573
+ if (this.suspended && this.suspendMode === 'error') {
2574
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2575
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2576
+ return callback(null, errorObj);
2577
+ }
2578
+
1889
2579
  /* HERE IS WHERE YOU VALIDATE DATA */
1890
2580
 
1891
2581
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -1950,6 +2640,12 @@ class Phpipam extends AdapterBaseCl {
1950
2640
  const origin = `${this.id}-${meth}`;
1951
2641
  log.trace(origin);
1952
2642
 
2643
+ if (this.suspended && this.suspendMode === 'error') {
2644
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2645
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2646
+ return callback(null, errorObj);
2647
+ }
2648
+
1953
2649
  /* HERE IS WHERE YOU VALIDATE DATA */
1954
2650
 
1955
2651
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -2015,6 +2711,12 @@ class Phpipam extends AdapterBaseCl {
2015
2711
  const origin = `${this.id}-${meth}`;
2016
2712
  log.trace(origin);
2017
2713
 
2714
+ if (this.suspended && this.suspendMode === 'error') {
2715
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2716
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2717
+ return callback(null, errorObj);
2718
+ }
2719
+
2018
2720
  /* HERE IS WHERE YOU VALIDATE DATA */
2019
2721
  if (id === undefined || id === null || id === '') {
2020
2722
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2085,6 +2787,12 @@ class Phpipam extends AdapterBaseCl {
2085
2787
  const origin = `${this.id}-${meth}`;
2086
2788
  log.trace(origin);
2087
2789
 
2790
+ if (this.suspended && this.suspendMode === 'error') {
2791
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2792
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2793
+ return callback(null, errorObj);
2794
+ }
2795
+
2088
2796
  /* HERE IS WHERE YOU VALIDATE DATA */
2089
2797
  if (id === undefined || id === null || id === '') {
2090
2798
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2155,6 +2863,12 @@ class Phpipam extends AdapterBaseCl {
2155
2863
  const origin = `${this.id}-${meth}`;
2156
2864
  log.trace(origin);
2157
2865
 
2866
+ if (this.suspended && this.suspendMode === 'error') {
2867
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2868
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2869
+ return callback(null, errorObj);
2870
+ }
2871
+
2158
2872
  /* HERE IS WHERE YOU VALIDATE DATA */
2159
2873
  if (id === undefined || id === null || id === '') {
2160
2874
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2224,6 +2938,12 @@ class Phpipam extends AdapterBaseCl {
2224
2938
  const origin = `${this.id}-${meth}`;
2225
2939
  log.trace(origin);
2226
2940
 
2941
+ if (this.suspended && this.suspendMode === 'error') {
2942
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2943
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2944
+ return callback(null, errorObj);
2945
+ }
2946
+
2227
2947
  /* HERE IS WHERE YOU VALIDATE DATA */
2228
2948
  if (id === undefined || id === null || id === '') {
2229
2949
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2293,6 +3013,12 @@ class Phpipam extends AdapterBaseCl {
2293
3013
  const origin = `${this.id}-${meth}`;
2294
3014
  log.trace(origin);
2295
3015
 
3016
+ if (this.suspended && this.suspendMode === 'error') {
3017
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3018
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3019
+ return callback(null, errorObj);
3020
+ }
3021
+
2296
3022
  /* HERE IS WHERE YOU VALIDATE DATA */
2297
3023
  if (id === undefined || id === null || id === '') {
2298
3024
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2363,6 +3089,12 @@ class Phpipam extends AdapterBaseCl {
2363
3089
  const origin = `${this.id}-${meth}`;
2364
3090
  log.trace(origin);
2365
3091
 
3092
+ if (this.suspended && this.suspendMode === 'error') {
3093
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3094
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3095
+ return callback(null, errorObj);
3096
+ }
3097
+
2366
3098
  /* HERE IS WHERE YOU VALIDATE DATA */
2367
3099
  if (id === undefined || id === null || id === '') {
2368
3100
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2426,21 +3158,33 @@ class Phpipam extends AdapterBaseCl {
2426
3158
  * @summary Updates address
2427
3159
  *
2428
3160
  * @function updateAddress
3161
+ * @param {string} id - address identifier, identifies which addressto work on.
2429
3162
  * @param {object} body - body
2430
3163
  * @param {getCallback} callback - a callback function to return the result
2431
3164
  */
2432
3165
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
2433
- updateAddress(body, callback) {
3166
+ updateAddress(id, body, callback) {
2434
3167
  const meth = 'adapter-updateAddress';
2435
3168
  const origin = `${this.id}-${meth}`;
2436
3169
  log.trace(origin);
2437
3170
 
3171
+ if (this.suspended && this.suspendMode === 'error') {
3172
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3173
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3174
+ return callback(null, errorObj);
3175
+ }
3176
+
2438
3177
  /* HERE IS WHERE YOU VALIDATE DATA */
3178
+ if (id === undefined || id === null || id === '') {
3179
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
3180
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3181
+ return callback(null, errorObj);
3182
+ }
2439
3183
 
2440
3184
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2441
3185
  const queryParamsAvailable = {};
2442
3186
  const queryParams = {};
2443
- const pathVars = [];
3187
+ const pathVars = [id];
2444
3188
  const bodyVars = body;
2445
3189
 
2446
3190
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2499,6 +3243,12 @@ class Phpipam extends AdapterBaseCl {
2499
3243
  const origin = `${this.id}-${meth}`;
2500
3244
  log.trace(origin);
2501
3245
 
3246
+ if (this.suspended && this.suspendMode === 'error') {
3247
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3248
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3249
+ return callback(null, errorObj);
3250
+ }
3251
+
2502
3252
  /* HERE IS WHERE YOU VALIDATE DATA */
2503
3253
  if (id === undefined || id === null || id === '') {
2504
3254
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2569,6 +3319,12 @@ class Phpipam extends AdapterBaseCl {
2569
3319
  const origin = `${this.id}-${meth}`;
2570
3320
  log.trace(origin);
2571
3321
 
3322
+ if (this.suspended && this.suspendMode === 'error') {
3323
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3324
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3325
+ return callback(null, errorObj);
3326
+ }
3327
+
2572
3328
  /* HERE IS WHERE YOU VALIDATE DATA */
2573
3329
  if (id === undefined || id === null || id === '') {
2574
3330
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -2643,6 +3399,12 @@ class Phpipam extends AdapterBaseCl {
2643
3399
  const origin = `${this.id}-${meth}`;
2644
3400
  log.trace(origin);
2645
3401
 
3402
+ if (this.suspended && this.suspendMode === 'error') {
3403
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3404
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3405
+ return callback(null, errorObj);
3406
+ }
3407
+
2646
3408
  /* HERE IS WHERE YOU VALIDATE DATA */
2647
3409
  if (ip === undefined || ip === null || ip === '') {
2648
3410
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ip'], null, null, null);
@@ -2721,6 +3483,12 @@ class Phpipam extends AdapterBaseCl {
2721
3483
  const origin = `${this.id}-${meth}`;
2722
3484
  log.trace(origin);
2723
3485
 
3486
+ if (this.suspended && this.suspendMode === 'error') {
3487
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3488
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3489
+ return callback(null, errorObj);
3490
+ }
3491
+
2724
3492
  /* HERE IS WHERE YOU VALIDATE DATA */
2725
3493
  if (ip === undefined || ip === null || ip === '') {
2726
3494
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ip'], null, null, null);
@@ -2796,6 +3564,12 @@ class Phpipam extends AdapterBaseCl {
2796
3564
  const origin = `${this.id}-${meth}`;
2797
3565
  log.trace(origin);
2798
3566
 
3567
+ if (this.suspended && this.suspendMode === 'error') {
3568
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3569
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3570
+ return callback(null, errorObj);
3571
+ }
3572
+
2799
3573
  /* HERE IS WHERE YOU VALIDATE DATA */
2800
3574
  if (ip === undefined || ip === null || ip === '') {
2801
3575
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ip'], null, null, null);
@@ -2869,6 +3643,12 @@ class Phpipam extends AdapterBaseCl {
2869
3643
  const origin = `${this.id}-${meth}`;
2870
3644
  log.trace(origin);
2871
3645
 
3646
+ if (this.suspended && this.suspendMode === 'error') {
3647
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3648
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3649
+ return callback(null, errorObj);
3650
+ }
3651
+
2872
3652
  /* HERE IS WHERE YOU VALIDATE DATA */
2873
3653
  if (hostname === undefined || hostname === null || hostname === '') {
2874
3654
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['hostname'], null, null, null);
@@ -2942,6 +3722,12 @@ class Phpipam extends AdapterBaseCl {
2942
3722
  const origin = `${this.id}-${meth}`;
2943
3723
  log.trace(origin);
2944
3724
 
3725
+ if (this.suspended && this.suspendMode === 'error') {
3726
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3727
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3728
+ return callback(null, errorObj);
3729
+ }
3730
+
2945
3731
  /* HERE IS WHERE YOU VALIDATE DATA */
2946
3732
  if (subnetId === undefined || subnetId === null || subnetId === '') {
2947
3733
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subnetId'], null, null, null);
@@ -3015,6 +3801,12 @@ class Phpipam extends AdapterBaseCl {
3015
3801
  const origin = `${this.id}-${meth}`;
3016
3802
  log.trace(origin);
3017
3803
 
3804
+ if (this.suspended && this.suspendMode === 'error') {
3805
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3806
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3807
+ return callback(null, errorObj);
3808
+ }
3809
+
3018
3810
  /* HERE IS WHERE YOU VALIDATE DATA */
3019
3811
  if (subnetId === undefined || subnetId === null || subnetId === '') {
3020
3812
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subnetId'], null, null, null);
@@ -3084,6 +3876,12 @@ class Phpipam extends AdapterBaseCl {
3084
3876
  const origin = `${this.id}-${meth}`;
3085
3877
  log.trace(origin);
3086
3878
 
3879
+ if (this.suspended && this.suspendMode === 'error') {
3880
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3881
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3882
+ return callback(null, errorObj);
3883
+ }
3884
+
3087
3885
  /* HERE IS WHERE YOU VALIDATE DATA */
3088
3886
 
3089
3887
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3151,6 +3949,12 @@ class Phpipam extends AdapterBaseCl {
3151
3949
  const origin = `${this.id}-${meth}`;
3152
3950
  log.trace(origin);
3153
3951
 
3952
+ if (this.suspended && this.suspendMode === 'error') {
3953
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3954
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3955
+ return callback(null, errorObj);
3956
+ }
3957
+
3154
3958
  /* HERE IS WHERE YOU VALIDATE DATA */
3155
3959
 
3156
3960
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3219,6 +4023,12 @@ class Phpipam extends AdapterBaseCl {
3219
4023
  const origin = `${this.id}-${meth}`;
3220
4024
  log.trace(origin);
3221
4025
 
4026
+ if (this.suspended && this.suspendMode === 'error') {
4027
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4028
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4029
+ return callback(null, errorObj);
4030
+ }
4031
+
3222
4032
  /* HERE IS WHERE YOU VALIDATE DATA */
3223
4033
  if (id === undefined || id === null || id === '') {
3224
4034
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3292,6 +4102,12 @@ class Phpipam extends AdapterBaseCl {
3292
4102
  const origin = `${this.id}-${meth}`;
3293
4103
  log.trace(origin);
3294
4104
 
4105
+ if (this.suspended && this.suspendMode === 'error') {
4106
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4107
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4108
+ return callback(null, errorObj);
4109
+ }
4110
+
3295
4111
  /* HERE IS WHERE YOU VALIDATE DATA */
3296
4112
  if (id === undefined || id === null || id === '') {
3297
4113
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3364,6 +4180,12 @@ class Phpipam extends AdapterBaseCl {
3364
4180
  const origin = `${this.id}-${meth}`;
3365
4181
  log.trace(origin);
3366
4182
 
4183
+ if (this.suspended && this.suspendMode === 'error') {
4184
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4185
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4186
+ return callback(null, errorObj);
4187
+ }
4188
+
3367
4189
  /* HERE IS WHERE YOU VALIDATE DATA */
3368
4190
 
3369
4191
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3428,6 +4250,12 @@ class Phpipam extends AdapterBaseCl {
3428
4250
  const origin = `${this.id}-${meth}`;
3429
4251
  log.trace(origin);
3430
4252
 
4253
+ if (this.suspended && this.suspendMode === 'error') {
4254
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4255
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4256
+ return callback(null, errorObj);
4257
+ }
4258
+
3431
4259
  /* HERE IS WHERE YOU VALIDATE DATA */
3432
4260
 
3433
4261
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3495,6 +4323,12 @@ class Phpipam extends AdapterBaseCl {
3495
4323
  const origin = `${this.id}-${meth}`;
3496
4324
  log.trace(origin);
3497
4325
 
4326
+ if (this.suspended && this.suspendMode === 'error') {
4327
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4328
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4329
+ return callback(null, errorObj);
4330
+ }
4331
+
3498
4332
  /* HERE IS WHERE YOU VALIDATE DATA */
3499
4333
 
3500
4334
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3559,6 +4393,12 @@ class Phpipam extends AdapterBaseCl {
3559
4393
  const origin = `${this.id}-${meth}`;
3560
4394
  log.trace(origin);
3561
4395
 
4396
+ if (this.suspended && this.suspendMode === 'error') {
4397
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4398
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4399
+ return callback(null, errorObj);
4400
+ }
4401
+
3562
4402
  /* HERE IS WHERE YOU VALIDATE DATA */
3563
4403
 
3564
4404
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3624,6 +4464,12 @@ class Phpipam extends AdapterBaseCl {
3624
4464
  const origin = `${this.id}-${meth}`;
3625
4465
  log.trace(origin);
3626
4466
 
4467
+ if (this.suspended && this.suspendMode === 'error') {
4468
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4469
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4470
+ return callback(null, errorObj);
4471
+ }
4472
+
3627
4473
  /* HERE IS WHERE YOU VALIDATE DATA */
3628
4474
  if (id === undefined || id === null || id === '') {
3629
4475
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3697,6 +4543,12 @@ class Phpipam extends AdapterBaseCl {
3697
4543
  const origin = `${this.id}-${meth}`;
3698
4544
  log.trace(origin);
3699
4545
 
4546
+ if (this.suspended && this.suspendMode === 'error') {
4547
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4548
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4549
+ return callback(null, errorObj);
4550
+ }
4551
+
3700
4552
  /* HERE IS WHERE YOU VALIDATE DATA */
3701
4553
  if (id === undefined || id === null || id === '') {
3702
4554
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3767,6 +4619,12 @@ class Phpipam extends AdapterBaseCl {
3767
4619
  const origin = `${this.id}-${meth}`;
3768
4620
  log.trace(origin);
3769
4621
 
4622
+ if (this.suspended && this.suspendMode === 'error') {
4623
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4624
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4625
+ return callback(null, errorObj);
4626
+ }
4627
+
3770
4628
  /* HERE IS WHERE YOU VALIDATE DATA */
3771
4629
  if (id === undefined || id === null || id === '') {
3772
4630
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3841,6 +4699,12 @@ class Phpipam extends AdapterBaseCl {
3841
4699
  const origin = `${this.id}-${meth}`;
3842
4700
  log.trace(origin);
3843
4701
 
4702
+ if (this.suspended && this.suspendMode === 'error') {
4703
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4704
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4705
+ return callback(null, errorObj);
4706
+ }
4707
+
3844
4708
  /* HERE IS WHERE YOU VALIDATE DATA */
3845
4709
  if (id === undefined || id === null || id === '') {
3846
4710
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3919,6 +4783,12 @@ class Phpipam extends AdapterBaseCl {
3919
4783
  const origin = `${this.id}-${meth}`;
3920
4784
  log.trace(origin);
3921
4785
 
4786
+ if (this.suspended && this.suspendMode === 'error') {
4787
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4788
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4789
+ return callback(null, errorObj);
4790
+ }
4791
+
3922
4792
  /* HERE IS WHERE YOU VALIDATE DATA */
3923
4793
  if (id === undefined || id === null || id === '') {
3924
4794
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -3993,6 +4863,12 @@ class Phpipam extends AdapterBaseCl {
3993
4863
  const origin = `${this.id}-${meth}`;
3994
4864
  log.trace(origin);
3995
4865
 
4866
+ if (this.suspended && this.suspendMode === 'error') {
4867
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4868
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4869
+ return callback(null, errorObj);
4870
+ }
4871
+
3996
4872
  /* HERE IS WHERE YOU VALIDATE DATA */
3997
4873
  if (id === undefined || id === null || id === '') {
3998
4874
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4070,6 +4946,12 @@ class Phpipam extends AdapterBaseCl {
4070
4946
  const origin = `${this.id}-${meth}`;
4071
4947
  log.trace(origin);
4072
4948
 
4949
+ if (this.suspended && this.suspendMode === 'error') {
4950
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4951
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4952
+ return callback(null, errorObj);
4953
+ }
4954
+
4073
4955
  /* HERE IS WHERE YOU VALIDATE DATA */
4074
4956
 
4075
4957
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4137,6 +5019,12 @@ class Phpipam extends AdapterBaseCl {
4137
5019
  const origin = `${this.id}-${meth}`;
4138
5020
  log.trace(origin);
4139
5021
 
5022
+ if (this.suspended && this.suspendMode === 'error') {
5023
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5024
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5025
+ return callback(null, errorObj);
5026
+ }
5027
+
4140
5028
  /* HERE IS WHERE YOU VALIDATE DATA */
4141
5029
 
4142
5030
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4201,6 +5089,12 @@ class Phpipam extends AdapterBaseCl {
4201
5089
  const origin = `${this.id}-${meth}`;
4202
5090
  log.trace(origin);
4203
5091
 
5092
+ if (this.suspended && this.suspendMode === 'error') {
5093
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5094
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5095
+ return callback(null, errorObj);
5096
+ }
5097
+
4204
5098
  /* HERE IS WHERE YOU VALIDATE DATA */
4205
5099
 
4206
5100
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4266,6 +5160,12 @@ class Phpipam extends AdapterBaseCl {
4266
5160
  const origin = `${this.id}-${meth}`;
4267
5161
  log.trace(origin);
4268
5162
 
5163
+ if (this.suspended && this.suspendMode === 'error') {
5164
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5165
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5166
+ return callback(null, errorObj);
5167
+ }
5168
+
4269
5169
  /* HERE IS WHERE YOU VALIDATE DATA */
4270
5170
  if (id === undefined || id === null || id === '') {
4271
5171
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4339,6 +5239,12 @@ class Phpipam extends AdapterBaseCl {
4339
5239
  const origin = `${this.id}-${meth}`;
4340
5240
  log.trace(origin);
4341
5241
 
5242
+ if (this.suspended && this.suspendMode === 'error') {
5243
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5244
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5245
+ return callback(null, errorObj);
5246
+ }
5247
+
4342
5248
  /* HERE IS WHERE YOU VALIDATE DATA */
4343
5249
  if (id === undefined || id === null || id === '') {
4344
5250
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4411,6 +5317,12 @@ class Phpipam extends AdapterBaseCl {
4411
5317
  const origin = `${this.id}-${meth}`;
4412
5318
  log.trace(origin);
4413
5319
 
5320
+ if (this.suspended && this.suspendMode === 'error') {
5321
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5322
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5323
+ return callback(null, errorObj);
5324
+ }
5325
+
4414
5326
  /* HERE IS WHERE YOU VALIDATE DATA */
4415
5327
 
4416
5328
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4478,6 +5390,12 @@ class Phpipam extends AdapterBaseCl {
4478
5390
  const origin = `${this.id}-${meth}`;
4479
5391
  log.trace(origin);
4480
5392
 
5393
+ if (this.suspended && this.suspendMode === 'error') {
5394
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5395
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5396
+ return callback(null, errorObj);
5397
+ }
5398
+
4481
5399
  /* HERE IS WHERE YOU VALIDATE DATA */
4482
5400
  if (id === undefined || id === null || id === '') {
4483
5401
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4547,6 +5465,12 @@ class Phpipam extends AdapterBaseCl {
4547
5465
  const origin = `${this.id}-${meth}`;
4548
5466
  log.trace(origin);
4549
5467
 
5468
+ if (this.suspended && this.suspendMode === 'error') {
5469
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5470
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5471
+ return callback(null, errorObj);
5472
+ }
5473
+
4550
5474
  /* HERE IS WHERE YOU VALIDATE DATA */
4551
5475
 
4552
5476
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4614,6 +5538,12 @@ class Phpipam extends AdapterBaseCl {
4614
5538
  const origin = `${this.id}-${meth}`;
4615
5539
  log.trace(origin);
4616
5540
 
5541
+ if (this.suspended && this.suspendMode === 'error') {
5542
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5543
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5544
+ return callback(null, errorObj);
5545
+ }
5546
+
4617
5547
  /* HERE IS WHERE YOU VALIDATE DATA */
4618
5548
 
4619
5549
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4678,6 +5608,12 @@ class Phpipam extends AdapterBaseCl {
4678
5608
  const origin = `${this.id}-${meth}`;
4679
5609
  log.trace(origin);
4680
5610
 
5611
+ if (this.suspended && this.suspendMode === 'error') {
5612
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5613
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5614
+ return callback(null, errorObj);
5615
+ }
5616
+
4681
5617
  /* HERE IS WHERE YOU VALIDATE DATA */
4682
5618
 
4683
5619
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -4743,6 +5679,12 @@ class Phpipam extends AdapterBaseCl {
4743
5679
  const origin = `${this.id}-${meth}`;
4744
5680
  log.trace(origin);
4745
5681
 
5682
+ if (this.suspended && this.suspendMode === 'error') {
5683
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5684
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5685
+ return callback(null, errorObj);
5686
+ }
5687
+
4746
5688
  /* HERE IS WHERE YOU VALIDATE DATA */
4747
5689
  if (id === undefined || id === null || id === '') {
4748
5690
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4815,6 +5757,12 @@ class Phpipam extends AdapterBaseCl {
4815
5757
  const origin = `${this.id}-${meth}`;
4816
5758
  log.trace(origin);
4817
5759
 
5760
+ if (this.suspended && this.suspendMode === 'error') {
5761
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5762
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5763
+ return callback(null, errorObj);
5764
+ }
5765
+
4818
5766
  /* HERE IS WHERE YOU VALIDATE DATA */
4819
5767
  if (id === undefined || id === null || id === '') {
4820
5768
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4885,6 +5833,12 @@ class Phpipam extends AdapterBaseCl {
4885
5833
  const origin = `${this.id}-${meth}`;
4886
5834
  log.trace(origin);
4887
5835
 
5836
+ if (this.suspended && this.suspendMode === 'error') {
5837
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5838
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5839
+ return callback(null, errorObj);
5840
+ }
5841
+
4888
5842
  /* HERE IS WHERE YOU VALIDATE DATA */
4889
5843
  if (id === undefined || id === null || id === '') {
4890
5844
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -4957,6 +5911,12 @@ class Phpipam extends AdapterBaseCl {
4957
5911
  const origin = `${this.id}-${meth}`;
4958
5912
  log.trace(origin);
4959
5913
 
5914
+ if (this.suspended && this.suspendMode === 'error') {
5915
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5916
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5917
+ return callback(null, errorObj);
5918
+ }
5919
+
4960
5920
  /* HERE IS WHERE YOU VALIDATE DATA */
4961
5921
 
4962
5922
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -5014,16 +5974,22 @@ class Phpipam extends AdapterBaseCl {
5014
5974
  /**
5015
5975
  * @summary Returns all devices
5016
5976
  *
5017
- * @function getDevices
5977
+ * @function getPhpDevices
5018
5978
  * @param {object} globals - global params (optional)
5019
5979
  * @param {getCallback} callback - a callback function to return the result
5020
5980
  */
5021
5981
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
5022
- getDevices(globals, callback) {
5023
- const meth = 'adapter-getDevices';
5982
+ getPhpDevices(globals, callback) {
5983
+ const meth = 'adapter-getPhpDevices';
5024
5984
  const origin = `${this.id}-${meth}`;
5025
5985
  log.trace(origin);
5026
5986
 
5987
+ if (this.suspended && this.suspendMode === 'error') {
5988
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5989
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5990
+ return callback(null, errorObj);
5991
+ }
5992
+
5027
5993
  /* HERE IS WHERE YOU VALIDATE DATA */
5028
5994
 
5029
5995
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -5062,7 +6028,7 @@ class Phpipam extends AdapterBaseCl {
5062
6028
  return callback(null, irReturnError);
5063
6029
  }
5064
6030
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
5065
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDevices'], null, null, null);
6031
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getPhpDevices'], null, null, null);
5066
6032
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5067
6033
  return callback(null, errorObj);
5068
6034
  }
@@ -5091,6 +6057,12 @@ class Phpipam extends AdapterBaseCl {
5091
6057
  const origin = `${this.id}-${meth}`;
5092
6058
  log.trace(origin);
5093
6059
 
6060
+ if (this.suspended && this.suspendMode === 'error') {
6061
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6062
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6063
+ return callback(null, errorObj);
6064
+ }
6065
+
5094
6066
  /* HERE IS WHERE YOU VALIDATE DATA */
5095
6067
 
5096
6068
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -5155,6 +6127,12 @@ class Phpipam extends AdapterBaseCl {
5155
6127
  const origin = `${this.id}-${meth}`;
5156
6128
  log.trace(origin);
5157
6129
 
6130
+ if (this.suspended && this.suspendMode === 'error') {
6131
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6132
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6133
+ return callback(null, errorObj);
6134
+ }
6135
+
5158
6136
  /* HERE IS WHERE YOU VALIDATE DATA */
5159
6137
 
5160
6138
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -5209,17 +6187,23 @@ class Phpipam extends AdapterBaseCl {
5209
6187
  /**
5210
6188
  * @summary Returns specific device
5211
6189
  *
5212
- * @function getDevice
6190
+ * @function getPhpDevice
5213
6191
  * @param {string} id - Device identifier
5214
6192
  * @param {object} globals - global params (optional)
5215
6193
  * @param {getCallback} callback - a callback function to return the result
5216
6194
  */
5217
6195
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
5218
- getDevice(id, globals, callback) {
5219
- const meth = 'adapter-getDevice';
6196
+ getPhpDevice(id, globals, callback) {
6197
+ const meth = 'adapter-getPhpDevice';
5220
6198
  const origin = `${this.id}-${meth}`;
5221
6199
  log.trace(origin);
5222
6200
 
6201
+ if (this.suspended && this.suspendMode === 'error') {
6202
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6203
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6204
+ return callback(null, errorObj);
6205
+ }
6206
+
5223
6207
  /* HERE IS WHERE YOU VALIDATE DATA */
5224
6208
  if (id === undefined || id === null || id === '') {
5225
6209
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -5263,7 +6247,7 @@ class Phpipam extends AdapterBaseCl {
5263
6247
  return callback(null, irReturnError);
5264
6248
  }
5265
6249
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
5266
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDevice'], null, null, null);
6250
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getPhpDevice'], null, null, null);
5267
6251
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5268
6252
  return callback(null, errorObj);
5269
6253
  }
@@ -5292,6 +6276,12 @@ class Phpipam extends AdapterBaseCl {
5292
6276
  const origin = `${this.id}-${meth}`;
5293
6277
  log.trace(origin);
5294
6278
 
6279
+ if (this.suspended && this.suspendMode === 'error') {
6280
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6281
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6282
+ return callback(null, errorObj);
6283
+ }
6284
+
5295
6285
  /* HERE IS WHERE YOU VALIDATE DATA */
5296
6286
  if (id === undefined || id === null || id === '') {
5297
6287
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -5362,6 +6352,12 @@ class Phpipam extends AdapterBaseCl {
5362
6352
  const origin = `${this.id}-${meth}`;
5363
6353
  log.trace(origin);
5364
6354
 
6355
+ if (this.suspended && this.suspendMode === 'error') {
6356
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6357
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6358
+ return callback(null, errorObj);
6359
+ }
6360
+
5365
6361
  /* HERE IS WHERE YOU VALIDATE DATA */
5366
6362
  if (id === undefined || id === null || id === '') {
5367
6363
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -5435,6 +6431,12 @@ class Phpipam extends AdapterBaseCl {
5435
6431
  const origin = `${this.id}-${meth}`;
5436
6432
  log.trace(origin);
5437
6433
 
6434
+ if (this.suspended && this.suspendMode === 'error') {
6435
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6436
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6437
+ return callback(null, errorObj);
6438
+ }
6439
+
5438
6440
  /* HERE IS WHERE YOU VALIDATE DATA */
5439
6441
  if (id === undefined || id === null || id === '') {
5440
6442
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -5508,6 +6510,12 @@ class Phpipam extends AdapterBaseCl {
5508
6510
  const origin = `${this.id}-${meth}`;
5509
6511
  log.trace(origin);
5510
6512
 
6513
+ if (this.suspended && this.suspendMode === 'error') {
6514
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6515
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6516
+ return callback(null, errorObj);
6517
+ }
6518
+
5511
6519
  /* HERE IS WHERE YOU VALIDATE DATA */
5512
6520
  if (searchString === undefined || searchString === null || searchString === '') {
5513
6521
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['searchString'], null, null, null);
@@ -5581,6 +6589,12 @@ class Phpipam extends AdapterBaseCl {
5581
6589
  const origin = `${this.id}-${meth}`;
5582
6590
  log.trace(origin);
5583
6591
 
6592
+ if (this.suspended && this.suspendMode === 'error') {
6593
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6594
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6595
+ return callback(null, errorObj);
6596
+ }
6597
+
5584
6598
  /* HERE IS WHERE YOU VALIDATE DATA */
5585
6599
  if (subcontroller === undefined || subcontroller === null || subcontroller === '') {
5586
6600
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subcontroller'], null, null, null);
@@ -5654,6 +6668,12 @@ class Phpipam extends AdapterBaseCl {
5654
6668
  const origin = `${this.id}-${meth}`;
5655
6669
  log.trace(origin);
5656
6670
 
6671
+ if (this.suspended && this.suspendMode === 'error') {
6672
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6673
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6674
+ return callback(null, errorObj);
6675
+ }
6676
+
5657
6677
  /* HERE IS WHERE YOU VALIDATE DATA */
5658
6678
  if (subcontroller === undefined || subcontroller === null || subcontroller === '') {
5659
6679
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subcontroller'], null, null, null);
@@ -5725,6 +6745,12 @@ class Phpipam extends AdapterBaseCl {
5725
6745
  const origin = `${this.id}-${meth}`;
5726
6746
  log.trace(origin);
5727
6747
 
6748
+ if (this.suspended && this.suspendMode === 'error') {
6749
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6750
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6751
+ return callback(null, errorObj);
6752
+ }
6753
+
5728
6754
  /* HERE IS WHERE YOU VALIDATE DATA */
5729
6755
  if (subcontroller === undefined || subcontroller === null || subcontroller === '') {
5730
6756
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subcontroller'], null, null, null);
@@ -5804,6 +6830,12 @@ class Phpipam extends AdapterBaseCl {
5804
6830
  const origin = `${this.id}-${meth}`;
5805
6831
  log.trace(origin);
5806
6832
 
6833
+ if (this.suspended && this.suspendMode === 'error') {
6834
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6835
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6836
+ return callback(null, errorObj);
6837
+ }
6838
+
5807
6839
  /* HERE IS WHERE YOU VALIDATE DATA */
5808
6840
  if (subcontroller === undefined || subcontroller === null || subcontroller === '') {
5809
6841
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subcontroller'], null, null, null);
@@ -5879,6 +6911,12 @@ class Phpipam extends AdapterBaseCl {
5879
6911
  const origin = `${this.id}-${meth}`;
5880
6912
  log.trace(origin);
5881
6913
 
6914
+ if (this.suspended && this.suspendMode === 'error') {
6915
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6916
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6917
+ return callback(null, errorObj);
6918
+ }
6919
+
5882
6920
  /* HERE IS WHERE YOU VALIDATE DATA */
5883
6921
  if (subcontroller === undefined || subcontroller === null || subcontroller === '') {
5884
6922
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subcontroller'], null, null, null);
@@ -5953,6 +6991,12 @@ class Phpipam extends AdapterBaseCl {
5953
6991
  const origin = `${this.id}-${meth}`;
5954
6992
  log.trace(origin);
5955
6993
 
6994
+ if (this.suspended && this.suspendMode === 'error') {
6995
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6996
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6997
+ return callback(null, errorObj);
6998
+ }
6999
+
5956
7000
  /* HERE IS WHERE YOU VALIDATE DATA */
5957
7001
  if (id === undefined || id === null || id === '') {
5958
7002
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6022,6 +7066,12 @@ class Phpipam extends AdapterBaseCl {
6022
7066
  const origin = `${this.id}-${meth}`;
6023
7067
  log.trace(origin);
6024
7068
 
7069
+ if (this.suspended && this.suspendMode === 'error') {
7070
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7071
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7072
+ return callback(null, errorObj);
7073
+ }
7074
+
6025
7075
  /* HERE IS WHERE YOU VALIDATE DATA */
6026
7076
  if (id === undefined || id === null || id === '') {
6027
7077
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6091,6 +7141,12 @@ class Phpipam extends AdapterBaseCl {
6091
7141
  const origin = `${this.id}-${meth}`;
6092
7142
  log.trace(origin);
6093
7143
 
7144
+ if (this.suspended && this.suspendMode === 'error') {
7145
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7146
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7147
+ return callback(null, errorObj);
7148
+ }
7149
+
6094
7150
  /* HERE IS WHERE YOU VALIDATE DATA */
6095
7151
  if (id === undefined || id === null || id === '') {
6096
7152
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6160,6 +7216,12 @@ class Phpipam extends AdapterBaseCl {
6160
7216
  const origin = `${this.id}-${meth}`;
6161
7217
  log.trace(origin);
6162
7218
 
7219
+ if (this.suspended && this.suspendMode === 'error') {
7220
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7221
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7222
+ return callback(null, errorObj);
7223
+ }
7224
+
6163
7225
  /* HERE IS WHERE YOU VALIDATE DATA */
6164
7226
  if (id === undefined || id === null || id === '') {
6165
7227
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6229,6 +7291,12 @@ class Phpipam extends AdapterBaseCl {
6229
7291
  const origin = `${this.id}-${meth}`;
6230
7292
  log.trace(origin);
6231
7293
 
7294
+ if (this.suspended && this.suspendMode === 'error') {
7295
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7296
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7297
+ return callback(null, errorObj);
7298
+ }
7299
+
6232
7300
  /* HERE IS WHERE YOU VALIDATE DATA */
6233
7301
  if (id === undefined || id === null || id === '') {
6234
7302
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6298,6 +7366,12 @@ class Phpipam extends AdapterBaseCl {
6298
7366
  const origin = `${this.id}-${meth}`;
6299
7367
  log.trace(origin);
6300
7368
 
7369
+ if (this.suspended && this.suspendMode === 'error') {
7370
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7371
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7372
+ return callback(null, errorObj);
7373
+ }
7374
+
6301
7375
  /* HERE IS WHERE YOU VALIDATE DATA */
6302
7376
  if (id === undefined || id === null || id === '') {
6303
7377
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6367,6 +7441,12 @@ class Phpipam extends AdapterBaseCl {
6367
7441
  const origin = `${this.id}-${meth}`;
6368
7442
  log.trace(origin);
6369
7443
 
7444
+ if (this.suspended && this.suspendMode === 'error') {
7445
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7446
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7447
+ return callback(null, errorObj);
7448
+ }
7449
+
6370
7450
  /* HERE IS WHERE YOU VALIDATE DATA */
6371
7451
  if (id === undefined || id === null || id === '') {
6372
7452
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6436,6 +7516,12 @@ class Phpipam extends AdapterBaseCl {
6436
7516
  const origin = `${this.id}-${meth}`;
6437
7517
  log.trace(origin);
6438
7518
 
7519
+ if (this.suspended && this.suspendMode === 'error') {
7520
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7521
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7522
+ return callback(null, errorObj);
7523
+ }
7524
+
6439
7525
  /* HERE IS WHERE YOU VALIDATE DATA */
6440
7526
  if (id === undefined || id === null || id === '') {
6441
7527
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6506,6 +7592,12 @@ class Phpipam extends AdapterBaseCl {
6506
7592
  const origin = `${this.id}-${meth}`;
6507
7593
  log.trace(origin);
6508
7594
 
7595
+ if (this.suspended && this.suspendMode === 'error') {
7596
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7597
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7598
+ return callback(null, errorObj);
7599
+ }
7600
+
6509
7601
  /* HERE IS WHERE YOU VALIDATE DATA */
6510
7602
  if (id === undefined || id === null || id === '') {
6511
7603
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6579,6 +7671,12 @@ class Phpipam extends AdapterBaseCl {
6579
7671
  const origin = `${this.id}-${meth}`;
6580
7672
  log.trace(origin);
6581
7673
 
7674
+ if (this.suspended && this.suspendMode === 'error') {
7675
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7676
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7677
+ return callback(null, errorObj);
7678
+ }
7679
+
6582
7680
  /* HERE IS WHERE YOU VALIDATE DATA */
6583
7681
  if (id === undefined || id === null || id === '') {
6584
7682
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
@@ -6652,6 +7750,12 @@ class Phpipam extends AdapterBaseCl {
6652
7750
  const origin = `${this.id}-${meth}`;
6653
7751
  log.trace(origin);
6654
7752
 
7753
+ if (this.suspended && this.suspendMode === 'error') {
7754
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7755
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7756
+ return callback(null, errorObj);
7757
+ }
7758
+
6655
7759
  /* HERE IS WHERE YOU VALIDATE DATA */
6656
7760
  if (customerType === undefined || customerType === null || customerType === '') {
6657
7761
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -6726,6 +7830,12 @@ class Phpipam extends AdapterBaseCl {
6726
7830
  const origin = `${this.id}-${meth}`;
6727
7831
  log.trace(origin);
6728
7832
 
7833
+ if (this.suspended && this.suspendMode === 'error') {
7834
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7835
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7836
+ return callback(null, errorObj);
7837
+ }
7838
+
6729
7839
  /* HERE IS WHERE YOU VALIDATE DATA */
6730
7840
  if (customerType === undefined || customerType === null || customerType === '') {
6731
7841
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -6804,6 +7914,12 @@ class Phpipam extends AdapterBaseCl {
6804
7914
  const origin = `${this.id}-${meth}`;
6805
7915
  log.trace(origin);
6806
7916
 
7917
+ if (this.suspended && this.suspendMode === 'error') {
7918
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7919
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7920
+ return callback(null, errorObj);
7921
+ }
7922
+
6807
7923
  /* HERE IS WHERE YOU VALIDATE DATA */
6808
7924
  if (customerType === undefined || customerType === null || customerType === '') {
6809
7925
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -6878,6 +7994,12 @@ class Phpipam extends AdapterBaseCl {
6878
7994
  const origin = `${this.id}-${meth}`;
6879
7995
  log.trace(origin);
6880
7996
 
7997
+ if (this.suspended && this.suspendMode === 'error') {
7998
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7999
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8000
+ return callback(null, errorObj);
8001
+ }
8002
+
6881
8003
  /* HERE IS WHERE YOU VALIDATE DATA */
6882
8004
  if (customerType === undefined || customerType === null || customerType === '') {
6883
8005
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -6958,6 +8080,12 @@ class Phpipam extends AdapterBaseCl {
6958
8080
  const origin = `${this.id}-${meth}`;
6959
8081
  log.trace(origin);
6960
8082
 
8083
+ if (this.suspended && this.suspendMode === 'error') {
8084
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8085
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8086
+ return callback(null, errorObj);
8087
+ }
8088
+
6961
8089
  /* HERE IS WHERE YOU VALIDATE DATA */
6962
8090
  if (customerType === undefined || customerType === null || customerType === '') {
6963
8091
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -7043,6 +8171,12 @@ class Phpipam extends AdapterBaseCl {
7043
8171
  const origin = `${this.id}-${meth}`;
7044
8172
  log.trace(origin);
7045
8173
 
8174
+ if (this.suspended && this.suspendMode === 'error') {
8175
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8176
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8177
+ return callback(null, errorObj);
8178
+ }
8179
+
7046
8180
  /* HERE IS WHERE YOU VALIDATE DATA */
7047
8181
  if (customerType === undefined || customerType === null || customerType === '') {
7048
8182
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -7124,6 +8258,12 @@ class Phpipam extends AdapterBaseCl {
7124
8258
  const origin = `${this.id}-${meth}`;
7125
8259
  log.trace(origin);
7126
8260
 
8261
+ if (this.suspended && this.suspendMode === 'error') {
8262
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8263
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8264
+ return callback(null, errorObj);
8265
+ }
8266
+
7127
8267
  /* HERE IS WHERE YOU VALIDATE DATA */
7128
8268
  if (customerType === undefined || customerType === null || customerType === '') {
7129
8269
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);
@@ -7203,6 +8343,12 @@ class Phpipam extends AdapterBaseCl {
7203
8343
  const origin = `${this.id}-${meth}`;
7204
8344
  log.trace(origin);
7205
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
+
7206
8352
  /* HERE IS WHERE YOU VALIDATE DATA */
7207
8353
  if (customerType === undefined || customerType === null || customerType === '') {
7208
8354
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['customerType'], null, null, null);