@itentialopensource/adapter-paragon_pathfinder 1.2.6 → 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 +33 -3
- package/CHANGELOG.md +16 -0
- package/adapter.js +450 -32
- package/entities/Config/schema.json +1 -1
- package/entities/Netconf/schema.json +1 -1
- package/entities/Scheduler/schema.json +1 -1
- package/entities/Topology/action.json +102 -0
- package/entities/Topology/schema.json +7 -2
- package/entities/TransportControllerGroups/schema.json +1 -1
- package/entities/TransportControllers/schema.json +1 -1
- package/package.json +2 -2
- package/pronghorn.json +1593 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +7 -7
- package/report/update-pathfinder-api-v2.json +31139 -0
- package/test/integration/adapterTestIntegration.js +453 -0
- package/test/unit/adapterTestUnit.js +162 -0
package/adapter.js
CHANGED
|
@@ -1857,7 +1857,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
1857
1857
|
const queryParamsAvailable = {};
|
|
1858
1858
|
const queryParams = {};
|
|
1859
1859
|
const pathVars = [topologyId];
|
|
1860
|
-
const bodyVars =
|
|
1860
|
+
const bodyVars = body;
|
|
1861
1861
|
|
|
1862
1862
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1863
1863
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -2530,7 +2530,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
2530
2530
|
const queryParamsAvailable = {};
|
|
2531
2531
|
const queryParams = {};
|
|
2532
2532
|
const pathVars = [topologyId, nodeIndex];
|
|
2533
|
-
const bodyVars =
|
|
2533
|
+
const bodyVars = body;
|
|
2534
2534
|
|
|
2535
2535
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2536
2536
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3224,7 +3224,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
3224
3224
|
const queryParamsAvailable = {};
|
|
3225
3225
|
const queryParams = {};
|
|
3226
3226
|
const pathVars = [topologyId];
|
|
3227
|
-
const bodyVars =
|
|
3227
|
+
const bodyVars = body;
|
|
3228
3228
|
|
|
3229
3229
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3230
3230
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3648,7 +3648,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
3648
3648
|
const queryParamsAvailable = {};
|
|
3649
3649
|
const queryParams = {};
|
|
3650
3650
|
const pathVars = [topologyId, linkIndex];
|
|
3651
|
-
const bodyVars =
|
|
3651
|
+
const bodyVars = body;
|
|
3652
3652
|
|
|
3653
3653
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3654
3654
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4090,7 +4090,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
4090
4090
|
const queryParamsAvailable = {};
|
|
4091
4091
|
const queryParams = {};
|
|
4092
4092
|
const pathVars = [topologyId, linkIndex];
|
|
4093
|
-
const bodyVars =
|
|
4093
|
+
const bodyVars = body;
|
|
4094
4094
|
|
|
4095
4095
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4096
4096
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4356,7 +4356,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
4356
4356
|
const queryParamsAvailable = {};
|
|
4357
4357
|
const queryParams = {};
|
|
4358
4358
|
const pathVars = [topologyId, linkIndex];
|
|
4359
|
-
const bodyVars =
|
|
4359
|
+
const bodyVars = body;
|
|
4360
4360
|
|
|
4361
4361
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4362
4362
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4698,7 +4698,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
4698
4698
|
const queryParamsAvailable = {};
|
|
4699
4699
|
const queryParams = {};
|
|
4700
4700
|
const pathVars = [topologyId];
|
|
4701
|
-
const bodyVars =
|
|
4701
|
+
const bodyVars = body;
|
|
4702
4702
|
|
|
4703
4703
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4704
4704
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -5371,7 +5371,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
5371
5371
|
const queryParamsAvailable = {};
|
|
5372
5372
|
const queryParams = {};
|
|
5373
5373
|
const pathVars = [topologyId, lspIndex];
|
|
5374
|
-
const bodyVars =
|
|
5374
|
+
const bodyVars = body;
|
|
5375
5375
|
|
|
5376
5376
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
5377
5377
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -5801,7 +5801,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
5801
5801
|
const queryParamsAvailable = {};
|
|
5802
5802
|
const queryParams = {};
|
|
5803
5803
|
const pathVars = [topologyId];
|
|
5804
|
-
const bodyVars =
|
|
5804
|
+
const bodyVars = body;
|
|
5805
5805
|
|
|
5806
5806
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
5807
5807
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -6060,7 +6060,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
6060
6060
|
const queryParamsAvailable = {};
|
|
6061
6061
|
const queryParams = {};
|
|
6062
6062
|
const pathVars = [topologyId, demandIndex];
|
|
6063
|
-
const bodyVars =
|
|
6063
|
+
const bodyVars = body;
|
|
6064
6064
|
|
|
6065
6065
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
6066
6066
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -6733,7 +6733,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
6733
6733
|
const queryParamsAvailable = {};
|
|
6734
6734
|
const queryParams = {};
|
|
6735
6735
|
const pathVars = [topologyId];
|
|
6736
|
-
const bodyVars =
|
|
6736
|
+
const bodyVars = body;
|
|
6737
6737
|
|
|
6738
6738
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
6739
6739
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -7074,7 +7074,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
7074
7074
|
const queryParamsAvailable = {};
|
|
7075
7075
|
const queryParams = {};
|
|
7076
7076
|
const pathVars = [topologyId, p2mpGroupIndex];
|
|
7077
|
-
const bodyVars =
|
|
7077
|
+
const bodyVars = body;
|
|
7078
7078
|
|
|
7079
7079
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
7080
7080
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -7340,7 +7340,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
7340
7340
|
const queryParamsAvailable = {};
|
|
7341
7341
|
const queryParams = {};
|
|
7342
7342
|
const pathVars = [topologyId, p2mpGroupIndex];
|
|
7343
|
-
const bodyVars =
|
|
7343
|
+
const bodyVars = body;
|
|
7344
7344
|
|
|
7345
7345
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
7346
7346
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -7951,7 +7951,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
7951
7951
|
const queryParamsAvailable = {};
|
|
7952
7952
|
const queryParams = {};
|
|
7953
7953
|
const pathVars = [topologyId];
|
|
7954
|
-
const bodyVars =
|
|
7954
|
+
const bodyVars = body;
|
|
7955
7955
|
|
|
7956
7956
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
7957
7957
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -8210,7 +8210,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
8210
8210
|
const queryParamsAvailable = {};
|
|
8211
8211
|
const queryParams = {};
|
|
8212
8212
|
const pathVars = [topologyId, maintenanceIndex];
|
|
8213
|
-
const bodyVars =
|
|
8213
|
+
const bodyVars = body;
|
|
8214
8214
|
|
|
8215
8215
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
8216
8216
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -8463,7 +8463,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
8463
8463
|
const queryParamsAvailable = {};
|
|
8464
8464
|
const queryParams = {};
|
|
8465
8465
|
const pathVars = [topologyId];
|
|
8466
|
-
const bodyVars =
|
|
8466
|
+
const bodyVars = body;
|
|
8467
8467
|
|
|
8468
8468
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
8469
8469
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -8722,7 +8722,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
8722
8722
|
const queryParamsAvailable = {};
|
|
8723
8723
|
const queryParams = {};
|
|
8724
8724
|
const pathVars = [topologyId, facilityIndex];
|
|
8725
|
-
const bodyVars =
|
|
8725
|
+
const bodyVars = body;
|
|
8726
8726
|
|
|
8727
8727
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
8728
8728
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -8975,7 +8975,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
8975
8975
|
const queryParamsAvailable = {};
|
|
8976
8976
|
const queryParams = {};
|
|
8977
8977
|
const pathVars = [topologyId];
|
|
8978
|
-
const bodyVars =
|
|
8978
|
+
const bodyVars = body;
|
|
8979
8979
|
|
|
8980
8980
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
8981
8981
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -9234,7 +9234,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
9234
9234
|
const queryParamsAvailable = {};
|
|
9235
9235
|
const queryParams = {};
|
|
9236
9236
|
const pathVars = [topologyId, containerIndex];
|
|
9237
|
-
const bodyVars =
|
|
9237
|
+
const bodyVars = body;
|
|
9238
9238
|
|
|
9239
9239
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
9240
9240
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -9494,7 +9494,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
9494
9494
|
const queryParamsAvailable = {};
|
|
9495
9495
|
const queryParams = {};
|
|
9496
9496
|
const pathVars = [topologyId];
|
|
9497
|
-
const bodyVars =
|
|
9497
|
+
const bodyVars = body;
|
|
9498
9498
|
|
|
9499
9499
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
9500
9500
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -9995,7 +9995,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
9995
9995
|
const queryParamsAvailable = {};
|
|
9996
9996
|
const queryParams = {};
|
|
9997
9997
|
const pathVars = [topologyId];
|
|
9998
|
-
const bodyVars =
|
|
9998
|
+
const bodyVars = body;
|
|
9999
9999
|
|
|
10000
10000
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
10001
10001
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -10072,7 +10072,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
10072
10072
|
const queryParamsAvailable = {};
|
|
10073
10073
|
const queryParams = {};
|
|
10074
10074
|
const pathVars = [];
|
|
10075
|
-
const bodyVars =
|
|
10075
|
+
const bodyVars = body;
|
|
10076
10076
|
|
|
10077
10077
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
10078
10078
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -10225,7 +10225,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
10225
10225
|
const queryParamsAvailable = {};
|
|
10226
10226
|
const queryParams = {};
|
|
10227
10227
|
const pathVars = [];
|
|
10228
|
-
const bodyVars =
|
|
10228
|
+
const bodyVars = body;
|
|
10229
10229
|
|
|
10230
10230
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
10231
10231
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -10548,7 +10548,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
10548
10548
|
const queryParamsAvailable = {};
|
|
10549
10549
|
const queryParams = {};
|
|
10550
10550
|
const pathVars = [];
|
|
10551
|
-
const bodyVars =
|
|
10551
|
+
const bodyVars = body;
|
|
10552
10552
|
|
|
10553
10553
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
10554
10554
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -10935,7 +10935,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
10935
10935
|
const queryParamsAvailable = {};
|
|
10936
10936
|
const queryParams = {};
|
|
10937
10937
|
const pathVars = [];
|
|
10938
|
-
const bodyVars =
|
|
10938
|
+
const bodyVars = body;
|
|
10939
10939
|
|
|
10940
10940
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
10941
10941
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -11012,7 +11012,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
11012
11012
|
const queryParamsAvailable = {};
|
|
11013
11013
|
const queryParams = {};
|
|
11014
11014
|
const pathVars = [];
|
|
11015
|
-
const bodyVars =
|
|
11015
|
+
const bodyVars = body;
|
|
11016
11016
|
|
|
11017
11017
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11018
11018
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -11089,7 +11089,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
11089
11089
|
const queryParamsAvailable = {};
|
|
11090
11090
|
const queryParams = {};
|
|
11091
11091
|
const pathVars = [];
|
|
11092
|
-
const bodyVars =
|
|
11092
|
+
const bodyVars = body;
|
|
11093
11093
|
|
|
11094
11094
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11095
11095
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -11407,7 +11407,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
11407
11407
|
const queryParamsAvailable = {};
|
|
11408
11408
|
const queryParams = {};
|
|
11409
11409
|
const pathVars = [];
|
|
11410
|
-
const bodyVars =
|
|
11410
|
+
const bodyVars = body;
|
|
11411
11411
|
|
|
11412
11412
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11413
11413
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -11484,7 +11484,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
11484
11484
|
const queryParamsAvailable = {};
|
|
11485
11485
|
const queryParams = {};
|
|
11486
11486
|
const pathVars = [];
|
|
11487
|
-
const bodyVars =
|
|
11487
|
+
const bodyVars = body;
|
|
11488
11488
|
|
|
11489
11489
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11490
11490
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -11713,7 +11713,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
11713
11713
|
const queryParamsAvailable = {};
|
|
11714
11714
|
const queryParams = {};
|
|
11715
11715
|
const pathVars = [];
|
|
11716
|
-
const bodyVars =
|
|
11716
|
+
const bodyVars = body;
|
|
11717
11717
|
|
|
11718
11718
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11719
11719
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -11878,7 +11878,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
11878
11878
|
const queryParamsAvailable = {};
|
|
11879
11879
|
const queryParams = {};
|
|
11880
11880
|
const pathVars = [transportControllerIndex];
|
|
11881
|
-
const bodyVars =
|
|
11881
|
+
const bodyVars = body;
|
|
11882
11882
|
|
|
11883
11883
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
11884
11884
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -12902,7 +12902,7 @@ class ParagonPathfinder extends AdapterBaseCl {
|
|
|
12902
12902
|
const queryParamsAvailable = {};
|
|
12903
12903
|
const queryParams = {};
|
|
12904
12904
|
const pathVars = [];
|
|
12905
|
-
const bodyVars =
|
|
12905
|
+
const bodyVars = body;
|
|
12906
12906
|
|
|
12907
12907
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
12908
12908
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -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;
|