@itentialopensource/adapter-nokia_nsp_nfm_p 0.2.3 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTH.md +17 -18
- package/BROKER.md +31 -19
- package/CALLS.md +83 -23
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +20 -6
- package/TAB1.md +10 -0
- package/TAB2.md +84 -10696
- package/adapter.js +308 -0
- package/entities/APIV3/action.json +84 -0
- package/entities/APIV3/schema.json +22 -0
- package/metadata.json +34 -7
- package/package.json +5 -7
- package/pronghorn.json +1249 -2220
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +7 -7
- package/report/nfmpRest-24.4-v3.json +208 -0
- package/report/updateReport1715046544506.json +120 -0
- package/sampleProperties.json +41 -29
- package/test/integration/adapterTestIntegration.js +105 -0
- package/test/unit/adapterTestUnit.js +48 -2
package/adapter.js
CHANGED
|
@@ -128041,6 +128041,314 @@ class NokiaNSPNFMP extends AdapterBaseCl {
|
|
|
128041
128041
|
return callback(null, errorObj);
|
|
128042
128042
|
}
|
|
128043
128043
|
}
|
|
128044
|
+
|
|
128045
|
+
/**
|
|
128046
|
+
* @function xmltojsonEndpoint
|
|
128047
|
+
* @pronghornType method
|
|
128048
|
+
* @name xmltojsonEndpoint
|
|
128049
|
+
* @summary NFMP REST-API v3 convert XML to JSON command
|
|
128050
|
+
*
|
|
128051
|
+
* @param {string} [body] - body param
|
|
128052
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
128053
|
+
* @return {object} results - An object containing the response of the action
|
|
128054
|
+
*
|
|
128055
|
+
* @route {POST} /xmltojsonEndpoint
|
|
128056
|
+
* @roles admin
|
|
128057
|
+
* @task true
|
|
128058
|
+
*/
|
|
128059
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
128060
|
+
xmltojsonEndpoint(body, callback) {
|
|
128061
|
+
const meth = 'adapter-xmltojsonEndpoint';
|
|
128062
|
+
const origin = `${this.id}-${meth}`;
|
|
128063
|
+
log.trace(origin);
|
|
128064
|
+
|
|
128065
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
128066
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
128067
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128068
|
+
return callback(null, errorObj);
|
|
128069
|
+
}
|
|
128070
|
+
|
|
128071
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
128072
|
+
|
|
128073
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
128074
|
+
const queryParamsAvailable = {};
|
|
128075
|
+
const queryParams = {};
|
|
128076
|
+
const pathVars = [];
|
|
128077
|
+
const bodyVars = { body };
|
|
128078
|
+
|
|
128079
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
128080
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
128081
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
128082
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
128083
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
128084
|
+
}
|
|
128085
|
+
});
|
|
128086
|
+
|
|
128087
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
128088
|
+
// see adapter code documentation for more information on the request object's fields
|
|
128089
|
+
const reqObj = {
|
|
128090
|
+
payload: bodyVars,
|
|
128091
|
+
uriPathVars: pathVars,
|
|
128092
|
+
uriQuery: queryParams
|
|
128093
|
+
};
|
|
128094
|
+
|
|
128095
|
+
try {
|
|
128096
|
+
// Make the call -
|
|
128097
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
128098
|
+
return this.requestHandlerInst.identifyRequest('APIV3', 'xmltojsonEndpoint', reqObj, true, (irReturnData, irReturnError) => {
|
|
128099
|
+
// if we received an error or their is no response on the results
|
|
128100
|
+
// return an error
|
|
128101
|
+
if (irReturnError) {
|
|
128102
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
128103
|
+
return callback(null, irReturnError);
|
|
128104
|
+
}
|
|
128105
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
128106
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['xmltojsonEndpoint'], null, null, null);
|
|
128107
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128108
|
+
return callback(null, errorObj);
|
|
128109
|
+
}
|
|
128110
|
+
|
|
128111
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
128112
|
+
// return the response
|
|
128113
|
+
return callback(irReturnData, null);
|
|
128114
|
+
});
|
|
128115
|
+
} catch (ex) {
|
|
128116
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
128117
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128118
|
+
return callback(null, errorObj);
|
|
128119
|
+
}
|
|
128120
|
+
}
|
|
128121
|
+
|
|
128122
|
+
/**
|
|
128123
|
+
* @function xmlEndpoint
|
|
128124
|
+
* @pronghornType method
|
|
128125
|
+
* @name xmlEndpoint
|
|
128126
|
+
* @summary NFMP REST-API v3 'xml' command
|
|
128127
|
+
*
|
|
128128
|
+
* @param {string} [body] - body param
|
|
128129
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
128130
|
+
* @return {object} results - An object containing the response of the action
|
|
128131
|
+
*
|
|
128132
|
+
* @route {POST} /xmlEndpoint
|
|
128133
|
+
* @roles admin
|
|
128134
|
+
* @task true
|
|
128135
|
+
*/
|
|
128136
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
128137
|
+
xmlEndpoint(body, callback) {
|
|
128138
|
+
const meth = 'adapter-xmlEndpoint';
|
|
128139
|
+
const origin = `${this.id}-${meth}`;
|
|
128140
|
+
log.trace(origin);
|
|
128141
|
+
|
|
128142
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
128143
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
128144
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128145
|
+
return callback(null, errorObj);
|
|
128146
|
+
}
|
|
128147
|
+
|
|
128148
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
128149
|
+
|
|
128150
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
128151
|
+
const queryParamsAvailable = {};
|
|
128152
|
+
const queryParams = {};
|
|
128153
|
+
const pathVars = [];
|
|
128154
|
+
const bodyVars = { body };
|
|
128155
|
+
|
|
128156
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
128157
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
128158
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
128159
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
128160
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
128161
|
+
}
|
|
128162
|
+
});
|
|
128163
|
+
|
|
128164
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
128165
|
+
// see adapter code documentation for more information on the request object's fields
|
|
128166
|
+
const reqObj = {
|
|
128167
|
+
payload: bodyVars,
|
|
128168
|
+
uriPathVars: pathVars,
|
|
128169
|
+
uriQuery: queryParams
|
|
128170
|
+
};
|
|
128171
|
+
|
|
128172
|
+
try {
|
|
128173
|
+
// Make the call -
|
|
128174
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
128175
|
+
return this.requestHandlerInst.identifyRequest('APIV3', 'xmlEndpoint', reqObj, true, (irReturnData, irReturnError) => {
|
|
128176
|
+
// if we received an error or their is no response on the results
|
|
128177
|
+
// return an error
|
|
128178
|
+
if (irReturnError) {
|
|
128179
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
128180
|
+
return callback(null, irReturnError);
|
|
128181
|
+
}
|
|
128182
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
128183
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['xmlEndpoint'], null, null, null);
|
|
128184
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128185
|
+
return callback(null, errorObj);
|
|
128186
|
+
}
|
|
128187
|
+
|
|
128188
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
128189
|
+
// return the response
|
|
128190
|
+
return callback(irReturnData, null);
|
|
128191
|
+
});
|
|
128192
|
+
} catch (ex) {
|
|
128193
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
128194
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128195
|
+
return callback(null, errorObj);
|
|
128196
|
+
}
|
|
128197
|
+
}
|
|
128198
|
+
|
|
128199
|
+
/**
|
|
128200
|
+
* @function requestEndpoint
|
|
128201
|
+
* @pronghornType method
|
|
128202
|
+
* @name requestEndpoint
|
|
128203
|
+
* @summary NFMP REST-API v3 'request' command
|
|
128204
|
+
*
|
|
128205
|
+
* @param {object} [body] - body param
|
|
128206
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
128207
|
+
* @return {object} results - An object containing the response of the action
|
|
128208
|
+
*
|
|
128209
|
+
* @route {POST} /requestEndpoint
|
|
128210
|
+
* @roles admin
|
|
128211
|
+
* @task true
|
|
128212
|
+
*/
|
|
128213
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
128214
|
+
requestEndpoint(body, callback) {
|
|
128215
|
+
const meth = 'adapter-requestEndpoint';
|
|
128216
|
+
const origin = `${this.id}-${meth}`;
|
|
128217
|
+
log.trace(origin);
|
|
128218
|
+
|
|
128219
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
128220
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
128221
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128222
|
+
return callback(null, errorObj);
|
|
128223
|
+
}
|
|
128224
|
+
|
|
128225
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
128226
|
+
|
|
128227
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
128228
|
+
const queryParamsAvailable = {};
|
|
128229
|
+
const queryParams = {};
|
|
128230
|
+
const pathVars = [];
|
|
128231
|
+
const bodyVars = body;
|
|
128232
|
+
|
|
128233
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
128234
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
128235
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
128236
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
128237
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
128238
|
+
}
|
|
128239
|
+
});
|
|
128240
|
+
|
|
128241
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
128242
|
+
// see adapter code documentation for more information on the request object's fields
|
|
128243
|
+
const reqObj = {
|
|
128244
|
+
payload: bodyVars,
|
|
128245
|
+
uriPathVars: pathVars,
|
|
128246
|
+
uriQuery: queryParams
|
|
128247
|
+
};
|
|
128248
|
+
|
|
128249
|
+
try {
|
|
128250
|
+
// Make the call -
|
|
128251
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
128252
|
+
return this.requestHandlerInst.identifyRequest('APIV3', 'requestEndpoint', reqObj, true, (irReturnData, irReturnError) => {
|
|
128253
|
+
// if we received an error or their is no response on the results
|
|
128254
|
+
// return an error
|
|
128255
|
+
if (irReturnError) {
|
|
128256
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
128257
|
+
return callback(null, irReturnError);
|
|
128258
|
+
}
|
|
128259
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
128260
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['requestEndpoint'], null, null, null);
|
|
128261
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128262
|
+
return callback(null, errorObj);
|
|
128263
|
+
}
|
|
128264
|
+
|
|
128265
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
128266
|
+
// return the response
|
|
128267
|
+
return callback(irReturnData, null);
|
|
128268
|
+
});
|
|
128269
|
+
} catch (ex) {
|
|
128270
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
128271
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128272
|
+
return callback(null, errorObj);
|
|
128273
|
+
}
|
|
128274
|
+
}
|
|
128275
|
+
|
|
128276
|
+
/**
|
|
128277
|
+
* @function findEndpoint
|
|
128278
|
+
* @pronghornType method
|
|
128279
|
+
* @name findEndpoint
|
|
128280
|
+
* @summary NFMP REST-API v3 find; command
|
|
128281
|
+
*
|
|
128282
|
+
* @param {object} [body] - body param
|
|
128283
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
128284
|
+
* @return {object} results - An object containing the response of the action
|
|
128285
|
+
*
|
|
128286
|
+
* @route {POST} /find
|
|
128287
|
+
* @roles admin
|
|
128288
|
+
* @task true
|
|
128289
|
+
*/
|
|
128290
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
128291
|
+
findEndpoint(body, callback) {
|
|
128292
|
+
const meth = 'adapter-findEndpoint';
|
|
128293
|
+
const origin = `${this.id}-${meth}`;
|
|
128294
|
+
log.trace(origin);
|
|
128295
|
+
|
|
128296
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
128297
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
128298
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128299
|
+
return callback(null, errorObj);
|
|
128300
|
+
}
|
|
128301
|
+
|
|
128302
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
128303
|
+
|
|
128304
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
128305
|
+
const queryParamsAvailable = {};
|
|
128306
|
+
const queryParams = {};
|
|
128307
|
+
const pathVars = [];
|
|
128308
|
+
const bodyVars = body;
|
|
128309
|
+
|
|
128310
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
128311
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
128312
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
128313
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
128314
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
128315
|
+
}
|
|
128316
|
+
});
|
|
128317
|
+
|
|
128318
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
128319
|
+
// see adapter code documentation for more information on the request object's fields
|
|
128320
|
+
const reqObj = {
|
|
128321
|
+
payload: bodyVars,
|
|
128322
|
+
uriPathVars: pathVars,
|
|
128323
|
+
uriQuery: queryParams
|
|
128324
|
+
};
|
|
128325
|
+
|
|
128326
|
+
try {
|
|
128327
|
+
// Make the call -
|
|
128328
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
128329
|
+
return this.requestHandlerInst.identifyRequest('APIV3', 'findEndpoint', reqObj, true, (irReturnData, irReturnError) => {
|
|
128330
|
+
// if we received an error or their is no response on the results
|
|
128331
|
+
// return an error
|
|
128332
|
+
if (irReturnError) {
|
|
128333
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
128334
|
+
return callback(null, irReturnError);
|
|
128335
|
+
}
|
|
128336
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
128337
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['findEndpoint'], null, null, null);
|
|
128338
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128339
|
+
return callback(null, errorObj);
|
|
128340
|
+
}
|
|
128341
|
+
|
|
128342
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
128343
|
+
// return the response
|
|
128344
|
+
return callback(irReturnData, null);
|
|
128345
|
+
});
|
|
128346
|
+
} catch (ex) {
|
|
128347
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
128348
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
128349
|
+
return callback(null, errorObj);
|
|
128350
|
+
}
|
|
128351
|
+
}
|
|
128044
128352
|
}
|
|
128045
128353
|
|
|
128046
128354
|
module.exports = NokiaNSPNFMP;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actions": [
|
|
3
|
+
{
|
|
4
|
+
"name": "xmltojsonEndpoint",
|
|
5
|
+
"protocol": "REST",
|
|
6
|
+
"method": "POST",
|
|
7
|
+
"entitypath": "{base_path}/{version}/v3/xml-to-json?{query}",
|
|
8
|
+
"requestSchema": "schema.json",
|
|
9
|
+
"responseSchema": "schema.json",
|
|
10
|
+
"timeout": 0,
|
|
11
|
+
"sendEmpty": false,
|
|
12
|
+
"requestDatatype": "XML",
|
|
13
|
+
"responseDatatype": "JSON",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"responseObjects": [
|
|
16
|
+
{
|
|
17
|
+
"type": "default",
|
|
18
|
+
"key": "",
|
|
19
|
+
"mockFile": ""
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "xmlEndpoint",
|
|
25
|
+
"protocol": "REST",
|
|
26
|
+
"method": "POST",
|
|
27
|
+
"entitypath": "{base_path}/{version}/v3/xml?{query}",
|
|
28
|
+
"requestSchema": "schema.json",
|
|
29
|
+
"responseSchema": "schema.json",
|
|
30
|
+
"timeout": 0,
|
|
31
|
+
"sendEmpty": false,
|
|
32
|
+
"requestDatatype": "XML",
|
|
33
|
+
"responseDatatype": "XML2JSON",
|
|
34
|
+
"headers": {},
|
|
35
|
+
"responseObjects": [
|
|
36
|
+
{
|
|
37
|
+
"type": "default",
|
|
38
|
+
"key": "",
|
|
39
|
+
"mockFile": ""
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "requestEndpoint",
|
|
45
|
+
"protocol": "REST",
|
|
46
|
+
"method": "POST",
|
|
47
|
+
"entitypath": "{base_path}/{version}/v3/request?{query}",
|
|
48
|
+
"requestSchema": "schema.json",
|
|
49
|
+
"responseSchema": "schema.json",
|
|
50
|
+
"timeout": 0,
|
|
51
|
+
"sendEmpty": false,
|
|
52
|
+
"requestDatatype": "JSON",
|
|
53
|
+
"responseDatatype": "JSON",
|
|
54
|
+
"headers": {},
|
|
55
|
+
"responseObjects": [
|
|
56
|
+
{
|
|
57
|
+
"type": "default",
|
|
58
|
+
"key": "",
|
|
59
|
+
"mockFile": ""
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "findEndpoint",
|
|
65
|
+
"protocol": "REST",
|
|
66
|
+
"method": "POST",
|
|
67
|
+
"entitypath": "{base_path}/{version}/v3/find?{query}",
|
|
68
|
+
"requestSchema": "schema.json",
|
|
69
|
+
"responseSchema": "schema.json",
|
|
70
|
+
"timeout": 0,
|
|
71
|
+
"sendEmpty": false,
|
|
72
|
+
"requestDatatype": "JSON",
|
|
73
|
+
"responseDatatype": "JSON",
|
|
74
|
+
"headers": {},
|
|
75
|
+
"responseObjects": [
|
|
76
|
+
{
|
|
77
|
+
"type": "default",
|
|
78
|
+
"key": "",
|
|
79
|
+
"mockFile": ""
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "schema.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"translate": false,
|
|
6
|
+
"dynamicfields": true,
|
|
7
|
+
"properties": {
|
|
8
|
+
"ph_request_type": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "type of request (internal to adapter)",
|
|
11
|
+
"default": "xmltojsonEndpoint",
|
|
12
|
+
"enum": [
|
|
13
|
+
"xmltojsonEndpoint",
|
|
14
|
+
"xmlEndpoint",
|
|
15
|
+
"requestEndpoint",
|
|
16
|
+
"findEndpoint"
|
|
17
|
+
],
|
|
18
|
+
"external_name": "ph_request_type"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"definitions": {}
|
|
22
|
+
}
|
package/metadata.json
CHANGED
|
@@ -35,20 +35,47 @@
|
|
|
35
35
|
"isDeprecated": false
|
|
36
36
|
},
|
|
37
37
|
"brokerSince": "",
|
|
38
|
+
"authMethods": [
|
|
39
|
+
{
|
|
40
|
+
"type": "OAuth",
|
|
41
|
+
"subtypes": [],
|
|
42
|
+
"primary": true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
38
45
|
"documentation": {
|
|
39
46
|
"storeLink": "",
|
|
40
47
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-nokia_nsp_nfm_p",
|
|
41
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/
|
|
48
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-nokia_nsp_nfm_p",
|
|
42
49
|
"docLink": "https://docs.itential.com/opensource/docs/nokia-nsp-nfm-p",
|
|
43
|
-
"demoLinks": [
|
|
44
|
-
|
|
50
|
+
"demoLinks": [
|
|
51
|
+
{
|
|
52
|
+
"title": "Itential SD-WAN Network Automation Solution",
|
|
53
|
+
"link": "https://www.itential.com/industries/communications-service-providers/sdwan-network-automation/"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"title": "Multi-Vendor SD-WAN",
|
|
57
|
+
"link": "https://www.itential.com/solutions/sdwan-automation-orchestration/"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"trainingLinks": [
|
|
61
|
+
{
|
|
62
|
+
"title": "Itential Academy",
|
|
63
|
+
"link": "https://www.itential.com/itential-academy/"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
45
66
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
46
67
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
47
68
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
48
|
-
"webLink": "",
|
|
49
|
-
"vendorLink": "",
|
|
50
|
-
"productLink": "",
|
|
51
|
-
"apiLinks": [
|
|
69
|
+
"webLink": "https://www.itential.com/adapters/nokia-nsp-nfm-p/",
|
|
70
|
+
"vendorLink": "https://www.nokia.com/",
|
|
71
|
+
"productLink": "https://www.nokia.com/networks/ip-networks/network-services-platform/",
|
|
72
|
+
"apiLinks": [
|
|
73
|
+
{
|
|
74
|
+
"title": "Nokia NSP API",
|
|
75
|
+
"link": "https://documentation.nokia.com/cgi-bin/dbaccessfilename.cgi/3HE12075AAAATQZZA01_V1_NSP%2017.3%20API%20Programmer%20Guide.pdf",
|
|
76
|
+
"public": true
|
|
77
|
+
}
|
|
78
|
+
]
|
|
52
79
|
},
|
|
53
80
|
"assets": [],
|
|
54
81
|
"relatedItems": {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-nokia_nsp_nfm_p",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "This adapter integrates with system described as: nfm-p(SAMO).",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.67.
|
|
7
|
+
"engineVersion": "1.67.19",
|
|
8
8
|
"adapterType": "http",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
|
|
16
16
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
17
17
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
18
|
-
"test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
|
|
19
18
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
20
19
|
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
21
20
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
@@ -43,15 +42,15 @@
|
|
|
43
42
|
],
|
|
44
43
|
"license": "Apache-2.0",
|
|
45
44
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
45
|
+
"node": ">= 14.0.0",
|
|
47
46
|
"npm": ">= 6.0.0"
|
|
48
47
|
},
|
|
49
48
|
"repository": {
|
|
50
49
|
"type": "git",
|
|
51
|
-
"url": "git@gitlab.com:itentialopensource/adapters/
|
|
50
|
+
"url": "git@gitlab.com:itentialopensource/adapters/adapter-nokia_nsp_nfm_p.git"
|
|
52
51
|
},
|
|
53
52
|
"author": "Itential",
|
|
54
|
-
"homepage": "https://gitlab.com/itentialopensource/adapters/
|
|
53
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-nokia_nsp_nfm_p#readme",
|
|
55
54
|
"dependencies": {
|
|
56
55
|
"@itentialopensource/adapter-utils": "^5.3.10",
|
|
57
56
|
"acorn": "^8.10.0",
|
|
@@ -64,7 +63,6 @@
|
|
|
64
63
|
"mocha": "^10.3.0",
|
|
65
64
|
"mocha-param": "^2.0.1",
|
|
66
65
|
"mongodb": "^4.16.0",
|
|
67
|
-
"nyc": "^15.1.0",
|
|
68
66
|
"ping": "^0.4.4",
|
|
69
67
|
"prompts": "^2.4.2",
|
|
70
68
|
"readline-sync": "^1.4.10",
|