@itentialopensource/adapter-dna_center 0.5.4 → 0.5.7
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.
- package/.eslintignore +1 -0
- package/.eslintrc.js +12 -12
- package/CHANGELOG.md +24 -0
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +247 -0
- package/README.md +151 -379
- package/SUMMARY.md +9 -0
- package/TROUBLESHOOT.md +46 -0
- package/adapter.js +2212 -85
- package/adapterBase.js +848 -50
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/.system/action.json +1 -1
- package/entities/Sites/action.json +42 -0
- package/entities/Sites/schema.json +2 -0
- package/error.json +12 -0
- package/package.json +45 -23
- package/pronghorn.json +780 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +451 -11
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1594147160686.json +95 -0
- package/report/updateReport1614887797185.json +95 -0
- package/report/updateReport1651598418513.json +114 -0
- package/sampleProperties.json +20 -5
- package/test/integration/adapterTestBasicGet.js +85 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +87 -11
- package/test/unit/adapterBaseTestUnit.js +947 -0
- package/test/unit/adapterTestUnit.js +794 -18
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +9 -14
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +224 -0
- package/utils/findPath.js +74 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +1 -1
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +169 -0
- package/utils/tbUtils.js +464 -0
- package/utils/troubleshootingAdapter.js +190 -0
- package/gl-code-quality-report.json +0 -1
package/adapter.js
CHANGED
|
@@ -10,12 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
/* Required libraries. */
|
|
12
12
|
const path = require('path');
|
|
13
|
-
// const xmldom = require('xmldom');
|
|
14
13
|
|
|
15
14
|
/* Fetch in the other needed components for the this Adaptor */
|
|
16
15
|
const AdapterBaseCl = require(path.join(__dirname, 'adapterBase.js'));
|
|
17
16
|
|
|
18
|
-
|
|
19
17
|
/**
|
|
20
18
|
* This is the adapter/interface into Dna_center
|
|
21
19
|
*/
|
|
@@ -25,69 +23,275 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
25
23
|
/**
|
|
26
24
|
* DnaCenter Adapter
|
|
27
25
|
* @constructor
|
|
26
|
+
*/
|
|
27
|
+
/* Working on changing the way we do Emit methods due to size and time constrainsts
|
|
28
28
|
constructor(prongid, properties) {
|
|
29
29
|
// Instantiate the AdapterBase super class
|
|
30
30
|
super(prongid, properties);
|
|
31
31
|
|
|
32
|
+
const restFunctionNames = this.getWorkflowFunctions();
|
|
33
|
+
|
|
34
|
+
// Dynamically bind emit functions
|
|
35
|
+
for (let i = 0; i < restFunctionNames.length; i += 1) {
|
|
36
|
+
// Bind function to have name fnNameEmit for fnName
|
|
37
|
+
const version = restFunctionNames[i].match(/__v[0-9]+/);
|
|
38
|
+
const baseFnName = restFunctionNames[i].replace(/__v[0-9]+/, '');
|
|
39
|
+
const fnNameEmit = version ? `${baseFnName}Emit${version}` : `${baseFnName}Emit`;
|
|
40
|
+
this[fnNameEmit] = function (...args) {
|
|
41
|
+
// extract the callback
|
|
42
|
+
const callback = args[args.length - 1];
|
|
43
|
+
// slice the callback from args so we can insert our own
|
|
44
|
+
const functionArgs = args.slice(0, args.length - 1);
|
|
45
|
+
// create a random name for the listener
|
|
46
|
+
const eventName = `${restFunctionNames[i]}:${Math.random().toString(36)}`;
|
|
47
|
+
// tell the calling class to start listening
|
|
48
|
+
callback({ event: eventName, status: 'received' });
|
|
49
|
+
// store parent for use of this context later
|
|
50
|
+
const parent = this;
|
|
51
|
+
// store emission function
|
|
52
|
+
const func = function (val, err) {
|
|
53
|
+
parent.removeListener(eventName, func);
|
|
54
|
+
parent.emit(eventName, val, err);
|
|
55
|
+
};
|
|
56
|
+
// Use apply to call the function in a specific context
|
|
57
|
+
this[restFunctionNames[i]].apply(this, functionArgs.concat([func])); // eslint-disable-line prefer-spread
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
32
61
|
// Uncomment if you have things to add to the constructor like using your own properties.
|
|
33
62
|
// Otherwise the constructor in the adapterBase will be used.
|
|
34
63
|
// Capture my own properties - they need to be defined in propertiesSchema.json
|
|
35
|
-
if (this.allProps && this.allProps.myownproperty) {
|
|
36
|
-
|
|
37
|
-
}
|
|
64
|
+
// if (this.allProps && this.allProps.myownproperty) {
|
|
65
|
+
// mypropvariable = this.allProps.myownproperty;
|
|
66
|
+
// }
|
|
38
67
|
}
|
|
39
68
|
*/
|
|
40
69
|
|
|
41
|
-
|
|
42
70
|
/**
|
|
43
71
|
* @callback healthCallback
|
|
44
|
-
* @param {Object}
|
|
72
|
+
* @param {Object} reqObj - the request to send into the healthcheck
|
|
73
|
+
* @param {Callback} callback - The results of the call
|
|
45
74
|
*/
|
|
75
|
+
healthCheck(reqObj, callback) {
|
|
76
|
+
// you can modify what is passed into the healthcheck by changing things in the newReq
|
|
77
|
+
let newReq = null;
|
|
78
|
+
if (reqObj) {
|
|
79
|
+
newReq = Object.assign(...reqObj);
|
|
80
|
+
}
|
|
81
|
+
super.healthCheck(newReq, callback);
|
|
82
|
+
}
|
|
83
|
+
|
|
46
84
|
/**
|
|
47
|
-
* @
|
|
48
|
-
* @param {Object} result - the result of the get request (entity/ies)
|
|
49
|
-
* @param {String} error - any error that occurred
|
|
85
|
+
* @iapGetAdapterWorkflowFunctions
|
|
50
86
|
*/
|
|
87
|
+
iapGetAdapterWorkflowFunctions(inIgnore) {
|
|
88
|
+
let myIgnore = ['hasEntities', 'hasDevices'];
|
|
89
|
+
if (!inIgnore && Array.isArray(inIgnore)) {
|
|
90
|
+
myIgnore = inIgnore;
|
|
91
|
+
} else if (!inIgnore && typeof inIgnore === 'string') {
|
|
92
|
+
myIgnore = [inIgnore];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The generic adapter functions should already be ignored (e.g. healthCheck)
|
|
96
|
+
// you can add specific methods that you do not want to be workflow functions to ignore like below
|
|
97
|
+
// myIgnore.push('myMethodNotInWorkflow');
|
|
98
|
+
|
|
99
|
+
return super.iapGetAdapterWorkflowFunctions(myIgnore);
|
|
100
|
+
}
|
|
101
|
+
|
|
51
102
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
103
|
+
* iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
|
|
104
|
+
* allows customers to make changes to adapter configuration without having to be on the
|
|
105
|
+
* file system.
|
|
106
|
+
*
|
|
107
|
+
* @function iapUpdateAdapterConfiguration
|
|
108
|
+
* @param {string} configFile - the name of the file being updated (required)
|
|
109
|
+
* @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
|
|
110
|
+
* @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
|
|
111
|
+
* @param {string} type - the type of entity file to change, (action, schema, mock) (optional)
|
|
112
|
+
* @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
|
|
113
|
+
* @param {Callback} callback - The results of the call
|
|
55
114
|
*/
|
|
115
|
+
iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
|
|
116
|
+
const origin = `${this.id}-adapter-iapUpdateAdapterConfiguration`;
|
|
117
|
+
log.trace(origin);
|
|
118
|
+
super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
|
|
119
|
+
}
|
|
120
|
+
|
|
56
121
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
122
|
+
* See if the API path provided is found in this adapter
|
|
123
|
+
*
|
|
124
|
+
* @function iapFindAdapterPath
|
|
125
|
+
* @param {string} apiPath - the api path to check on
|
|
126
|
+
* @param {Callback} callback - The results of the call
|
|
60
127
|
*/
|
|
128
|
+
iapFindAdapterPath(apiPath, callback) {
|
|
129
|
+
const origin = `${this.id}-adapter-iapFindAdapterPath`;
|
|
130
|
+
log.trace(origin);
|
|
131
|
+
super.iapFindAdapterPath(apiPath, callback);
|
|
132
|
+
}
|
|
133
|
+
|
|
61
134
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
135
|
+
* @summary Suspends adapter
|
|
136
|
+
*
|
|
137
|
+
* @function iapSuspendAdapter
|
|
138
|
+
* @param {Callback} callback - callback function
|
|
139
|
+
*/
|
|
140
|
+
iapSuspendAdapter(mode, callback) {
|
|
141
|
+
const origin = `${this.id}-adapter-iapSuspendAdapter`;
|
|
142
|
+
log.trace(origin);
|
|
143
|
+
try {
|
|
144
|
+
return super.iapSuspendAdapter(mode, callback);
|
|
145
|
+
} catch (error) {
|
|
146
|
+
log.error(`${origin}: ${error}`);
|
|
147
|
+
return callback(null, error);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @summary Unsuspends adapter
|
|
153
|
+
*
|
|
154
|
+
* @function iapUnsuspendAdapter
|
|
155
|
+
* @param {Callback} callback - callback function
|
|
156
|
+
*/
|
|
157
|
+
iapUnsuspendAdapter(callback) {
|
|
158
|
+
const origin = `${this.id}-adapter-iapUnsuspendAdapter`;
|
|
159
|
+
log.trace(origin);
|
|
160
|
+
try {
|
|
161
|
+
return super.iapUnsuspendAdapter(callback);
|
|
162
|
+
} catch (error) {
|
|
163
|
+
log.error(`${origin}: ${error}`);
|
|
164
|
+
return callback(null, error);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @summary Get the Adaoter Queue
|
|
170
|
+
*
|
|
171
|
+
* @function iapGetAdapterQueue
|
|
172
|
+
* @param {Callback} callback - callback function
|
|
173
|
+
*/
|
|
174
|
+
iapGetAdapterQueue(callback) {
|
|
175
|
+
const origin = `${this.id}-adapter-iapGetAdapterQueue`;
|
|
176
|
+
log.trace(origin);
|
|
177
|
+
return super.iapGetAdapterQueue(callback);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @summary Runs troubleshoot scripts for adapter
|
|
182
|
+
*
|
|
183
|
+
* @function iapTroubleshootAdapter
|
|
184
|
+
* @param {Object} props - the connection, healthcheck and authentication properties
|
|
185
|
+
*
|
|
186
|
+
* @param {boolean} persistFlag - whether the adapter properties should be updated
|
|
187
|
+
* @param {Callback} callback - The results of the call
|
|
188
|
+
*/
|
|
189
|
+
iapTroubleshootAdapter(props, persistFlag, callback) {
|
|
190
|
+
const origin = `${this.id}-adapter-iapTroubleshootAdapter`;
|
|
191
|
+
log.trace(origin);
|
|
192
|
+
try {
|
|
193
|
+
return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
log.error(`${origin}: ${error}`);
|
|
196
|
+
return callback(null, error);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @summary runs healthcheck script for adapter
|
|
202
|
+
*
|
|
203
|
+
* @function iapRunAdapterHealthcheck
|
|
204
|
+
* @param {Adapter} adapter - adapter instance to troubleshoot
|
|
205
|
+
* @param {Callback} callback - callback function
|
|
206
|
+
*/
|
|
207
|
+
iapRunAdapterHealthcheck(callback) {
|
|
208
|
+
const origin = `${this.id}-adapter-iapRunAdapterHealthcheck`;
|
|
209
|
+
log.trace(origin);
|
|
210
|
+
try {
|
|
211
|
+
return super.iapRunAdapterHealthcheck(this, callback);
|
|
212
|
+
} catch (error) {
|
|
213
|
+
log.error(`${origin}: ${error}`);
|
|
214
|
+
return callback(null, error);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @summary runs connectivity check script for adapter
|
|
220
|
+
*
|
|
221
|
+
* @function iapRunAdapterConnectivity
|
|
222
|
+
* @param {Callback} callback - callback function
|
|
223
|
+
*/
|
|
224
|
+
iapRunAdapterConnectivity(callback) {
|
|
225
|
+
const origin = `${this.id}-adapter-iapRunAdapterConnectivity`;
|
|
226
|
+
log.trace(origin);
|
|
227
|
+
try {
|
|
228
|
+
return super.iapRunAdapterConnectivity(callback);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
log.error(`${origin}: ${error}`);
|
|
231
|
+
return callback(null, error);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @summary runs basicGet script for adapter
|
|
237
|
+
*
|
|
238
|
+
* @function iapRunAdapterBasicGet
|
|
239
|
+
* @param {Callback} callback - callback function
|
|
240
|
+
*/
|
|
241
|
+
iapRunAdapterBasicGet(callback) {
|
|
242
|
+
const origin = `${this.id}-adapter-iapRunAdapterBasicGet`;
|
|
243
|
+
log.trace(origin);
|
|
244
|
+
try {
|
|
245
|
+
return super.iapRunAdapterBasicGet(callback);
|
|
246
|
+
} catch (error) {
|
|
247
|
+
log.error(`${origin}: ${error}`);
|
|
248
|
+
return callback(null, error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @summary moves entites into Mongo DB
|
|
254
|
+
*
|
|
255
|
+
* @function iapMoveAdapterEntitiesToDB
|
|
256
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
257
|
+
* or the error
|
|
65
258
|
*/
|
|
259
|
+
iapMoveAdapterEntitiesToDB(callback) {
|
|
260
|
+
const origin = `${this.id}-adapter-iapMoveAdapterEntitiesToDB`;
|
|
261
|
+
log.trace(origin);
|
|
262
|
+
try {
|
|
263
|
+
return super.iapMoveAdapterEntitiesToDB(callback);
|
|
264
|
+
} catch (err) {
|
|
265
|
+
log.error(`${origin}: ${err}`);
|
|
266
|
+
return callback(null, err);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
66
269
|
|
|
270
|
+
/* BROKER CALLS */
|
|
67
271
|
/**
|
|
68
272
|
* @summary Determines if this adapter supports the specific entity
|
|
69
273
|
*
|
|
70
|
-
* @function
|
|
274
|
+
* @function iapHasAdapterEntity
|
|
71
275
|
* @param {String} entityType - the entity type to check for
|
|
72
276
|
* @param {String/Array} entityId - the specific entity we are looking for
|
|
73
277
|
*
|
|
74
278
|
* @param {Callback} callback - An array of whether the adapter can has the
|
|
75
279
|
* desired capability or an error
|
|
76
280
|
*/
|
|
77
|
-
|
|
78
|
-
const origin = `${this.id}-adapter-
|
|
281
|
+
iapHasAdapterEntity(entityType, entityId, callback) {
|
|
282
|
+
const origin = `${this.id}-adapter-iapHasAdapterEntity`;
|
|
79
283
|
log.trace(origin);
|
|
80
284
|
|
|
81
285
|
// Make the call -
|
|
82
|
-
//
|
|
83
|
-
return this.
|
|
286
|
+
// iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
|
|
287
|
+
return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
|
|
84
288
|
}
|
|
85
289
|
|
|
86
290
|
/**
|
|
87
291
|
* @summary Provides a way for the adapter to tell north bound integrations
|
|
88
292
|
* whether the adapter supports type, action and specific entity
|
|
89
293
|
*
|
|
90
|
-
* @function
|
|
294
|
+
* @function iapVerifyAdapterCapability
|
|
91
295
|
* @param {String} entityType - the entity type to check for
|
|
92
296
|
* @param {String} actionType - the action type to check for
|
|
93
297
|
* @param {String/Array} entityId - the specific entity we are looking for
|
|
@@ -95,15 +299,15 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
95
299
|
* @param {Callback} callback - An array of whether the adapter can has the
|
|
96
300
|
* desired capability or an error
|
|
97
301
|
*/
|
|
98
|
-
|
|
99
|
-
const meth = 'adapterBase-
|
|
302
|
+
iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
|
|
303
|
+
const meth = 'adapterBase-iapVerifyAdapterCapability';
|
|
100
304
|
const origin = `${this.id}-${meth}`;
|
|
101
305
|
log.trace(origin);
|
|
102
306
|
|
|
103
307
|
// if caching
|
|
104
308
|
if (this.caching) {
|
|
105
|
-
// Make the call -
|
|
106
|
-
return this.requestHandlerInst.
|
|
309
|
+
// Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
|
|
310
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
|
|
107
311
|
if (error) {
|
|
108
312
|
return callback(null, error);
|
|
109
313
|
}
|
|
@@ -121,7 +325,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
121
325
|
}
|
|
122
326
|
|
|
123
327
|
// need to check the cache again since it has been updated
|
|
124
|
-
return this.requestHandlerInst.
|
|
328
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
|
|
125
329
|
if (verror) {
|
|
126
330
|
return callback(null, verror);
|
|
127
331
|
}
|
|
@@ -154,7 +358,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
154
358
|
// if no entity id
|
|
155
359
|
if (!entityId) {
|
|
156
360
|
// need to check the cache again since it has been updated
|
|
157
|
-
return this.requestHandlerInst.
|
|
361
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
|
|
158
362
|
if (verror) {
|
|
159
363
|
return callback(null, verror);
|
|
160
364
|
}
|
|
@@ -175,7 +379,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
175
379
|
}
|
|
176
380
|
|
|
177
381
|
// need to check the cache again since it has been updated
|
|
178
|
-
return this.requestHandlerInst.
|
|
382
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
|
|
179
383
|
if (verror) {
|
|
180
384
|
return callback(null, verror);
|
|
181
385
|
}
|
|
@@ -208,31 +412,766 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
208
412
|
}
|
|
209
413
|
}
|
|
210
414
|
|
|
211
|
-
return callback(result);
|
|
212
|
-
}
|
|
415
|
+
return callback(result);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* @summary Updates the cache for all entities by call the get All entity method
|
|
422
|
+
*
|
|
423
|
+
* @function iapUpdateAdapterEntityCache
|
|
424
|
+
*
|
|
425
|
+
*/
|
|
426
|
+
iapUpdateAdapterEntityCache() {
|
|
427
|
+
const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
|
|
428
|
+
log.trace(origin);
|
|
429
|
+
|
|
430
|
+
if (this.caching) {
|
|
431
|
+
// if the cache is invalid, update the cache
|
|
432
|
+
this.getEntities(null, null, null, null, (data, err) => {
|
|
433
|
+
if (err) {
|
|
434
|
+
log.trace(`${origin}: Could not load template_entity into cache - ${err}`);
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* @summary Determines if this adapter supports any in a list of entities
|
|
442
|
+
*
|
|
443
|
+
* @function hasEntities
|
|
444
|
+
* @param {String} entityType - the entity type to check for
|
|
445
|
+
* @param {Array} entityList - the list of entities we are looking for
|
|
446
|
+
*
|
|
447
|
+
* @param {Callback} callback - A map where the entity is the key and the
|
|
448
|
+
* value is true or false
|
|
449
|
+
*/
|
|
450
|
+
hasEntities(entityType, entityList, callback) {
|
|
451
|
+
const origin = `${this.id}-adapter-hasEntities`;
|
|
452
|
+
log.trace(origin);
|
|
453
|
+
|
|
454
|
+
switch (entityType) {
|
|
455
|
+
case 'Device':
|
|
456
|
+
return this.hasDevices(entityList, callback);
|
|
457
|
+
default:
|
|
458
|
+
return callback(null, `${this.id} does not support entity ${entityType}`);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* @summary Helper method for hasEntities for the specific device case
|
|
464
|
+
*
|
|
465
|
+
* @param {Array} deviceList - array of unique device identifiers
|
|
466
|
+
* @param {Callback} callback - A map where the device is the key and the
|
|
467
|
+
* value is true or false
|
|
468
|
+
*/
|
|
469
|
+
hasDevices(deviceList, callback) {
|
|
470
|
+
const origin = `${this.id}-adapter-hasDevices`;
|
|
471
|
+
log.trace(origin);
|
|
472
|
+
|
|
473
|
+
const findings = deviceList.reduce((map, device) => {
|
|
474
|
+
// eslint-disable-next-line no-param-reassign
|
|
475
|
+
map[device] = false;
|
|
476
|
+
log.debug(`In reduce: ${JSON.stringify(map)}`);
|
|
477
|
+
return map;
|
|
478
|
+
}, {});
|
|
479
|
+
const apiCalls = deviceList.map((device) => new Promise((resolve) => {
|
|
480
|
+
this.getDevice(device, (result, error) => {
|
|
481
|
+
if (error) {
|
|
482
|
+
log.debug(`In map error: ${JSON.stringify(device)}`);
|
|
483
|
+
return resolve({ name: device, found: false });
|
|
484
|
+
}
|
|
485
|
+
log.debug(`In map: ${JSON.stringify(device)}`);
|
|
486
|
+
return resolve({ name: device, found: true });
|
|
487
|
+
});
|
|
488
|
+
}));
|
|
489
|
+
Promise.all(apiCalls).then((results) => {
|
|
490
|
+
results.forEach((device) => {
|
|
491
|
+
findings[device.name] = device.found;
|
|
492
|
+
});
|
|
493
|
+
log.debug(`FINDINGS: ${JSON.stringify(findings)}`);
|
|
494
|
+
return callback(findings);
|
|
495
|
+
}).catch((errors) => {
|
|
496
|
+
log.error('Unable to do device lookup.');
|
|
497
|
+
return callback(null, { code: 503, message: 'Unable to do device lookup.', error: errors });
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @summary Get Appliance that match the deviceName
|
|
503
|
+
*
|
|
504
|
+
* @function getDevice
|
|
505
|
+
* @param {String} deviceName - the deviceName to find (required)
|
|
506
|
+
*
|
|
507
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
508
|
+
* (appliance) or the error
|
|
509
|
+
*/
|
|
510
|
+
getDevice(deviceName, callback) {
|
|
511
|
+
const meth = 'adapter-getDevice';
|
|
512
|
+
const origin = `${this.id}-${meth}`;
|
|
513
|
+
log.trace(origin);
|
|
514
|
+
|
|
515
|
+
// make sure we are set up for device broker getDevice
|
|
516
|
+
if (!this.allProps.devicebroker || !this.allProps.devicebroker.getDevice || this.allProps.devicebroker.getDevice.length === 0 || !this.allProps.devicebroker.getDevice[0].path) {
|
|
517
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Properties', ['devicebroker.getDevice.path'], null, null, null);
|
|
518
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
519
|
+
return callback(null, errorObj);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
523
|
+
if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
|
|
524
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
|
|
525
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
526
|
+
return callback(null, errorObj);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
try {
|
|
530
|
+
// need to get the device so we can convert the deviceName to an id
|
|
531
|
+
// !! if we can do a lookup by name the getDevicesFiltered may not be necessary
|
|
532
|
+
const opts = {
|
|
533
|
+
filter: {
|
|
534
|
+
name: deviceName
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
return this.getDevicesFiltered(opts, (devs, ferr) => {
|
|
538
|
+
// if we received an error or their is no response on the results return an error
|
|
539
|
+
if (ferr) {
|
|
540
|
+
return callback(null, ferr);
|
|
541
|
+
}
|
|
542
|
+
if (devs.list.length < 1) {
|
|
543
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
|
|
544
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
545
|
+
return callback(null, errorObj);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const callPromises = [];
|
|
549
|
+
for (let i = 0; i < this.allProps.devicebroker.getDevice.length; i += 1) {
|
|
550
|
+
// Perform component calls here.
|
|
551
|
+
callPromises.push(
|
|
552
|
+
new Promise((resolve, reject) => {
|
|
553
|
+
this.iapMakeBrokerCall('getDevice', this.allProps.devicebroker.getDevice[i], devs.list[0], null, (callRet, callErr) => {
|
|
554
|
+
// return an error
|
|
555
|
+
if (callErr) {
|
|
556
|
+
reject(callErr);
|
|
557
|
+
} else {
|
|
558
|
+
// return the data
|
|
559
|
+
resolve(callRet);
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
})
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// return an array of repsonses
|
|
567
|
+
return Promise.all(callPromises).then((results) => {
|
|
568
|
+
let myResult = {};
|
|
569
|
+
results.forEach((result) => {
|
|
570
|
+
myResult = { ...myResult, ...result };
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
return callback(myResult, null);
|
|
574
|
+
})
|
|
575
|
+
.catch((error) => {
|
|
576
|
+
log.debug(`Caught ${JSON.stringify(error)}`);
|
|
577
|
+
return callback(null, error);
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
} catch (ex) {
|
|
581
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
582
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
583
|
+
return callback(null, errorObj);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @summary Get Appliances that match the filter
|
|
589
|
+
*
|
|
590
|
+
* @function getDevicesFiltered
|
|
591
|
+
* @param {Object} options - the data to use to filter the appliances (optional)
|
|
592
|
+
*
|
|
593
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
594
|
+
* (appliances) or the error
|
|
595
|
+
*/
|
|
596
|
+
getDevicesFiltered(options, callback) {
|
|
597
|
+
const meth = 'adapter-getDevicesFiltered';
|
|
598
|
+
const origin = `${this.id}-${meth}`;
|
|
599
|
+
log.trace(origin);
|
|
600
|
+
|
|
601
|
+
// make sure we are set up for device broker getDevicesFiltered
|
|
602
|
+
if (!this.allProps.devicebroker || !this.allProps.devicebroker.getDevicesFiltered || this.allProps.devicebroker.getDevicesFiltered.length === 0 || !this.allProps.devicebroker.getDevicesFiltered[0].path) {
|
|
603
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Properties', ['devicebroker.getDevicesFiltered.path'], null, null, null);
|
|
604
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
605
|
+
return callback(null, errorObj);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// verify the required fields have been provided
|
|
609
|
+
if (options === undefined || options === null || options === '' || options.length === 0) {
|
|
610
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['options'], null, null, null);
|
|
611
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
612
|
+
return callback(null, errorObj);
|
|
613
|
+
}
|
|
614
|
+
log.debug(`Device Filter Options: ${JSON.stringify(options)}`);
|
|
615
|
+
|
|
616
|
+
try {
|
|
617
|
+
// TODO - get pagination working
|
|
618
|
+
// const nextToken = options.start;
|
|
619
|
+
// const maxResults = options.limit;
|
|
620
|
+
|
|
621
|
+
// set up the filter of Device Names
|
|
622
|
+
let filterName = [];
|
|
623
|
+
if (options && options.filter && options.filter.name) {
|
|
624
|
+
// when this hack is removed, remove the lint ignore above
|
|
625
|
+
if (Array.isArray(options.filter.name)) {
|
|
626
|
+
// eslint-disable-next-line prefer-destructuring
|
|
627
|
+
filterName = options.filter.name;
|
|
628
|
+
} else {
|
|
629
|
+
filterName = [options.filter.name];
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// TODO - get sort and order working
|
|
634
|
+
/*
|
|
635
|
+
if (options && options.sort) {
|
|
636
|
+
reqObj.uriOptions.sort = JSON.stringify(options.sort);
|
|
637
|
+
}
|
|
638
|
+
if (options && options.order) {
|
|
639
|
+
reqObj.uriOptions.order = options.order;
|
|
640
|
+
}
|
|
641
|
+
*/
|
|
642
|
+
const callPromises = [];
|
|
643
|
+
for (let i = 0; i < this.allProps.devicebroker.getDevicesFiltered.length; i += 1) {
|
|
644
|
+
// Perform component calls here.
|
|
645
|
+
callPromises.push(
|
|
646
|
+
new Promise((resolve, reject) => {
|
|
647
|
+
this.iapMakeBrokerCall('getDevicesFiltered', this.allProps.devicebroker.getDevicesFiltered[i], {}, filterName, (callRet, callErr) => {
|
|
648
|
+
// return an error
|
|
649
|
+
if (callErr) {
|
|
650
|
+
reject(callErr);
|
|
651
|
+
} else {
|
|
652
|
+
// return the data
|
|
653
|
+
resolve(callRet);
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
})
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
// return an array of repsonses
|
|
661
|
+
return Promise.all(callPromises).then((results) => {
|
|
662
|
+
let myResult = [];
|
|
663
|
+
results.forEach((result) => {
|
|
664
|
+
if (Array.isArray(result)) {
|
|
665
|
+
myResult = [...myResult, ...result];
|
|
666
|
+
} else if (Object.keys(result).length > 0) {
|
|
667
|
+
myResult.push(result);
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
log.debug(`${origin}: Found #${myResult.length} devices.`);
|
|
672
|
+
log.debug(`Devices: ${JSON.stringify(myResult)}`);
|
|
673
|
+
return callback({ total: myResult.length, list: myResult });
|
|
674
|
+
})
|
|
675
|
+
.catch((error) => {
|
|
676
|
+
log.debug(`Caught ${JSON.stringify(error)}`);
|
|
677
|
+
return callback(null, error);
|
|
678
|
+
});
|
|
679
|
+
} catch (ex) {
|
|
680
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
681
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
682
|
+
return callback(null, errorObj);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @summary Gets the status for the provided appliance
|
|
688
|
+
*
|
|
689
|
+
* @function isAlive
|
|
690
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
691
|
+
*
|
|
692
|
+
* @param {configCallback} callback - callback function to return the result
|
|
693
|
+
* (appliance isAlive) or the error
|
|
694
|
+
*/
|
|
695
|
+
isAlive(deviceName, callback) {
|
|
696
|
+
const meth = 'adapter-isAlive';
|
|
697
|
+
const origin = `${this.id}-${meth}`;
|
|
698
|
+
log.trace(origin);
|
|
699
|
+
|
|
700
|
+
// make sure we are set up for device broker isAlive
|
|
701
|
+
if (!this.allProps.devicebroker || !this.allProps.devicebroker.isAlive || this.allProps.devicebroker.isAlive.length === 0 || !this.allProps.devicebroker.isAlive[0].path) {
|
|
702
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Properties', ['devicebroker.isAlive.path'], null, null, null);
|
|
703
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
704
|
+
return callback(null, errorObj);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// verify the required fields have been provided
|
|
708
|
+
if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
|
|
709
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
|
|
710
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
711
|
+
return callback(null, errorObj);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
try {
|
|
715
|
+
// need to get the device so we can convert the deviceName to an id
|
|
716
|
+
// !! if we can do a lookup by name the getDevicesFiltered may not be necessary
|
|
717
|
+
const opts = {
|
|
718
|
+
filter: {
|
|
719
|
+
name: deviceName
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
return this.getDevicesFiltered(opts, (devs, ferr) => {
|
|
723
|
+
// if we received an error or their is no response on the results return an error
|
|
724
|
+
if (ferr) {
|
|
725
|
+
return callback(null, ferr);
|
|
726
|
+
}
|
|
727
|
+
if (devs.list.length < 1) {
|
|
728
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
|
|
729
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
730
|
+
return callback(null, errorObj);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
const callPromises = [];
|
|
734
|
+
for (let i = 0; i < this.allProps.devicebroker.isAlive.length; i += 1) {
|
|
735
|
+
// Perform component calls here.
|
|
736
|
+
callPromises.push(
|
|
737
|
+
new Promise((resolve, reject) => {
|
|
738
|
+
this.iapMakeBrokerCall('isAlive', this.allProps.devicebroker.isAlive[i], devs.list[0], null, (callRet, callErr) => {
|
|
739
|
+
// return an error
|
|
740
|
+
if (callErr) {
|
|
741
|
+
reject(callErr);
|
|
742
|
+
} else {
|
|
743
|
+
// return the data
|
|
744
|
+
resolve(callRet);
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
})
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// return an array of repsonses
|
|
752
|
+
return Promise.all(callPromises).then((results) => {
|
|
753
|
+
let myResult = {};
|
|
754
|
+
results.forEach((result) => {
|
|
755
|
+
myResult = { ...myResult, ...result };
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
let response = true;
|
|
759
|
+
if (myResult.isAlive !== null && myResult.isAlive !== undefined && myResult.isAlive === false) {
|
|
760
|
+
response = false;
|
|
761
|
+
}
|
|
762
|
+
return callback(response);
|
|
763
|
+
})
|
|
764
|
+
.catch((error) => {
|
|
765
|
+
log.debug(`Caught ${JSON.stringify(error)}`);
|
|
766
|
+
return callback(null, error);
|
|
767
|
+
});
|
|
768
|
+
});
|
|
769
|
+
} catch (ex) {
|
|
770
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
771
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
772
|
+
return callback(null, errorObj);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @summary Gets a config for the provided Appliance
|
|
778
|
+
*
|
|
779
|
+
* @function getConfig
|
|
780
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
781
|
+
* @param {String} format - the desired format of the config. (optional)
|
|
782
|
+
*
|
|
783
|
+
* @param {configCallback} callback - callback function to return the result
|
|
784
|
+
* (appliance config) or the error
|
|
785
|
+
*/
|
|
786
|
+
getConfig(deviceName, format, callback) {
|
|
787
|
+
const meth = 'adapter-getConfig';
|
|
788
|
+
const origin = `${this.id}-${meth}`;
|
|
789
|
+
log.trace(origin);
|
|
790
|
+
|
|
791
|
+
// make sure we are set up for device broker getConfig
|
|
792
|
+
if (!this.allProps.devicebroker || !this.allProps.devicebroker.getConfig || this.allProps.devicebroker.getConfig.length === 0 || !this.allProps.devicebroker.getConfig[0].path) {
|
|
793
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Properties', ['devicebroker.getConfig.path'], null, null, null);
|
|
794
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
795
|
+
return callback(null, errorObj);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
// verify the required fields have been provided
|
|
799
|
+
if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
|
|
800
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
|
|
801
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
802
|
+
return callback(null, errorObj);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
try {
|
|
806
|
+
// need to get the device so we can convert the deviceName to an id
|
|
807
|
+
// !! if we can do a lookup by name the getDevicesFiltered may not be necessary
|
|
808
|
+
const opts = {
|
|
809
|
+
filter: {
|
|
810
|
+
name: deviceName
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
return this.getDevicesFiltered(opts, (devs, ferr) => {
|
|
814
|
+
// if we received an error or their is no response on the results return an error
|
|
815
|
+
if (ferr) {
|
|
816
|
+
return callback(null, ferr);
|
|
817
|
+
}
|
|
818
|
+
if (devs.list.length < 1) {
|
|
819
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
|
|
820
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
821
|
+
return callback(null, errorObj);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
const callPromises = [];
|
|
825
|
+
for (let i = 0; i < this.allProps.devicebroker.getConfig.length; i += 1) {
|
|
826
|
+
// Perform component calls here.
|
|
827
|
+
callPromises.push(
|
|
828
|
+
new Promise((resolve, reject) => {
|
|
829
|
+
this.iapMakeBrokerCall('getConfig', this.allProps.devicebroker.getConfig[i], devs.list[0], null, (callRet, callErr) => {
|
|
830
|
+
// return an error
|
|
831
|
+
if (callErr) {
|
|
832
|
+
reject(callErr);
|
|
833
|
+
} else {
|
|
834
|
+
// return the data
|
|
835
|
+
resolve(callRet);
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
})
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// return an array of repsonses
|
|
843
|
+
return Promise.all(callPromises).then((results) => {
|
|
844
|
+
let myResult = {};
|
|
845
|
+
results.forEach((result) => {
|
|
846
|
+
myResult = { ...myResult, ...result };
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
// return the result
|
|
850
|
+
const newResponse = {
|
|
851
|
+
response: JSON.stringify(myResult, null, 2)
|
|
852
|
+
};
|
|
853
|
+
return callback(newResponse, null);
|
|
854
|
+
})
|
|
855
|
+
.catch((error) => {
|
|
856
|
+
log.debug(`Caught ${JSON.stringify(error)}`);
|
|
857
|
+
return callback(null, error);
|
|
858
|
+
});
|
|
859
|
+
});
|
|
860
|
+
} catch (ex) {
|
|
861
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
862
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
863
|
+
return callback(null, errorObj);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* @summary Gets the device count from the system
|
|
869
|
+
*
|
|
870
|
+
* @function iapGetDeviceCount
|
|
871
|
+
*
|
|
872
|
+
* @param {getCallback} callback - callback function to return the result
|
|
873
|
+
* (count) or the error
|
|
874
|
+
*/
|
|
875
|
+
iapGetDeviceCount(callback) {
|
|
876
|
+
const meth = 'adapter-iapGetDeviceCount';
|
|
877
|
+
const origin = `${this.id}-${meth}`;
|
|
878
|
+
log.trace(origin);
|
|
879
|
+
|
|
880
|
+
// make sure we are set up for device broker getCount
|
|
881
|
+
if (!this.allProps.devicebroker || !this.allProps.devicebroker.getCount || this.allProps.devicebroker.getCount.length === 0 || !this.allProps.devicebroker.getCount[0].path) {
|
|
882
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Properties', ['devicebroker.getCount.path'], null, null, null);
|
|
883
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
884
|
+
return callback(null, errorObj);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// verify the required fields have been provided
|
|
888
|
+
|
|
889
|
+
try {
|
|
890
|
+
const callPromises = [];
|
|
891
|
+
for (let i = 0; i < this.allProps.devicebroker.getCount.length; i += 1) {
|
|
892
|
+
// Perform component calls here.
|
|
893
|
+
callPromises.push(
|
|
894
|
+
new Promise((resolve, reject) => {
|
|
895
|
+
this.iapMakeBrokerCall('getCount', this.allProps.devicebroker.getCount[i], null, null, (callRet, callErr) => {
|
|
896
|
+
// return an error
|
|
897
|
+
if (callErr) {
|
|
898
|
+
reject(callErr);
|
|
899
|
+
} else {
|
|
900
|
+
// return the data
|
|
901
|
+
resolve(callRet);
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
})
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
// return an array of repsonses
|
|
909
|
+
return Promise.all(callPromises).then((results) => {
|
|
910
|
+
let myResult = {};
|
|
911
|
+
results.forEach((result) => {
|
|
912
|
+
myResult = { ...myResult, ...result };
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
// return the result
|
|
916
|
+
return callback({ count: myResult.length });
|
|
917
|
+
})
|
|
918
|
+
.catch((error) => {
|
|
919
|
+
log.debug(`Caught ${JSON.stringify(error)}`);
|
|
920
|
+
return callback(null, error);
|
|
921
|
+
});
|
|
922
|
+
} catch (ex) {
|
|
923
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
924
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
925
|
+
return callback(null, errorObj);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
|
|
930
|
+
/**
|
|
931
|
+
* Makes the requested generic call
|
|
932
|
+
*
|
|
933
|
+
* @function genericAdapterRequest
|
|
934
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
|
|
935
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
|
|
936
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
937
|
+
* Can be a stringified Object.
|
|
938
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
939
|
+
* Can be a stringified Object.
|
|
940
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
941
|
+
* Can be a stringified Object.
|
|
942
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
943
|
+
* or the error
|
|
944
|
+
*/
|
|
945
|
+
genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
|
|
946
|
+
const meth = 'adapter-genericAdapterRequest';
|
|
947
|
+
const origin = `${this.id}-${meth}`;
|
|
948
|
+
log.trace(origin);
|
|
949
|
+
|
|
950
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
951
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
952
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
953
|
+
return callback(null, errorObj);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
957
|
+
if (uriPath === undefined || uriPath === null || uriPath === '') {
|
|
958
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
|
|
959
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
960
|
+
return callback(null, errorObj);
|
|
961
|
+
}
|
|
962
|
+
if (restMethod === undefined || restMethod === null || restMethod === '') {
|
|
963
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
|
|
964
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
965
|
+
return callback(null, errorObj);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
969
|
+
// remove any leading / and split the uripath into path variables
|
|
970
|
+
let myPath = uriPath;
|
|
971
|
+
while (myPath.indexOf('/') === 0) {
|
|
972
|
+
myPath = myPath.substring(1);
|
|
973
|
+
}
|
|
974
|
+
const pathVars = myPath.split('/');
|
|
975
|
+
const queryParamsAvailable = queryData;
|
|
976
|
+
const queryParams = {};
|
|
977
|
+
const bodyVars = requestBody;
|
|
978
|
+
|
|
979
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
980
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
981
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
982
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
983
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
|
|
987
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
988
|
+
const reqObj = {
|
|
989
|
+
payload: bodyVars,
|
|
990
|
+
uriPathVars: pathVars,
|
|
991
|
+
uriQuery: queryParams,
|
|
992
|
+
uriOptions: {}
|
|
993
|
+
};
|
|
994
|
+
// add headers if provided
|
|
995
|
+
if (addlHeaders) {
|
|
996
|
+
reqObj.addlHeaders = addlHeaders;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// determine the call and return flag
|
|
1000
|
+
let action = 'getGenerics';
|
|
1001
|
+
let returnF = true;
|
|
1002
|
+
if (restMethod.toUpperCase() === 'POST') {
|
|
1003
|
+
action = 'createGeneric';
|
|
1004
|
+
} else if (restMethod.toUpperCase() === 'PUT') {
|
|
1005
|
+
action = 'updateGeneric';
|
|
1006
|
+
} else if (restMethod.toUpperCase() === 'PATCH') {
|
|
1007
|
+
action = 'patchGeneric';
|
|
1008
|
+
} else if (restMethod.toUpperCase() === 'DELETE') {
|
|
1009
|
+
action = 'deleteGeneric';
|
|
1010
|
+
returnF = false;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
try {
|
|
1014
|
+
// Make the call -
|
|
1015
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1016
|
+
return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
|
|
1017
|
+
// if we received an error or their is no response on the results
|
|
1018
|
+
// return an error
|
|
1019
|
+
if (irReturnError) {
|
|
1020
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
1021
|
+
return callback(null, irReturnError);
|
|
1022
|
+
}
|
|
1023
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
1024
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
|
|
1025
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1026
|
+
return callback(null, errorObj);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
1030
|
+
// return the response
|
|
1031
|
+
return callback(irReturnData, null);
|
|
1032
|
+
});
|
|
1033
|
+
} catch (ex) {
|
|
1034
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
1035
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1036
|
+
return callback(null, errorObj);
|
|
213
1037
|
}
|
|
214
1038
|
}
|
|
215
1039
|
|
|
216
1040
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* @function updateEntityCache
|
|
1041
|
+
* Makes the requested generic call with no base path or version
|
|
220
1042
|
*
|
|
1043
|
+
* @function genericAdapterRequestNoBasePath
|
|
1044
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
|
|
1045
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
|
|
1046
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
1047
|
+
* Can be a stringified Object.
|
|
1048
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
1049
|
+
* Can be a stringified Object.
|
|
1050
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
1051
|
+
* Can be a stringified Object.
|
|
1052
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
1053
|
+
* or the error
|
|
221
1054
|
*/
|
|
222
|
-
|
|
223
|
-
const
|
|
1055
|
+
genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
|
|
1056
|
+
const meth = 'adapter-genericAdapterRequestNoBasePath';
|
|
1057
|
+
const origin = `${this.id}-${meth}`;
|
|
224
1058
|
log.trace(origin);
|
|
225
1059
|
|
|
226
|
-
if (this.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
1060
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1061
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1062
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1063
|
+
return callback(null, errorObj);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1067
|
+
if (uriPath === undefined || uriPath === null || uriPath === '') {
|
|
1068
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
|
|
1069
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1070
|
+
return callback(null, errorObj);
|
|
1071
|
+
}
|
|
1072
|
+
if (restMethod === undefined || restMethod === null || restMethod === '') {
|
|
1073
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
|
|
1074
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1075
|
+
return callback(null, errorObj);
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1079
|
+
// remove any leading / and split the uripath into path variables
|
|
1080
|
+
let myPath = uriPath;
|
|
1081
|
+
while (myPath.indexOf('/') === 0) {
|
|
1082
|
+
myPath = myPath.substring(1);
|
|
1083
|
+
}
|
|
1084
|
+
const pathVars = myPath.split('/');
|
|
1085
|
+
const queryParamsAvailable = queryData;
|
|
1086
|
+
const queryParams = {};
|
|
1087
|
+
const bodyVars = requestBody;
|
|
1088
|
+
|
|
1089
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1090
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1091
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1092
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1093
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1094
|
+
}
|
|
1095
|
+
});
|
|
1096
|
+
|
|
1097
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
1098
|
+
const reqObj = {
|
|
1099
|
+
payload: bodyVars,
|
|
1100
|
+
uriPathVars: pathVars,
|
|
1101
|
+
uriQuery: queryParams,
|
|
1102
|
+
uriOptions: {}
|
|
1103
|
+
};
|
|
1104
|
+
// add headers if provided
|
|
1105
|
+
if (addlHeaders) {
|
|
1106
|
+
reqObj.addlHeaders = addlHeaders;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
// determine the call and return flag
|
|
1110
|
+
let action = 'getGenericsNoBase';
|
|
1111
|
+
let returnF = true;
|
|
1112
|
+
if (restMethod.toUpperCase() === 'POST') {
|
|
1113
|
+
action = 'createGenericNoBase';
|
|
1114
|
+
} else if (restMethod.toUpperCase() === 'PUT') {
|
|
1115
|
+
action = 'updateGenericNoBase';
|
|
1116
|
+
} else if (restMethod.toUpperCase() === 'PATCH') {
|
|
1117
|
+
action = 'patchGenericNoBase';
|
|
1118
|
+
} else if (restMethod.toUpperCase() === 'DELETE') {
|
|
1119
|
+
action = 'deleteGenericNoBase';
|
|
1120
|
+
returnF = false;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
try {
|
|
1124
|
+
// Make the call -
|
|
1125
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1126
|
+
return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
|
|
1127
|
+
// if we received an error or their is no response on the results
|
|
1128
|
+
// return an error
|
|
1129
|
+
if (irReturnError) {
|
|
1130
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
1131
|
+
return callback(null, irReturnError);
|
|
1132
|
+
}
|
|
1133
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
1134
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
|
|
1135
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1136
|
+
return callback(null, errorObj);
|
|
231
1137
|
}
|
|
1138
|
+
|
|
1139
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
1140
|
+
// return the response
|
|
1141
|
+
return callback(irReturnData, null);
|
|
232
1142
|
});
|
|
1143
|
+
} catch (ex) {
|
|
1144
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
1145
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1146
|
+
return callback(null, errorObj);
|
|
233
1147
|
}
|
|
234
1148
|
}
|
|
235
1149
|
|
|
1150
|
+
/**
|
|
1151
|
+
* @callback healthCallback
|
|
1152
|
+
* @param {Object} result - the result of the get request (contains an id and a status)
|
|
1153
|
+
*/
|
|
1154
|
+
/**
|
|
1155
|
+
* @callback getCallback
|
|
1156
|
+
* @param {Object} result - the result of the get request (entity/ies)
|
|
1157
|
+
* @param {String} error - any error that occurred
|
|
1158
|
+
*/
|
|
1159
|
+
/**
|
|
1160
|
+
* @callback createCallback
|
|
1161
|
+
* @param {Object} item - the newly created entity
|
|
1162
|
+
* @param {String} error - any error that occurred
|
|
1163
|
+
*/
|
|
1164
|
+
/**
|
|
1165
|
+
* @callback updateCallback
|
|
1166
|
+
* @param {String} status - the status of the update action
|
|
1167
|
+
* @param {String} error - any error that occurred
|
|
1168
|
+
*/
|
|
1169
|
+
/**
|
|
1170
|
+
* @callback deleteCallback
|
|
1171
|
+
* @param {String} status - the status of the delete action
|
|
1172
|
+
* @param {String} error - any error that occurred
|
|
1173
|
+
*/
|
|
1174
|
+
|
|
236
1175
|
/**
|
|
237
1176
|
* @summary Create Project
|
|
238
1177
|
*
|
|
@@ -247,6 +1186,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
247
1186
|
const origin = `${this.id}-${meth}`;
|
|
248
1187
|
log.trace(origin);
|
|
249
1188
|
|
|
1189
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1190
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1191
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1192
|
+
return callback(null, errorObj);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
250
1195
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
251
1196
|
if (request === undefined || request === null || request === '') {
|
|
252
1197
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -320,6 +1265,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
320
1265
|
const origin = `${this.id}-${meth}`;
|
|
321
1266
|
log.trace(origin);
|
|
322
1267
|
|
|
1268
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1269
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1270
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1271
|
+
return callback(null, errorObj);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
323
1274
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
324
1275
|
|
|
325
1276
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -384,6 +1335,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
384
1335
|
const origin = `${this.id}-${meth}`;
|
|
385
1336
|
log.trace(origin);
|
|
386
1337
|
|
|
1338
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1339
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1340
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1341
|
+
return callback(null, errorObj);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
387
1344
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
388
1345
|
if (request === undefined || request === null || request === '') {
|
|
389
1346
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -463,6 +1420,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
463
1420
|
const origin = `${this.id}-${meth}`;
|
|
464
1421
|
log.trace(origin);
|
|
465
1422
|
|
|
1423
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1424
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1425
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1426
|
+
return callback(null, errorObj);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
466
1429
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
467
1430
|
|
|
468
1431
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -527,6 +1490,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
527
1490
|
const origin = `${this.id}-${meth}`;
|
|
528
1491
|
log.trace(origin);
|
|
529
1492
|
|
|
1493
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1494
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1495
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1496
|
+
return callback(null, errorObj);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
530
1499
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
531
1500
|
if (request === undefined || request === null || request === '') {
|
|
532
1501
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -601,6 +1570,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
601
1570
|
const origin = `${this.id}-${meth}`;
|
|
602
1571
|
log.trace(origin);
|
|
603
1572
|
|
|
1573
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1574
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1575
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1576
|
+
return callback(null, errorObj);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
604
1579
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
605
1580
|
if (request === undefined || request === null || request === '') {
|
|
606
1581
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -675,6 +1650,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
675
1650
|
const origin = `${this.id}-${meth}`;
|
|
676
1651
|
log.trace(origin);
|
|
677
1652
|
|
|
1653
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1654
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1655
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1656
|
+
return callback(null, errorObj);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
678
1659
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
679
1660
|
if (request === undefined || request === null || request === '') {
|
|
680
1661
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -749,6 +1730,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
749
1730
|
const origin = `${this.id}-${meth}`;
|
|
750
1731
|
log.trace(origin);
|
|
751
1732
|
|
|
1733
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1734
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1735
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1736
|
+
return callback(null, errorObj);
|
|
1737
|
+
}
|
|
1738
|
+
|
|
752
1739
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
753
1740
|
if (templateId === undefined || templateId === null || templateId === '') {
|
|
754
1741
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['templateId'], null, null, null);
|
|
@@ -817,6 +1804,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
817
1804
|
const origin = `${this.id}-${meth}`;
|
|
818
1805
|
log.trace(origin);
|
|
819
1806
|
|
|
1807
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1808
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1809
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1810
|
+
return callback(null, errorObj);
|
|
1811
|
+
}
|
|
1812
|
+
|
|
820
1813
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
821
1814
|
if (templateId === undefined || templateId === null || templateId === '') {
|
|
822
1815
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['templateId'], null, null, null);
|
|
@@ -885,6 +1878,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
885
1878
|
const origin = `${this.id}-${meth}`;
|
|
886
1879
|
log.trace(origin);
|
|
887
1880
|
|
|
1881
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1882
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1883
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1884
|
+
return callback(null, errorObj);
|
|
1885
|
+
}
|
|
1886
|
+
|
|
888
1887
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
889
1888
|
if (deploymentId === undefined || deploymentId === null || deploymentId === '') {
|
|
890
1889
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deploymentId'], null, null, null);
|
|
@@ -953,6 +1952,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
953
1952
|
const origin = `${this.id}-${meth}`;
|
|
954
1953
|
log.trace(origin);
|
|
955
1954
|
|
|
1955
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1956
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1957
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1958
|
+
return callback(null, errorObj);
|
|
1959
|
+
}
|
|
1960
|
+
|
|
956
1961
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
957
1962
|
if (projectId === undefined || projectId === null || projectId === '') {
|
|
958
1963
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['projectId'], null, null, null);
|
|
@@ -1021,6 +2026,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1021
2026
|
const origin = `${this.id}-${meth}`;
|
|
1022
2027
|
log.trace(origin);
|
|
1023
2028
|
|
|
2029
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2030
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2031
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2032
|
+
return callback(null, errorObj);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
1024
2035
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1025
2036
|
if (templateId === undefined || templateId === null || templateId === '') {
|
|
1026
2037
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['templateId'], null, null, null);
|
|
@@ -1090,6 +2101,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1090
2101
|
const origin = `${this.id}-${meth}`;
|
|
1091
2102
|
log.trace(origin);
|
|
1092
2103
|
|
|
2104
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2105
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2106
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2107
|
+
return callback(null, errorObj);
|
|
2108
|
+
}
|
|
2109
|
+
|
|
1093
2110
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1094
2111
|
if (request === undefined || request === null || request === '') {
|
|
1095
2112
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -1165,6 +2182,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1165
2182
|
const origin = `${this.id}-${meth}`;
|
|
1166
2183
|
log.trace(origin);
|
|
1167
2184
|
|
|
2185
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2186
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2187
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2188
|
+
return callback(null, errorObj);
|
|
2189
|
+
}
|
|
2190
|
+
|
|
1168
2191
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1169
2192
|
if (request === undefined || request === null || request === '') {
|
|
1170
2193
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -1245,6 +2268,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1245
2268
|
const origin = `${this.id}-${meth}`;
|
|
1246
2269
|
log.trace(origin);
|
|
1247
2270
|
|
|
2271
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2272
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2273
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2274
|
+
return callback(null, errorObj);
|
|
2275
|
+
}
|
|
2276
|
+
|
|
1248
2277
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1249
2278
|
if (request === undefined || request === null || request === '') {
|
|
1250
2279
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -1328,6 +2357,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1328
2357
|
const origin = `${this.id}-${meth}`;
|
|
1329
2358
|
log.trace(origin);
|
|
1330
2359
|
|
|
2360
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2361
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2362
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2363
|
+
return callback(null, errorObj);
|
|
2364
|
+
}
|
|
2365
|
+
|
|
1331
2366
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1332
2367
|
if (id === undefined || id === null || id === '') {
|
|
1333
2368
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -1402,6 +2437,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1402
2437
|
const origin = `${this.id}-${meth}`;
|
|
1403
2438
|
log.trace(origin);
|
|
1404
2439
|
|
|
2440
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2441
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2442
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2443
|
+
return callback(null, errorObj);
|
|
2444
|
+
}
|
|
2445
|
+
|
|
1405
2446
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1406
2447
|
if (request === undefined || request === null || request === '') {
|
|
1407
2448
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -1476,6 +2517,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1476
2517
|
const origin = `${this.id}-${meth}`;
|
|
1477
2518
|
log.trace(origin);
|
|
1478
2519
|
|
|
2520
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2521
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2522
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2523
|
+
return callback(null, errorObj);
|
|
2524
|
+
}
|
|
2525
|
+
|
|
1479
2526
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1480
2527
|
if (request === undefined || request === null || request === '') {
|
|
1481
2528
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -1559,6 +2606,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1559
2606
|
const origin = `${this.id}-${meth}`;
|
|
1560
2607
|
log.trace(origin);
|
|
1561
2608
|
|
|
2609
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2610
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2611
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2612
|
+
return callback(null, errorObj);
|
|
2613
|
+
}
|
|
2614
|
+
|
|
1562
2615
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1563
2616
|
|
|
1564
2617
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -1625,6 +2678,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1625
2678
|
const origin = `${this.id}-${meth}`;
|
|
1626
2679
|
log.trace(origin);
|
|
1627
2680
|
|
|
2681
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2682
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2683
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2684
|
+
return callback(null, errorObj);
|
|
2685
|
+
}
|
|
2686
|
+
|
|
1628
2687
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1629
2688
|
if (id === undefined || id === null || id === '') {
|
|
1630
2689
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -1697,6 +2756,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1697
2756
|
const origin = `${this.id}-${meth}`;
|
|
1698
2757
|
log.trace(origin);
|
|
1699
2758
|
|
|
2759
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2760
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2761
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2762
|
+
return callback(null, errorObj);
|
|
2763
|
+
}
|
|
2764
|
+
|
|
1700
2765
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1701
2766
|
|
|
1702
2767
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -1743,6 +2808,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1743
2808
|
const origin = `${this.id}-${meth}`;
|
|
1744
2809
|
log.trace(origin);
|
|
1745
2810
|
|
|
2811
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2812
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2813
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2814
|
+
return callback(null, errorObj);
|
|
2815
|
+
}
|
|
2816
|
+
|
|
1746
2817
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1747
2818
|
if (request === undefined || request === null || request === '') {
|
|
1748
2819
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -1817,6 +2888,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1817
2888
|
const origin = `${this.id}-${meth}`;
|
|
1818
2889
|
log.trace(origin);
|
|
1819
2890
|
|
|
2891
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2892
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2893
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2894
|
+
return callback(null, errorObj);
|
|
2895
|
+
}
|
|
2896
|
+
|
|
1820
2897
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1821
2898
|
if (id === undefined || id === null || id === '') {
|
|
1822
2899
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -1885,6 +2962,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1885
2962
|
const origin = `${this.id}-${meth}`;
|
|
1886
2963
|
log.trace(origin);
|
|
1887
2964
|
|
|
2965
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2966
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2967
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2968
|
+
return callback(null, errorObj);
|
|
2969
|
+
}
|
|
2970
|
+
|
|
1888
2971
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1889
2972
|
if (id === undefined || id === null || id === '') {
|
|
1890
2973
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -1958,6 +3041,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
1958
3041
|
const origin = `${this.id}-${meth}`;
|
|
1959
3042
|
log.trace(origin);
|
|
1960
3043
|
|
|
3044
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3045
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3046
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3047
|
+
return callback(null, errorObj);
|
|
3048
|
+
}
|
|
3049
|
+
|
|
1961
3050
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1962
3051
|
|
|
1963
3052
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -2022,6 +3111,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2022
3111
|
const origin = `${this.id}-${meth}`;
|
|
2023
3112
|
log.trace(origin);
|
|
2024
3113
|
|
|
3114
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3115
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3116
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3117
|
+
return callback(null, errorObj);
|
|
3118
|
+
}
|
|
3119
|
+
|
|
2025
3120
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2026
3121
|
if (id === undefined || id === null || id === '') {
|
|
2027
3122
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -2094,6 +3189,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2094
3189
|
const origin = `${this.id}-${meth}`;
|
|
2095
3190
|
log.trace(origin);
|
|
2096
3191
|
|
|
3192
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3193
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3194
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3195
|
+
return callback(null, errorObj);
|
|
3196
|
+
}
|
|
3197
|
+
|
|
2097
3198
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2098
3199
|
|
|
2099
3200
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -2140,6 +3241,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2140
3241
|
const origin = `${this.id}-${meth}`;
|
|
2141
3242
|
log.trace(origin);
|
|
2142
3243
|
|
|
3244
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3245
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3246
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3247
|
+
return callback(null, errorObj);
|
|
3248
|
+
}
|
|
3249
|
+
|
|
2143
3250
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2144
3251
|
if (request === undefined || request === null || request === '') {
|
|
2145
3252
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2215,6 +3322,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2215
3322
|
const origin = `${this.id}-${meth}`;
|
|
2216
3323
|
log.trace(origin);
|
|
2217
3324
|
|
|
3325
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3326
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3327
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3328
|
+
return callback(null, errorObj);
|
|
3329
|
+
}
|
|
3330
|
+
|
|
2218
3331
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2219
3332
|
if (request === undefined || request === null || request === '') {
|
|
2220
3333
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2289,6 +3402,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2289
3402
|
const origin = `${this.id}-${meth}`;
|
|
2290
3403
|
log.trace(origin);
|
|
2291
3404
|
|
|
3405
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3406
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3407
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3408
|
+
return callback(null, errorObj);
|
|
3409
|
+
}
|
|
3410
|
+
|
|
2292
3411
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2293
3412
|
if (request === undefined || request === null || request === '') {
|
|
2294
3413
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2363,6 +3482,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2363
3482
|
const origin = `${this.id}-${meth}`;
|
|
2364
3483
|
log.trace(origin);
|
|
2365
3484
|
|
|
3485
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3486
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3487
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3488
|
+
return callback(null, errorObj);
|
|
3489
|
+
}
|
|
3490
|
+
|
|
2366
3491
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2367
3492
|
if (request === undefined || request === null || request === '') {
|
|
2368
3493
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2437,6 +3562,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2437
3562
|
const origin = `${this.id}-${meth}`;
|
|
2438
3563
|
log.trace(origin);
|
|
2439
3564
|
|
|
3565
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3566
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3567
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3568
|
+
return callback(null, errorObj);
|
|
3569
|
+
}
|
|
3570
|
+
|
|
2440
3571
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2441
3572
|
if (request === undefined || request === null || request === '') {
|
|
2442
3573
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2511,6 +3642,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2511
3642
|
const origin = `${this.id}-${meth}`;
|
|
2512
3643
|
log.trace(origin);
|
|
2513
3644
|
|
|
3645
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3646
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3647
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3648
|
+
return callback(null, errorObj);
|
|
3649
|
+
}
|
|
3650
|
+
|
|
2514
3651
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2515
3652
|
if (request === undefined || request === null || request === '') {
|
|
2516
3653
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2593,6 +3730,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2593
3730
|
const origin = `${this.id}-${meth}`;
|
|
2594
3731
|
log.trace(origin);
|
|
2595
3732
|
|
|
3733
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3734
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3735
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3736
|
+
return callback(null, errorObj);
|
|
3737
|
+
}
|
|
3738
|
+
|
|
2596
3739
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2597
3740
|
if (id === undefined || id === null || id === '') {
|
|
2598
3741
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -2662,6 +3805,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2662
3805
|
const origin = `${this.id}-${meth}`;
|
|
2663
3806
|
log.trace(origin);
|
|
2664
3807
|
|
|
3808
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3809
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3810
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3811
|
+
return callback(null, errorObj);
|
|
3812
|
+
}
|
|
3813
|
+
|
|
2665
3814
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2666
3815
|
if (request === undefined || request === null || request === '') {
|
|
2667
3816
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2736,6 +3885,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2736
3885
|
const origin = `${this.id}-${meth}`;
|
|
2737
3886
|
log.trace(origin);
|
|
2738
3887
|
|
|
3888
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3889
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3890
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3891
|
+
return callback(null, errorObj);
|
|
3892
|
+
}
|
|
3893
|
+
|
|
2739
3894
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2740
3895
|
if (request === undefined || request === null || request === '') {
|
|
2741
3896
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2808,6 +3963,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2808
3963
|
const origin = `${this.id}-${meth}`;
|
|
2809
3964
|
log.trace(origin);
|
|
2810
3965
|
|
|
3966
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3967
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3968
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3969
|
+
return callback(null, errorObj);
|
|
3970
|
+
}
|
|
3971
|
+
|
|
2811
3972
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2812
3973
|
|
|
2813
3974
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -2854,6 +4015,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2854
4015
|
const origin = `${this.id}-${meth}`;
|
|
2855
4016
|
log.trace(origin);
|
|
2856
4017
|
|
|
4018
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4019
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4020
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4021
|
+
return callback(null, errorObj);
|
|
4022
|
+
}
|
|
4023
|
+
|
|
2857
4024
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2858
4025
|
if (request === undefined || request === null || request === '') {
|
|
2859
4026
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -2928,6 +4095,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2928
4095
|
const origin = `${this.id}-${meth}`;
|
|
2929
4096
|
log.trace(origin);
|
|
2930
4097
|
|
|
4098
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4099
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4100
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4101
|
+
return callback(null, errorObj);
|
|
4102
|
+
}
|
|
4103
|
+
|
|
2931
4104
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2932
4105
|
if (id === undefined || id === null || id === '') {
|
|
2933
4106
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -2996,6 +4169,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
2996
4169
|
const origin = `${this.id}-${meth}`;
|
|
2997
4170
|
log.trace(origin);
|
|
2998
4171
|
|
|
4172
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4173
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4174
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4175
|
+
return callback(null, errorObj);
|
|
4176
|
+
}
|
|
4177
|
+
|
|
2999
4178
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3000
4179
|
if (id === undefined || id === null || id === '') {
|
|
3001
4180
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -3065,6 +4244,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3065
4244
|
const origin = `${this.id}-${meth}`;
|
|
3066
4245
|
log.trace(origin);
|
|
3067
4246
|
|
|
4247
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4248
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4249
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4250
|
+
return callback(null, errorObj);
|
|
4251
|
+
}
|
|
4252
|
+
|
|
3068
4253
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3069
4254
|
if (request === undefined || request === null || request === '') {
|
|
3070
4255
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3139,6 +4324,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3139
4324
|
const origin = `${this.id}-${meth}`;
|
|
3140
4325
|
log.trace(origin);
|
|
3141
4326
|
|
|
4327
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4328
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4329
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4330
|
+
return callback(null, errorObj);
|
|
4331
|
+
}
|
|
4332
|
+
|
|
3142
4333
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3143
4334
|
if (request === undefined || request === null || request === '') {
|
|
3144
4335
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3211,6 +4402,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3211
4402
|
const origin = `${this.id}-${meth}`;
|
|
3212
4403
|
log.trace(origin);
|
|
3213
4404
|
|
|
4405
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4406
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4407
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4408
|
+
return callback(null, errorObj);
|
|
4409
|
+
}
|
|
4410
|
+
|
|
3214
4411
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3215
4412
|
|
|
3216
4413
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -3257,6 +4454,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3257
4454
|
const origin = `${this.id}-${meth}`;
|
|
3258
4455
|
log.trace(origin);
|
|
3259
4456
|
|
|
4457
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4458
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4459
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4460
|
+
return callback(null, errorObj);
|
|
4461
|
+
}
|
|
4462
|
+
|
|
3260
4463
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3261
4464
|
if (request === undefined || request === null || request === '') {
|
|
3262
4465
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3332,6 +4535,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3332
4535
|
const origin = `${this.id}-${meth}`;
|
|
3333
4536
|
log.trace(origin);
|
|
3334
4537
|
|
|
4538
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4539
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4540
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4541
|
+
return callback(null, errorObj);
|
|
4542
|
+
}
|
|
4543
|
+
|
|
3335
4544
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3336
4545
|
if (request === undefined || request === null || request === '') {
|
|
3337
4546
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3406,6 +4615,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3406
4615
|
const origin = `${this.id}-${meth}`;
|
|
3407
4616
|
log.trace(origin);
|
|
3408
4617
|
|
|
4618
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4619
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4620
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4621
|
+
return callback(null, errorObj);
|
|
4622
|
+
}
|
|
4623
|
+
|
|
3409
4624
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3410
4625
|
if (startIndex === undefined || startIndex === null || startIndex === '') {
|
|
3411
4626
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['startIndex'], null, null, null);
|
|
@@ -3481,6 +4696,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3481
4696
|
const origin = `${this.id}-${meth}`;
|
|
3482
4697
|
log.trace(origin);
|
|
3483
4698
|
|
|
4699
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4700
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4701
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4702
|
+
return callback(null, errorObj);
|
|
4703
|
+
}
|
|
4704
|
+
|
|
3484
4705
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3485
4706
|
if (request === undefined || request === null || request === '') {
|
|
3486
4707
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3559,6 +4780,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3559
4780
|
const origin = `${this.id}-${meth}`;
|
|
3560
4781
|
log.trace(origin);
|
|
3561
4782
|
|
|
4783
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4784
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4785
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4786
|
+
return callback(null, errorObj);
|
|
4787
|
+
}
|
|
4788
|
+
|
|
3562
4789
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3563
4790
|
if (globalCredentialId === undefined || globalCredentialId === null || globalCredentialId === '') {
|
|
3564
4791
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['globalCredentialId'], null, null, null);
|
|
@@ -3627,6 +4854,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3627
4854
|
const origin = `${this.id}-${meth}`;
|
|
3628
4855
|
log.trace(origin);
|
|
3629
4856
|
|
|
4857
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4858
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4859
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4860
|
+
return callback(null, errorObj);
|
|
4861
|
+
}
|
|
4862
|
+
|
|
3630
4863
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3631
4864
|
if (id === undefined || id === null || id === '') {
|
|
3632
4865
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -3696,6 +4929,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3696
4929
|
const origin = `${this.id}-${meth}`;
|
|
3697
4930
|
log.trace(origin);
|
|
3698
4931
|
|
|
4932
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4933
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4934
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4935
|
+
return callback(null, errorObj);
|
|
4936
|
+
}
|
|
4937
|
+
|
|
3699
4938
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3700
4939
|
if (request === undefined || request === null || request === '') {
|
|
3701
4940
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3770,6 +5009,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3770
5009
|
const origin = `${this.id}-${meth}`;
|
|
3771
5010
|
log.trace(origin);
|
|
3772
5011
|
|
|
5012
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5013
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5014
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5015
|
+
return callback(null, errorObj);
|
|
5016
|
+
}
|
|
5017
|
+
|
|
3773
5018
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3774
5019
|
if (request === undefined || request === null || request === '') {
|
|
3775
5020
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3844,6 +5089,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3844
5089
|
const origin = `${this.id}-${meth}`;
|
|
3845
5090
|
log.trace(origin);
|
|
3846
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
|
+
|
|
3847
5098
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3848
5099
|
if (request === undefined || request === null || request === '') {
|
|
3849
5100
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3918,6 +5169,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3918
5169
|
const origin = `${this.id}-${meth}`;
|
|
3919
5170
|
log.trace(origin);
|
|
3920
5171
|
|
|
5172
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5173
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5174
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5175
|
+
return callback(null, errorObj);
|
|
5176
|
+
}
|
|
5177
|
+
|
|
3921
5178
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3922
5179
|
if (request === undefined || request === null || request === '') {
|
|
3923
5180
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -3994,6 +5251,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3994
5251
|
const origin = `${this.id}-${meth}`;
|
|
3995
5252
|
log.trace(origin);
|
|
3996
5253
|
|
|
5254
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5255
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5256
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5257
|
+
return callback(null, errorObj);
|
|
5258
|
+
}
|
|
5259
|
+
|
|
3997
5260
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3998
5261
|
if (ipAddress === undefined || ipAddress === null || ipAddress === '') {
|
|
3999
5262
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ipAddress'], null, null, null);
|
|
@@ -4063,6 +5326,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4063
5326
|
const origin = `${this.id}-${meth}`;
|
|
4064
5327
|
log.trace(origin);
|
|
4065
5328
|
|
|
5329
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5330
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5331
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5332
|
+
return callback(null, errorObj);
|
|
5333
|
+
}
|
|
5334
|
+
|
|
4066
5335
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4067
5336
|
if (id === undefined || id === null || id === '') {
|
|
4068
5337
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -4134,6 +5403,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4134
5403
|
const origin = `${this.id}-${meth}`;
|
|
4135
5404
|
log.trace(origin);
|
|
4136
5405
|
|
|
5406
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5407
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5408
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5409
|
+
return callback(null, errorObj);
|
|
5410
|
+
}
|
|
5411
|
+
|
|
4137
5412
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4138
5413
|
if (id === undefined || id === null || id === '') {
|
|
4139
5414
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -4205,6 +5480,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4205
5480
|
const origin = `${this.id}-${meth}`;
|
|
4206
5481
|
log.trace(origin);
|
|
4207
5482
|
|
|
5483
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5484
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5485
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5486
|
+
return callback(null, errorObj);
|
|
5487
|
+
}
|
|
5488
|
+
|
|
4208
5489
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4209
5490
|
if (id === undefined || id === null || id === '') {
|
|
4210
5491
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -4284,6 +5565,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4284
5565
|
const origin = `${this.id}-${meth}`;
|
|
4285
5566
|
log.trace(origin);
|
|
4286
5567
|
|
|
5568
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5569
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5570
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5571
|
+
return callback(null, errorObj);
|
|
5572
|
+
}
|
|
5573
|
+
|
|
4287
5574
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4288
5575
|
if (startIndex === undefined || startIndex === null || startIndex === '') {
|
|
4289
5576
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['startIndex'], null, null, null);
|
|
@@ -4358,6 +5645,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4358
5645
|
const origin = `${this.id}-${meth}`;
|
|
4359
5646
|
log.trace(origin);
|
|
4360
5647
|
|
|
5648
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5649
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5650
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5651
|
+
return callback(null, errorObj);
|
|
5652
|
+
}
|
|
5653
|
+
|
|
4361
5654
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4362
5655
|
if (id === undefined || id === null || id === '') {
|
|
4363
5656
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -4428,6 +5721,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4428
5721
|
const origin = `${this.id}-${meth}`;
|
|
4429
5722
|
log.trace(origin);
|
|
4430
5723
|
|
|
5724
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5725
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5726
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5727
|
+
return callback(null, errorObj);
|
|
5728
|
+
}
|
|
5729
|
+
|
|
4431
5730
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4432
5731
|
|
|
4433
5732
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -4492,6 +5791,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4492
5791
|
const origin = `${this.id}-${meth}`;
|
|
4493
5792
|
log.trace(origin);
|
|
4494
5793
|
|
|
5794
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5795
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5796
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5797
|
+
return callback(null, errorObj);
|
|
5798
|
+
}
|
|
5799
|
+
|
|
4495
5800
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4496
5801
|
if (request === undefined || request === null || request === '') {
|
|
4497
5802
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -4566,6 +5871,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4566
5871
|
const origin = `${this.id}-${meth}`;
|
|
4567
5872
|
log.trace(origin);
|
|
4568
5873
|
|
|
5874
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5875
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5876
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5877
|
+
return callback(null, errorObj);
|
|
5878
|
+
}
|
|
5879
|
+
|
|
4569
5880
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4570
5881
|
if (domain === undefined || domain === null || domain === '') {
|
|
4571
5882
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['domain'], null, null, null);
|
|
@@ -4641,6 +5952,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4641
5952
|
const origin = `${this.id}-${meth}`;
|
|
4642
5953
|
log.trace(origin);
|
|
4643
5954
|
|
|
5955
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
5956
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
5957
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5958
|
+
return callback(null, errorObj);
|
|
5959
|
+
}
|
|
5960
|
+
|
|
4644
5961
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4645
5962
|
if (request === undefined || request === null || request === '') {
|
|
4646
5963
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -4719,6 +6036,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4719
6036
|
const origin = `${this.id}-${meth}`;
|
|
4720
6037
|
log.trace(origin);
|
|
4721
6038
|
|
|
6039
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6040
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6041
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6042
|
+
return callback(null, errorObj);
|
|
6043
|
+
}
|
|
6044
|
+
|
|
4722
6045
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4723
6046
|
if (id === undefined || id === null || id === '') {
|
|
4724
6047
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -4787,6 +6110,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4787
6110
|
const origin = `${this.id}-${meth}`;
|
|
4788
6111
|
log.trace(origin);
|
|
4789
6112
|
|
|
6113
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6114
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6115
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6116
|
+
return callback(null, errorObj);
|
|
6117
|
+
}
|
|
6118
|
+
|
|
4790
6119
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4791
6120
|
if (id === undefined || id === null || id === '') {
|
|
4792
6121
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -4856,6 +6185,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4856
6185
|
const origin = `${this.id}-${meth}`;
|
|
4857
6186
|
log.trace(origin);
|
|
4858
6187
|
|
|
6188
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6189
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6190
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6191
|
+
return callback(null, errorObj);
|
|
6192
|
+
}
|
|
6193
|
+
|
|
4859
6194
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4860
6195
|
if (request === undefined || request === null || request === '') {
|
|
4861
6196
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -4930,6 +6265,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4930
6265
|
const origin = `${this.id}-${meth}`;
|
|
4931
6266
|
log.trace(origin);
|
|
4932
6267
|
|
|
6268
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6269
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6270
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6271
|
+
return callback(null, errorObj);
|
|
6272
|
+
}
|
|
6273
|
+
|
|
4933
6274
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4934
6275
|
if (request === undefined || request === null || request === '') {
|
|
4935
6276
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5004,6 +6345,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5004
6345
|
const origin = `${this.id}-${meth}`;
|
|
5005
6346
|
log.trace(origin);
|
|
5006
6347
|
|
|
6348
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6349
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6350
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6351
|
+
return callback(null, errorObj);
|
|
6352
|
+
}
|
|
6353
|
+
|
|
5007
6354
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5008
6355
|
if (request === undefined || request === null || request === '') {
|
|
5009
6356
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5079,6 +6426,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5079
6426
|
const origin = `${this.id}-${meth}`;
|
|
5080
6427
|
log.trace(origin);
|
|
5081
6428
|
|
|
6429
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6430
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6431
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6432
|
+
return callback(null, errorObj);
|
|
6433
|
+
}
|
|
6434
|
+
|
|
5082
6435
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5083
6436
|
if (request === undefined || request === null || request === '') {
|
|
5084
6437
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5157,6 +6510,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5157
6510
|
const origin = `${this.id}-${meth}`;
|
|
5158
6511
|
log.trace(origin);
|
|
5159
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
|
+
|
|
5160
6519
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5161
6520
|
if (id === undefined || id === null || id === '') {
|
|
5162
6521
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -5225,6 +6584,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5225
6584
|
const origin = `${this.id}-${meth}`;
|
|
5226
6585
|
log.trace(origin);
|
|
5227
6586
|
|
|
6587
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6588
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6589
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6590
|
+
return callback(null, errorObj);
|
|
6591
|
+
}
|
|
6592
|
+
|
|
5228
6593
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5229
6594
|
if (id === undefined || id === null || id === '') {
|
|
5230
6595
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -5294,6 +6659,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5294
6659
|
const origin = `${this.id}-${meth}`;
|
|
5295
6660
|
log.trace(origin);
|
|
5296
6661
|
|
|
6662
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6663
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6664
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6665
|
+
return callback(null, errorObj);
|
|
6666
|
+
}
|
|
6667
|
+
|
|
5297
6668
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5298
6669
|
if (request === undefined || request === null || request === '') {
|
|
5299
6670
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5368,6 +6739,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5368
6739
|
const origin = `${this.id}-${meth}`;
|
|
5369
6740
|
log.trace(origin);
|
|
5370
6741
|
|
|
6742
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6743
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6744
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6745
|
+
return callback(null, errorObj);
|
|
6746
|
+
}
|
|
6747
|
+
|
|
5371
6748
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5372
6749
|
if (domain === undefined || domain === null || domain === '') {
|
|
5373
6750
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['domain'], null, null, null);
|
|
@@ -5440,6 +6817,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5440
6817
|
const origin = `${this.id}-${meth}`;
|
|
5441
6818
|
log.trace(origin);
|
|
5442
6819
|
|
|
6820
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6821
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6822
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6823
|
+
return callback(null, errorObj);
|
|
6824
|
+
}
|
|
6825
|
+
|
|
5443
6826
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5444
6827
|
|
|
5445
6828
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -5485,6 +6868,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5485
6868
|
const origin = `${this.id}-${meth}`;
|
|
5486
6869
|
log.trace(origin);
|
|
5487
6870
|
|
|
6871
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6872
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6873
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6874
|
+
return callback(null, errorObj);
|
|
6875
|
+
}
|
|
6876
|
+
|
|
5488
6877
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5489
6878
|
|
|
5490
6879
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -5549,6 +6938,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5549
6938
|
const origin = `${this.id}-${meth}`;
|
|
5550
6939
|
log.trace(origin);
|
|
5551
6940
|
|
|
6941
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
6942
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
6943
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6944
|
+
return callback(null, errorObj);
|
|
6945
|
+
}
|
|
6946
|
+
|
|
5552
6947
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5553
6948
|
if (domain === undefined || domain === null || domain === '') {
|
|
5554
6949
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['domain'], null, null, null);
|
|
@@ -5618,6 +7013,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5618
7013
|
const origin = `${this.id}-${meth}`;
|
|
5619
7014
|
log.trace(origin);
|
|
5620
7015
|
|
|
7016
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7017
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7018
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7019
|
+
return callback(null, errorObj);
|
|
7020
|
+
}
|
|
7021
|
+
|
|
5621
7022
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5622
7023
|
if (request === undefined || request === null || request === '') {
|
|
5623
7024
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5690,6 +7091,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5690
7091
|
const origin = `${this.id}-${meth}`;
|
|
5691
7092
|
log.trace(origin);
|
|
5692
7093
|
|
|
7094
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7095
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7096
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7097
|
+
return callback(null, errorObj);
|
|
7098
|
+
}
|
|
7099
|
+
|
|
5693
7100
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5694
7101
|
|
|
5695
7102
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -5736,6 +7143,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5736
7143
|
const origin = `${this.id}-${meth}`;
|
|
5737
7144
|
log.trace(origin);
|
|
5738
7145
|
|
|
7146
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7147
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7148
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7149
|
+
return callback(null, errorObj);
|
|
7150
|
+
}
|
|
7151
|
+
|
|
5739
7152
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5740
7153
|
if (request === undefined || request === null || request === '') {
|
|
5741
7154
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5811,6 +7224,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5811
7224
|
const origin = `${this.id}-${meth}`;
|
|
5812
7225
|
log.trace(origin);
|
|
5813
7226
|
|
|
7227
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7228
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7229
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7230
|
+
return callback(null, errorObj);
|
|
7231
|
+
}
|
|
7232
|
+
|
|
5814
7233
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5815
7234
|
if (request === undefined || request === null || request === '') {
|
|
5816
7235
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -5889,6 +7308,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5889
7308
|
const origin = `${this.id}-${meth}`;
|
|
5890
7309
|
log.trace(origin);
|
|
5891
7310
|
|
|
7311
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7312
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7313
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7314
|
+
return callback(null, errorObj);
|
|
7315
|
+
}
|
|
7316
|
+
|
|
5892
7317
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5893
7318
|
|
|
5894
7319
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -5953,6 +7378,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
5953
7378
|
const origin = `${this.id}-${meth}`;
|
|
5954
7379
|
log.trace(origin);
|
|
5955
7380
|
|
|
7381
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7382
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7383
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7384
|
+
return callback(null, errorObj);
|
|
7385
|
+
}
|
|
7386
|
+
|
|
5956
7387
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
5957
7388
|
if (request === undefined || request === null || request === '') {
|
|
5958
7389
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6039,6 +7470,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6039
7470
|
const origin = `${this.id}-${meth}`;
|
|
6040
7471
|
log.trace(origin);
|
|
6041
7472
|
|
|
7473
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7474
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7475
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7476
|
+
return callback(null, errorObj);
|
|
7477
|
+
}
|
|
7478
|
+
|
|
6042
7479
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6043
7480
|
|
|
6044
7481
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -6104,6 +7541,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6104
7541
|
const origin = `${this.id}-${meth}`;
|
|
6105
7542
|
log.trace(origin);
|
|
6106
7543
|
|
|
7544
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7545
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7546
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7547
|
+
return callback(null, errorObj);
|
|
7548
|
+
}
|
|
7549
|
+
|
|
6107
7550
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6108
7551
|
if (serialNumber === undefined || serialNumber === null || serialNumber === '') {
|
|
6109
7552
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['serialNumber'], null, null, null);
|
|
@@ -6173,6 +7616,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6173
7616
|
const origin = `${this.id}-${meth}`;
|
|
6174
7617
|
log.trace(origin);
|
|
6175
7618
|
|
|
7619
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7620
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7621
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7622
|
+
return callback(null, errorObj);
|
|
7623
|
+
}
|
|
7624
|
+
|
|
6176
7625
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6177
7626
|
if (request === undefined || request === null || request === '') {
|
|
6178
7627
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6247,6 +7696,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6247
7696
|
const origin = `${this.id}-${meth}`;
|
|
6248
7697
|
log.trace(origin);
|
|
6249
7698
|
|
|
7699
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7700
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7701
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7702
|
+
return callback(null, errorObj);
|
|
7703
|
+
}
|
|
7704
|
+
|
|
6250
7705
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6251
7706
|
if (request === undefined || request === null || request === '') {
|
|
6252
7707
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6337,6 +7792,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6337
7792
|
const origin = `${this.id}-${meth}`;
|
|
6338
7793
|
log.trace(origin);
|
|
6339
7794
|
|
|
7795
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7796
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7797
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7798
|
+
return callback(null, errorObj);
|
|
7799
|
+
}
|
|
7800
|
+
|
|
6340
7801
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6341
7802
|
|
|
6342
7803
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -6401,6 +7862,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6401
7862
|
const origin = `${this.id}-${meth}`;
|
|
6402
7863
|
log.trace(origin);
|
|
6403
7864
|
|
|
7865
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7866
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7867
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7868
|
+
return callback(null, errorObj);
|
|
7869
|
+
}
|
|
7870
|
+
|
|
6404
7871
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6405
7872
|
if (request === undefined || request === null || request === '') {
|
|
6406
7873
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6491,6 +7958,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6491
7958
|
const origin = `${this.id}-${meth}`;
|
|
6492
7959
|
log.trace(origin);
|
|
6493
7960
|
|
|
7961
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
7962
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
7963
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7964
|
+
return callback(null, errorObj);
|
|
7965
|
+
}
|
|
7966
|
+
|
|
6494
7967
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6495
7968
|
|
|
6496
7969
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -6558,6 +8031,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6558
8031
|
const origin = `${this.id}-${meth}`;
|
|
6559
8032
|
log.trace(origin);
|
|
6560
8033
|
|
|
8034
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8035
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8036
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8037
|
+
return callback(null, errorObj);
|
|
8038
|
+
}
|
|
8039
|
+
|
|
6561
8040
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6562
8041
|
if (ContentType === undefined || ContentType === null || ContentType === '') {
|
|
6563
8042
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ContentType'], null, null, null);
|
|
@@ -6627,6 +8106,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6627
8106
|
const origin = `${this.id}-${meth}`;
|
|
6628
8107
|
log.trace(origin);
|
|
6629
8108
|
|
|
8109
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8110
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8111
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8112
|
+
return callback(null, errorObj);
|
|
8113
|
+
}
|
|
8114
|
+
|
|
6630
8115
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6631
8116
|
if (request === undefined || request === null || request === '') {
|
|
6632
8117
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6704,6 +8189,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6704
8189
|
const origin = `${this.id}-${meth}`;
|
|
6705
8190
|
log.trace(origin);
|
|
6706
8191
|
|
|
8192
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8193
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8194
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8195
|
+
return callback(null, errorObj);
|
|
8196
|
+
}
|
|
8197
|
+
|
|
6707
8198
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6708
8199
|
if (request === undefined || request === null || request === '') {
|
|
6709
8200
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6781,6 +8272,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6781
8272
|
const origin = `${this.id}-${meth}`;
|
|
6782
8273
|
log.trace(origin);
|
|
6783
8274
|
|
|
8275
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8276
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8277
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8278
|
+
return callback(null, errorObj);
|
|
8279
|
+
}
|
|
8280
|
+
|
|
6784
8281
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6785
8282
|
if (request === undefined || request === null || request === '') {
|
|
6786
8283
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -6854,6 +8351,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6854
8351
|
const origin = `${this.id}-${meth}`;
|
|
6855
8352
|
log.trace(origin);
|
|
6856
8353
|
|
|
8354
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8355
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8356
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8357
|
+
return callback(null, errorObj);
|
|
8358
|
+
}
|
|
8359
|
+
|
|
6857
8360
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6858
8361
|
if (id === undefined || id === null || id === '') {
|
|
6859
8362
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -6952,6 +8455,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
6952
8455
|
const origin = `${this.id}-${meth}`;
|
|
6953
8456
|
log.trace(origin);
|
|
6954
8457
|
|
|
8458
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8459
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8460
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8461
|
+
return callback(null, errorObj);
|
|
8462
|
+
}
|
|
8463
|
+
|
|
6955
8464
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
6956
8465
|
|
|
6957
8466
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -7016,6 +8525,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7016
8525
|
const origin = `${this.id}-${meth}`;
|
|
7017
8526
|
log.trace(origin);
|
|
7018
8527
|
|
|
8528
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8529
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8530
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8531
|
+
return callback(null, errorObj);
|
|
8532
|
+
}
|
|
8533
|
+
|
|
7019
8534
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7020
8535
|
if (request === undefined || request === null || request === '') {
|
|
7021
8536
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -7090,6 +8605,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7090
8605
|
const origin = `${this.id}-${meth}`;
|
|
7091
8606
|
log.trace(origin);
|
|
7092
8607
|
|
|
8608
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8609
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8610
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8611
|
+
return callback(null, errorObj);
|
|
8612
|
+
}
|
|
8613
|
+
|
|
7093
8614
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7094
8615
|
if (request === undefined || request === null || request === '') {
|
|
7095
8616
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -7164,6 +8685,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7164
8685
|
const origin = `${this.id}-${meth}`;
|
|
7165
8686
|
log.trace(origin);
|
|
7166
8687
|
|
|
8688
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8689
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8690
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8691
|
+
return callback(null, errorObj);
|
|
8692
|
+
}
|
|
8693
|
+
|
|
7167
8694
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7168
8695
|
if (id === undefined || id === null || id === '') {
|
|
7169
8696
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -7234,6 +8761,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7234
8761
|
const origin = `${this.id}-${meth}`;
|
|
7235
8762
|
log.trace(origin);
|
|
7236
8763
|
|
|
8764
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8765
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8766
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8767
|
+
return callback(null, errorObj);
|
|
8768
|
+
}
|
|
8769
|
+
|
|
7237
8770
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7238
8771
|
if (deviceId === undefined || deviceId === null || deviceId === '') {
|
|
7239
8772
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceId'], null, null, null);
|
|
@@ -7311,6 +8844,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7311
8844
|
const origin = `${this.id}-${meth}`;
|
|
7312
8845
|
log.trace(origin);
|
|
7313
8846
|
|
|
8847
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8848
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8849
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8850
|
+
return callback(null, errorObj);
|
|
8851
|
+
}
|
|
8852
|
+
|
|
7314
8853
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7315
8854
|
|
|
7316
8855
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -7355,6 +8894,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7355
8894
|
const origin = `${this.id}-${meth}`;
|
|
7356
8895
|
log.trace(origin);
|
|
7357
8896
|
|
|
8897
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8898
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8899
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8900
|
+
return callback(null, errorObj);
|
|
8901
|
+
}
|
|
8902
|
+
|
|
7358
8903
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7359
8904
|
|
|
7360
8905
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -7401,6 +8946,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7401
8946
|
const origin = `${this.id}-${meth}`;
|
|
7402
8947
|
log.trace(origin);
|
|
7403
8948
|
|
|
8949
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
8950
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
8951
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8952
|
+
return callback(null, errorObj);
|
|
8953
|
+
}
|
|
8954
|
+
|
|
7404
8955
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7405
8956
|
if (id === undefined || id === null || id === '') {
|
|
7406
8957
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -7471,6 +9022,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7471
9022
|
const origin = `${this.id}-${meth}`;
|
|
7472
9023
|
log.trace(origin);
|
|
7473
9024
|
|
|
9025
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9026
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9027
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9028
|
+
return callback(null, errorObj);
|
|
9029
|
+
}
|
|
9030
|
+
|
|
7474
9031
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7475
9032
|
if (id === undefined || id === null || id === '') {
|
|
7476
9033
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -7541,6 +9098,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7541
9098
|
const origin = `${this.id}-${meth}`;
|
|
7542
9099
|
log.trace(origin);
|
|
7543
9100
|
|
|
9101
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9102
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9103
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9104
|
+
return callback(null, errorObj);
|
|
9105
|
+
}
|
|
9106
|
+
|
|
7544
9107
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7545
9108
|
if (request === undefined || request === null || request === '') {
|
|
7546
9109
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -7613,6 +9176,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7613
9176
|
const origin = `${this.id}-${meth}`;
|
|
7614
9177
|
log.trace(origin);
|
|
7615
9178
|
|
|
9179
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9180
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9181
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9182
|
+
return callback(null, errorObj);
|
|
9183
|
+
}
|
|
9184
|
+
|
|
7616
9185
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7617
9186
|
|
|
7618
9187
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -7657,6 +9226,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7657
9226
|
const origin = `${this.id}-${meth}`;
|
|
7658
9227
|
log.trace(origin);
|
|
7659
9228
|
|
|
9229
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9230
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9231
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9232
|
+
return callback(null, errorObj);
|
|
9233
|
+
}
|
|
9234
|
+
|
|
7660
9235
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7661
9236
|
|
|
7662
9237
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -7702,6 +9277,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7702
9277
|
const origin = `${this.id}-${meth}`;
|
|
7703
9278
|
log.trace(origin);
|
|
7704
9279
|
|
|
9280
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9281
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9282
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9283
|
+
return callback(null, errorObj);
|
|
9284
|
+
}
|
|
9285
|
+
|
|
7705
9286
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7706
9287
|
if (id === undefined || id === null || id === '') {
|
|
7707
9288
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -7773,6 +9354,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7773
9354
|
const origin = `${this.id}-${meth}`;
|
|
7774
9355
|
log.trace(origin);
|
|
7775
9356
|
|
|
9357
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9358
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9359
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9360
|
+
return callback(null, errorObj);
|
|
9361
|
+
}
|
|
9362
|
+
|
|
7776
9363
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7777
9364
|
if (deviceId === undefined || deviceId === null || deviceId === '') {
|
|
7778
9365
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceId'], null, null, null);
|
|
@@ -7850,6 +9437,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7850
9437
|
const origin = `${this.id}-${meth}`;
|
|
7851
9438
|
log.trace(origin);
|
|
7852
9439
|
|
|
9440
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9441
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9442
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9443
|
+
return callback(null, errorObj);
|
|
9444
|
+
}
|
|
9445
|
+
|
|
7853
9446
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7854
9447
|
if (deviceId === undefined || deviceId === null || deviceId === '') {
|
|
7855
9448
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceId'], null, null, null);
|
|
@@ -7918,6 +9511,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7918
9511
|
const origin = `${this.id}-${meth}`;
|
|
7919
9512
|
log.trace(origin);
|
|
7920
9513
|
|
|
9514
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9515
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9516
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9517
|
+
return callback(null, errorObj);
|
|
9518
|
+
}
|
|
9519
|
+
|
|
7921
9520
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7922
9521
|
if (id === undefined || id === null || id === '') {
|
|
7923
9522
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -7986,6 +9585,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7986
9585
|
const origin = `${this.id}-${meth}`;
|
|
7987
9586
|
log.trace(origin);
|
|
7988
9587
|
|
|
9588
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9589
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9590
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9591
|
+
return callback(null, errorObj);
|
|
9592
|
+
}
|
|
9593
|
+
|
|
7989
9594
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
7990
9595
|
if (deviceId === undefined || deviceId === null || deviceId === '') {
|
|
7991
9596
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceId'], null, null, null);
|
|
@@ -8054,6 +9659,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8054
9659
|
const origin = `${this.id}-${meth}`;
|
|
8055
9660
|
log.trace(origin);
|
|
8056
9661
|
|
|
9662
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9663
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9664
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9665
|
+
return callback(null, errorObj);
|
|
9666
|
+
}
|
|
9667
|
+
|
|
8057
9668
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8058
9669
|
if (id === undefined || id === null || id === '') {
|
|
8059
9670
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -8122,6 +9733,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8122
9733
|
const origin = `${this.id}-${meth}`;
|
|
8123
9734
|
log.trace(origin);
|
|
8124
9735
|
|
|
9736
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9737
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9738
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9739
|
+
return callback(null, errorObj);
|
|
9740
|
+
}
|
|
9741
|
+
|
|
8125
9742
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8126
9743
|
if (networkDeviceId === undefined || networkDeviceId === null || networkDeviceId === '') {
|
|
8127
9744
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['networkDeviceId'], null, null, null);
|
|
@@ -8189,6 +9806,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8189
9806
|
const origin = `${this.id}-${meth}`;
|
|
8190
9807
|
log.trace(origin);
|
|
8191
9808
|
|
|
9809
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9810
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9811
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9812
|
+
return callback(null, errorObj);
|
|
9813
|
+
}
|
|
9814
|
+
|
|
8192
9815
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8193
9816
|
|
|
8194
9817
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -8234,6 +9857,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8234
9857
|
const origin = `${this.id}-${meth}`;
|
|
8235
9858
|
log.trace(origin);
|
|
8236
9859
|
|
|
9860
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9861
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9862
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9863
|
+
return callback(null, errorObj);
|
|
9864
|
+
}
|
|
9865
|
+
|
|
8237
9866
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8238
9867
|
if (id === undefined || id === null || id === '') {
|
|
8239
9868
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -8302,6 +9931,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8302
9931
|
const origin = `${this.id}-${meth}`;
|
|
8303
9932
|
log.trace(origin);
|
|
8304
9933
|
|
|
9934
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9935
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9936
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9937
|
+
return callback(null, errorObj);
|
|
9938
|
+
}
|
|
9939
|
+
|
|
8305
9940
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8306
9941
|
|
|
8307
9942
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -8346,6 +9981,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8346
9981
|
const origin = `${this.id}-${meth}`;
|
|
8347
9982
|
log.trace(origin);
|
|
8348
9983
|
|
|
9984
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
9985
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
9986
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9987
|
+
return callback(null, errorObj);
|
|
9988
|
+
}
|
|
9989
|
+
|
|
8349
9990
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8350
9991
|
|
|
8351
9992
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -8391,6 +10032,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8391
10032
|
const origin = `${this.id}-${meth}`;
|
|
8392
10033
|
log.trace(origin);
|
|
8393
10034
|
|
|
10035
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10036
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10037
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10038
|
+
return callback(null, errorObj);
|
|
10039
|
+
}
|
|
10040
|
+
|
|
8394
10041
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8395
10042
|
if (id === undefined || id === null || id === '') {
|
|
8396
10043
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
@@ -8462,6 +10109,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8462
10109
|
const origin = `${this.id}-${meth}`;
|
|
8463
10110
|
log.trace(origin);
|
|
8464
10111
|
|
|
10112
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10113
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10114
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10115
|
+
return callback(null, errorObj);
|
|
10116
|
+
}
|
|
10117
|
+
|
|
8465
10118
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8466
10119
|
|
|
8467
10120
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -8525,6 +10178,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8525
10178
|
const origin = `${this.id}-${meth}`;
|
|
8526
10179
|
log.trace(origin);
|
|
8527
10180
|
|
|
10181
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10182
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10183
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10184
|
+
return callback(null, errorObj);
|
|
10185
|
+
}
|
|
10186
|
+
|
|
8528
10187
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8529
10188
|
if (deviceId === undefined || deviceId === null || deviceId === '') {
|
|
8530
10189
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceId'], null, null, null);
|
|
@@ -8594,6 +10253,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8594
10253
|
const origin = `${this.id}-${meth}`;
|
|
8595
10254
|
log.trace(origin);
|
|
8596
10255
|
|
|
10256
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10257
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10258
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10259
|
+
return callback(null, errorObj);
|
|
10260
|
+
}
|
|
10261
|
+
|
|
8597
10262
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8598
10263
|
if (request === undefined || request === null || request === '') {
|
|
8599
10264
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -8668,6 +10333,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8668
10333
|
const origin = `${this.id}-${meth}`;
|
|
8669
10334
|
log.trace(origin);
|
|
8670
10335
|
|
|
10336
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10337
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10338
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10339
|
+
return callback(null, errorObj);
|
|
10340
|
+
}
|
|
10341
|
+
|
|
8671
10342
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8672
10343
|
if (request === undefined || request === null || request === '') {
|
|
8673
10344
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -8742,6 +10413,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8742
10413
|
const origin = `${this.id}-${meth}`;
|
|
8743
10414
|
log.trace(origin);
|
|
8744
10415
|
|
|
10416
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10417
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10418
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10419
|
+
return callback(null, errorObj);
|
|
10420
|
+
}
|
|
10421
|
+
|
|
8745
10422
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8746
10423
|
|
|
8747
10424
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -8805,6 +10482,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8805
10482
|
const origin = `${this.id}-${meth}`;
|
|
8806
10483
|
log.trace(origin);
|
|
8807
10484
|
|
|
10485
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10486
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10487
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10488
|
+
return callback(null, errorObj);
|
|
10489
|
+
}
|
|
10490
|
+
|
|
8808
10491
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8809
10492
|
if (ipAddress === undefined || ipAddress === null || ipAddress === '') {
|
|
8810
10493
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ipAddress'], null, null, null);
|
|
@@ -8873,6 +10556,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8873
10556
|
const origin = `${this.id}-${meth}`;
|
|
8874
10557
|
log.trace(origin);
|
|
8875
10558
|
|
|
10559
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10560
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10561
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10562
|
+
return callback(null, errorObj);
|
|
10563
|
+
}
|
|
10564
|
+
|
|
8876
10565
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8877
10566
|
if (serialNumber === undefined || serialNumber === null || serialNumber === '') {
|
|
8878
10567
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['serialNumber'], null, null, null);
|
|
@@ -8941,6 +10630,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8941
10630
|
const origin = `${this.id}-${meth}`;
|
|
8942
10631
|
log.trace(origin);
|
|
8943
10632
|
|
|
10633
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10634
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10635
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10636
|
+
return callback(null, errorObj);
|
|
10637
|
+
}
|
|
10638
|
+
|
|
8944
10639
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8945
10640
|
if (ipAddress === undefined || ipAddress === null || ipAddress === '') {
|
|
8946
10641
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ipAddress'], null, null, null);
|
|
@@ -9015,6 +10710,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9015
10710
|
const origin = `${this.id}-${meth}`;
|
|
9016
10711
|
log.trace(origin);
|
|
9017
10712
|
|
|
10713
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10714
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10715
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10716
|
+
return callback(null, errorObj);
|
|
10717
|
+
}
|
|
10718
|
+
|
|
9018
10719
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9019
10720
|
if (deviceId === undefined || deviceId === null || deviceId === '') {
|
|
9020
10721
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceId'], null, null, null);
|
|
@@ -9084,6 +10785,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9084
10785
|
const origin = `${this.id}-${meth}`;
|
|
9085
10786
|
log.trace(origin);
|
|
9086
10787
|
|
|
10788
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10789
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10790
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10791
|
+
return callback(null, errorObj);
|
|
10792
|
+
}
|
|
10793
|
+
|
|
9087
10794
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9088
10795
|
if (startIndex === undefined || startIndex === null || startIndex === '') {
|
|
9089
10796
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['startIndex'], null, null, null);
|
|
@@ -9159,6 +10866,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9159
10866
|
const origin = `${this.id}-${meth}`;
|
|
9160
10867
|
log.trace(origin);
|
|
9161
10868
|
|
|
10869
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10870
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10871
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10872
|
+
return callback(null, errorObj);
|
|
10873
|
+
}
|
|
10874
|
+
|
|
9162
10875
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9163
10876
|
if (timestamp === undefined || timestamp === null || timestamp === '') {
|
|
9164
10877
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['timestamp'], null, null, null);
|
|
@@ -9236,6 +10949,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9236
10949
|
const origin = `${this.id}-${meth}`;
|
|
9237
10950
|
log.trace(origin);
|
|
9238
10951
|
|
|
10952
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
10953
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
10954
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
10955
|
+
return callback(null, errorObj);
|
|
10956
|
+
}
|
|
10957
|
+
|
|
9239
10958
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9240
10959
|
|
|
9241
10960
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -9302,10 +11021,165 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9302
11021
|
const origin = `${this.id}-${meth}`;
|
|
9303
11022
|
log.trace(origin);
|
|
9304
11023
|
|
|
11024
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11025
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11026
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11027
|
+
return callback(null, errorObj);
|
|
11028
|
+
}
|
|
11029
|
+
|
|
11030
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11031
|
+
|
|
11032
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
11033
|
+
const queryParamsAvailable = { vrfName, managementIpAddress, hostname, macAddress, family, collectionStatus, collectionInterval, softwareVersion, softwareType, reachabilityStatus, reachabilityFailureReason, errorCode, platformId, series, type, serialNumber, upTime, role, roleSource, associatedWlcIp, offset, limit };
|
|
11034
|
+
const queryParams = {};
|
|
11035
|
+
const pathVars = [];
|
|
11036
|
+
const bodyVars = {};
|
|
11037
|
+
|
|
11038
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11039
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
11040
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
11041
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
11042
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
11043
|
+
}
|
|
11044
|
+
});
|
|
11045
|
+
|
|
11046
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
11047
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
11048
|
+
const reqObj = {
|
|
11049
|
+
payload: bodyVars,
|
|
11050
|
+
uriPathVars: pathVars,
|
|
11051
|
+
uriQuery: queryParams
|
|
11052
|
+
};
|
|
11053
|
+
|
|
11054
|
+
try {
|
|
11055
|
+
// Make the call -
|
|
11056
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
11057
|
+
return this.requestHandlerInst.identifyRequest('Devices', 'getDnaintentapiv1networkDeviceautocomplete', reqObj, true, (irReturnData, irReturnError) => {
|
|
11058
|
+
// if we received an error or their is no response on the results
|
|
11059
|
+
// return an error
|
|
11060
|
+
if (irReturnError) {
|
|
11061
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
11062
|
+
return callback(null, irReturnError);
|
|
11063
|
+
}
|
|
11064
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
11065
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDnaintentapiv1networkDeviceautocomplete'], null, null, null);
|
|
11066
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11067
|
+
return callback(null, errorObj);
|
|
11068
|
+
}
|
|
11069
|
+
|
|
11070
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
11071
|
+
// return the response
|
|
11072
|
+
return callback(irReturnData, null);
|
|
11073
|
+
});
|
|
11074
|
+
} catch (ex) {
|
|
11075
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
11076
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11077
|
+
return callback(null, errorObj);
|
|
11078
|
+
}
|
|
11079
|
+
}
|
|
11080
|
+
|
|
11081
|
+
/**
|
|
11082
|
+
* @summary Get wireless lan controller details by Id
|
|
11083
|
+
*
|
|
11084
|
+
* @function getDnaintentapiv1networkDeviceidwirelessInfo
|
|
11085
|
+
* @param {string} id - Device ID
|
|
11086
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
11087
|
+
*/
|
|
11088
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
11089
|
+
getDnaintentapiv1networkDeviceidwirelessInfo(id, callback) {
|
|
11090
|
+
const meth = 'adapter-getDnaintentapiv1networkDeviceidwirelessInfo';
|
|
11091
|
+
const origin = `${this.id}-${meth}`;
|
|
11092
|
+
log.trace(origin);
|
|
11093
|
+
|
|
11094
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11095
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11096
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11097
|
+
return callback(null, errorObj);
|
|
11098
|
+
}
|
|
11099
|
+
|
|
11100
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11101
|
+
if (id === undefined || id === null || id === '') {
|
|
11102
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['id'], null, null, null);
|
|
11103
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11104
|
+
return callback(null, errorObj);
|
|
11105
|
+
}
|
|
11106
|
+
|
|
11107
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
11108
|
+
const queryParamsAvailable = {};
|
|
11109
|
+
const queryParams = {};
|
|
11110
|
+
const pathVars = [id];
|
|
11111
|
+
const bodyVars = {};
|
|
11112
|
+
|
|
11113
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11114
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
11115
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
11116
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
11117
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
11118
|
+
}
|
|
11119
|
+
});
|
|
11120
|
+
|
|
11121
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
11122
|
+
const reqObj = {
|
|
11123
|
+
payload: bodyVars,
|
|
11124
|
+
uriPathVars: pathVars,
|
|
11125
|
+
uriQuery: queryParams
|
|
11126
|
+
};
|
|
11127
|
+
|
|
11128
|
+
try {
|
|
11129
|
+
// Make the call -
|
|
11130
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
11131
|
+
return this.requestHandlerInst.identifyRequest('Devices', 'getDnaintentapiv1networkDeviceidwirelessInfo', reqObj, true, (irReturnData, irReturnError) => {
|
|
11132
|
+
// if we received an error or their is no response on the results
|
|
11133
|
+
// return an error
|
|
11134
|
+
if (irReturnError) {
|
|
11135
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
11136
|
+
return callback(null, irReturnError);
|
|
11137
|
+
}
|
|
11138
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
11139
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDnaintentapiv1networkDeviceidwirelessInfo'], null, null, null);
|
|
11140
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11141
|
+
return callback(null, errorObj);
|
|
11142
|
+
}
|
|
11143
|
+
|
|
11144
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
11145
|
+
// return the response
|
|
11146
|
+
return callback(irReturnData, null);
|
|
11147
|
+
});
|
|
11148
|
+
} catch (ex) {
|
|
11149
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
11150
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11151
|
+
return callback(null, errorObj);
|
|
11152
|
+
}
|
|
11153
|
+
}
|
|
11154
|
+
|
|
11155
|
+
/**
|
|
11156
|
+
* @summary Get Site Health
|
|
11157
|
+
*
|
|
11158
|
+
* @function getDnaintentapiv1siteHealth
|
|
11159
|
+
* @param {string} timestamp - Epoch time(in milliseconds) when the Site Hierarchy data is required
|
|
11160
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
11161
|
+
*/
|
|
11162
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
11163
|
+
getDnaintentapiv1siteHealth(timestamp, callback) {
|
|
11164
|
+
const meth = 'adapter-getDnaintentapiv1siteHealth';
|
|
11165
|
+
const origin = `${this.id}-${meth}`;
|
|
11166
|
+
log.trace(origin);
|
|
11167
|
+
|
|
11168
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11169
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11170
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11171
|
+
return callback(null, errorObj);
|
|
11172
|
+
}
|
|
11173
|
+
|
|
9305
11174
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11175
|
+
if (timestamp === undefined || timestamp === null || timestamp === '') {
|
|
11176
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['timestamp'], null, null, null);
|
|
11177
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11178
|
+
return callback(null, errorObj);
|
|
11179
|
+
}
|
|
9306
11180
|
|
|
9307
11181
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
9308
|
-
const queryParamsAvailable = {
|
|
11182
|
+
const queryParamsAvailable = { timestamp };
|
|
9309
11183
|
const queryParams = {};
|
|
9310
11184
|
const pathVars = [];
|
|
9311
11185
|
const bodyVars = {};
|
|
@@ -9318,7 +11192,6 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9318
11192
|
}
|
|
9319
11193
|
});
|
|
9320
11194
|
|
|
9321
|
-
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
9322
11195
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
9323
11196
|
const reqObj = {
|
|
9324
11197
|
payload: bodyVars,
|
|
@@ -9329,7 +11202,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9329
11202
|
try {
|
|
9330
11203
|
// Make the call -
|
|
9331
11204
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
9332
|
-
return this.requestHandlerInst.identifyRequest('
|
|
11205
|
+
return this.requestHandlerInst.identifyRequest('Sites', 'getDnaintentapiv1siteHealth', reqObj, true, (irReturnData, irReturnError) => {
|
|
9333
11206
|
// if we received an error or their is no response on the results
|
|
9334
11207
|
// return an error
|
|
9335
11208
|
if (irReturnError) {
|
|
@@ -9337,7 +11210,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9337
11210
|
return callback(null, irReturnError);
|
|
9338
11211
|
}
|
|
9339
11212
|
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
9340
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['
|
|
11213
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDnaintentapiv1siteHealth'], null, null, null);
|
|
9341
11214
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9342
11215
|
return callback(null, errorObj);
|
|
9343
11216
|
}
|
|
@@ -9354,21 +11227,46 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9354
11227
|
}
|
|
9355
11228
|
|
|
9356
11229
|
/**
|
|
9357
|
-
* @summary
|
|
11230
|
+
* @summary Assign Device To Site
|
|
9358
11231
|
*
|
|
9359
|
-
* @function
|
|
9360
|
-
* @param {
|
|
11232
|
+
* @function postDnaintentapiv1sitesiteIddevice
|
|
11233
|
+
* @param {object} request - request
|
|
11234
|
+
* @param {boolean} Runsync - Enable this parameter to execute the API and return a response synchronously
|
|
11235
|
+
* @param {boolean} Persistbapioutput - Persist bapi sync response
|
|
11236
|
+
* @param {number} Timeout - During synchronous execution, this defines the maximum time to wait for a response, before the API execution is terminated
|
|
11237
|
+
* @param {string} siteId - Site id to which the device is assigned
|
|
9361
11238
|
* @param {getCallback} callback - a callback function to return the result
|
|
9362
11239
|
*/
|
|
9363
11240
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
9364
|
-
|
|
9365
|
-
const meth = 'adapter-
|
|
11241
|
+
postDnaintentapiv1sitesiteIddevice(request, Runsync, Persistbapioutput, Timeout, siteId, callback) {
|
|
11242
|
+
const meth = 'adapter-postDnaintentapiv1sitesiteIddevice';
|
|
9366
11243
|
const origin = `${this.id}-${meth}`;
|
|
9367
11244
|
log.trace(origin);
|
|
9368
11245
|
|
|
11246
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11247
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11248
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11249
|
+
return callback(null, errorObj);
|
|
11250
|
+
}
|
|
11251
|
+
|
|
9369
11252
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9370
|
-
if (
|
|
9371
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['
|
|
11253
|
+
if (request === undefined || request === null || request === '') {
|
|
11254
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
11255
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11256
|
+
return callback(null, errorObj);
|
|
11257
|
+
}
|
|
11258
|
+
if (Runsync === undefined || Runsync === null || Runsync === '') {
|
|
11259
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['Runsync'], null, null, null);
|
|
11260
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11261
|
+
return callback(null, errorObj);
|
|
11262
|
+
}
|
|
11263
|
+
if (Persistbapioutput === undefined || Persistbapioutput === null || Persistbapioutput === '') {
|
|
11264
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['Persistbapioutput'], null, null, null);
|
|
11265
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11266
|
+
return callback(null, errorObj);
|
|
11267
|
+
}
|
|
11268
|
+
if (siteId === undefined || siteId === null || siteId === '') {
|
|
11269
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['siteId'], null, null, null);
|
|
9372
11270
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9373
11271
|
return callback(null, errorObj);
|
|
9374
11272
|
}
|
|
@@ -9376,8 +11274,8 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9376
11274
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
9377
11275
|
const queryParamsAvailable = {};
|
|
9378
11276
|
const queryParams = {};
|
|
9379
|
-
const pathVars = [
|
|
9380
|
-
const bodyVars =
|
|
11277
|
+
const pathVars = [siteId];
|
|
11278
|
+
const bodyVars = request;
|
|
9381
11279
|
|
|
9382
11280
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
9383
11281
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -9397,7 +11295,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9397
11295
|
try {
|
|
9398
11296
|
// Make the call -
|
|
9399
11297
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
9400
|
-
return this.requestHandlerInst.identifyRequest('
|
|
11298
|
+
return this.requestHandlerInst.identifyRequest('Sites', 'postDnaintentapiv1sitesiteIddevice', reqObj, true, (irReturnData, irReturnError) => {
|
|
9401
11299
|
// if we received an error or their is no response on the results
|
|
9402
11300
|
// return an error
|
|
9403
11301
|
if (irReturnError) {
|
|
@@ -9405,7 +11303,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9405
11303
|
return callback(null, irReturnError);
|
|
9406
11304
|
}
|
|
9407
11305
|
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
9408
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['
|
|
11306
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['postDnaintentapiv1sitesiteIddevice'], null, null, null);
|
|
9409
11307
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9410
11308
|
return callback(null, errorObj);
|
|
9411
11309
|
}
|
|
@@ -9422,30 +11320,55 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9422
11320
|
}
|
|
9423
11321
|
|
|
9424
11322
|
/**
|
|
9425
|
-
* @summary
|
|
11323
|
+
* @summary Assign Device To Site
|
|
9426
11324
|
*
|
|
9427
|
-
* @function
|
|
9428
|
-
* @param {
|
|
11325
|
+
* @function postDnasystemapiv1sitesiteIddevice
|
|
11326
|
+
* @param {object} request - request
|
|
11327
|
+
* @param {boolean} Runsync - Enable this parameter to execute the API and return a response synchronously
|
|
11328
|
+
* @param {boolean} Persistbapioutput - Persist bapi sync response
|
|
11329
|
+
* @param {number} Timeout - During synchronous execution, this defines the maximum time to wait for a response, before the API execution is terminated
|
|
11330
|
+
* @param {string} siteId - Site id to which the device is assigned
|
|
9429
11331
|
* @param {getCallback} callback - a callback function to return the result
|
|
9430
11332
|
*/
|
|
9431
11333
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
9432
|
-
|
|
9433
|
-
const meth = 'adapter-
|
|
11334
|
+
postDnasystemapiv1sitesiteIddevice(request, Runsync, Persistbapioutput, Timeout, siteId, callback) {
|
|
11335
|
+
const meth = 'adapter-postDnasystemapiv1sitesiteIddevice';
|
|
9434
11336
|
const origin = `${this.id}-${meth}`;
|
|
9435
11337
|
log.trace(origin);
|
|
9436
11338
|
|
|
11339
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11340
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11341
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11342
|
+
return callback(null, errorObj);
|
|
11343
|
+
}
|
|
11344
|
+
|
|
9437
11345
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9438
|
-
if (
|
|
9439
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['
|
|
11346
|
+
if (request === undefined || request === null || request === '') {
|
|
11347
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
11348
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11349
|
+
return callback(null, errorObj);
|
|
11350
|
+
}
|
|
11351
|
+
if (Runsync === undefined || Runsync === null || Runsync === '') {
|
|
11352
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['Runsync'], null, null, null);
|
|
11353
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11354
|
+
return callback(null, errorObj);
|
|
11355
|
+
}
|
|
11356
|
+
if (Persistbapioutput === undefined || Persistbapioutput === null || Persistbapioutput === '') {
|
|
11357
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['Persistbapioutput'], null, null, null);
|
|
11358
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11359
|
+
return callback(null, errorObj);
|
|
11360
|
+
}
|
|
11361
|
+
if (siteId === undefined || siteId === null || siteId === '') {
|
|
11362
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['siteId'], null, null, null);
|
|
9440
11363
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9441
11364
|
return callback(null, errorObj);
|
|
9442
11365
|
}
|
|
9443
11366
|
|
|
9444
11367
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
9445
|
-
const queryParamsAvailable = {
|
|
11368
|
+
const queryParamsAvailable = {};
|
|
9446
11369
|
const queryParams = {};
|
|
9447
|
-
const pathVars = [];
|
|
9448
|
-
const bodyVars =
|
|
11370
|
+
const pathVars = [siteId];
|
|
11371
|
+
const bodyVars = request;
|
|
9449
11372
|
|
|
9450
11373
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
9451
11374
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -9465,7 +11388,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9465
11388
|
try {
|
|
9466
11389
|
// Make the call -
|
|
9467
11390
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
9468
|
-
return this.requestHandlerInst.identifyRequest('Sites', '
|
|
11391
|
+
return this.requestHandlerInst.identifyRequest('Sites', 'postDnasystemapiv1sitesiteIddevice', reqObj, true, (irReturnData, irReturnError) => {
|
|
9469
11392
|
// if we received an error or their is no response on the results
|
|
9470
11393
|
// return an error
|
|
9471
11394
|
if (irReturnError) {
|
|
@@ -9473,7 +11396,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9473
11396
|
return callback(null, irReturnError);
|
|
9474
11397
|
}
|
|
9475
11398
|
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
9476
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['
|
|
11399
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['postDnasystemapiv1sitesiteIddevice'], null, null, null);
|
|
9477
11400
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9478
11401
|
return callback(null, errorObj);
|
|
9479
11402
|
}
|
|
@@ -9490,22 +11413,27 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9490
11413
|
}
|
|
9491
11414
|
|
|
9492
11415
|
/**
|
|
9493
|
-
* @summary
|
|
11416
|
+
* @summary Create Site
|
|
9494
11417
|
*
|
|
9495
|
-
* @function
|
|
11418
|
+
* @function postDnaintentapiv1site
|
|
9496
11419
|
* @param {object} request - request
|
|
9497
11420
|
* @param {boolean} Runsync - Enable this parameter to execute the API and return a response synchronously
|
|
9498
|
-
* @param {boolean} Persistbapioutput - Persist bapi sync response
|
|
9499
11421
|
* @param {number} Timeout - During synchronous execution, this defines the maximum time to wait for a response, before the API execution is terminated
|
|
9500
|
-
* @param {
|
|
11422
|
+
* @param {boolean} Persistbapioutput - Persist bapi sync response
|
|
9501
11423
|
* @param {getCallback} callback - a callback function to return the result
|
|
9502
11424
|
*/
|
|
9503
11425
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
9504
|
-
|
|
9505
|
-
const meth = 'adapter-
|
|
11426
|
+
postDnaintentapiv1site(request, Runsync, Timeout, Persistbapioutput, callback) {
|
|
11427
|
+
const meth = 'adapter-postDnaintentapiv1site';
|
|
9506
11428
|
const origin = `${this.id}-${meth}`;
|
|
9507
11429
|
log.trace(origin);
|
|
9508
11430
|
|
|
11431
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11432
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11433
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11434
|
+
return callback(null, errorObj);
|
|
11435
|
+
}
|
|
11436
|
+
|
|
9509
11437
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9510
11438
|
if (request === undefined || request === null || request === '') {
|
|
9511
11439
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -9522,16 +11450,11 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9522
11450
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9523
11451
|
return callback(null, errorObj);
|
|
9524
11452
|
}
|
|
9525
|
-
if (siteId === undefined || siteId === null || siteId === '') {
|
|
9526
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['siteId'], null, null, null);
|
|
9527
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9528
|
-
return callback(null, errorObj);
|
|
9529
|
-
}
|
|
9530
11453
|
|
|
9531
11454
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
9532
11455
|
const queryParamsAvailable = {};
|
|
9533
11456
|
const queryParams = {};
|
|
9534
|
-
const pathVars = [
|
|
11457
|
+
const pathVars = [];
|
|
9535
11458
|
const bodyVars = request;
|
|
9536
11459
|
|
|
9537
11460
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -9552,7 +11475,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9552
11475
|
try {
|
|
9553
11476
|
// Make the call -
|
|
9554
11477
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
9555
|
-
return this.requestHandlerInst.identifyRequest('Sites', '
|
|
11478
|
+
return this.requestHandlerInst.identifyRequest('Sites', 'postDnaintentapiv1site', reqObj, true, (irReturnData, irReturnError) => {
|
|
9556
11479
|
// if we received an error or their is no response on the results
|
|
9557
11480
|
// return an error
|
|
9558
11481
|
if (irReturnError) {
|
|
@@ -9560,7 +11483,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9560
11483
|
return callback(null, irReturnError);
|
|
9561
11484
|
}
|
|
9562
11485
|
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
9563
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['
|
|
11486
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['postDnaintentapiv1site'], null, null, null);
|
|
9564
11487
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
9565
11488
|
return callback(null, errorObj);
|
|
9566
11489
|
}
|
|
@@ -9592,6 +11515,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9592
11515
|
const origin = `${this.id}-${meth}`;
|
|
9593
11516
|
log.trace(origin);
|
|
9594
11517
|
|
|
11518
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11519
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11520
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11521
|
+
return callback(null, errorObj);
|
|
11522
|
+
}
|
|
11523
|
+
|
|
9595
11524
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9596
11525
|
if (request === undefined || request === null || request === '') {
|
|
9597
11526
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -9679,6 +11608,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9679
11608
|
const origin = `${this.id}-${meth}`;
|
|
9680
11609
|
log.trace(origin);
|
|
9681
11610
|
|
|
11611
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11612
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11613
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11614
|
+
return callback(null, errorObj);
|
|
11615
|
+
}
|
|
11616
|
+
|
|
9682
11617
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9683
11618
|
|
|
9684
11619
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -9742,6 +11677,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9742
11677
|
const origin = `${this.id}-${meth}`;
|
|
9743
11678
|
log.trace(origin);
|
|
9744
11679
|
|
|
11680
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11681
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11682
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11683
|
+
return callback(null, errorObj);
|
|
11684
|
+
}
|
|
11685
|
+
|
|
9745
11686
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9746
11687
|
if (taskId === undefined || taskId === null || taskId === '') {
|
|
9747
11688
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['taskId'], null, null, null);
|
|
@@ -9823,6 +11764,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9823
11764
|
const origin = `${this.id}-${meth}`;
|
|
9824
11765
|
log.trace(origin);
|
|
9825
11766
|
|
|
11767
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11768
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11769
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11770
|
+
return callback(null, errorObj);
|
|
11771
|
+
}
|
|
11772
|
+
|
|
9826
11773
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9827
11774
|
|
|
9828
11775
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -9886,6 +11833,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9886
11833
|
const origin = `${this.id}-${meth}`;
|
|
9887
11834
|
log.trace(origin);
|
|
9888
11835
|
|
|
11836
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11837
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11838
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11839
|
+
return callback(null, errorObj);
|
|
11840
|
+
}
|
|
11841
|
+
|
|
9889
11842
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9890
11843
|
if (taskId === undefined || taskId === null || taskId === '') {
|
|
9891
11844
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['taskId'], null, null, null);
|
|
@@ -9956,6 +11909,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
9956
11909
|
const origin = `${this.id}-${meth}`;
|
|
9957
11910
|
log.trace(origin);
|
|
9958
11911
|
|
|
11912
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11913
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11914
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11915
|
+
return callback(null, errorObj);
|
|
11916
|
+
}
|
|
11917
|
+
|
|
9959
11918
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
9960
11919
|
if (operationId === undefined || operationId === null || operationId === '') {
|
|
9961
11920
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['operationId'], null, null, null);
|
|
@@ -10033,6 +11992,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10033
11992
|
const origin = `${this.id}-${meth}`;
|
|
10034
11993
|
log.trace(origin);
|
|
10035
11994
|
|
|
11995
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
11996
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
11997
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
11998
|
+
return callback(null, errorObj);
|
|
11999
|
+
}
|
|
12000
|
+
|
|
10036
12001
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10037
12002
|
|
|
10038
12003
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -10078,6 +12043,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10078
12043
|
const origin = `${this.id}-${meth}`;
|
|
10079
12044
|
log.trace(origin);
|
|
10080
12045
|
|
|
12046
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12047
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12048
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12049
|
+
return callback(null, errorObj);
|
|
12050
|
+
}
|
|
12051
|
+
|
|
10081
12052
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10082
12053
|
if (nameSpace === undefined || nameSpace === null || nameSpace === '') {
|
|
10083
12054
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['nameSpace'], null, null, null);
|
|
@@ -10147,6 +12118,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10147
12118
|
const origin = `${this.id}-${meth}`;
|
|
10148
12119
|
log.trace(origin);
|
|
10149
12120
|
|
|
12121
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12122
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12123
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12124
|
+
return callback(null, errorObj);
|
|
12125
|
+
}
|
|
12126
|
+
|
|
10150
12127
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10151
12128
|
if (fileId === undefined || fileId === null || fileId === '') {
|
|
10152
12129
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['fileId'], null, null, null);
|
|
@@ -10214,6 +12191,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10214
12191
|
const origin = `${this.id}-${meth}`;
|
|
10215
12192
|
log.trace(origin);
|
|
10216
12193
|
|
|
12194
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12195
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12196
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12197
|
+
return callback(null, errorObj);
|
|
12198
|
+
}
|
|
12199
|
+
|
|
10217
12200
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10218
12201
|
|
|
10219
12202
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -10260,6 +12243,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10260
12243
|
const origin = `${this.id}-${meth}`;
|
|
10261
12244
|
log.trace(origin);
|
|
10262
12245
|
|
|
12246
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12247
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12248
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12249
|
+
return callback(null, errorObj);
|
|
12250
|
+
}
|
|
12251
|
+
|
|
10263
12252
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10264
12253
|
if (request === undefined || request === null || request === '') {
|
|
10265
12254
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -10333,6 +12322,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10333
12322
|
const origin = `${this.id}-${meth}`;
|
|
10334
12323
|
log.trace(origin);
|
|
10335
12324
|
|
|
12325
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12326
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12327
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12328
|
+
return callback(null, errorObj);
|
|
12329
|
+
}
|
|
12330
|
+
|
|
10336
12331
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10337
12332
|
|
|
10338
12333
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -10377,6 +12372,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10377
12372
|
const origin = `${this.id}-${meth}`;
|
|
10378
12373
|
log.trace(origin);
|
|
10379
12374
|
|
|
12375
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12376
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12377
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12378
|
+
return callback(null, errorObj);
|
|
12379
|
+
}
|
|
12380
|
+
|
|
10380
12381
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10381
12382
|
|
|
10382
12383
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -10422,6 +12423,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10422
12423
|
const origin = `${this.id}-${meth}`;
|
|
10423
12424
|
log.trace(origin);
|
|
10424
12425
|
|
|
12426
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12427
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12428
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12429
|
+
return callback(null, errorObj);
|
|
12430
|
+
}
|
|
12431
|
+
|
|
10425
12432
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10426
12433
|
|
|
10427
12434
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -10487,6 +12494,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10487
12494
|
const origin = `${this.id}-${meth}`;
|
|
10488
12495
|
log.trace(origin);
|
|
10489
12496
|
|
|
12497
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12498
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12499
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12500
|
+
return callback(null, errorObj);
|
|
12501
|
+
}
|
|
12502
|
+
|
|
10490
12503
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10491
12504
|
if (vlanID === undefined || vlanID === null || vlanID === '') {
|
|
10492
12505
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['vlanID'], null, null, null);
|
|
@@ -10555,6 +12568,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10555
12568
|
const origin = `${this.id}-${meth}`;
|
|
10556
12569
|
log.trace(origin);
|
|
10557
12570
|
|
|
12571
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12572
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12573
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12574
|
+
return callback(null, errorObj);
|
|
12575
|
+
}
|
|
12576
|
+
|
|
10558
12577
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10559
12578
|
if (topologyType === undefined || topologyType === null || topologyType === '') {
|
|
10560
12579
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['topologyType'], null, null, null);
|
|
@@ -10623,6 +12642,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10623
12642
|
const origin = `${this.id}-${meth}`;
|
|
10624
12643
|
log.trace(origin);
|
|
10625
12644
|
|
|
12645
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12646
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12647
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12648
|
+
return callback(null, errorObj);
|
|
12649
|
+
}
|
|
12650
|
+
|
|
10626
12651
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10627
12652
|
if (timestamp === undefined || timestamp === null || timestamp === '') {
|
|
10628
12653
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['timestamp'], null, null, null);
|
|
@@ -10705,6 +12730,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10705
12730
|
const origin = `${this.id}-${meth}`;
|
|
10706
12731
|
log.trace(origin);
|
|
10707
12732
|
|
|
12733
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12734
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12735
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12736
|
+
return callback(null, errorObj);
|
|
12737
|
+
}
|
|
12738
|
+
|
|
10708
12739
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10709
12740
|
|
|
10710
12741
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -10769,6 +12800,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10769
12800
|
const origin = `${this.id}-${meth}`;
|
|
10770
12801
|
log.trace(origin);
|
|
10771
12802
|
|
|
12803
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12804
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12805
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12806
|
+
return callback(null, errorObj);
|
|
12807
|
+
}
|
|
12808
|
+
|
|
10772
12809
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10773
12810
|
if (request === undefined || request === null || request === '') {
|
|
10774
12811
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -10842,6 +12879,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10842
12879
|
const origin = `${this.id}-${meth}`;
|
|
10843
12880
|
log.trace(origin);
|
|
10844
12881
|
|
|
12882
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12883
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12884
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12885
|
+
return callback(null, errorObj);
|
|
12886
|
+
}
|
|
12887
|
+
|
|
10845
12888
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10846
12889
|
if (flowAnalysisId === undefined || flowAnalysisId === null || flowAnalysisId === '') {
|
|
10847
12890
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['flowAnalysisId'], null, null, null);
|
|
@@ -10910,6 +12953,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10910
12953
|
const origin = `${this.id}-${meth}`;
|
|
10911
12954
|
log.trace(origin);
|
|
10912
12955
|
|
|
12956
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
12957
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
12958
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
12959
|
+
return callback(null, errorObj);
|
|
12960
|
+
}
|
|
12961
|
+
|
|
10913
12962
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10914
12963
|
if (flowAnalysisId === undefined || flowAnalysisId === null || flowAnalysisId === '') {
|
|
10915
12964
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['flowAnalysisId'], null, null, null);
|
|
@@ -10978,6 +13027,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
10978
13027
|
const origin = `${this.id}-${meth}`;
|
|
10979
13028
|
log.trace(origin);
|
|
10980
13029
|
|
|
13030
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13031
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13032
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13033
|
+
return callback(null, errorObj);
|
|
13034
|
+
}
|
|
13035
|
+
|
|
10981
13036
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
10982
13037
|
if (deviceIp === undefined || deviceIp === null || deviceIp === '') {
|
|
10983
13038
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceIp'], null, null, null);
|
|
@@ -11049,6 +13104,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11049
13104
|
const origin = `${this.id}-${meth}`;
|
|
11050
13105
|
log.trace(origin);
|
|
11051
13106
|
|
|
13107
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13108
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13109
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13110
|
+
return callback(null, errorObj);
|
|
13111
|
+
}
|
|
13112
|
+
|
|
11052
13113
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11053
13114
|
if (request === undefined || request === null || request === '') {
|
|
11054
13115
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -11128,6 +13189,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11128
13189
|
const origin = `${this.id}-${meth}`;
|
|
11129
13190
|
log.trace(origin);
|
|
11130
13191
|
|
|
13192
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13193
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13194
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13195
|
+
return callback(null, errorObj);
|
|
13196
|
+
}
|
|
13197
|
+
|
|
11131
13198
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11132
13199
|
if (ContentType === undefined || ContentType === null || ContentType === '') {
|
|
11133
13200
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ContentType'], null, null, null);
|
|
@@ -11202,6 +13269,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11202
13269
|
const origin = `${this.id}-${meth}`;
|
|
11203
13270
|
log.trace(origin);
|
|
11204
13271
|
|
|
13272
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13273
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13274
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13275
|
+
return callback(null, errorObj);
|
|
13276
|
+
}
|
|
13277
|
+
|
|
11205
13278
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11206
13279
|
if (ssidName === undefined || ssidName === null || ssidName === '') {
|
|
11207
13280
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ssidName'], null, null, null);
|
|
@@ -11275,6 +13348,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11275
13348
|
const origin = `${this.id}-${meth}`;
|
|
11276
13349
|
log.trace(origin);
|
|
11277
13350
|
|
|
13351
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13352
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13353
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13354
|
+
return callback(null, errorObj);
|
|
13355
|
+
}
|
|
13356
|
+
|
|
11278
13357
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11279
13358
|
if (request === undefined || request === null || request === '') {
|
|
11280
13359
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -11343,6 +13422,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11343
13422
|
const origin = `${this.id}-${meth}`;
|
|
11344
13423
|
log.trace(origin);
|
|
11345
13424
|
|
|
13425
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13426
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13427
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13428
|
+
return callback(null, errorObj);
|
|
13429
|
+
}
|
|
13430
|
+
|
|
11346
13431
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11347
13432
|
|
|
11348
13433
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -11406,6 +13491,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11406
13491
|
const origin = `${this.id}-${meth}`;
|
|
11407
13492
|
log.trace(origin);
|
|
11408
13493
|
|
|
13494
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13495
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13496
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13497
|
+
return callback(null, errorObj);
|
|
13498
|
+
}
|
|
13499
|
+
|
|
11409
13500
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11410
13501
|
if (request === undefined || request === null || request === '') {
|
|
11411
13502
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -11474,6 +13565,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11474
13565
|
const origin = `${this.id}-${meth}`;
|
|
11475
13566
|
log.trace(origin);
|
|
11476
13567
|
|
|
13568
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13569
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13570
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13571
|
+
return callback(null, errorObj);
|
|
13572
|
+
}
|
|
13573
|
+
|
|
11477
13574
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11478
13575
|
if (ssidName === undefined || ssidName === null || ssidName === '') {
|
|
11479
13576
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ssidName'], null, null, null);
|
|
@@ -11543,6 +13640,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11543
13640
|
const origin = `${this.id}-${meth}`;
|
|
11544
13641
|
log.trace(origin);
|
|
11545
13642
|
|
|
13643
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13644
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13645
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13646
|
+
return callback(null, errorObj);
|
|
13647
|
+
}
|
|
13648
|
+
|
|
11546
13649
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11547
13650
|
if (timestamp === undefined || timestamp === null || timestamp === '') {
|
|
11548
13651
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['timestamp'], null, null, null);
|
|
@@ -11616,6 +13719,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11616
13719
|
const origin = `${this.id}-${meth}`;
|
|
11617
13720
|
log.trace(origin);
|
|
11618
13721
|
|
|
13722
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13723
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13724
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13725
|
+
return callback(null, errorObj);
|
|
13726
|
+
}
|
|
13727
|
+
|
|
11619
13728
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11620
13729
|
if (timestamp === undefined || timestamp === null || timestamp === '') {
|
|
11621
13730
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['timestamp'], null, null, null);
|
|
@@ -11685,6 +13794,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11685
13794
|
const origin = `${this.id}-${meth}`;
|
|
11686
13795
|
log.trace(origin);
|
|
11687
13796
|
|
|
13797
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13798
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13799
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13800
|
+
return callback(null, errorObj);
|
|
13801
|
+
}
|
|
13802
|
+
|
|
11688
13803
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11689
13804
|
if (sdaborderdevice === undefined || sdaborderdevice === null || sdaborderdevice === '') {
|
|
11690
13805
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['sdaborderdevice'], null, null, null);
|
|
@@ -11762,6 +13877,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11762
13877
|
const origin = `${this.id}-${meth}`;
|
|
11763
13878
|
log.trace(origin);
|
|
11764
13879
|
|
|
13880
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13881
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13882
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13883
|
+
return callback(null, errorObj);
|
|
13884
|
+
}
|
|
13885
|
+
|
|
11765
13886
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11766
13887
|
if (request === undefined || request === null || request === '') {
|
|
11767
13888
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|
|
@@ -11843,6 +13964,12 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
11843
13964
|
const origin = `${this.id}-${meth}`;
|
|
11844
13965
|
log.trace(origin);
|
|
11845
13966
|
|
|
13967
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
13968
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
13969
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
13970
|
+
return callback(null, errorObj);
|
|
13971
|
+
}
|
|
13972
|
+
|
|
11846
13973
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
11847
13974
|
if (request === undefined || request === null || request === '') {
|
|
11848
13975
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['request'], null, null, null);
|