@itentialopensource/adapter-paragon_pathfinder 1.2.7 → 1.2.8

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/CALLS.md CHANGED
@@ -1116,5 +1116,35 @@ Specific adapter calls are built based on the API of the Paragon_pathfinder. The
1116
1116
  <td style="padding:15px">{base_path}/{version}/config?{query}</td>
1117
1117
  <td style="padding:15px">Yes</td>
1118
1118
  </tr>
1119
+ <tr>
1120
+ <td style="padding:15px">getTopologyV2TopologyIdIpePolicy(topologyId, callback)</td>
1121
+ <td style="padding:15px">Get all IPE Policies</td>
1122
+ <td style="padding:15px">{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}</td>
1123
+ <td style="padding:15px">Yes</td>
1124
+ </tr>
1125
+ <tr>
1126
+ <td style="padding:15px">postTopologyV2TopologyIdIpePolicy(topologyId, body, callback)</td>
1127
+ <td style="padding:15px">Create IPE Policies</td>
1128
+ <td style="padding:15px">{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}</td>
1129
+ <td style="padding:15px">Yes</td>
1130
+ </tr>
1131
+ <tr>
1132
+ <td style="padding:15px">putTopologyV2TopologyIdIpePolicy(topologyId, body, callback)</td>
1133
+ <td style="padding:15px">Update IPE Policies</td>
1134
+ <td style="padding:15px">{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}</td>
1135
+ <td style="padding:15px">Yes</td>
1136
+ </tr>
1137
+ <tr>
1138
+ <td style="padding:15px">deleteTopologyV2TopologyIdIpePolicy(topologyId, callback)</td>
1139
+ <td style="padding:15px">Delete IPE Policies</td>
1140
+ <td style="padding:15px">{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}</td>
1141
+ <td style="padding:15px">Yes</td>
1142
+ </tr>
1143
+ <tr>
1144
+ <td style="padding:15px">getTopologyV2TopologyIdIpePolicyIpePolicyId(topologyId, ipePolicyId, callback)</td>
1145
+ <td style="padding:15px">Get single IPE policy</td>
1146
+ <td style="padding:15px">{base_path}/{version}/topology/v2/{pathv1}/ipe/policy/{pathv2}?{query}</td>
1147
+ <td style="padding:15px">Yes</td>
1148
+ </tr>
1119
1149
  </table>
1120
1150
  <br>
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 1.2.8 [08-11-2023]
3
+
4
+ * Add calls and default value to schema files
5
+
6
+ See merge request itentialopensource/adapters/controller-orchestrator/adapter-paragon_pathfinder!12
7
+
8
+ ---
9
+
2
10
  ## 1.2.7 [07-05-2023]
3
11
 
4
12
  * Fix body objects for all calls
package/adapter.js CHANGED
@@ -13104,6 +13104,424 @@ class ParagonPathfinder extends AdapterBaseCl {
13104
13104
  return callback(null, errorObj);
13105
13105
  }
13106
13106
  }
