@itentialopensource/adapter-nokia_nsp_device_configurator 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/adapter.js CHANGED
@@ -2526,23 +2526,24 @@ class NokiaNspDeviceConfigurator extends AdapterBaseCl {
2526
2526
  }
2527
2527
 
2528
2528
  /**
2529
- * @function fieldquerytoretrieveasinglechildnodeunderthetargetresource
2529
+ * @function fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource
2530
2530
  * @pronghornType method
2531
- * @name fieldquerytoretrieveasinglechildnodeunderthetargetresource
2531
+ * @name fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource
2532
2532
  * @summary Field query to retrieve a single child node under the target resource
2533
2533
  *
2534
- * @param {string} neType - neType param
2535
- * @param {string} neVersion - neVersion param
2534
+ * @param {string} fields - fields param
2535
+ * @param {string} neId - neId (network device) param
2536
+ * @param {string} port - port param
2536
2537
  * @param {getCallback} callback - a callback function to return the result
2537
2538
  * @return {object} results - An object containing the response of the action
2538
2539
  *
2539
- * @route {POST} /fieldquerytoretrieveasinglechildnodeunderthetargetresource
2540
+ * @route {POST} /fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource
2540
2541
  * @roles admin
2541
2542
  * @task true
2542
2543
  */
2543
2544
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
2544
- fieldquerytoretrieveasinglechildnodeunderthetargetresource(neType, neVersion, callback) {
2545
- const meth = 'adapter-fieldquerytoretrieveasinglechildnodeunderthetargetresource';
2545
+ fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource(fields, neId, port, callback) {
2546
+ const meth = 'adapter-fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource';
2546
2547
  const origin = `${this.id}-${meth}`;
2547
2548
  log.trace(origin);
2548
2549
 
@@ -2553,21 +2554,26 @@ class NokiaNspDeviceConfigurator extends AdapterBaseCl {
2553
2554
  }
2554
2555
 
2555
2556
  /* HERE IS WHERE YOU VALIDATE DATA */
2556
- if (neType === undefined || neType === null || neType === '') {
2557
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['neType'], null, null, null);
2557
+ if (fields === undefined || fields === null || fields === '') {
2558
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['fields'], null, null, null);
2559
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2560
+ return callback(null, errorObj);
2561
+ }
2562
+ if (neId === undefined || neId === null || neId === '') {
2563
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['neId'], null, null, null);
2558
2564
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2559
2565
  return callback(null, errorObj);
2560
2566
  }
2561
- if (neVersion === undefined || neVersion === null || neVersion === '') {
2562
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['neVersion'], null, null, null);
2567
+ if (port === undefined || port === null || port === '') {
2568
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['port'], null, null, null);
2563
2569
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2564
2570
  return callback(null, errorObj);
2565
2571
  }
2566
2572
 
2567
2573
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2568
- const queryParamsAvailable = {};
2574
+ const queryParamsAvailable = { fields };
2569
2575
  const queryParams = {};
2570
- const pathVars = [`neType=${neType}`, `neVersion=${neVersion}`];
2576
+ const pathVars = [`network-device=${neId}`, `port=${port}`];
2571
2577
  const bodyVars = {};
2572
2578
 
