@itentialopensource/adapter-dna_center 0.6.0 → 0.6.2
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/CHANGELOG.md +16 -0
- package/adapter.js +61 -17
- package/package.json +2 -2
- package/pronghorn.json +354 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +7 -7
- package/test/integration/adapterTestIntegration.js +27 -0
- package/test/unit/adapterTestUnit.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 0.6.2 [07-20-2023]
|
|
3
|
+
|
|
4
|
+
* Fix request array
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapters/controller-orchestrator/adapter-dna_center!13
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0.6.1 [04-12-2023]
|
|
11
|
+
|
|
12
|
+
* Cisco DNA Center Limit and Offset
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/controller-orchestrator/adapter-dna_center!12
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 0.6.0 [05-21-2022]
|
|
3
19
|
|
|
4
20
|
* Migration to the latest Adapter Foundation
|
package/adapter.js
CHANGED
|
@@ -3096,7 +3096,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3096
3096
|
const queryParamsAvailable = {};
|
|
3097
3097
|
const queryParams = {};
|
|
3098
3098
|
const pathVars = [];
|
|
3099
|
-
const bodyVars =
|
|
3099
|
+
const bodyVars = request;
|
|
3100
3100
|
|
|
3101
3101
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3102
3102
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3176,7 +3176,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3176
3176
|
const queryParamsAvailable = {};
|
|
3177
3177
|
const queryParams = {};
|
|
3178
3178
|
const pathVars = [];
|
|
3179
|
-
const bodyVars =
|
|
3179
|
+
const bodyVars = request;
|
|
3180
3180
|
|
|
3181
3181
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3182
3182
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3256,7 +3256,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3256
3256
|
const queryParamsAvailable = {};
|
|
3257
3257
|
const queryParams = {};
|
|
3258
3258
|
const pathVars = [];
|
|
3259
|
-
const bodyVars =
|
|
3259
|
+
const bodyVars = request;
|
|
3260
3260
|
|
|
3261
3261
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3262
3262
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3336,7 +3336,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3336
3336
|
const queryParamsAvailable = {};
|
|
3337
3337
|
const queryParams = {};
|
|
3338
3338
|
const pathVars = [];
|
|
3339
|
-
const bodyVars =
|
|
3339
|
+
const bodyVars = request;
|
|
3340
3340
|
|
|
3341
3341
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3342
3342
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3709,7 +3709,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
3709
3709
|
const queryParamsAvailable = {};
|
|
3710
3710
|
const queryParams = {};
|
|
3711
3711
|
const pathVars = [];
|
|
3712
|
-
const bodyVars =
|
|
3712
|
+
const bodyVars = request;
|
|
3713
3713
|
|
|
3714
3714
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3715
3715
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4148,7 +4148,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4148
4148
|
const queryParamsAvailable = {};
|
|
4149
4149
|
const queryParams = {};
|
|
4150
4150
|
const pathVars = [];
|
|
4151
|
-
const bodyVars =
|
|
4151
|
+
const bodyVars = request;
|
|
4152
4152
|
|
|
4153
4153
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4154
4154
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4229,7 +4229,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4229
4229
|
const queryParamsAvailable = {};
|
|
4230
4230
|
const queryParams = {};
|
|
4231
4231
|
const pathVars = [];
|
|
4232
|
-
const bodyVars =
|
|
4232
|
+
const bodyVars = request;
|
|
4233
4233
|
|
|
4234
4234
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4235
4235
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4783,7 +4783,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4783
4783
|
const queryParamsAvailable = {};
|
|
4784
4784
|
const queryParams = {};
|
|
4785
4785
|
const pathVars = [];
|
|
4786
|
-
const bodyVars =
|
|
4786
|
+
const bodyVars = request;
|
|
4787
4787
|
|
|
4788
4788
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4789
4789
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -4863,7 +4863,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
4863
4863
|
const queryParamsAvailable = {};
|
|
4864
4864
|
const queryParams = {};
|
|
4865
4865
|
const pathVars = [];
|
|
4866
|
-
const bodyVars =
|
|
4866
|
+
const bodyVars = request;
|
|
4867
4867
|
|
|
4868
4868
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
4869
4869
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -7800,7 +7800,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7800
7800
|
const queryParamsAvailable = {};
|
|
7801
7801
|
const queryParams = {};
|
|
7802
7802
|
const pathVars = [];
|
|
7803
|
-
const bodyVars =
|
|
7803
|
+
const bodyVars = request;
|
|
7804
7804
|
|
|
7805
7805
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
7806
7806
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -7883,7 +7883,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7883
7883
|
const queryParamsAvailable = { scheduleAt, scheduleDesc, scheduleOrigin };
|
|
7884
7884
|
const queryParams = {};
|
|
7885
7885
|
const pathVars = [];
|
|
7886
|
-
const bodyVars =
|
|
7886
|
+
const bodyVars = request;
|
|
7887
7887
|
|
|
7888
7888
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
7889
7889
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -7966,7 +7966,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
7966
7966
|
const queryParamsAvailable = { scheduleValidate };
|
|
7967
7967
|
const queryParams = {};
|
|
7968
7968
|
const pathVars = [];
|
|
7969
|
-
const bodyVars =
|
|
7969
|
+
const bodyVars = request;
|
|
7970
7970
|
|
|
7971
7971
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
7972
7972
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -8123,7 +8123,51 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8123
8123
|
*/
|
|
8124
8124
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
8125
8125
|
getDnaintentapiv1networkDevice(hostname, managementIpAddress, macAddress, locationName, serialNumber, location, family, type, series, collectionStatus, collectionInterval, notSyncedForMinutes, errorCode, errorDescription, softwareVersion, softwareType, platformId, role, reachabilityStatus, upTime, associatedWlcIp, licensename, licensetype, licensestatus, modulename, moduleequpimenttype, moduleservicestate, modulevendorequipmenttype, modulepartnumber, moduleoperationstatecode, id, callback) {
|
|
8126
|
-
|
|
8126
|
+
this.getDnaintentapiv1networkDeviceWithOptions(hostname, managementIpAddress, macAddress, locationName, serialNumber, location, family, type, series, collectionStatus, collectionInterval, notSyncedForMinutes, errorCode, errorDescription, softwareVersion, softwareType, platformId, role, reachabilityStatus, upTime, associatedWlcIp, licensename, licensetype, licensestatus, modulename, moduleequpimenttype, moduleservicestate, modulevendorequipmenttype, modulepartnumber, moduleoperationstatecode, id, null, null, callback);
|
|
8127
|
+
}
|
|
8128
|
+
|
|
8129
|
+
/**
|
|
8130
|
+
* @summary Get Device list
|
|
8131
|
+
*
|
|
8132
|
+
* @function getDnaintentapiv1networkDeviceWithOptions
|
|
8133
|
+
* @param {array} hostname - hostname
|
|
8134
|
+
* @param {array} managementIpAddress - managementIpAddress
|
|
8135
|
+
* @param {array} macAddress - macAddress
|
|
8136
|
+
* @param {array} locationName - locationName
|
|
8137
|
+
* @param {array} serialNumber - serialNumber
|
|
8138
|
+
* @param {array} location - location
|
|
8139
|
+
* @param {array} family - family
|
|
8140
|
+
* @param {array} type - type
|
|
8141
|
+
* @param {array} series - series
|
|
8142
|
+
* @param {array} collectionStatus - collectionStatus
|
|
8143
|
+
* @param {array} collectionInterval - collectionInterval
|
|
8144
|
+
* @param {array} notSyncedForMinutes - notSyncedForMinutes
|
|
8145
|
+
* @param {array} errorCode - errorCode
|
|
8146
|
+
* @param {array} errorDescription - errorDescription
|
|
8147
|
+
* @param {array} softwareVersion - softwareVersion
|
|
8148
|
+
* @param {array} softwareType - softwareType
|
|
8149
|
+
* @param {array} platformId - platformId
|
|
8150
|
+
* @param {array} role - role
|
|
8151
|
+
* @param {array} reachabilityStatus - reachabilityStatus
|
|
8152
|
+
* @param {array} upTime - upTime
|
|
8153
|
+
* @param {array} associatedWlcIp - associatedWlcIp
|
|
8154
|
+
* @param {array} licensename - licenseName
|
|
8155
|
+
* @param {array} licensetype - licenseType
|
|
8156
|
+
* @param {array} licensestatus - licenseStatus
|
|
8157
|
+
* @param {array} modulename - moduleName
|
|
8158
|
+
* @param {array} moduleequpimenttype - moduleEqupimentType
|
|
8159
|
+
* @param {array} moduleservicestate - moduleServiceState
|
|
8160
|
+
* @param {array} modulevendorequipmenttype - moduleVendorEquipmentType
|
|
8161
|
+
* @param {array} modulepartnumber - modulePartNumber
|
|
8162
|
+
* @param {array} moduleoperationstatecode - moduleOperationStateCode
|
|
8163
|
+
* @param {string} id - Accepts comma separated id's and return list of network-devices for the given id's. If invalid or not-found id's are provided, null entry will be returned in the list.
|
|
8164
|
+
* @param {number} offset - offset. Greater than or equal to 1
|
|
8165
|
+
* @param {number} limit - limit. max. no. of devices to be returned. 1 <= limit <= 500
|
|
8166
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
8167
|
+
*/
|
|
8168
|
+
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
8169
|
+
getDnaintentapiv1networkDeviceWithOptions(hostname, managementIpAddress, macAddress, locationName, serialNumber, location, family, type, series, collectionStatus, collectionInterval, notSyncedForMinutes, errorCode, errorDescription, softwareVersion, softwareType, platformId, role, reachabilityStatus, upTime, associatedWlcIp, licensename, licensetype, licensestatus, modulename, moduleequpimenttype, moduleservicestate, modulevendorequipmenttype, modulepartnumber, moduleoperationstatecode, id, offset, limit, callback) {
|
|
8170
|
+
const meth = 'adapter-getDnaintentapiv1networkDeviceWithOptions';
|
|
8127
8171
|
const origin = `${this.id}-${meth}`;
|
|
8128
8172
|
log.trace(origin);
|
|
8129
8173
|
|
|
@@ -8136,7 +8180,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8136
8180
|
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
8137
8181
|
|
|
8138
8182
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8139
|
-
const queryParamsAvailable = { hostname, managementIpAddress, macAddress, locationName, serialNumber, location, family, type, series, collectionStatus, collectionInterval, notSyncedForMinutes, errorCode, errorDescription, softwareVersion, softwareType, platformId, role, reachabilityStatus, upTime, associatedWlcIp, licensename, licensetype, licensestatus, modulename, moduleequpimenttype, moduleservicestate, modulevendorequipmenttype, modulepartnumber, moduleoperationstatecode, id };
|
|
8183
|
+
const queryParamsAvailable = { hostname, managementIpAddress, macAddress, locationName, serialNumber, location, family, type, series, collectionStatus, collectionInterval, notSyncedForMinutes, errorCode, errorDescription, softwareVersion, softwareType, platformId, role, reachabilityStatus, upTime, associatedWlcIp, licensename, licensetype, licensestatus, modulename, moduleequpimenttype, moduleservicestate, modulevendorequipmenttype, modulepartnumber, moduleoperationstatecode, id, offset, limit };
|
|
8140
8184
|
const queryParams = {};
|
|
8141
8185
|
const pathVars = [];
|
|
8142
8186
|
const bodyVars = {};
|
|
@@ -8792,7 +8836,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
8792
8836
|
const queryParamsAvailable = { forceSync };
|
|
8793
8837
|
const queryParams = {};
|
|
8794
8838
|
const pathVars = [];
|
|
8795
|
-
const bodyVars =
|
|
8839
|
+
const bodyVars = request;
|
|
8796
8840
|
|
|
8797
8841
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
8798
8842
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -13576,7 +13620,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
13576
13620
|
const queryParamsAvailable = {};
|
|
13577
13621
|
const queryParams = {};
|
|
13578
13622
|
const pathVars = [sdaborderdevice, deviceipaddress];
|
|
13579
|
-
const bodyVars =
|
|
13623
|
+
const bodyVars = request;
|
|
13580
13624
|
|
|
13581
13625
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
13582
13626
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -13658,7 +13702,7 @@ class DnaCenter extends AdapterBaseCl {
|
|
|
13658
13702
|
const queryParamsAvailable = {};
|
|
13659
13703
|
const queryParams = {};
|
|
13660
13704
|
const pathVars = [sdaborderdevice];
|
|
13661
|
-
const bodyVars =
|
|
13705
|
+
const bodyVars = request;
|
|
13662
13706
|
|
|
13663
13707
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
13664
13708
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-dna_center",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "This adapter integrates with system Dna_center",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Cisco DNA Center",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"author": "Itential",
|
|
55
55
|
"homepage": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-dna_center#readme",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@itentialopensource/adapter-utils": "^4.
|
|
57
|
+
"@itentialopensource/adapter-utils": "^4.48.13",
|
|
58
58
|
"ajv": "^6.12.0",
|
|
59
59
|
"axios": "^0.21.0",
|
|
60
60
|
"commander": "^2.20.0",
|
package/pronghorn.json
CHANGED
|
@@ -5834,6 +5834,360 @@
|
|
|
5834
5834
|
},
|
|
5835
5835
|
"task": true
|
|
5836
5836
|
},
|
|
5837
|
+
{
|
|
5838
|
+
"name": "getDnaintentapiv1networkDeviceWithOptions",
|
|
5839
|
+
"summary": "Get Device list",
|
|
5840
|
+
"description": "Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request:\nGET fqdnoripofdnacenterplatform/dna/intent/api/v1/network-device? hostname=myhost* & managementIpAddress=192.25.18.*\nFor a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation.\n\nNote: If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters.",
|
|
5841
|
+
"input": [
|
|
5842
|
+
{
|
|
5843
|
+
"name": "hostname",
|
|
5844
|
+
"type": "array",
|
|
5845
|
+
"info": "hostname",
|
|
5846
|
+
"required": false,
|
|
5847
|
+
"schema": {
|
|
5848
|
+
"title": "hostname",
|
|
5849
|
+
"type": "array"
|
|
5850
|
+
}
|
|
5851
|
+
},
|
|
5852
|
+
{
|
|
5853
|
+
"name": "managementIpAddress",
|
|
5854
|
+
"type": "array",
|
|
5855
|
+
"info": "managementIpAddress",
|
|
5856
|
+
"required": false,
|
|
5857
|
+
"schema": {
|
|
5858
|
+
"title": "managementIpAddress",
|
|
5859
|
+
"type": "array"
|
|
5860
|
+
}
|
|
5861
|
+
},
|
|
5862
|
+
{
|
|
5863
|
+
"name": "macAddress",
|
|
5864
|
+
"type": "array",
|
|
5865
|
+
"info": "macAddress",
|
|
5866
|
+
"required": false,
|
|
5867
|
+
"schema": {
|
|
5868
|
+
"title": "macAddress",
|
|
5869
|
+
"type": "array"
|
|
5870
|
+
}
|
|
5871
|
+
},
|
|
5872
|
+
{
|
|
5873
|
+
"name": "locationName",
|
|
5874
|
+
"type": "array",
|
|
5875
|
+
"info": "locationName",
|
|
5876
|
+
"required": false,
|
|
5877
|
+
"schema": {
|
|
5878
|
+
"title": "locationName",
|
|
5879
|
+
"type": "array"
|
|
5880
|
+
}
|
|
5881
|
+
},
|
|
5882
|
+
{
|
|
5883
|
+
"name": "serialNumber",
|
|
5884
|
+
"type": "array",
|
|
5885
|
+
"info": "serialNumber",
|
|
5886
|
+
"required": false,
|
|
5887
|
+
"schema": {
|
|
5888
|
+
"title": "serialNumber",
|
|
5889
|
+
"type": "array"
|
|
5890
|
+
}
|
|
5891
|
+
},
|
|
5892
|
+
{
|
|
5893
|
+
"name": "location",
|
|
5894
|
+
"type": "array",
|
|
5895
|
+
"info": "location",
|
|
5896
|
+
"required": false,
|
|
5897
|
+
"schema": {
|
|
5898
|
+
"title": "location",
|
|
5899
|
+
"type": "array"
|
|
5900
|
+
}
|
|
5901
|
+
},
|
|
5902
|
+
{
|
|
5903
|
+
"name": "family",
|
|
5904
|
+
"type": "array",
|
|
5905
|
+
"info": "family",
|
|
5906
|
+
"required": false,
|
|
5907
|
+
"schema": {
|
|
5908
|
+
"title": "family",
|
|
5909
|
+
"type": "array"
|
|
5910
|
+
}
|
|
5911
|
+
},
|
|
5912
|
+
{
|
|
5913
|
+
"name": "type",
|
|
5914
|
+
"type": "array",
|
|
5915
|
+
"info": "type",
|
|
5916
|
+
"required": false,
|
|
5917
|
+
"schema": {
|
|
5918
|
+
"title": "type",
|
|
5919
|
+
"type": "array"
|
|
5920
|
+
}
|
|
5921
|
+
},
|
|
5922
|
+
{
|
|
5923
|
+
"name": "series",
|
|
5924
|
+
"type": "array",
|
|
5925
|
+
"info": "series",
|
|
5926
|
+
"required": false,
|
|
5927
|
+
"schema": {
|
|
5928
|
+
"title": "series",
|
|
5929
|
+
"type": "array"
|
|
5930
|
+
}
|
|
5931
|
+
},
|
|
5932
|
+
{
|
|
5933
|
+
"name": "collectionStatus",
|
|
5934
|
+
"type": "array",
|
|
5935
|
+
"info": "collectionStatus",
|
|
5936
|
+
"required": false,
|
|
5937
|
+
"schema": {
|
|
5938
|
+
"title": "collectionStatus",
|
|
5939
|
+
"type": "array"
|
|
5940
|
+
}
|
|
5941
|
+
},
|
|
5942
|
+
{
|
|
5943
|
+
"name": "collectionInterval",
|
|
5944
|
+
"type": "array",
|
|
5945
|
+
"info": "collectionInterval",
|
|
5946
|
+
"required": false,
|
|
5947
|
+
"schema": {
|
|
5948
|
+
"title": "collectionInterval",
|
|
5949
|
+
"type": "array"
|
|
5950
|
+
}
|
|
5951
|
+
},
|
|
5952
|
+
{
|
|
5953
|
+
"name": "notSyncedForMinutes",
|
|
5954
|
+
"type": "array",
|
|
5955
|
+
"info": "notSyncedForMinutes",
|
|
5956
|
+
"required": false,
|
|
5957
|
+
"schema": {
|
|
5958
|
+
"title": "notSyncedForMinutes",
|
|
5959
|
+
"type": "array"
|
|
5960
|
+
}
|
|
5961
|
+
},
|
|
5962
|
+
{
|
|
5963
|
+
"name": "errorCode",
|
|
5964
|
+
"type": "array",
|
|
5965
|
+
"info": "errorCode",
|
|
5966
|
+
"required": false,
|
|
5967
|
+
"schema": {
|
|
5968
|
+
"title": "errorCode",
|
|
5969
|
+
"type": "array"
|
|
5970
|
+
}
|
|
5971
|
+
},
|
|
5972
|
+
{
|
|
5973
|
+
"name": "errorDescription",
|
|
5974
|
+
"type": "array",
|
|
5975
|
+
"info": "errorDescription",
|
|
5976
|
+
"required": false,
|
|
5977
|
+
"schema": {
|
|
5978
|
+
"title": "errorDescription",
|
|
5979
|
+
"type": "array"
|
|
5980
|
+
}
|
|
5981
|
+
},
|
|
5982
|
+
{
|
|
5983
|
+
"name": "softwareVersion",
|
|
5984
|
+
"type": "array",
|
|
5985
|
+
"info": "softwareVersion",
|
|
5986
|
+
"required": false,
|
|
5987
|
+
"schema": {
|
|
5988
|
+
"title": "softwareVersion",
|
|
5989
|
+
"type": "array"
|
|
5990
|
+
}
|
|
5991
|
+
},
|
|
5992
|
+
{
|
|
5993
|
+
"name": "softwareType",
|
|
5994
|
+
"type": "array",
|
|
5995
|
+
"info": "softwareType",
|
|
5996
|
+
"required": false,
|
|
5997
|
+
"schema": {
|
|
5998
|
+
"title": "softwareType",
|
|
5999
|
+
"type": "array"
|
|
6000
|
+
}
|
|
6001
|
+
},
|
|
6002
|
+
{
|
|
6003
|
+
"name": "platformId",
|
|
6004
|
+
"type": "array",
|
|
6005
|
+
"info": "platformId",
|
|
6006
|
+
"required": false,
|
|
6007
|
+
"schema": {
|
|
6008
|
+
"title": "platformId",
|
|
6009
|
+
"type": "array"
|
|
6010
|
+
}
|
|
6011
|
+
},
|
|
6012
|
+
{
|
|
6013
|
+
"name": "role",
|
|
6014
|
+
"type": "array",
|
|
6015
|
+
"info": "role",
|
|
6016
|
+
"required": false,
|
|
6017
|
+
"schema": {
|
|
6018
|
+
"title": "role",
|
|
6019
|
+
"type": "array"
|
|
6020
|
+
}
|
|
6021
|
+
},
|
|
6022
|
+
{
|
|
6023
|
+
"name": "reachabilityStatus",
|
|
6024
|
+
"type": "array",
|
|
6025
|
+
"info": "reachabilityStatus",
|
|
6026
|
+
"required": false,
|
|
6027
|
+
"schema": {
|
|
6028
|
+
"title": "reachabilityStatus",
|
|
6029
|
+
"type": "array"
|
|
6030
|
+
}
|
|
6031
|
+
},
|
|
6032
|
+
{
|
|
6033
|
+
"name": "upTime",
|
|
6034
|
+
"type": "array",
|
|
6035
|
+
"info": "upTime",
|
|
6036
|
+
"required": false,
|
|
6037
|
+
"schema": {
|
|
6038
|
+
"title": "upTime",
|
|
6039
|
+
"type": "array"
|
|
6040
|
+
}
|
|
6041
|
+
},
|
|
6042
|
+
{
|
|
6043
|
+
"name": "associatedWlcIp",
|
|
6044
|
+
"type": "array",
|
|
6045
|
+
"info": "associatedWlcIp",
|
|
6046
|
+
"required": false,
|
|
6047
|
+
"schema": {
|
|
6048
|
+
"title": "associatedWlcIp",
|
|
6049
|
+
"type": "array"
|
|
6050
|
+
}
|
|
6051
|
+
},
|
|
6052
|
+
{
|
|
6053
|
+
"name": "licensename",
|
|
6054
|
+
"type": "array",
|
|
6055
|
+
"info": "licenseName",
|
|
6056
|
+
"required": false,
|
|
6057
|
+
"schema": {
|
|
6058
|
+
"title": "licensename",
|
|
6059
|
+
"type": "array"
|
|
6060
|
+
}
|
|
6061
|
+
},
|
|
6062
|
+
{
|
|
6063
|
+
"name": "licensetype",
|
|
6064
|
+
"type": "array",
|
|
6065
|
+
"info": "licenseType",
|
|
6066
|
+
"required": false,
|
|
6067
|
+
"schema": {
|
|
6068
|
+
"title": "licensetype",
|
|
6069
|
+
"type": "array"
|
|
6070
|
+
}
|
|
6071
|
+
},
|
|
6072
|
+
{
|
|
6073
|
+
"name": "licensestatus",
|
|
6074
|
+
"type": "array",
|
|
6075
|
+
"info": "licenseStatus",
|
|
6076
|
+
"required": false,
|
|
6077
|
+
"schema": {
|
|
6078
|
+
"title": "licensestatus",
|
|
6079
|
+
"type": "array"
|
|
6080
|
+
}
|
|
6081
|
+
},
|
|
6082
|
+
{
|
|
6083
|
+
"name": "modulename",
|
|
6084
|
+
"type": "array",
|
|
6085
|
+
"info": "moduleName",
|
|
6086
|
+
"required": false,
|
|
6087
|
+
"schema": {
|
|
6088
|
+
"title": "modulename",
|
|
6089
|
+
"type": "array"
|
|
6090
|
+
}
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
"name": "moduleequpimenttype",
|
|
6094
|
+
"type": "array",
|
|
6095
|
+
"info": "moduleEqupimentType",
|
|
6096
|
+
"required": false,
|
|
6097
|
+
"schema": {
|
|
6098
|
+
"title": "moduleequpimenttype",
|
|
6099
|
+
"type": "array"
|
|
6100
|
+
}
|
|
6101
|
+
},
|
|
6102
|
+
{
|
|
6103
|
+
"name": "moduleservicestate",
|
|
6104
|
+
"type": "array",
|
|
6105
|
+
"info": "moduleServiceState",
|
|
6106
|
+
"required": false,
|
|
6107
|
+
"schema": {
|
|
6108
|
+
"title": "moduleservicestate",
|
|
6109
|
+
"type": "array"
|
|
6110
|
+
}
|
|
6111
|
+
},
|
|
6112
|
+
{
|
|
6113
|
+
"name": "modulevendorequipmenttype",
|
|
6114
|
+
"type": "array",
|
|
6115
|
+
"info": "moduleVendorEquipmentType",
|
|
6116
|
+
"required": false,
|
|
6117
|
+
"schema": {
|
|
6118
|
+
"title": "modulevendorequipmenttype",
|
|
6119
|
+
"type": "array"
|
|
6120
|
+
}
|
|
6121
|
+
},
|
|
6122
|
+
{
|
|
6123
|
+
"name": "modulepartnumber",
|
|
6124
|
+
"type": "array",
|
|
6125
|
+
"info": "modulePartNumber",
|
|
6126
|
+
"required": false,
|
|
6127
|
+
"schema": {
|
|
6128
|
+
"title": "modulepartnumber",
|
|
6129
|
+
"type": "array"
|
|
6130
|
+
}
|
|
6131
|
+
},
|
|
6132
|
+
{
|
|
6133
|
+
"name": "moduleoperationstatecode",
|
|
6134
|
+
"type": "array",
|
|
6135
|
+
"info": "moduleOperationStateCode",
|
|
6136
|
+
"required": false,
|
|
6137
|
+
"schema": {
|
|
6138
|
+
"title": "moduleoperationstatecode",
|
|
6139
|
+
"type": "array"
|
|
6140
|
+
}
|
|
6141
|
+
},
|
|
6142
|
+
{
|
|
6143
|
+
"name": "id",
|
|
6144
|
+
"type": "string",
|
|
6145
|
+
"info": "Accepts comma separated id's and return list of network-devices for the given id's. If invalid or not-found id's are provided, null entry will be returned in the list.",
|
|
6146
|
+
"required": false,
|
|
6147
|
+
"schema": {
|
|
6148
|
+
"title": "id",
|
|
6149
|
+
"type": "string"
|
|
6150
|
+
}
|
|
6151
|
+
},
|
|
6152
|
+
{
|
|
6153
|
+
"name": "offset",
|
|
6154
|
+
"type": "number",
|
|
6155
|
+
"info": "offset. offset >= 1",
|
|
6156
|
+
"required": false,
|
|
6157
|
+
"schema": {
|
|
6158
|
+
"title": "offset",
|
|
6159
|
+
"type": "number"
|
|
6160
|
+
}
|
|
6161
|
+
},
|
|
6162
|
+
{
|
|
6163
|
+
"name": "limit",
|
|
6164
|
+
"type": "number",
|
|
6165
|
+
"info": "max. no. of devices to be returned. 1 <= limit <= 500",
|
|
6166
|
+
"required": false,
|
|
6167
|
+
"schema": {
|
|
6168
|
+
"title": "limit",
|
|
6169
|
+
"type": "number"
|
|
6170
|
+
}
|
|
6171
|
+
}
|
|
6172
|
+
],
|
|
6173
|
+
"output": {
|
|
6174
|
+
"name": "result",
|
|
6175
|
+
"type": "object",
|
|
6176
|
+
"description": "A JSON Object containing status, code and the result",
|
|
6177
|
+
"schema": {
|
|
6178
|
+
"title": "result",
|
|
6179
|
+
"type": "object"
|
|
6180
|
+
}
|
|
6181
|
+
},
|
|
6182
|
+
"roles": [
|
|
6183
|
+
"admin"
|
|
6184
|
+
],
|
|
6185
|
+
"route": {
|
|
6186
|
+
"verb": "POST",
|
|
6187
|
+
"path": "/getDnaintentapiv1networkDevice"
|
|
6188
|
+
},
|
|
6189
|
+
"task": true
|
|
6190
|
+
},
|
|
5837
6191
|
{
|
|
5838
6192
|
"name": "postDnaintentapiv1networkDevice",
|
|
5839
6193
|
"summary": "Add Device",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.6.0",
|
|
3
|
+
"configLines": 11211,
|
|
4
4
|
"scriptLines": 1707,
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
9
|
-
"wfTasks":
|
|
5
|
+
"codeLines": 15534,
|
|
6
|
+
"testLines": 13711,
|
|
7
|
+
"testCases": 690,
|
|
8
|
+
"totalCodeLines": 30952,
|
|
9
|
+
"wfTasks": 188
|
|
10
10
|
}
|
|
@@ -3284,6 +3284,33 @@ describe('[integration] Dna_center Adapter Test', () => {
|
|
|
3284
3284
|
}).timeout(attemptTimeout);
|
|
3285
3285
|
});
|
|
3286
3286
|
|
|
3287
|
+
describe('#getDnaintentapiv1networkDeviceWithOptions - errors', () => {
|
|
3288
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
3289
|
+
try {
|
|
3290
|
+
a.getDnaintentapiv1networkDeviceWithOptions(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
3291
|
+
try {
|
|
3292
|
+
runCommonAsserts(data, error);
|
|
3293
|
+
|
|
3294
|
+
if (stub) {
|
|
3295
|
+
assert.equal(true, Array.isArray(data.response.response));
|
|
3296
|
+
assert.equal('string', data.response.version);
|
|
3297
|
+
} else {
|
|
3298
|
+
runCommonAsserts(data, error);
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
done();
|
|
3302
|
+
} catch (err) {
|
|
3303
|
+
log.error(`Test Failure: ${err}`);
|
|
3304
|
+
done(err);
|
|
3305
|
+
}
|
|
3306
|
+
});
|
|
3307
|
+
} catch (error) {
|
|
3308
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3309
|
+
done(error);
|
|
3310
|
+
}
|
|
3311
|
+
}).timeout(attemptTimeout);
|
|
3312
|
+
});
|
|
3313
|
+
|
|
3287
3314
|
// describe('#postDnaintentapiv1networkDevice - errors', () => {
|
|
3288
3315
|
// it('should work if integrated or standalone with mockdata', (done) => {
|
|
3289
3316
|
// try {
|
|
@@ -4765,6 +4765,18 @@ describe('[unit] Dna_center Adapter Test', () => {
|
|
|
4765
4765
|
}).timeout(attemptTimeout);
|
|
4766
4766
|
});
|
|
4767
4767
|
|
|
4768
|
+
describe('#getDnaintentapiv1networkDeviceWithOptions - errors', () => {
|
|
4769
|
+
it('should have a getDnaintentapiv1networkDeviceWithOptions function', (done) => {
|
|
4770
|
+
try {
|
|
4771
|
+
assert.equal(true, typeof a.getDnaintentapiv1networkDeviceWithOptions === 'function');
|
|
4772
|
+
done();
|
|
4773
|
+
} catch (error) {
|
|
4774
|
+
log.error(`Test Failure: ${error}`);
|
|
4775
|
+
done(error);
|
|
4776
|
+
}
|
|
4777
|
+
}).timeout(attemptTimeout);
|
|
4778
|
+
});
|
|
4779
|
+
|
|
4768
4780
|
describe('#postDnaintentapiv1networkDevice - errors', () => {
|
|
4769
4781
|
it('should have a postDnaintentapiv1networkDevice function', (done) => {
|
|
4770
4782
|
try {
|