13107
+
13108
+ /**
13109
+ * @function getTopologyV2TopologyIdIpePolicy
13110
+ * @pronghornType method
13111
+ * @name getTopologyV2TopologyIdIpePolicy
13112
+ * @summary Get all IPE Policie
13113
+ *
13114
+ * @param {number} topologyId - A unique identifier for the topology. In Paragon PathFinder version 2, the unique identifier is set to 1. \n \n
13115
+ * @param {getCallback} callback - a callback function to return the result
13116
+ * @return {object} results - An object containing the response of the action
13117
+ *
13118
+ * @route {POST} /getTopologyV2TopologyIdIpePolicy
13119
+ * @roles admin
13120
+ * @task true
13121
+ */
13122
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
13123
+ getTopologyV2TopologyIdIpePolicy(topologyId, callback) {
13124
+ const meth = 'adapter-getTopologyV2TopologyIdIpePolicy';
13125
+ const origin = `${this.id}-${meth}`;
13126
+ log.trace(origin);
13127
+
13128
+ if (this.suspended && this.suspendMode === 'error') {
13129
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13130
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13131
+ return callback(null, errorObj);
13132
+ }
13133
+
13134
+ /* HERE IS WHERE YOU VALIDATE DATA */
13135
+ if (topologyId === undefined || topologyId === null || topologyId === '') {
13136
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['topologyId'], null, null, null);
13137
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13138
+ return callback(null, errorObj);
13139
+ }
13140
+
13141
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
13142
+ const queryParamsAvailable = {};
13143
+ const queryParams = {};
13144
+ const pathVars = [topologyId];
13145
+ const bodyVars = {};
13146
+
13147
+ // loop in template. long callback arg name to avoid identifier conflicts
13148
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
13149
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
13150
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
13151
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
13152
+ }
13153
+ });
13154
+
13155
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
13156
+ // see adapter code documentation for more information on the request object's fields
13157
+ const reqObj = {
13158
+ payload: bodyVars,
13159
+ uriPathVars: pathVars,
13160
+ uriQuery: queryParams
13161
+ };
13162
+
13163
+ try {
13164
+ // Make the call -
13165
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
13166
+ return this.requestHandlerInst.identifyRequest('Topology', 'getTopologyV2TopologyIdIpePolicy', reqObj, true, (irReturnData, irReturnError) => {
13167
+ // if we received an error or their is no response on the results
13168
+ // return an error
13169
+ if (irReturnError) {
13170
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
13171
+ return callback(null, irReturnError);
13172
+ }
13173
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
13174
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getTopologyV2TopologyIdIpePolicy'], null, null, null);
13175
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13176
+ return callback(null, errorObj);
13177
+ }
13178
+
13179
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
13180
+ // return the response
13181
+ return callback(irReturnData, null);
13182
+ });
13183
+ } catch (ex) {
13184
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
13185
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13186
+ return callback(null, errorObj);
13187
+ }
13188
+ }
13189
+
13190
+ /**
13191
+ * @function postTopologyV2TopologyIdIpePolicy
13192
+ * @pronghornType method
13193
+ * @name postTopologyV2TopologyIdIpePolicy
13194
+ * @summary Create IPE Policies
13195
+ *
13196
+ * @param {number} topologyId - A unique identifier for the topology. In Paragon PathFinder version 2, the unique identifier is set to 1. \n \n
13197
+ * @param {array} [body] - body param
13198
+ * @param {getCallback} callback - a callback function to return the result
13199
+ * @return {object} results - An object containing the response of the action
13200
+ *
13201
+ * @route {POST} /postTopologyV2TopologyIdIpePolicy
13202
+ * @roles admin
13203
+ * @task true
13204
+ */
13205
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
13206
+ postTopologyV2TopologyIdIpePolicy(topologyId, body, callback) {
13207
+ const meth = 'adapter-postTopologyV2TopologyIdIpePolicy';
13208
+ const origin = `${this.id}-${meth}`;
13209
+ log.trace(origin);
13210
+
13211
+ if (this.suspended && this.suspendMode === 'error') {
13212
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13213
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13214
+ return callback(null, errorObj);
13215
+ }
13216
+
13217
+ /* HERE IS WHERE YOU VALIDATE DATA */
13218
+ if (topologyId === undefined || topologyId === null || topologyId === '') {
13219
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['topologyId'], null, null, null);
13220
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13221
+ return callback(null, errorObj);
13222
+ }
13223
+
13224
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
13225
+ const queryParamsAvailable = {};
13226
+ const queryParams = {};
13227
+ const pathVars = [topologyId];
13228
+ const bodyVars = body;
13229
+
13230
+ // loop in template. long callback arg name to avoid identifier conflicts
13231
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
13232
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
13233
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
13234
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
13235
+ }
13236
+ });
13237
+
13238
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
13239
+ // see adapter code documentation for more information on the request object's fields
13240
+ const reqObj = {
13241
+ payload: bodyVars,
13242
+ uriPathVars: pathVars,
13243
+ uriQuery: queryParams
13244
+ };
13245
+
13246
+ try {
13247
+ // Make the call -
13248
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
13249
+ return this.requestHandlerInst.identifyRequest('Topology', 'postTopologyV2TopologyIdIpePolicy', reqObj, true, (irReturnData, irReturnError) => {
13250
+ // if we received an error or their is no response on the results
13251
+ // return an error
13252
+ if (irReturnError) {
13253
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
13254
+ return callback(null, irReturnError);
13255
+ }
13256
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
13257
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['postTopologyV2TopologyIdIpePolicy'], null, null, null);
13258
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13259
+ return callback(null, errorObj);
13260
+ }
13261
+
13262
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
13263
+ // return the response
13264
+ return callback(irReturnData, null);
13265
+ });
13266
+ } catch (ex) {
13267
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
13268
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13269
+ return callback(null, errorObj);
13270
+ }
13271
+ }
13272
+
13273
+ /**
13274
+ * @function putTopologyV2TopologyIdIpePolicy
13275
+ * @pronghornType method
13276
+ * @name putTopologyV2TopologyIdIpePolicy
13277
+ * @summary Update IPE Policies
13278
+ *
13279
+ * @param {number} topologyId - A unique identifier for the topology. In Paragon PathFinder version 2, the unique identifier is set to 1. \n \n
13280
+ * @param {array} [body] - body param
13281
+ * @param {getCallback} callback - a callback function to return the result
13282
+ * @return {object} results - An object containing the response of the action
13283
+ *
13284
+ * @route {POST} /putTopologyV2TopologyIdIpePolicy
13285
+ * @roles admin
13286
+ * @task true
13287
+ */
13288
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
13289
+ putTopologyV2TopologyIdIpePolicy(topologyId, body, callback) {
13290
+ const meth = 'adapter-putTopologyV2TopologyIdIpePolicy';
13291
+ const origin = `${this.id}-${meth}`;
13292
+ log.trace(origin);
13293
+
13294
+ if (this.suspended && this.suspendMode === 'error') {
13295
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13296
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13297
+ return callback(null, errorObj);
13298
+ }
13299
+
13300
+ /* HERE IS WHERE YOU VALIDATE DATA */
13301
+ if (topologyId === undefined || topologyId === null || topologyId === '') {
13302
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['topologyId'], null, null, null);
13303
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13304
+ return callback(null, errorObj);
13305
+ }
13306
+
13307
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
13308
+ const queryParamsAvailable = {};
13309
+ const queryParams = {};
13310
+ const pathVars = [topologyId];
13311
+ const bodyVars = body;
13312
+
13313
+ // loop in template. long callback arg name to avoid identifier conflicts
13314
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
13315
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
13316
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
13317
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
13318
+ }
13319
+ });
13320
+
13321
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
13322
+ // see adapter code documentation for more information on the request object's fields
13323
+ const reqObj = {
13324
+ payload: bodyVars,
13325
+ uriPathVars: pathVars,
13326
+ uriQuery: queryParams
13327
+ };
13328
+
13329
+ try {
13330
+ // Make the call -
13331
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
13332
+ return this.requestHandlerInst.identifyRequest('Topology', 'putTopologyV2TopologyIdIpePolicy', reqObj, false, (irReturnData, irReturnError) => {
13333
+ // if we received an error or their is no response on the results
13334
+ // return an error
13335
+ if (irReturnError) {
13336
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
13337
+ return callback(null, irReturnError);
13338
+ }
13339
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
13340
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['putTopologyV2TopologyIdIpePolicy'], null, null, null);
13341
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13342
+ return callback(null, errorObj);
13343
+ }
13344
+
13345
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
13346
+ // return the response
13347
+ return callback(irReturnData, null);
13348
+ });
13349
+ } catch (ex) {
13350
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
13351
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13352
+ return callback(null, errorObj);
13353
+ }
13354
+ }
13355
+
13356
+ /**
13357
+ * @function deleteTopologyV2TopologyIdIpePolicy
13358
+ * @pronghornType method
13359
+ * @name deleteTopologyV2TopologyIdIpePolicy
13360
+ * @summary Delete IPE Policies
13361
+ *
13362
+ * @param {number} topologyId - A unique identifier for the topology. In Paragon PathFinder version 2, the unique identifier is set to 1. \n \n
13363
+ * @param {getCallback} callback - a callback function to return the result
13364
+ * @return {object} results - An object containing the response of the action
13365
+ *
13366
+ * @route {POST} /deleteTopologyV2TopologyIdIpePolicy
13367
+ * @roles admin
13368
+ * @task true
13369
+ */
13370
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
13371
+ deleteTopologyV2TopologyIdIpePolicy(topologyId, callback) {
13372
+ const meth = 'adapter-deleteTopologyV2TopologyIdIpePolicy';
13373
+ const origin = `${this.id}-${meth}`;
13374
+ log.trace(origin);
13375
+
13376
+ if (this.suspended && this.suspendMode === 'error') {
13377
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13378
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13379
+ return callback(null, errorObj);
13380
+ }
13381
+
13382
+ /* HERE IS WHERE YOU VALIDATE DATA */
13383
+ if (topologyId === undefined || topologyId === null || topologyId === '') {
13384
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['topologyId'], null, null, null);
13385
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13386
+ return callback(null, errorObj);
13387
+ }
13388
+
13389
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
13390
+ const queryParamsAvailable = {};
13391
+ const queryParams = {};
13392
+ const pathVars = [topologyId];
13393
+ const bodyVars = {};
13394
+
13395
+ // loop in template. long callback arg name to avoid identifier conflicts
13396
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
13397
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
13398
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
13399
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
13400
+ }
13401
+ });
13402
+
13403
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
13404
+ // see adapter code documentation for more information on the request object's fields
13405
+ const reqObj = {
13406
+ payload: bodyVars,
13407
+ uriPathVars: pathVars,
13408
+ uriQuery: queryParams
13409
+ };
13410
+
13411
+ try {
13412
+ // Make the call -
13413
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
13414
+ return this.requestHandlerInst.identifyRequest('Topology', 'deleteTopologyV2TopologyIdIpePolicy', reqObj, false, (irReturnData, irReturnError) => {
13415
+ // if we received an error or their is no response on the results
13416
+ // return an error
13417
+ if (irReturnError) {
13418
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
13419
+ return callback(null, irReturnError);
13420
+ }
13421
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
13422
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['deleteTopologyV2TopologyIdIpePolicy'], null, null, null);
13423
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13424
+ return callback(null, errorObj);
13425
+ }
13426
+
13427
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
13428
+ // return the response
13429
+ return callback(irReturnData, null);
13430
+ });
13431
+ } catch (ex) {
13432
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
13433
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13434
+ return callback(null, errorObj);
13435
+ }
13436
+ }
13437
+
13438
+ /**
13439
+ * @function getTopologyV2TopologyIdIpePolicyIpePolicyId
13440
+ * @pronghornType method
13441
+ * @name getTopologyV2TopologyIdIpePolicyIpePolicyId
13442
+ * @summary Get single IPE policy
13443
+ *
13444
+ * @param {number} topologyId - A unique identifier for the topology. In Paragon PathFinder version 2, the unique identifier is set to 1. \n \n
13445
+ * @param {number} ipePolicyId - Program ID of an IPE policy \n \n
13446
+ * @param {getCallback} callback - a callback function to return the result
13447
+ * @return {object} results - An object containing the response of the action
13448
+ *
13449
+ * @route {POST} /getTopologyV2TopologyIdIpePolicyIpePolicyId
13450
+ * @roles admin
13451
+ * @task true
13452
+ */
13453
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
13454
+ getTopologyV2TopologyIdIpePolicyIpePolicyId(topologyId, ipePolicyId, callback) {
13455
+ const meth = 'adapter-getTopologyV2TopologyIdIpePolicyIpePolicyId';
13456
+ const origin = `${this.id}-${meth}`;
13457
+ log.trace(origin);
13458
+
13459
+ if (this.suspended && this.suspendMode === 'error') {
13460
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13461
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13462
+ return callback(null, errorObj);
13463
+ }
13464
+
13465
+ /* HERE IS WHERE YOU VALIDATE DATA */
13466
+ if (topologyId === undefined || topologyId === null || topologyId === '') {
13467
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['topologyId'], null, null, null);
13468
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13469
+ return callback(null, errorObj);
13470
+ }
13471
+ if (ipePolicyId === undefined || ipePolicyId === null || ipePolicyId === '') {
13472
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['ipePolicyId'], null, null, null);
13473
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13474
+ return callback(null, errorObj);
13475
+ }
13476
+
13477
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
13478
+ const queryParamsAvailable = {};
13479
+ const queryParams = {};
13480
+ const pathVars = [topologyId, ipePolicyId];
13481
+ const bodyVars = {};
13482
+
13483
+ // loop in template. long callback arg name to avoid identifier conflicts
13484
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
13485
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
13486
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
13487
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
13488
+ }
13489
+ });
13490
+
13491
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
13492
+ // see adapter code documentation for more information on the request object's fields
13493
+ const reqObj = {
13494
+ payload: bodyVars,
13495
+ uriPathVars: pathVars,
13496
+ uriQuery: queryParams
13497
+ };
13498
+
13499
+ try {
13500
+ // Make the call -
13501
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
13502
+ return this.requestHandlerInst.identifyRequest('Topology', 'getTopologyV2TopologyIdIpePolicyIpePolicyId', reqObj, true, (irReturnData, irReturnError) => {
13503
+ // if we received an error or their is no response on the results
13504
+ // return an error
13505
+ if (irReturnError) {
13506
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
13507
+ return callback(null, irReturnError);
13508
+ }
13509
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
13510
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getTopologyV2TopologyIdIpePolicyIpePolicyId'], null, null, null);
13511
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13512
+ return callback(null, errorObj);
13513
+ }
13514
+
13515
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
13516
+ // return the response
13517
+ return callback(irReturnData, null);
13518
+ });
13519
+ } catch (ex) {
13520
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
13521
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13522
+ return callback(null, errorObj);
13523
+ }
13524
+ }
13107
13525
  }