2573
2579
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2606,7 +2612,7 @@ class NokiaNspDeviceConfigurator extends AdapterBaseCl {
2606
2612
  try {
2607
2613
  // Make the call -
2608
2614
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2609
- return this.requestHandlerInst.identifyRequest('Search', 'fieldquerytoretrieveasinglechildnodeunderthetargetresource', reqObj, true, (irReturnData, irReturnError) => {
2615
+ return this.requestHandlerInst.identifyRequest('Search', 'fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource', reqObj, true, (irReturnData, irReturnError) => {
2610
2616
  // if we received an error or their is no response on the results
2611
2617
  // return an error
2612
2618
  if (irReturnError) {
@@ -2614,7 +2620,7 @@ class NokiaNspDeviceConfigurator extends AdapterBaseCl {
2614
2620
  return callback(null, irReturnError);
2615
2621
  }
2616
2622
  if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
2617
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['fieldquerytoretrieveasinglechildnodeunderthetargetresource'], null, null, null);
2623
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource'], null, null, null);
2618
2624
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2619
2625
  return callback(null, errorObj);
2620
2626
  }
@@ -43,10 +43,10 @@
43
43
  ]
44
44
  },
45
45
  {
46
- "name": "fieldquerytoretrieveasinglechildnodeunderthetargetresource",
46
+ "name": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
47
47
  "protocol": "REST",
48
48
  "method": "GET",
49
- "entitypath": "{base_path}/{version}/restconf/meta/api/v1/model/schema/{pathv1}/{pathv2}/nokia-conf:/configure/filter?{query}",
49
+ "entitypath": "{base_path}/{version}/restconf/data/network-device-mgr:network-devices/{pathv1}/root/nokia-conf:/configure/{pathv2}?{query}",
50
50
  "requestSchema": "schema.json",
51
51
  "responseSchema": "schema.json",
52
52
  "timeout": 0,
@@ -12,7 +12,7 @@
12
12
  "enum": [
13
13
  "fieldquerytoselectmultiplefieldsunderthetargetresource",
14
14
  "fieldquerywithsubSelectorsofanodeunderthetargetresource",
15
- "fieldquerytoretrieveasinglechildnodeunderthetargetresource"
15
+ "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource"
16
16
  ],
17
17
  "external_name": "ph_request_type"
18
18
  }
package/metadata.json CHANGED
@@ -35,20 +35,47 @@
35
35
  "isDeprecated": false
36
36
  },
37
37
  "brokerSince": "",
38
+ "authMethods": [
39
+ {
40
+ "type": "OAuth",
41
+ "subtypes": [],
42
+ "primary": true
43
+ }
44
+ ],
38
45
  "documentation": {
39
46
  "storeLink": "",
40
47
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-nokia_nsp_device_configurator",
41
- "repoLink": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-nokia_nsp_device_configurator",
48
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-nokia_nsp_device_configurator",
42
49
  "docLink": "",
43
- "demoLinks": [],
44
- "trainingLinks": [],
50
+ "demoLinks": [
51
+ {
52
+ "title": "Itential SD-WAN Network Automation Solution",
53
+ "link": "https://www.itential.com/industries/communications-service-providers/sdwan-network-automation/"
54
+ },
55
+ {
56
+ "title": "Multi-Vendor SD-WAN",
57
+ "link": "https://www.itential.com/solutions/sdwan-automation-orchestration/"
58
+ }
59
+ ],
60
+ "trainingLinks": [
61
+ {
62
+ "title": "Itential Academy",
63
+ "link": "https://www.itential.com/itential-academy/"
64
+ }
65
+ ],
45
66
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
46
67
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
47
68
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
48
- "webLink": "",
49
- "vendorLink": "",
50
- "productLink": "",
51
- "apiLinks": []
69
+ "webLink": "https://www.itential.com/adapters/nokia-nsp-device-configurator/",
70
+ "vendorLink": "https://www.nokia.com/",
71
+ "productLink": "https://www.nokia.com/networks/ip-networks/network-services-platform/",
72
+ "apiLinks": [
73
+ {
74
+ "title": "Nokia NSP API",
75
+ "link": "https://documentation.nokia.com/cgi-bin/dbaccessfilename.cgi/3HE12075AAAATQZZA01_V1_NSP%2017.3%20API%20Programmer%20Guide.pdf",
76
+ "public": true
77
+ }
78
+ ]
52
79
  },
53
80
  "assets": [],
54
81
  "relatedItems": {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-nokia_nsp_device_configurator",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "This adapter integrates with system described as: 22.11Modeled-deviceConfiguratorRestconfApis.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.14",
7
+ "engineVersion": "1.67.19",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -15,7 +15,6 @@
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
16
16
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
17
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
18
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
19
18
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
20
19
  "adapter:install": "npm i && node utils/tbScript.js install",
21
20
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -43,15 +42,15 @@
43
42
  ],
44
43
  "license": "Apache-2.0",
45
44
  "engines": {
46
- "node": ">= 8.0.0",
45
+ "node": ">= 14.0.0",
47
46
  "npm": ">= 6.0.0"
48
47
  },
49
48
  "repository": {
50
49
  "type": "git",
51
- "url": "git@gitlab.com:itentialopensource/adapters/sd-wan/adapter-nokia_nsp_device_configurator.git"
50
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-nokia_nsp_device_configurator.git"
52
51
  },
53
52
  "author": "Itential",
54
- "homepage": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-nokia_nsp_device_configurator#readme",
53
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-nokia_nsp_device_configurator#readme",
55
54
  "dependencies": {
56
55
  "@itentialopensource/adapter-utils": "^5.3.10",
57
56
  "acorn": "^8.10.0",
@@ -64,7 +63,6 @@
64
63
  "mocha": "^10.3.0",
65
64
  "mocha-param": "^2.0.1",
66
65
  "mongodb": "^4.16.0",
67
- "nyc": "^15.1.0",
68
66
  "ping": "^0.4.4",
69
67
  "prompts": "^2.4.2",
70
68
  "readline-sync": "^1.4.10",
package/pronghorn.json CHANGED
@@ -4023,27 +4023,37 @@
4023
4023
  "task": true
4024
4024
  },
4025
4025
  {
4026
- "name": "fieldquerytoretrieveasinglechildnodeunderthetargetresource",
4026
+ "name": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
4027
4027
  "summary": "Field query to retrieve a single child node under the target resource",
4028
4028
  "description": "Field query to retrieve a single child node under the target resource",
4029
4029
  "input": [
4030
4030
  {
4031
- "name": "neType",
4031
+ "name": "fields",
4032
+ "type": "string",
4033
+ "info": ": string",
4034
+ "required": true,
4035
+ "schema": {
4036
+ "title": "fields",
4037
+ "type": "string"
4038
+ }
4039
+ },
4040
+ {
4041
+ "name": "neId",
4032
4042
  "type": "string",
4033
4043
  "info": ": string",
4034
4044
  "required": true,
4035
4045
  "schema": {
4036
- "title": "neType",
4046
+ "title": "neId",
4037
4047
  "type": "string"
4038
4048
  }
4039
4049
  },
4040
4050
  {
4041
- "name": "neVersion",
4051
+ "name": "port",
4042
4052
  "type": "string",
4043
4053
  "info": ": string",
4044
4054
  "required": true,
4045
4055
  "schema": {
4046
- "title": "neVersion",
4056
+ "title": "port",
4047
4057
  "type": "string"
4048
4058
  }
4049
4059
  }
@@ -4055,7 +4065,7 @@
4055
4065
  "schema": {
4056
4066
  "allOf": [
4057
4067
  {
4058
- "title": "Fieldquerytoretrieveasinglechildnodeunderthetargetresource",
4068
+ "title": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
4059
4069
  "required": [
4060
4070
  "nokia-conf:port"
4061
4071
  ],
@@ -4254,7 +4264,7 @@
4254
4264
  ],
4255
4265
  "route": {
4256
4266
  "verb": "POST",
4257
- "path": "/fieldquerytoretrieveasinglechildnodeunderthetargetresource"
4267
+ "path": "/fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource"
4258
4268
  },
4259
4269
  "task": true
4260
4270
  },
@@ -945,6 +945,11 @@
945
945
  "devicebroker": {
946
946
  "type": "object",
947
947
  "properties": {
948
+ "enabled": {
949
+ "type": "boolean",
950
+ "description": "Whether or not the device broker calls have been mapped",
951
+ "default": false
952
+ },
948
953
  "getDevice": {
949
954
  "type": "array",
950
955
  "description": "Broker call(s) to getDevice",
Binary file
@@ -3792,7 +3792,7 @@
3792
3792
  ],
3793
3793
  "summary": "Field query to retrieve a single child node under the target resource",
3794
3794
  "description": "Field query to retrieve a single child node under the target resource",
3795
- "operationId": "Fieldquerytoretrieveasinglechildnodeunderthetargetresource",
3795
+ "operationId": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
3796
3796
  "parameters": [
3797
3797
  {
3798
3798
  "name": "Content-Type",
@@ -3962,7 +3962,7 @@
3962
3962
  "schema": {
3963
3963
  "allOf": [
3964
3964
  {
3965
- "$ref": "#/components/schemas/Fieldquerytoretrieveasinglechildnodeunderthetargetresource"
3965
+ "$ref": "#/components/schemas/fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource"
3966
3966
  },
3967
3967
  {
3968
3968
  "example": {
@@ -8368,8 +8368,8 @@
8368
8368
  "mda-type": "m60-10/100eth-tx"
8369
8369
  }
8370
8370
  },
8371
- "Fieldquerytoretrieveasinglechildnodeunderthetargetresource": {
8372
- "title": "Fieldquerytoretrieveasinglechildnodeunderthetargetresource",
8371
+ "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource": {
8372
+ "title": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
8373
8373
  "required": [
8374
8374
  "nokia-conf:port"
8375
8375
  ],
@@ -3792,7 +3792,7 @@
3792
3792
  ],
3793
3793
  "summary": "Field query to retrieve a single child node under the target resource",
3794
3794
  "description": "Field query to retrieve a single child node under the target resource",
3795
- "operationId": "Fieldquerytoretrieveasinglechildnodeunderthetargetresource",
3795
+ "operationId": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
3796
3796
  "parameters": [
3797
3797
  {
3798
3798
  "name": "Content-Type",
@@ -3962,7 +3962,7 @@
3962
3962
  "schema": {
3963
3963
  "allOf": [
3964
3964
  {
3965
- "$ref": "#/components/schemas/Fieldquerytoretrieveasinglechildnodeunderthetargetresource"
3965
+ "$ref": "#/components/schemas/fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource"
3966
3966
  },
3967
3967
  {
3968
3968
  "example": {
@@ -8368,8 +8368,8 @@
8368
8368
  "mda-type": "m60-10/100eth-tx"
8369
8369
  }
8370
8370
  },
8371
- "Fieldquerytoretrieveasinglechildnodeunderthetargetresource": {
8372
- "title": "Fieldquerytoretrieveasinglechildnodeunderthetargetresource",
8371
+ "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource": {
8372
+ "title": "fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource",
8373
8373
  "required": [
8374
8374
  "nokia-conf:port"
8375
8375
  ],
@@ -2482,9 +2482,9 @@ paths:
2482
2482
  get:
2483
2483
  tags:
2484
2484
  - Search
2485
- summary: Fieldquerytoretrieveasinglechildnodeunderthetargetresource
2485
+ summary: fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource
2486
2486
  description: Field query to retrieve a single child node under the target resource
2487
- operationId: Fieldquerytoretrieveasinglechildnodeunderthetargetresource
2487
+ operationId: fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource
2488
2488
  parameters:
2489
2489
  - name: Content-Type
2490
2490
  in: header
@@ -2604,7 +2604,7 @@ paths:
2604
2604
  application/json;charset=UTF-8:
2605
2605
  schema:
2606
2606
  allOf:
2607
- - $ref: '#/components/schemas/Fieldquerytoretrieveasinglechildnodeunderthetargetresource'
2607
+ - $ref: '#/components/schemas/fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource'
2608
2608
  - example:
2609
2609
  nokia-conf:port:
2610
2610
  - ethernet:
@@ -5788,8 +5788,8 @@ components:
5788
5788
  example:
5789
5789
  mda-slot: 1
5790
5790
  mda-type: m60-10/100eth-tx
5791
- Fieldquerytoretrieveasinglechildnodeunderthetargetresource:
5792
- title: Fieldquerytoretrieveasinglechildnodeunderthetargetresource
5791
+ fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource:
5792
+ title: fieldQueryToRetrieveASingleChildNodeUnderTheTargetResource
5793
5793
  required:
5794
5794
  - nokia-conf:port
5795
5795
  type: object
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.1.5",
3
- "configLines": 8373,
2
+ "version": "0.3.0",
3
+ "configLines": 8388,
4
4
  "scriptLines": 1783,
5
- "codeLines": 4492,
6
- "testLines": 4838,
7
- "testCases": 231,
8
- "totalCodeLines": 11113,
5
+ "codeLines": 4498,
6
+ "testLines": 4853,
7
+ "testCases": 232,
8
+ "totalCodeLines": 11134,
9
9
  "wfTasks": 48
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 16
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.3.10"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 647
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 2429
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 129
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 1156
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 32
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 5038
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 161
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }