@itentialopensource/adapter-onap_so 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/.eslintrc.js +12 -12
- package/AUTH.md +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +169 -0
- package/CHANGELOG.md +51 -4
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +88 -74
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +641 -0
- package/README.md +244 -392
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +946 -84
- package/adapterBase.js +1331 -50
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/.system/action.json +1 -1
- package/error.json +12 -0
- package/package.json +47 -23
- package/pronghorn.json +642 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +505 -11
- package/refs?service=git-upload-pack +0 -0
- package/report/SO_OpenApi3Json.json +2911 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1594254901650.json +95 -0
- package/report/updateReport1615490154357.json +95 -0
- package/report/updateReport1653173659556.json +120 -0
- package/sampleProperties.json +110 -6
- package/test/integration/adapterTestBasicGet.js +85 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +33 -96
- package/test/unit/adapterBaseTestUnit.js +949 -0
- package/test/unit/adapterTestUnit.js +643 -104
- package/utils/adapterInfo.js +206 -0
- 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 +179 -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 +4 -1
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +184 -0
- package/utils/tbUtils.js +469 -0
- package/utils/testRunner.js +16 -16
- 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 Onap_so
|
|
21
19
|
*/
|
|
@@ -25,69 +23,303 @@ class OnapSo extends AdapterBaseCl {
|
|
|
25
23
|
/**
|
|
26
24
|
* OnapSo 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 = [
|
|
89
|
+
'healthCheck',
|
|
90
|
+
'iapGetAdapterWorkflowFunctions',
|
|
91
|
+
'iapHasAdapterEntity',
|
|
92
|
+
'iapVerifyAdapterCapability',
|
|
93
|
+
'iapUpdateAdapterEntityCache',
|
|
94
|
+
'hasEntities',
|
|
95
|
+
'getAuthorization'
|
|
96
|
+
];
|
|
97
|
+
if (!inIgnore && Array.isArray(inIgnore)) {
|
|
98
|
+
myIgnore = inIgnore;
|
|
99
|
+
} else if (!inIgnore && typeof inIgnore === 'string') {
|
|
100
|
+
myIgnore = [inIgnore];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// The generic adapter functions should already be ignored (e.g. healthCheck)
|
|
104
|
+
// you can add specific methods that you do not want to be workflow functions to ignore like below
|
|
105
|
+
// myIgnore.push('myMethodNotInWorkflow');
|
|
106
|
+
|
|
107
|
+
return super.iapGetAdapterWorkflowFunctions(myIgnore);
|
|
108
|
+
}
|
|
109
|
+
|
|
51
110
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
111
|
+
* iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
|
|
112
|
+
* allows customers to make changes to adapter configuration without having to be on the
|
|
113
|
+
* file system.
|
|
114
|
+
*
|
|
115
|
+
* @function iapUpdateAdapterConfiguration
|
|
116
|
+
* @param {string} configFile - the name of the file being updated (required)
|
|
117
|
+
* @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
|
|
118
|
+
* @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
|
|
119
|
+
* @param {string} type - the type of entity file to change, (action, schema, mock) (optional)
|
|
120
|
+
* @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
|
|
121
|
+
* @param {Callback} callback - The results of the call
|
|
55
122
|
*/
|
|
123
|
+
iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
|
|
124
|
+
const meth = 'adapter-iapUpdateAdapterConfiguration';
|
|
125
|
+
const origin = `${this.id}-${meth}`;
|
|
126
|
+
log.trace(origin);
|
|
127
|
+
|
|
128
|
+
super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
|
|
129
|
+
}
|
|
130
|
+
|
|
56
131
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
132
|
+
* See if the API path provided is found in this adapter
|
|
133
|
+
*
|
|
134
|
+
* @function iapFindAdapterPath
|
|
135
|
+
* @param {string} apiPath - the api path to check on
|
|
136
|
+
* @param {Callback} callback - The results of the call
|
|
60
137
|
*/
|
|
138
|
+
iapFindAdapterPath(apiPath, callback) {
|
|
139
|
+
const meth = 'adapter-iapFindAdapterPath';
|
|
140
|
+
const origin = `${this.id}-${meth}`;
|
|
141
|
+
log.trace(origin);
|
|
142
|
+
|
|
143
|
+
super.iapFindAdapterPath(apiPath, callback);
|
|
144
|
+
}
|
|
145
|
+
|
|
61
146
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
147
|
+
* @summary Suspends adapter
|
|
148
|
+
*
|
|
149
|
+
* @function iapSuspendAdapter
|
|
150
|
+
* @param {Callback} callback - callback function
|
|
151
|
+
*/
|
|
152
|
+
iapSuspendAdapter(mode, callback) {
|
|
153
|
+
const meth = 'adapter-iapSuspendAdapter';
|
|
154
|
+
const origin = `${this.id}-${meth}`;
|
|
155
|
+
log.trace(origin);
|
|
156
|
+
|
|
157
|
+
try {
|
|
158
|
+
return super.iapSuspendAdapter(mode, callback);
|
|
159
|
+
} catch (error) {
|
|
160
|
+
log.error(`${origin}: ${error}`);
|
|
161
|
+
return callback(null, error);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @summary Unsuspends adapter
|
|
167
|
+
*
|
|
168
|
+
* @function iapUnsuspendAdapter
|
|
169
|
+
* @param {Callback} callback - callback function
|
|
170
|
+
*/
|
|
171
|
+
iapUnsuspendAdapter(callback) {
|
|
172
|
+
const meth = 'adapter-iapUnsuspendAdapter';
|
|
173
|
+
const origin = `${this.id}-${meth}`;
|
|
174
|
+
log.trace(origin);
|
|
175
|
+
|
|
176
|
+
try {
|
|
177
|
+
return super.iapUnsuspendAdapter(callback);
|
|
178
|
+
} catch (error) {
|
|
179
|
+
log.error(`${origin}: ${error}`);
|
|
180
|
+
return callback(null, error);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @summary Get the Adaoter Queue
|
|
186
|
+
*
|
|
187
|
+
* @function iapGetAdapterQueue
|
|
188
|
+
* @param {Callback} callback - callback function
|
|
189
|
+
*/
|
|
190
|
+
iapGetAdapterQueue(callback) {
|
|
191
|
+
const meth = 'adapter-iapGetAdapterQueue';
|
|
192
|
+
const origin = `${this.id}-${meth}`;
|
|
193
|
+
log.trace(origin);
|
|
194
|
+
|
|
195
|
+
return super.iapGetAdapterQueue(callback);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @summary Runs troubleshoot scripts for adapter
|
|
200
|
+
*
|
|
201
|
+
* @function iapTroubleshootAdapter
|
|
202
|
+
* @param {Object} props - the connection, healthcheck and authentication properties
|
|
203
|
+
*
|
|
204
|
+
* @param {boolean} persistFlag - whether the adapter properties should be updated
|
|
205
|
+
* @param {Callback} callback - The results of the call
|
|
206
|
+
*/
|
|
207
|
+
iapTroubleshootAdapter(props, persistFlag, callback) {
|
|
208
|
+
const meth = 'adapter-iapTroubleshootAdapter';
|
|
209
|
+
const origin = `${this.id}-${meth}`;
|
|
210
|
+
log.trace(origin);
|
|
211
|
+
|
|
212
|
+
try {
|
|
213
|
+
return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
|
|
214
|
+
} catch (error) {
|
|
215
|
+
log.error(`${origin}: ${error}`);
|
|
216
|
+
return callback(null, error);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @summary runs healthcheck script for adapter
|
|
222
|
+
*
|
|
223
|
+
* @function iapRunAdapterHealthcheck
|
|
224
|
+
* @param {Adapter} adapter - adapter instance to troubleshoot
|
|
225
|
+
* @param {Callback} callback - callback function
|
|
226
|
+
*/
|
|
227
|
+
iapRunAdapterHealthcheck(callback) {
|
|
228
|
+
const meth = 'adapter-iapRunAdapterHealthcheck';
|
|
229
|
+
const origin = `${this.id}-${meth}`;
|
|
230
|
+
log.trace(origin);
|
|
231
|
+
|
|
232
|
+
try {
|
|
233
|
+
return super.iapRunAdapterHealthcheck(this, callback);
|
|
234
|
+
} catch (error) {
|
|
235
|
+
log.error(`${origin}: ${error}`);
|
|
236
|
+
return callback(null, error);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @summary runs connectivity check script for adapter
|
|
242
|
+
*
|
|
243
|
+
* @function iapRunAdapterConnectivity
|
|
244
|
+
* @param {Callback} callback - callback function
|
|
245
|
+
*/
|
|
246
|
+
iapRunAdapterConnectivity(callback) {
|
|
247
|
+
const meth = 'adapter-iapRunAdapterConnectivity';
|
|
248
|
+
const origin = `${this.id}-${meth}`;
|
|
249
|
+
log.trace(origin);
|
|
250
|
+
|
|
251
|
+
try {
|
|
252
|
+
return super.iapRunAdapterConnectivity(callback);
|
|
253
|
+
} catch (error) {
|
|
254
|
+
log.error(`${origin}: ${error}`);
|
|
255
|
+
return callback(null, error);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @summary runs basicGet script for adapter
|
|
261
|
+
*
|
|
262
|
+
* @function iapRunAdapterBasicGet
|
|
263
|
+
* @param {Callback} callback - callback function
|
|
264
|
+
*/
|
|
265
|
+
iapRunAdapterBasicGet(callback) {
|
|
266
|
+
const meth = 'adapter-iapRunAdapterBasicGet';
|
|
267
|
+
const origin = `${this.id}-${meth}`;
|
|
268
|
+
log.trace(origin);
|
|
269
|
+
|
|
270
|
+
try {
|
|
271
|
+
return super.iapRunAdapterBasicGet(callback);
|
|
272
|
+
} catch (error) {
|
|
273
|
+
log.error(`${origin}: ${error}`);
|
|
274
|
+
return callback(null, error);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @summary moves entites into Mongo DB
|
|
280
|
+
*
|
|
281
|
+
* @function iapMoveAdapterEntitiesToDB
|
|
282
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
283
|
+
* or the error
|
|
65
284
|
*/
|
|
285
|
+
iapMoveAdapterEntitiesToDB(callback) {
|
|
286
|
+
const meth = 'adapter-iapMoveAdapterEntitiesToDB';
|
|
287
|
+
const origin = `${this.id}-${meth}`;
|
|
288
|
+
log.trace(origin);
|
|
66
289
|
|
|
290
|
+
try {
|
|
291
|
+
return super.iapMoveAdapterEntitiesToDB(callback);
|
|
292
|
+
} catch (err) {
|
|
293
|
+
log.error(`${origin}: ${err}`);
|
|
294
|
+
return callback(null, err);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* BROKER CALLS */
|
|
67
299
|
/**
|
|
68
300
|
* @summary Determines if this adapter supports the specific entity
|
|
69
301
|
*
|
|
70
|
-
* @function
|
|
302
|
+
* @function iapHasAdapterEntity
|
|
71
303
|
* @param {String} entityType - the entity type to check for
|
|
72
304
|
* @param {String/Array} entityId - the specific entity we are looking for
|
|
73
305
|
*
|
|
74
306
|
* @param {Callback} callback - An array of whether the adapter can has the
|
|
75
307
|
* desired capability or an error
|
|
76
308
|
*/
|
|
77
|
-
|
|
78
|
-
const origin = `${this.id}-adapter-
|
|
309
|
+
iapHasAdapterEntity(entityType, entityId, callback) {
|
|
310
|
+
const origin = `${this.id}-adapter-iapHasAdapterEntity`;
|
|
79
311
|
log.trace(origin);
|
|
80
312
|
|
|
81
313
|
// Make the call -
|
|
82
|
-
//
|
|
83
|
-
return this.
|
|
314
|
+
// iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
|
|
315
|
+
return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
|
|
84
316
|
}
|
|
85
317
|
|
|
86
318
|
/**
|
|
87
319
|
* @summary Provides a way for the adapter to tell north bound integrations
|
|
88
320
|
* whether the adapter supports type, action and specific entity
|
|
89
321
|
*
|
|
90
|
-
* @function
|
|
322
|
+
* @function iapVerifyAdapterCapability
|
|
91
323
|
* @param {String} entityType - the entity type to check for
|
|
92
324
|
* @param {String} actionType - the action type to check for
|
|
93
325
|
* @param {String/Array} entityId - the specific entity we are looking for
|
|
@@ -95,15 +327,15 @@ class OnapSo extends AdapterBaseCl {
|
|
|
95
327
|
* @param {Callback} callback - An array of whether the adapter can has the
|
|
96
328
|
* desired capability or an error
|
|
97
329
|
*/
|
|
98
|
-
|
|
99
|
-
const meth = 'adapterBase-
|
|
330
|
+
iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
|
|
331
|
+
const meth = 'adapterBase-iapVerifyAdapterCapability';
|
|
100
332
|
const origin = `${this.id}-${meth}`;
|
|
101
333
|
log.trace(origin);
|
|
102
334
|
|
|
103
335
|
// if caching
|
|
104
336
|
if (this.caching) {
|
|
105
|
-
// Make the call -
|
|
106
|
-
return this.requestHandlerInst.
|
|
337
|
+
// Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
|
|
338
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
|
|
107
339
|
if (error) {
|
|
108
340
|
return callback(null, error);
|
|
109
341
|
}
|
|
@@ -121,7 +353,7 @@ class OnapSo extends AdapterBaseCl {
|
|
|
121
353
|
}
|
|
122
354
|
|
|
123
355
|
// need to check the cache again since it has been updated
|
|
124
|
-
return this.requestHandlerInst.
|
|
356
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
|
|
125
357
|
if (verror) {
|
|
126
358
|
return callback(null, verror);
|
|
127
359
|
}
|
|
@@ -154,7 +386,7 @@ class OnapSo extends AdapterBaseCl {
|
|
|
154
386
|
// if no entity id
|
|
155
387
|
if (!entityId) {
|
|
156
388
|
// need to check the cache again since it has been updated
|
|
157
|
-
return this.requestHandlerInst.
|
|
389
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
|
|
158
390
|
if (verror) {
|
|
159
391
|
return callback(null, verror);
|
|
160
392
|
}
|
|
@@ -175,7 +407,7 @@ class OnapSo extends AdapterBaseCl {
|
|
|
175
407
|
}
|
|
176
408
|
|
|
177
409
|
// need to check the cache again since it has been updated
|
|
178
|
-
return this.requestHandlerInst.
|
|
410
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
|
|
179
411
|
if (verror) {
|
|
180
412
|
return callback(null, verror);
|
|
181
413
|
}
|
|
@@ -216,11 +448,11 @@ class OnapSo extends AdapterBaseCl {
|
|
|
216
448
|
/**
|
|
217
449
|
* @summary Updates the cache for all entities by call the get All entity method
|
|
218
450
|
*
|
|
219
|
-
* @function
|
|
451
|
+
* @function iapUpdateAdapterEntityCache
|
|
220
452
|
*
|
|
221
453
|
*/
|
|
222
|
-
|
|
223
|
-
const origin = `${this.id}-adapter-
|
|
454
|
+
iapUpdateAdapterEntityCache() {
|
|
455
|
+
const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
|
|
224
456
|
log.trace(origin);
|
|
225
457
|
|
|
226
458
|
if (this.caching) {
|
|
@@ -233,6 +465,385 @@ class OnapSo extends AdapterBaseCl {
|
|
|
233
465
|
}
|
|
234
466
|
}
|
|
235
467
|
|
|
468
|
+
/**
|
|
469
|
+
* @summary Determines if this adapter supports any in a list of entities
|
|
470
|
+
*
|
|
471
|
+
* @function hasEntities
|
|
472
|
+
* @param {String} entityType - the entity type to check for
|
|
473
|
+
* @param {Array} entityList - the list of entities we are looking for
|
|
474
|
+
*
|
|
475
|
+
* @param {Callback} callback - A map where the entity is the key and the
|
|
476
|
+
* value is true or false
|
|
477
|
+
*/
|
|
478
|
+
hasEntities(entityType, entityList, callback) {
|
|
479
|
+
const meth = 'adapter-hasEntities';
|
|
480
|
+
const origin = `${this.id}-${meth}`;
|
|
481
|
+
log.trace(origin);
|
|
482
|
+
|
|
483
|
+
try {
|
|
484
|
+
return super.hasEntities(entityType, entityList, callback);
|
|
485
|
+
} catch (err) {
|
|
486
|
+
log.error(`${origin}: ${err}`);
|
|
487
|
+
return callback(null, err);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @summary Get Appliance that match the deviceName
|
|
493
|
+
*
|
|
494
|
+
* @function getDevice
|
|
495
|
+
* @param {String} deviceName - the deviceName to find (required)
|
|
496
|
+
*
|
|
497
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
498
|
+
* (appliance) or the error
|
|
499
|
+
*/
|
|
500
|
+
getDevice(deviceName, callback) {
|
|
501
|
+
const meth = 'adapter-getDevice';
|
|
502
|
+
const origin = `${this.id}-${meth}`;
|
|
503
|
+
log.trace(origin);
|
|
504
|
+
|
|
505
|
+
try {
|
|
506
|
+
return super.getDevice(deviceName, callback);
|
|
507
|
+
} catch (err) {
|
|
508
|
+
log.error(`${origin}: ${err}`);
|
|
509
|
+
return callback(null, err);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @summary Get Appliances that match the filter
|
|
515
|
+
*
|
|
516
|
+
* @function getDevicesFiltered
|
|
517
|
+
* @param {Object} options - the data to use to filter the appliances (optional)
|
|
518
|
+
*
|
|
519
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
520
|
+
* (appliances) or the error
|
|
521
|
+
*/
|
|
522
|
+
getDevicesFiltered(options, callback) {
|
|
523
|
+
const meth = 'adapter-getDevicesFiltered';
|
|
524
|
+
const origin = `${this.id}-${meth}`;
|
|
525
|
+
log.trace(origin);
|
|
526
|
+
|
|
527
|
+
try {
|
|
528
|
+
return super.getDevicesFiltered(options, callback);
|
|
529
|
+
} catch (err) {
|
|
530
|
+
log.error(`${origin}: ${err}`);
|
|
531
|
+
return callback(null, err);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* @summary Gets the status for the provided appliance
|
|
537
|
+
*
|
|
538
|
+
* @function isAlive
|
|
539
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
540
|
+
*
|
|
541
|
+
* @param {configCallback} callback - callback function to return the result
|
|
542
|
+
* (appliance isAlive) or the error
|
|
543
|
+
*/
|
|
544
|
+
isAlive(deviceName, callback) {
|
|
545
|
+
const meth = 'adapter-isAlive';
|
|
546
|
+
const origin = `${this.id}-${meth}`;
|
|
547
|
+
log.trace(origin);
|
|
548
|
+
|
|
549
|
+
try {
|
|
550
|
+
return super.isAlive(deviceName, callback);
|
|
551
|
+
} catch (err) {
|
|
552
|
+
log.error(`${origin}: ${err}`);
|
|
553
|
+
return callback(null, err);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* @summary Gets a config for the provided Appliance
|
|
559
|
+
*
|
|
560
|
+
* @function getConfig
|
|
561
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
562
|
+
* @param {String} format - the desired format of the config. (optional)
|
|
563
|
+
*
|
|
564
|
+
* @param {configCallback} callback - callback function to return the result
|
|
565
|
+
* (appliance config) or the error
|
|
566
|
+
*/
|
|
567
|
+
getConfig(deviceName, format, callback) {
|
|
568
|
+
const meth = 'adapter-getConfig';
|
|
569
|
+
const origin = `${this.id}-${meth}`;
|
|
570
|
+
log.trace(origin);
|
|
571
|
+
|
|
572
|
+
try {
|
|
573
|
+
return super.getConfig(deviceName, format, callback);
|
|
574
|
+
} catch (err) {
|
|
575
|
+
log.error(`${origin}: ${err}`);
|
|
576
|
+
return callback(null, err);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* @summary Gets the device count from the system
|
|
582
|
+
*
|
|
583
|
+
* @function iapGetDeviceCount
|
|
584
|
+
*
|
|
585
|
+
* @param {getCallback} callback - callback function to return the result
|
|
586
|
+
* (count) or the error
|
|
587
|
+
*/
|
|
588
|
+
iapGetDeviceCount(callback) {
|
|
589
|
+
const meth = 'adapter-iapGetDeviceCount';
|
|
590
|
+
const origin = `${this.id}-${meth}`;
|
|
591
|
+
log.trace(origin);
|
|
592
|
+
|
|
593
|
+
try {
|
|
594
|
+
return super.iapGetDeviceCount(callback);
|
|
595
|
+
} catch (err) {
|
|
596
|
+
log.error(`${origin}: ${err}`);
|
|
597
|
+
return callback(null, err);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
|
|
602
|
+
/**
|
|
603
|
+
* Makes the requested generic call
|
|
604
|
+
*
|
|
605
|
+
* @function genericAdapterRequest
|
|
606
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
|
|
607
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
|
|
608
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
609
|
+
* Can be a stringified Object.
|
|
610
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
611
|
+
* Can be a stringified Object.
|
|
612
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
613
|
+
* Can be a stringified Object.
|
|
614
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
615
|
+
* or the error
|
|
616
|
+
*/
|
|
617
|
+
genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
|
|
618
|
+
const meth = 'adapter-genericAdapterRequest';
|
|
619
|
+
const origin = `${this.id}-${meth}`;
|
|
620
|
+
log.trace(origin);
|
|
621
|
+
|
|
622
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
623
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
624
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
625
|
+
return callback(null, errorObj);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
629
|
+
if (uriPath === undefined || uriPath === null || uriPath === '') {
|
|
630
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
|
|
631
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
632
|
+
return callback(null, errorObj);
|
|
633
|
+
}
|
|
634
|
+
if (restMethod === undefined || restMethod === null || restMethod === '') {
|
|
635
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
|
|
636
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
637
|
+
return callback(null, errorObj);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
641
|
+
// remove any leading / and split the uripath into path variables
|
|
642
|
+
let myPath = uriPath;
|
|
643
|
+
while (myPath.indexOf('/') === 0) {
|
|
644
|
+
myPath = myPath.substring(1);
|
|
645
|
+
}
|
|
646
|
+
const pathVars = myPath.split('/');
|
|
647
|
+
const queryParamsAvailable = queryData;
|
|
648
|
+
const queryParams = {};
|
|
649
|
+
const bodyVars = requestBody;
|
|
650
|
+
|
|
651
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
652
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
653
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
654
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
655
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
660
|
+
const reqObj = {
|
|
661
|
+
payload: bodyVars,
|
|
662
|
+
uriPathVars: pathVars,
|
|
663
|
+
uriQuery: queryParams,
|
|
664
|
+
uriOptions: {}
|
|
665
|
+
};
|
|
666
|
+
// add headers if provided
|
|
667
|
+
if (addlHeaders) {
|
|
668
|
+
reqObj.addlHeaders = addlHeaders;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// determine the call and return flag
|
|
672
|
+
let action = 'getGenerics';
|
|
673
|
+
let returnF = true;
|
|
674
|
+
if (restMethod.toUpperCase() === 'POST') {
|
|
675
|
+
action = 'createGeneric';
|
|
676
|
+
} else if (restMethod.toUpperCase() === 'PUT') {
|
|
677
|
+
action = 'updateGeneric';
|
|
678
|
+
} else if (restMethod.toUpperCase() === 'PATCH') {
|
|
679
|
+
action = 'patchGeneric';
|
|
680
|
+
} else if (restMethod.toUpperCase() === 'DELETE') {
|
|
681
|
+
action = 'deleteGeneric';
|
|
682
|
+
returnF = false;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
try {
|
|
686
|
+
// Make the call -
|
|
687
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
688
|
+
return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
|
|
689
|
+
// if we received an error or their is no response on the results
|
|
690
|
+
// return an error
|
|
691
|
+
if (irReturnError) {
|
|
692
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
693
|
+
return callback(null, irReturnError);
|
|
694
|
+
}
|
|
695
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
696
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
|
|
697
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
698
|
+
return callback(null, errorObj);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
702
|
+
// return the response
|
|
703
|
+
return callback(irReturnData, null);
|
|
704
|
+
});
|
|
705
|
+
} catch (ex) {
|
|
706
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
707
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
708
|
+
return callback(null, errorObj);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Makes the requested generic call with no base path or version
|
|
714
|
+
*
|
|
715
|
+
* @function genericAdapterRequestNoBasePath
|
|
716
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
|
|
717
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
|
|
718
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
719
|
+
* Can be a stringified Object.
|
|
720
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
721
|
+
* Can be a stringified Object.
|
|
722
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
723
|
+
* Can be a stringified Object.
|
|
724
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
725
|
+
* or the error
|
|
726
|
+
*/
|
|
727
|
+
genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
|
|
728
|
+
const meth = 'adapter-genericAdapterRequestNoBasePath';
|
|
729
|
+
const origin = `${this.id}-${meth}`;
|
|
730
|
+
log.trace(origin);
|
|
731
|
+
|
|
732
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
733
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
734
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
735
|
+
return callback(null, errorObj);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
739
|
+
if (uriPath === undefined || uriPath === null || uriPath === '') {
|
|
740
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
|
|
741
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
742
|
+
return callback(null, errorObj);
|
|
743
|
+
}
|
|
744
|
+
if (restMethod === undefined || restMethod === null || restMethod === '') {
|
|
745
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
|
|
746
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
747
|
+
return callback(null, errorObj);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
751
|
+
// remove any leading / and split the uripath into path variables
|
|
752
|
+
let myPath = uriPath;
|
|
753
|
+
while (myPath.indexOf('/') === 0) {
|
|
754
|
+
myPath = myPath.substring(1);
|
|
755
|
+
}
|
|
756
|
+
const pathVars = myPath.split('/');
|
|
757
|
+
const queryParamsAvailable = queryData;
|
|
758
|
+
const queryParams = {};
|
|
759
|
+
const bodyVars = requestBody;
|
|
760
|
+
|
|
761
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
762
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
763
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
764
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
765
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
770
|
+
const reqObj = {
|
|
771
|
+
payload: bodyVars,
|
|
772
|
+
uriPathVars: pathVars,
|
|
773
|
+
uriQuery: queryParams,
|
|
774
|
+
uriOptions: {}
|
|
775
|
+
};
|
|
776
|
+
// add headers if provided
|
|
777
|
+
if (addlHeaders) {
|
|
778
|
+
reqObj.addlHeaders = addlHeaders;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// determine the call and return flag
|
|
782
|
+
let action = 'getGenericsNoBase';
|
|
783
|
+
let returnF = true;
|
|
784
|
+
if (restMethod.toUpperCase() === 'POST') {
|
|
785
|
+
action = 'createGenericNoBase';
|
|
786
|
+
} else if (restMethod.toUpperCase() === 'PUT') {
|
|
787
|
+
action = 'updateGenericNoBase';
|
|
788
|
+
} else if (restMethod.toUpperCase() === 'PATCH') {
|
|
789
|
+
action = 'patchGenericNoBase';
|
|
790
|
+
} else if (restMethod.toUpperCase() === 'DELETE') {
|
|
791
|
+
action = 'deleteGenericNoBase';
|
|
792
|
+
returnF = false;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
try {
|
|
796
|
+
// Make the call -
|
|
797
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
798
|
+
return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
|
|
799
|
+
// if we received an error or their is no response on the results
|
|
800
|
+
// return an error
|
|
801
|
+
if (irReturnError) {
|
|
802
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
803
|
+
return callback(null, irReturnError);
|
|
804
|
+
}
|
|
805
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
806
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
|
|
807
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
808
|
+
return callback(null, errorObj);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
812
|
+
// return the response
|
|
813
|
+
return callback(irReturnData, null);
|
|
814
|
+
});
|
|
815
|
+
} catch (ex) {
|
|
816
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
817
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
818
|
+
return callback(null, errorObj);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* @callback healthCallback
|
|
824
|
+
* @param {Object} result - the result of the get request (contains an id and a status)
|
|
825
|
+
*/
|
|
826
|
+
/**
|
|
827
|
+
* @callback getCallback
|
|
828
|
+
* @param {Object} result - the result of the get request (entity/ies)
|
|
829
|
+
* @param {String} error - any error that occurred
|
|
830
|
+
*/
|
|
831
|
+
/**
|
|
832
|
+
* @callback createCallback
|
|
833
|
+
* @param {Object} item - the newly created entity
|
|
834
|
+
* @param {String} error - any error that occurred
|
|
835
|
+
*/
|
|
836
|
+
/**
|
|
837
|
+
* @callback updateCallback
|
|
838
|
+
* @param {String} status - the status of the update action
|
|
839
|
+
* @param {String} error - any error that occurred
|
|
840
|
+
*/
|
|
841
|
+
/**
|
|
842
|
+
* @callback deleteCallback
|
|
843
|
+
* @param {String} status - the status of the delete action
|
|
844
|
+
* @param {String} error - any error that occurred
|
|
845
|
+
*/
|
|
846
|
+
|
|
236
847
|
/**
|
|
237
848
|
* @summary Create an E2E Service Instance on a version provided
|
|
238
849
|
*
|
|
@@ -247,6 +858,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
247
858
|
const origin = `${this.id}-${meth}`;
|
|
248
859
|
log.trace(origin);
|
|
249
860
|
|
|
861
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
862
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
863
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
864
|
+
return callback(null, errorObj);
|
|
865
|
+
}
|
|
866
|
+
|
|
250
867
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
251
868
|
if (version === undefined || version === null || version === '') {
|
|
252
869
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -275,7 +892,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
275
892
|
uriQuery: queryParams
|
|
276
893
|
};
|
|
277
894
|
|
|
278
|
-
|
|
279
895
|
try {
|
|
280
896
|
// Make the call -
|
|
281
897
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -318,6 +934,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
318
934
|
const origin = `${this.id}-${meth}`;
|
|
319
935
|
log.trace(origin);
|
|
320
936
|
|
|
937
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
938
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
939
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
940
|
+
return callback(null, errorObj);
|
|
941
|
+
}
|
|
942
|
+
|
|
321
943
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
322
944
|
if (version === undefined || version === null || version === '') {
|
|
323
945
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -351,7 +973,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
351
973
|
uriQuery: queryParams
|
|
352
974
|
};
|
|
353
975
|
|
|
354
|
-
|
|
355
976
|
try {
|
|
356
977
|
// Make the call -
|
|
357
978
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -394,6 +1015,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
394
1015
|
const origin = `${this.id}-${meth}`;
|
|
395
1016
|
log.trace(origin);
|
|
396
1017
|
|
|
1018
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1019
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1020
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1021
|
+
return callback(null, errorObj);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
397
1024
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
398
1025
|
if (version === undefined || version === null || version === '') {
|
|
399
1026
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -427,7 +1054,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
427
1054
|
uriQuery: queryParams
|
|
428
1055
|
};
|
|
429
1056
|
|
|
430
|
-
|
|
431
1057
|
try {
|
|
432
1058
|
// Make the call -
|
|
433
1059
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -470,6 +1096,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
470
1096
|
const origin = `${this.id}-${meth}`;
|
|
471
1097
|
log.trace(origin);
|
|
472
1098
|
|
|
1099
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1100
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1101
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1102
|
+
return callback(null, errorObj);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
473
1105
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
474
1106
|
if (serviceId === undefined || serviceId === null || serviceId === '') {
|
|
475
1107
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['serviceId'], null, null, null);
|
|
@@ -508,7 +1140,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
508
1140
|
uriQuery: queryParams
|
|
509
1141
|
};
|
|
510
1142
|
|
|
511
|
-
|
|
512
1143
|
try {
|
|
513
1144
|
// Make the call -
|
|
514
1145
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -551,6 +1182,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
551
1182
|
const origin = `${this.id}-${meth}`;
|
|
552
1183
|
log.trace(origin);
|
|
553
1184
|
|
|
1185
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1186
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1187
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1188
|
+
return callback(null, errorObj);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
554
1191
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
555
1192
|
if (version === undefined || version === null || version === '') {
|
|
556
1193
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -584,7 +1221,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
584
1221
|
uriQuery: queryParams
|
|
585
1222
|
};
|
|
586
1223
|
|
|
587
|
-
|
|
588
1224
|
try {
|
|
589
1225
|
// Make the call -
|
|
590
1226
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -627,6 +1263,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
627
1263
|
const origin = `${this.id}-${meth}`;
|
|
628
1264
|
log.trace(origin);
|
|
629
1265
|
|
|
1266
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1267
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1268
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1269
|
+
return callback(null, errorObj);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
630
1272
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
631
1273
|
if (serviceId === undefined || serviceId === null || serviceId === '') {
|
|
632
1274
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['serviceId'], null, null, null);
|
|
@@ -660,7 +1302,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
660
1302
|
uriQuery: queryParams
|
|
661
1303
|
};
|
|
662
1304
|
|
|
663
|
-
|
|
664
1305
|
try {
|
|
665
1306
|
// Make the call -
|
|
666
1307
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -701,6 +1342,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
701
1342
|
const origin = `${this.id}-${meth}`;
|
|
702
1343
|
log.trace(origin);
|
|
703
1344
|
|
|
1345
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1346
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1347
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1348
|
+
return callback(null, errorObj);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
704
1351
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
705
1352
|
|
|
706
1353
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -724,7 +1371,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
724
1371
|
uriQuery: queryParams
|
|
725
1372
|
};
|
|
726
1373
|
|
|
727
|
-
|
|
728
1374
|
try {
|
|
729
1375
|
// Make the call -
|
|
730
1376
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -764,6 +1410,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
764
1410
|
const origin = `${this.id}-${meth}`;
|
|
765
1411
|
log.trace(origin);
|
|
766
1412
|
|
|
1413
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1414
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1415
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1416
|
+
return callback(null, errorObj);
|
|
1417
|
+
}
|
|
1418
|
+
|
|
767
1419
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
768
1420
|
|
|
769
1421
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
@@ -810,6 +1462,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
810
1462
|
const origin = `${this.id}-${meth}`;
|
|
811
1463
|
log.trace(origin);
|
|
812
1464
|
|
|
1465
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1466
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1467
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1468
|
+
return callback(null, errorObj);
|
|
1469
|
+
}
|
|
1470
|
+
|
|
813
1471
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
814
1472
|
if (version === undefined || version === null || version === '') {
|
|
815
1473
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -838,7 +1496,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
838
1496
|
uriQuery: queryParams
|
|
839
1497
|
};
|
|
840
1498
|
|
|
841
|
-
|
|
842
1499
|
try {
|
|
843
1500
|
// Make the call -
|
|
844
1501
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -880,6 +1537,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
880
1537
|
const origin = `${this.id}-${meth}`;
|
|
881
1538
|
log.trace(origin);
|
|
882
1539
|
|
|
1540
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1541
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1542
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1543
|
+
return callback(null, errorObj);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
883
1546
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
884
1547
|
if (requestId === undefined || requestId === null || requestId === '') {
|
|
885
1548
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['requestId'], null, null, null);
|
|
@@ -913,7 +1576,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
913
1576
|
uriQuery: queryParams
|
|
914
1577
|
};
|
|
915
1578
|
|
|
916
|
-
|
|
917
1579
|
try {
|
|
918
1580
|
// Make the call -
|
|
919
1581
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -956,6 +1618,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
956
1618
|
const origin = `${this.id}-${meth}`;
|
|
957
1619
|
log.trace(origin);
|
|
958
1620
|
|
|
1621
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1622
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1623
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1624
|
+
return callback(null, errorObj);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
959
1627
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
960
1628
|
if (requestId === undefined || requestId === null || requestId === '') {
|
|
961
1629
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['requestId'], null, null, null);
|
|
@@ -989,7 +1657,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
989
1657
|
uriQuery: queryParams
|
|
990
1658
|
};
|
|
991
1659
|
|
|
992
|
-
|
|
993
1660
|
try {
|
|
994
1661
|
// Make the call -
|
|
995
1662
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1034,6 +1701,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1034
1701
|
const origin = `${this.id}-${meth}`;
|
|
1035
1702
|
log.trace(origin);
|
|
1036
1703
|
|
|
1704
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1705
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1706
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1707
|
+
return callback(null, errorObj);
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1037
1710
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1038
1711
|
if (version === undefined || version === null || version === '') {
|
|
1039
1712
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1077,7 +1750,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1077
1750
|
uriQuery: queryParams
|
|
1078
1751
|
};
|
|
1079
1752
|
|
|
1080
|
-
|
|
1081
1753
|
try {
|
|
1082
1754
|
// Make the call -
|
|
1083
1755
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1121,6 +1793,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1121
1793
|
const origin = `${this.id}-${meth}`;
|
|
1122
1794
|
log.trace(origin);
|
|
1123
1795
|
|
|
1796
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1797
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1798
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1799
|
+
return callback(null, errorObj);
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1124
1802
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1125
1803
|
if (version === undefined || version === null || version === '') {
|
|
1126
1804
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1159,7 +1837,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1159
1837
|
uriQuery: queryParams
|
|
1160
1838
|
};
|
|
1161
1839
|
|
|
1162
|
-
|
|
1163
1840
|
try {
|
|
1164
1841
|
// Make the call -
|
|
1165
1842
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1203,6 +1880,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1203
1880
|
const origin = `${this.id}-${meth}`;
|
|
1204
1881
|
log.trace(origin);
|
|
1205
1882
|
|
|
1883
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1884
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1885
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1886
|
+
return callback(null, errorObj);
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1206
1889
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1207
1890
|
if (version === undefined || version === null || version === '') {
|
|
1208
1891
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1241,7 +1924,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1241
1924
|
uriQuery: queryParams
|
|
1242
1925
|
};
|
|
1243
1926
|
|
|
1244
|
-
|
|
1245
1927
|
try {
|
|
1246
1928
|
// Make the call -
|
|
1247
1929
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1285,6 +1967,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1285
1967
|
const origin = `${this.id}-${meth}`;
|
|
1286
1968
|
log.trace(origin);
|
|
1287
1969
|
|
|
1970
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
1971
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
1972
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1973
|
+
return callback(null, errorObj);
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1288
1976
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1289
1977
|
if (version === undefined || version === null || version === '') {
|
|
1290
1978
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1323,7 +2011,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1323
2011
|
uriQuery: queryParams
|
|
1324
2012
|
};
|
|
1325
2013
|
|
|
1326
|
-
|
|
1327
2014
|
try {
|
|
1328
2015
|
// Make the call -
|
|
1329
2016
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1367,6 +2054,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1367
2054
|
const origin = `${this.id}-${meth}`;
|
|
1368
2055
|
log.trace(origin);
|
|
1369
2056
|
|
|
2057
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2058
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2059
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2060
|
+
return callback(null, errorObj);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
1370
2063
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1371
2064
|
if (version === undefined || version === null || version === '') {
|
|
1372
2065
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1405,7 +2098,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1405
2098
|
uriQuery: queryParams
|
|
1406
2099
|
};
|
|
1407
2100
|
|
|
1408
|
-
|
|
1409
2101
|
try {
|
|
1410
2102
|
// Make the call -
|
|
1411
2103
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1448,6 +2140,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1448
2140
|
const origin = `${this.id}-${meth}`;
|
|
1449
2141
|
log.trace(origin);
|
|
1450
2142
|
|
|
2143
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2144
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2145
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2146
|
+
return callback(null, errorObj);
|
|
2147
|
+
}
|
|
2148
|
+
|
|
1451
2149
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1452
2150
|
if (version === undefined || version === null || version === '') {
|
|
1453
2151
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1481,7 +2179,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1481
2179
|
uriQuery: queryParams
|
|
1482
2180
|
};
|
|
1483
2181
|
|
|
1484
|
-
|
|
1485
2182
|
try {
|
|
1486
2183
|
// Make the call -
|
|
1487
2184
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1525,6 +2222,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1525
2222
|
const origin = `${this.id}-${meth}`;
|
|
1526
2223
|
log.trace(origin);
|
|
1527
2224
|
|
|
2225
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2226
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2227
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2228
|
+
return callback(null, errorObj);
|
|
2229
|
+
}
|
|
2230
|
+
|
|
1528
2231
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1529
2232
|
if (version === undefined || version === null || version === '') {
|
|
1530
2233
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1563,7 +2266,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1563
2266
|
uriQuery: queryParams
|
|
1564
2267
|
};
|
|
1565
2268
|
|
|
1566
|
-
|
|
1567
2269
|
try {
|
|
1568
2270
|
// Make the call -
|
|
1569
2271
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1607,6 +2309,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1607
2309
|
const origin = `${this.id}-${meth}`;
|
|
1608
2310
|
log.trace(origin);
|
|
1609
2311
|
|
|
2312
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2313
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2314
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2315
|
+
return callback(null, errorObj);
|
|
2316
|
+
}
|
|
2317
|
+
|
|
1610
2318
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1611
2319
|
if (version === undefined || version === null || version === '') {
|
|
1612
2320
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1645,7 +2353,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1645
2353
|
uriQuery: queryParams
|
|
1646
2354
|
};
|
|
1647
2355
|
|
|
1648
|
-
|
|
1649
2356
|
try {
|
|
1650
2357
|
// Make the call -
|
|
1651
2358
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1689,6 +2396,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1689
2396
|
const origin = `${this.id}-${meth}`;
|
|
1690
2397
|
log.trace(origin);
|
|
1691
2398
|
|
|
2399
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2400
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2401
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2402
|
+
return callback(null, errorObj);
|
|
2403
|
+
}
|
|
2404
|
+
|
|
1692
2405
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1693
2406
|
if (version === undefined || version === null || version === '') {
|
|
1694
2407
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1727,7 +2440,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1727
2440
|
uriQuery: queryParams
|
|
1728
2441
|
};
|
|
1729
2442
|
|
|
1730
|
-
|
|
1731
2443
|
try {
|
|
1732
2444
|
// Make the call -
|
|
1733
2445
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1769,6 +2481,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1769
2481
|
const origin = `${this.id}-${meth}`;
|
|
1770
2482
|
log.trace(origin);
|
|
1771
2483
|
|
|
2484
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2485
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2486
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2487
|
+
return callback(null, errorObj);
|
|
2488
|
+
}
|
|
2489
|
+
|
|
1772
2490
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1773
2491
|
if (version === undefined || version === null || version === '') {
|
|
1774
2492
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1797,7 +2515,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1797
2515
|
uriQuery: queryParams
|
|
1798
2516
|
};
|
|
1799
2517
|
|
|
1800
|
-
|
|
1801
2518
|
try {
|
|
1802
2519
|
// Make the call -
|
|
1803
2520
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1840,6 +2557,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1840
2557
|
const origin = `${this.id}-${meth}`;
|
|
1841
2558
|
log.trace(origin);
|
|
1842
2559
|
|
|
2560
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2561
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2562
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2563
|
+
return callback(null, errorObj);
|
|
2564
|
+
}
|
|
2565
|
+
|
|
1843
2566
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1844
2567
|
if (version === undefined || version === null || version === '') {
|
|
1845
2568
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1873,7 +2596,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1873
2596
|
uriQuery: queryParams
|
|
1874
2597
|
};
|
|
1875
2598
|
|
|
1876
|
-
|
|
1877
2599
|
try {
|
|
1878
2600
|
// Make the call -
|
|
1879
2601
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1916,6 +2638,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1916
2638
|
const origin = `${this.id}-${meth}`;
|
|
1917
2639
|
log.trace(origin);
|
|
1918
2640
|
|
|
2641
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2642
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2643
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2644
|
+
return callback(null, errorObj);
|
|
2645
|
+
}
|
|
2646
|
+
|
|
1919
2647
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1920
2648
|
if (version === undefined || version === null || version === '') {
|
|
1921
2649
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -1949,7 +2677,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1949
2677
|
uriQuery: queryParams
|
|
1950
2678
|
};
|
|
1951
2679
|
|
|
1952
|
-
|
|
1953
2680
|
try {
|
|
1954
2681
|
// Make the call -
|
|
1955
2682
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -1992,6 +2719,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
1992
2719
|
const origin = `${this.id}-${meth}`;
|
|
1993
2720
|
log.trace(origin);
|
|
1994
2721
|
|
|
2722
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2723
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2724
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2725
|
+
return callback(null, errorObj);
|
|
2726
|
+
}
|
|
2727
|
+
|
|
1995
2728
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
1996
2729
|
if (version === undefined || version === null || version === '') {
|
|
1997
2730
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2025,7 +2758,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2025
2758
|
uriQuery: queryParams
|
|
2026
2759
|
};
|
|
2027
2760
|
|
|
2028
|
-
|
|
2029
2761
|
try {
|
|
2030
2762
|
// Make the call -
|
|
2031
2763
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2067,6 +2799,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2067
2799
|
const origin = `${this.id}-${meth}`;
|
|
2068
2800
|
log.trace(origin);
|
|
2069
2801
|
|
|
2802
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2803
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2804
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2805
|
+
return callback(null, errorObj);
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2070
2808
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2071
2809
|
if (version === undefined || version === null || version === '') {
|
|
2072
2810
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2095,7 +2833,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2095
2833
|
uriQuery: queryParams
|
|
2096
2834
|
};
|
|
2097
2835
|
|
|
2098
|
-
|
|
2099
2836
|
try {
|
|
2100
2837
|
// Make the call -
|
|
2101
2838
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2138,6 +2875,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2138
2875
|
const origin = `${this.id}-${meth}`;
|
|
2139
2876
|
log.trace(origin);
|
|
2140
2877
|
|
|
2878
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2879
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2880
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2881
|
+
return callback(null, errorObj);
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2141
2884
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2142
2885
|
if (version === undefined || version === null || version === '') {
|
|
2143
2886
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2171,7 +2914,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2171
2914
|
uriQuery: queryParams
|
|
2172
2915
|
};
|
|
2173
2916
|
|
|
2174
|
-
|
|
2175
2917
|
try {
|
|
2176
2918
|
// Make the call -
|
|
2177
2919
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2214,6 +2956,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2214
2956
|
const origin = `${this.id}-${meth}`;
|
|
2215
2957
|
log.trace(origin);
|
|
2216
2958
|
|
|
2959
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
2960
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
2961
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2962
|
+
return callback(null, errorObj);
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2217
2965
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2218
2966
|
if (version === undefined || version === null || version === '') {
|
|
2219
2967
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2247,7 +2995,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2247
2995
|
uriQuery: queryParams
|
|
2248
2996
|
};
|
|
2249
2997
|
|
|
2250
|
-
|
|
2251
2998
|
try {
|
|
2252
2999
|
// Make the call -
|
|
2253
3000
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2291,6 +3038,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2291
3038
|
const origin = `${this.id}-${meth}`;
|
|
2292
3039
|
log.trace(origin);
|
|
2293
3040
|
|
|
3041
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3042
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3043
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3044
|
+
return callback(null, errorObj);
|
|
3045
|
+
}
|
|
3046
|
+
|
|
2294
3047
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2295
3048
|
if (version === undefined || version === null || version === '') {
|
|
2296
3049
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2329,7 +3082,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2329
3082
|
uriQuery: queryParams
|
|
2330
3083
|
};
|
|
2331
3084
|
|
|
2332
|
-
|
|
2333
3085
|
try {
|
|
2334
3086
|
// Make the call -
|
|
2335
3087
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2372,6 +3124,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2372
3124
|
const origin = `${this.id}-${meth}`;
|
|
2373
3125
|
log.trace(origin);
|
|
2374
3126
|
|
|
3127
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3128
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3129
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3130
|
+
return callback(null, errorObj);
|
|
3131
|
+
}
|
|
3132
|
+
|
|
2375
3133
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2376
3134
|
if (version === undefined || version === null || version === '') {
|
|
2377
3135
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2405,7 +3163,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2405
3163
|
uriQuery: queryParams
|
|
2406
3164
|
};
|
|
2407
3165
|
|
|
2408
|
-
|
|
2409
3166
|
try {
|
|
2410
3167
|
// Make the call -
|
|
2411
3168
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2448,6 +3205,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2448
3205
|
const origin = `${this.id}-${meth}`;
|
|
2449
3206
|
log.trace(origin);
|
|
2450
3207
|
|
|
3208
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3209
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3210
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3211
|
+
return callback(null, errorObj);
|
|
3212
|
+
}
|
|
3213
|
+
|
|
2451
3214
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2452
3215
|
if (version === undefined || version === null || version === '') {
|
|
2453
3216
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2481,7 +3244,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2481
3244
|
uriQuery: queryParams
|
|
2482
3245
|
};
|
|
2483
3246
|
|
|
2484
|
-
|
|
2485
3247
|
try {
|
|
2486
3248
|
// Make the call -
|
|
2487
3249
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2525,6 +3287,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2525
3287
|
const origin = `${this.id}-${meth}`;
|
|
2526
3288
|
log.trace(origin);
|
|
2527
3289
|
|
|
3290
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3291
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3292
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3293
|
+
return callback(null, errorObj);
|
|
3294
|
+
}
|
|
3295
|
+
|
|
2528
3296
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2529
3297
|
if (version === undefined || version === null || version === '') {
|
|
2530
3298
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2563,7 +3331,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2563
3331
|
uriQuery: queryParams
|
|
2564
3332
|
};
|
|
2565
3333
|
|
|
2566
|
-
|
|
2567
3334
|
try {
|
|
2568
3335
|
// Make the call -
|
|
2569
3336
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2607,6 +3374,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2607
3374
|
const origin = `${this.id}-${meth}`;
|
|
2608
3375
|
log.trace(origin);
|
|
2609
3376
|
|
|
3377
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3378
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3379
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3380
|
+
return callback(null, errorObj);
|
|
3381
|
+
}
|
|
3382
|
+
|
|
2610
3383
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2611
3384
|
if (version === undefined || version === null || version === '') {
|
|
2612
3385
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2645,7 +3418,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2645
3418
|
uriQuery: queryParams
|
|
2646
3419
|
};
|
|
2647
3420
|
|
|
2648
|
-
|
|
2649
3421
|
try {
|
|
2650
3422
|
// Make the call -
|
|
2651
3423
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2689,6 +3461,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2689
3461
|
const origin = `${this.id}-${meth}`;
|
|
2690
3462
|
log.trace(origin);
|
|
2691
3463
|
|
|
3464
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3465
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3466
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3467
|
+
return callback(null, errorObj);
|
|
3468
|
+
}
|
|
3469
|
+
|
|
2692
3470
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2693
3471
|
if (version === undefined || version === null || version === '') {
|
|
2694
3472
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2727,7 +3505,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2727
3505
|
uriQuery: queryParams
|
|
2728
3506
|
};
|
|
2729
3507
|
|
|
2730
|
-
|
|
2731
3508
|
try {
|
|
2732
3509
|
// Make the call -
|
|
2733
3510
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2771,6 +3548,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2771
3548
|
const origin = `${this.id}-${meth}`;
|
|
2772
3549
|
log.trace(origin);
|
|
2773
3550
|
|
|
3551
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3552
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3553
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3554
|
+
return callback(null, errorObj);
|
|
3555
|
+
}
|
|
3556
|
+
|
|
2774
3557
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2775
3558
|
if (version === undefined || version === null || version === '') {
|
|
2776
3559
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2809,7 +3592,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2809
3592
|
uriQuery: queryParams
|
|
2810
3593
|
};
|
|
2811
3594
|
|
|
2812
|
-
|
|
2813
3595
|
try {
|
|
2814
3596
|
// Make the call -
|
|
2815
3597
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2854,6 +3636,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2854
3636
|
const origin = `${this.id}-${meth}`;
|
|
2855
3637
|
log.trace(origin);
|
|
2856
3638
|
|
|
3639
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3640
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3641
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3642
|
+
return callback(null, errorObj);
|
|
3643
|
+
}
|
|
3644
|
+
|
|
2857
3645
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2858
3646
|
if (version === undefined || version === null || version === '') {
|
|
2859
3647
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2897,7 +3685,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2897
3685
|
uriQuery: queryParams
|
|
2898
3686
|
};
|
|
2899
3687
|
|
|
2900
|
-
|
|
2901
3688
|
try {
|
|
2902
3689
|
// Make the call -
|
|
2903
3690
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -2942,6 +3729,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2942
3729
|
const origin = `${this.id}-${meth}`;
|
|
2943
3730
|
log.trace(origin);
|
|
2944
3731
|
|
|
3732
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3733
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3734
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3735
|
+
return callback(null, errorObj);
|
|
3736
|
+
}
|
|
3737
|
+
|
|
2945
3738
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
2946
3739
|
if (version === undefined || version === null || version === '') {
|
|
2947
3740
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -2985,7 +3778,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
2985
3778
|
uriQuery: queryParams
|
|
2986
3779
|
};
|
|
2987
3780
|
|
|
2988
|
-
|
|
2989
3781
|
try {
|
|
2990
3782
|
// Make the call -
|
|
2991
3783
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3030,6 +3822,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3030
3822
|
const origin = `${this.id}-${meth}`;
|
|
3031
3823
|
log.trace(origin);
|
|
3032
3824
|
|
|
3825
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3826
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3827
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3828
|
+
return callback(null, errorObj);
|
|
3829
|
+
}
|
|
3830
|
+
|
|
3033
3831
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3034
3832
|
if (version === undefined || version === null || version === '') {
|
|
3035
3833
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3073,7 +3871,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3073
3871
|
uriQuery: queryParams
|
|
3074
3872
|
};
|
|
3075
3873
|
|
|
3076
|
-
|
|
3077
3874
|
try {
|
|
3078
3875
|
// Make the call -
|
|
3079
3876
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3117,6 +3914,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3117
3914
|
const origin = `${this.id}-${meth}`;
|
|
3118
3915
|
log.trace(origin);
|
|
3119
3916
|
|
|
3917
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
3918
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
3919
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3920
|
+
return callback(null, errorObj);
|
|
3921
|
+
}
|
|
3922
|
+
|
|
3120
3923
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3121
3924
|
if (version === undefined || version === null || version === '') {
|
|
3122
3925
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3155,7 +3958,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3155
3958
|
uriQuery: queryParams
|
|
3156
3959
|
};
|
|
3157
3960
|
|
|
3158
|
-
|
|
3159
3961
|
try {
|
|
3160
3962
|
// Make the call -
|
|
3161
3963
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3200,6 +4002,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3200
4002
|
const origin = `${this.id}-${meth}`;
|
|
3201
4003
|
log.trace(origin);
|
|
3202
4004
|
|
|
4005
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4006
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4007
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4008
|
+
return callback(null, errorObj);
|
|
4009
|
+
}
|
|
4010
|
+
|
|
3203
4011
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3204
4012
|
if (version === undefined || version === null || version === '') {
|
|
3205
4013
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3243,7 +4051,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3243
4051
|
uriQuery: queryParams
|
|
3244
4052
|
};
|
|
3245
4053
|
|
|
3246
|
-
|
|
3247
4054
|
try {
|
|
3248
4055
|
// Make the call -
|
|
3249
4056
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3288,6 +4095,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3288
4095
|
const origin = `${this.id}-${meth}`;
|
|
3289
4096
|
log.trace(origin);
|
|
3290
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
|
+
|
|
3291
4104
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3292
4105
|
if (version === undefined || version === null || version === '') {
|
|
3293
4106
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3331,7 +4144,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3331
4144
|
uriQuery: queryParams
|
|
3332
4145
|
};
|
|
3333
4146
|
|
|
3334
|
-
|
|
3335
4147
|
try {
|
|
3336
4148
|
// Make the call -
|
|
3337
4149
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3374,6 +4186,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3374
4186
|
const origin = `${this.id}-${meth}`;
|
|
3375
4187
|
log.trace(origin);
|
|
3376
4188
|
|
|
4189
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4190
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4191
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4192
|
+
return callback(null, errorObj);
|
|
4193
|
+
}
|
|
4194
|
+
|
|
3377
4195
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3378
4196
|
if (version === undefined || version === null || version === '') {
|
|
3379
4197
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3407,7 +4225,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3407
4225
|
uriQuery: queryParams
|
|
3408
4226
|
};
|
|
3409
4227
|
|
|
3410
|
-
|
|
3411
4228
|
try {
|
|
3412
4229
|
// Make the call -
|
|
3413
4230
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3451,6 +4268,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3451
4268
|
const origin = `${this.id}-${meth}`;
|
|
3452
4269
|
log.trace(origin);
|
|
3453
4270
|
|
|
4271
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4272
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4273
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4274
|
+
return callback(null, errorObj);
|
|
4275
|
+
}
|
|
4276
|
+
|
|
3454
4277
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3455
4278
|
if (version === undefined || version === null || version === '') {
|
|
3456
4279
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3489,7 +4312,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3489
4312
|
uriQuery: queryParams
|
|
3490
4313
|
};
|
|
3491
4314
|
|
|
3492
|
-
|
|
3493
4315
|
try {
|
|
3494
4316
|
// Make the call -
|
|
3495
4317
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3533,6 +4355,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3533
4355
|
const origin = `${this.id}-${meth}`;
|
|
3534
4356
|
log.trace(origin);
|
|
3535
4357
|
|
|
4358
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4359
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4360
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4361
|
+
return callback(null, errorObj);
|
|
4362
|
+
}
|
|
4363
|
+
|
|
3536
4364
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3537
4365
|
if (version === undefined || version === null || version === '') {
|
|
3538
4366
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3571,7 +4399,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3571
4399
|
uriQuery: queryParams
|
|
3572
4400
|
};
|
|
3573
4401
|
|
|
3574
|
-
|
|
3575
4402
|
try {
|
|
3576
4403
|
// Make the call -
|
|
3577
4404
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3619,6 +4446,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3619
4446
|
const origin = `${this.id}-${meth}`;
|
|
3620
4447
|
log.trace(origin);
|
|
3621
4448
|
|
|
4449
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4450
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4451
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4452
|
+
return callback(null, errorObj);
|
|
4453
|
+
}
|
|
4454
|
+
|
|
3622
4455
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3623
4456
|
if (version === undefined || version === null || version === '') {
|
|
3624
4457
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3647,7 +4480,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3647
4480
|
uriQuery: queryParams
|
|
3648
4481
|
};
|
|
3649
4482
|
|
|
3650
|
-
|
|
3651
4483
|
try {
|
|
3652
4484
|
// Make the call -
|
|
3653
4485
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3689,6 +4521,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3689
4521
|
const origin = `${this.id}-${meth}`;
|
|
3690
4522
|
log.trace(origin);
|
|
3691
4523
|
|
|
4524
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4525
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4526
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4527
|
+
return callback(null, errorObj);
|
|
4528
|
+
}
|
|
4529
|
+
|
|
3692
4530
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3693
4531
|
if (version === undefined || version === null || version === '') {
|
|
3694
4532
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3717,7 +4555,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3717
4555
|
uriQuery: queryParams
|
|
3718
4556
|
};
|
|
3719
4557
|
|
|
3720
|
-
|
|
3721
4558
|
try {
|
|
3722
4559
|
// Make the call -
|
|
3723
4560
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3760,6 +4597,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3760
4597
|
const origin = `${this.id}-${meth}`;
|
|
3761
4598
|
log.trace(origin);
|
|
3762
4599
|
|
|
4600
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4601
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4602
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4603
|
+
return callback(null, errorObj);
|
|
4604
|
+
}
|
|
4605
|
+
|
|
3763
4606
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3764
4607
|
if (version === undefined || version === null || version === '') {
|
|
3765
4608
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3793,7 +4636,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3793
4636
|
uriQuery: queryParams
|
|
3794
4637
|
};
|
|
3795
4638
|
|
|
3796
|
-
|
|
3797
4639
|
try {
|
|
3798
4640
|
// Make the call -
|
|
3799
4641
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3836,6 +4678,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3836
4678
|
const origin = `${this.id}-${meth}`;
|
|
3837
4679
|
log.trace(origin);
|
|
3838
4680
|
|
|
4681
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4682
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4683
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4684
|
+
return callback(null, errorObj);
|
|
4685
|
+
}
|
|
4686
|
+
|
|
3839
4687
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3840
4688
|
if (version === undefined || version === null || version === '') {
|
|
3841
4689
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -3869,7 +4717,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3869
4717
|
uriQuery: queryParams
|
|
3870
4718
|
};
|
|
3871
4719
|
|
|
3872
|
-
|
|
3873
4720
|
try {
|
|
3874
4721
|
// Make the call -
|
|
3875
4722
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3912,6 +4759,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3912
4759
|
const origin = `${this.id}-${meth}`;
|
|
3913
4760
|
log.trace(origin);
|
|
3914
4761
|
|
|
4762
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4763
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4764
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4765
|
+
return callback(null, errorObj);
|
|
4766
|
+
}
|
|
4767
|
+
|
|
3915
4768
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3916
4769
|
if (requestId === undefined || requestId === null || requestId === '') {
|
|
3917
4770
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['requestId'], null, null, null);
|
|
@@ -3945,7 +4798,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3945
4798
|
uriQuery: queryParams
|
|
3946
4799
|
};
|
|
3947
4800
|
|
|
3948
|
-
|
|
3949
4801
|
try {
|
|
3950
4802
|
// Make the call -
|
|
3951
4803
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -3986,6 +4838,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
3986
4838
|
const origin = `${this.id}-${meth}`;
|
|
3987
4839
|
log.trace(origin);
|
|
3988
4840
|
|
|
4841
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4842
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4843
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4844
|
+
return callback(null, errorObj);
|
|
4845
|
+
}
|
|
4846
|
+
|
|
3989
4847
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
3990
4848
|
if (version === undefined || version === null || version === '') {
|
|
3991
4849
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -4014,7 +4872,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
4014
4872
|
uriQuery: queryParams
|
|
4015
4873
|
};
|
|
4016
4874
|
|
|
4017
|
-
|
|
4018
4875
|
try {
|
|
4019
4876
|
// Make the call -
|
|
4020
4877
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
@@ -4057,6 +4914,12 @@ class OnapSo extends AdapterBaseCl {
|
|
|
4057
4914
|
const origin = `${this.id}-${meth}`;
|
|
4058
4915
|
log.trace(origin);
|
|
4059
4916
|
|
|
4917
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
4918
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
4919
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4920
|
+
return callback(null, errorObj);
|
|
4921
|
+
}
|
|
4922
|
+
|
|
4060
4923
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
4061
4924
|
if (version === undefined || version === null || version === '') {
|
|
4062
4925
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['version'], null, null, null);
|
|
@@ -4090,7 +4953,6 @@ class OnapSo extends AdapterBaseCl {
|
|
|
4090
4953
|
uriQuery: queryParams
|
|
4091
4954
|
};
|
|
4092
4955
|
|
|
4093
|
-
|
|
4094
4956
|
try {
|
|
4095
4957
|
// Make the call -
|
|
4096
4958
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|