13108
13526
 
13109
13527
  module.exports = ParagonPathfinder;
@@ -8,7 +8,7 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "",
11
+ "default": "postConfig",
12
12
  "enum": [
13
13
  "postConfig",
14
14
  "patchConfig",
@@ -8,7 +8,7 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "",
11
+ "default": "getNetconfV2Profiles",
12
12
  "enum": [
13
13
  "getNetconfV2Profiles",
14
14
  "postNetconfV2Profiles",
@@ -8,7 +8,7 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "",
11
+ "default": "getSchedulerV2Tasklist",
12
12
  "enum": [
13
13
  "getSchedulerV2Tasklist",
14
14
  "getSchedulerV2Tasks",
@@ -2397,6 +2397,108 @@
2397
2397
  "mockFile": ""
2398
2398
  }
2399
2399
  ]
2400
+ },
2401
+ {
2402
+ "name": "getTopologyV2TopologyIdIpePolicy",
2403
+ "protocol": "REST",
2404
+ "method": "GET",
2405
+ "entitypath": "{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}",
2406
+ "requestSchema": "schema.json",
2407
+ "responseSchema": "schema.json",
2408
+ "timeout": 0,
2409
+ "sendEmpty": false,
2410
+ "sendGetBody": false,
2411
+ "requestDatatype": "JSON",
2412
+ "responseDatatype": "JSON",
2413
+ "headers": {},
2414
+ "responseObjects": [
2415
+ {
2416
+ "type": "default",
2417
+ "key": "",
2418
+ "mockFile": ""
2419
+ }
2420
+ ]
2421
+ },
2422
+ {
2423
+ "name": "postTopologyV2TopologyIdIpePolicy",
2424
+ "protocol": "REST",
2425
+ "method": "POST",
2426
+ "entitypath": "{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}",
2427
+ "requestSchema": "schema.json",
2428
+ "responseSchema": "schema.json",
2429
+ "timeout": 0,
2430
+ "sendEmpty": false,
2431
+ "requestDatatype": "JSON",
2432
+ "responseDatatype": "JSON",
2433
+ "headers": {},
2434
+ "responseObjects": [
2435
+ {
2436
+ "type": "default",
2437
+ "key": "",
2438
+ "mockFile": ""
2439
+ }
2440
+ ]
2441
+ },
2442
+ {
2443
+ "name": "putTopologyV2TopologyIdIpePolicy",
2444
+ "protocol": "REST",
2445
+ "method": "PUT",
2446
+ "entitypath": "{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}",
2447
+ "requestSchema": "schema.json",
2448
+ "responseSchema": "schema.json",
2449
+ "timeout": 0,
2450
+ "sendEmpty": false,
2451
+ "requestDatatype": "JSON",
2452
+ "responseDatatype": "JSON",
2453
+ "headers": {},
2454
+ "responseObjects": [
2455
+ {
2456
+ "type": "default",
2457
+ "key": "",
2458
+ "mockFile": ""
2459
+ }
2460
+ ]
2461
+ },
2462
+ {
2463
+ "name": "deleteTopologyV2TopologyIdIpePolicy",
2464
+ "protocol": "REST",
2465
+ "method": "DELETE",
2466
+ "entitypath": "{base_path}/{version}/topology/v2/{pathv1}/ipe/policy?{query}",
2467
+ "requestSchema": "schema.json",
2468
+ "responseSchema": "schema.json",
2469
+ "timeout": 0,
2470
+ "sendEmpty": false,
2471
+ "requestDatatype": "JSON",
2472
+ "responseDatatype": "JSON",
2473
+ "headers": {},
2474
+ "responseObjects": [
2475
+ {
2476
+ "type": "default",
2477
+ "key": "",
2478
+ "mockFile": ""
2479
+ }
2480
+ ]
2481
+ },
2482
+ {
2483
+ "name": "getTopologyV2TopologyIdIpePolicyIpePolicyId",
2484
+ "protocol": "REST",
2485
+ "method": "GET",
2486
+ "entitypath": "{base_path}/{version}/topology/v2/{pathv1}/ipe/policy/{pathv2}?{query}",
2487
+ "requestSchema": "schema.json",
2488
+ "responseSchema": "schema.json",
2489
+ "timeout": 0,
2490
+ "sendEmpty": false,
2491
+ "sendGetBody": false,
2492
+ "requestDatatype": "JSON",
2493
+ "responseDatatype": "JSON",
2494
+ "headers": {},
2495
+ "responseObjects": [
2496
+ {
2497
+ "type": "default",
2498
+ "key": "",
2499
+ "mockFile": ""
2500
+ }
2501
+ ]
2400
2502
  }
2401
2503
  ]
2402
2504
  }
@@ -8,7 +8,7 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "",
11
+ "default": "getTopologyV2",
12
12
  "enum": [
13
13
  "getTopologyV2",
14
14
  "getTopologyV2TopologyId",
@@ -126,7 +126,12 @@
126
126
  "getTopologyV2RpcSimulationUuidReportName",
127
127
  "postTopologyV2RpcDiverseTreeDesign",
128
128
  "getTopologyV2RpcDiverseTreeDesign",
129
- "getTopologyV2RpcDiverseTreeDesignUuid"
129
+ "getTopologyV2RpcDiverseTreeDesignUuid",
130
+ "getTopologyV2TopologyIdIpePolicy",
131
+ "postTopologyV2TopologyIdIpePolicy",
132
+ "putTopologyV2TopologyIdIpePolicy",
133
+ "deleteTopologyV2TopologyIdIpePolicy",
134
+ "getTopologyV2TopologyIdIpePolicyIpePolicyId"
130
135
  ],
131
136
  "external_name": "ph_request_type"
132
137
  }
@@ -8,7 +8,7 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "",
11
+ "default": "getTransportControllerGroupsV2",
12
12
  "enum": [
13
13
  "getTransportControllerGroupsV2",
14
14
  "postTransportControllerGroupsV2",
@@ -8,7 +8,7 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "",
11
+ "default": "getTransportControllersV2",
12
12
  "enum": [
13
13
  "getTransportControllersV2",
14
14
  "postTransportControllersV2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-paragon_pathfinder",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "This adapter integrates with paragon pathfinder",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.15",