@itentialopensource/adapter-nokia_altiplano 0.5.0 → 0.5.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.
@@ -104,6 +104,111 @@
104
104
  "mockFile": ""
105
105
  }
106
106
  ]
107
+ },
108
+ {
109
+ "name": "getGenericsNoBase",
110
+ "protocol": "REST",
111
+ "method": "GET",
112
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
113
+ "requestSchema": "schema.json",
114
+ "responseSchema": "schema.json",
115
+ "timeout": 0,
116
+ "sendEmpty": false,
117
+ "sendGetBody": false,
118
+ "requestDatatype": "JSON",
119
+ "responseDatatype": "JSON",
120
+ "headers": {},
121
+ "responseObjects": [
122
+ {
123
+ "type": "default",
124
+ "key": "",
125
+ "mockFile": ""
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "name": "createGenericNoBase",
131
+ "protocol": "REST",
132
+ "method": "POST",
133
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
134
+ "requestSchema": "schema.json",
135
+ "responseSchema": "schema.json",
136
+ "timeout": 0,
137
+ "sendEmpty": false,
138
+ "sendGetBody": false,
139
+ "requestDatatype": "JSON",
140
+ "responseDatatype": "JSON",
141
+ "headers": {},
142
+ "responseObjects": [
143
+ {
144
+ "type": "default",
145
+ "key": "",
146
+ "mockFile": ""
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "name": "updateGenericNoBase",
152
+ "protocol": "REST",
153
+ "method": "PUT",
154
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
155
+ "requestSchema": "schema.json",
156
+ "responseSchema": "schema.json",
157
+ "timeout": 0,
158
+ "sendEmpty": false,
159
+ "sendGetBody": false,
160
+ "requestDatatype": "JSON",
161
+ "responseDatatype": "JSON",
162
+ "headers": {},
163
+ "responseObjects": [
164
+ {
165
+ "type": "default",
166
+ "key": "",
167
+ "mockFile": ""
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "name": "patchGenericNoBase",
173
+ "protocol": "REST",
174
+ "method": "PATCH",
175
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
176
+ "requestSchema": "schema.json",
177
+ "responseSchema": "schema.json",
178
+ "timeout": 0,
179
+ "sendEmpty": false,
180
+ "sendGetBody": false,
181
+ "requestDatatype": "JSON",
182
+ "responseDatatype": "JSON",
183
+ "headers": {},
184
+ "responseObjects": [
185
+ {
186
+ "type": "default",
187
+ "key": "",
188
+ "mockFile": ""
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ "name": "deleteGenericNoBase",
194
+ "protocol": "REST",
195
+ "method": "DELETE",
196
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
197
+ "requestSchema": "schema.json",
198
+ "responseSchema": "schema.json",
199
+ "timeout": 0,
200
+ "sendEmpty": false,
201
+ "sendGetBody": false,
202
+ "requestDatatype": "JSON",
203
+ "responseDatatype": "JSON",
204
+ "headers": {},
205
+ "responseObjects": [
206
+ {
207
+ "type": "default",
208
+ "key": "",
209
+ "mockFile": ""
210
+ }
211
+ ]
107
212
  }
108
213
  ]
109
214
  }
@@ -14,7 +14,12 @@
14
14
  "createGeneric",
15
15
  "updateGeneric",
16
16
  "patchGeneric",
17
- "deleteGeneric"
17
+ "deleteGeneric",
18
+ "getGenericsNoBase",
19
+ "createGenericNoBase",
20
+ "updateGenericNoBase",
21
+ "patchGenericNoBase",
22
+ "deleteGenericNoBase"
18
23
  ],
19
24
  "external_name": "ph_request_type"
20
25
  }
@@ -397,8 +397,8 @@
397
397
  {
398
398
  "name": "deleteIbnIntent",
399
399
  "protocol": "REST",
400
- "method": "DELETE",
401
- "entitypath": "{base_path}/{version}/restconf/data/ibn:ibn/{pathv1}?{query}",
400
+ "method": "POST",
401
+ "entitypath": "{base_path}/{version}/restconf/operations/ibn:delete-intent-from-network-and-controller?{query}",
402
402
  "requestSchema": "schema.json",
403
403
  "responseSchema": "schema.json",
404
404
  "timeout": 0,
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-nokia_altiplano",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "This adapter integrates with system described as: Nokia Altiplano.",
5
5
  "main": "adapter.js",
6
+ "systemName": "Nokia Altiplano",
6
7
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.61.2",
8
+ "engineVersion": "1.61.4",
8
9
  "adapterType": "http",
9
10
  "scripts": {
10
11
  "artifactize": "npm i && node utils/packModificationScript.js",
package/pronghorn.json CHANGED
@@ -402,6 +402,85 @@
402
402
  },
403
403
  "task": true
404
404
  },
405
+ {
406
+ "name": "genericAdapterRequestNoBasePath",
407
+ "summary": "Makes the requested generic call with no base path or version",
408
+ "description": "Makes the requested generic call with no base path or version",
409
+ "input": [
410
+ {
411
+ "name": "uriPath",
412
+ "type": "string",
413
+ "info": "the path of the api call - do not include the host, port, base path or version",
414
+ "description": "the path of the api call",
415
+ "schema": {
416
+ "title": "uriPath",
417
+ "type": "string"
418
+ },
419
+ "required": true
420
+ },
421
+ {
422
+ "name": "restMethod",
423
+ "type": "string",
424
+ "info": "the rest method (GET, POST, PUT, PATCH, DELETE)",
425
+ "description": "the rest method (GET, POST, PUT, PATCH, DELETE)",
426
+ "schema": {
427
+ "title": "restMethod",
428
+ "type": "string"
429
+ },
430
+ "required": true
431
+ },
432
+ {
433
+ "name": "queryData",
434
+ "type": "object",
435
+ "info": "the query parameters to be put on the url (optional)",
436
+ "description": "the query parameters to be put on the url (optional)",
437
+ "schema": {
438
+ "title": "queryData",
439
+ "type": "object"
440
+ },
441
+ "required": false
442
+ },
443
+ {
444
+ "name": "requestBody",
445
+ "type": "object",
446
+ "info": "the payload to be sent with the request (optional)",
447
+ "description": "the payload to be sent with the request (optional)",
448
+ "schema": {
449
+ "title": "requestBody",
450
+ "type": "object"
451
+ },
452
+ "required": false
453
+ },
454
+ {
455
+ "name": "addlHeaders",
456
+ "type": "object",
457
+ "info": "additional headers to be put on the call (optional)",
458
+ "description": "additional headers to be put on the call (optional)",
459
+ "schema": {
460
+ "title": "addlHeaders",
461
+ "type": "object"
462
+ },
463
+ "required": false
464
+ }
465
+ ],
466
+ "output": {
467
+ "name": "result",
468
+ "type": "object",
469
+ "description": "A JSON Object containing status, code and the result",
470
+ "schema": {
471
+ "title": "result",
472
+ "type": "object"
473
+ }
474
+ },
475
+ "roles": [
476
+ "admin"
477
+ ],
478
+ "route": {
479
+ "verb": "POST",
480
+ "path": "/genericAdapterRequestNoBasePath"
481
+ },
482
+ "task": true
483
+ },
405
484
  {
406
485
  "name": "getDevice",
407
486
  "summary": "Get the Appliance",
@@ -1745,12 +1824,22 @@
1745
1824
  "description": "This request sample is used to delete an intent.",
1746
1825
  "input": [
1747
1826
  {
1748
- "name": "intent",
1827
+ "name": "intentType",
1749
1828
  "type": "string",
1750
- "info": "the intent value, type (MYINTONT1,ont)",
1829
+ "info": "the intent type (mcast-user)",
1751
1830
  "required": true,
1752
1831
  "schema": {
1753
- "title": "intent",
1832
+ "title": "intentType",
1833
+ "type": "string"
1834
+ }
1835
+ },
1836
+ {
1837
+ "name": "target",
1838
+ "type": "string",
1839
+ "info": "the target intent to delete",
1840
+ "required": true,
1841
+ "schema": {
1842
+ "title": "target",
1754
1843
  "type": "string"
1755
1844
  }
1756
1845
  }
@@ -51,6 +51,11 @@
51
51
  "description": "When true the path variables are encoded in the url",
52
52
  "default": true
53
53
  },
54
+ "encode_queryvars": {
55
+ "type": "boolean",
56
+ "description": "When true the query parameters are encoded in the url",
57
+ "default": true
58
+ },
54
59
  "save_metric": {
55
60
  "type": [
56
61
  "boolean",
@@ -93,6 +98,9 @@
93
98
  },
94
99
  "mongo": {
95
100
  "$ref": "#/definitions/mongo"
101
+ },
102
+ "devicebroker": {
103
+ "$ref": "#/definitions/devicebroker"
96
104
  }
97
105
  },
98
106
  "required": [
@@ -877,7 +885,10 @@
877
885
  },
878
886
  "handleFailure": {
879
887
  "type": "string",
880
- "enum": ["ignore", "fail"],
888
+ "enum": [
889
+ "ignore",
890
+ "fail"
891
+ ],
881
892
  "description": "return failure or ignore failure",
882
893
  "default": "ignore"
883
894
  },
@@ -964,10 +975,21 @@
964
975
  },
965
976
  "handleFailure": {
966
977
  "type": "string",
967
- "enum": ["ignore", "fail"],
978
+ "enum": [
979
+ "ignore",
980
+ "fail"
981
+ ],
968
982
  "description": "return failure or ignore failure",
969
983
  "default": "ignore"
970
984
  },
985
+ "requestFields": {
986
+ "type": "object",
987
+ "description": "The json object with response fields of the call to getDevice",
988
+ "additionalProperties": {
989
+ "type": "string"
990
+ },
991
+ "properties": {}
992
+ },
971
993
  "responseFields": {
972
994
  "type": "object",
973
995
  "description": "The json object with response fields of the call to getDevicesFiltered",
@@ -1043,7 +1065,10 @@
1043
1065
  },
1044
1066
  "handleFailure": {
1045
1067
  "type": "string",
1046
- "enum": ["ignore", "fail"],
1068
+ "enum": [
1069
+ "ignore",
1070
+ "fail"
1071
+ ],
1047
1072
  "description": "return failure or ignore isAlive",
1048
1073
  "default": "ignore"
1049
1074
  },
@@ -1115,7 +1140,10 @@
1115
1140
  },
1116
1141
  "handleFailure": {
1117
1142
  "type": "string",
1118
- "enum": ["ignore", "fail"],
1143
+ "enum": [
1144
+ "ignore",
1145
+ "fail"
1146
+ ],
1119
1147
  "description": "return failure or ignore getConfig",
1120
1148
  "default": "ignore"
1121
1149
  },
@@ -1133,8 +1161,7 @@
1133
1161
  "additionalProperties": {
1134
1162
  "type": "string"
1135
1163
  },
1136
- "properties": {
1137
- }
1164
+ "properties": {}
1138
1165
  }
1139
1166
  }
1140
1167
  }
@@ -1177,7 +1204,10 @@
1177
1204
  },
1178
1205
  "handleFailure": {
1179
1206
  "type": "string",
1180
- "enum": ["ignore", "fail"],
1207
+ "enum": [
1208
+ "ignore",
1209
+ "fail"
1210
+ ],
1181
1211
  "description": "return failure or ignore getCount",
1182
1212
  "default": "ignore"
1183
1213
  }
Binary file
@@ -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": 13
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 7
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^4.45.4"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 69
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 338
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": 642
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": 2198
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 110
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 1086
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 29
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1750
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": 5034
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 139
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -8,6 +8,7 @@
8
8
  "version": "",
9
9
  "cache_location": "none",
10
10
  "encode_pathvars": false,
11
+ "encode_queryvars": false,
11
12
  "save_metric": true,
12
13
  "stub": true,
13
14
  "protocol": "https",
@@ -97,6 +98,87 @@
97
98
  "key_file": "",
98
99
  "cert_file": ""
99
100
  }
101
+ },
102
+ "deviceBroker": {
103
+ "getDevice": [
104
+ {
105
+ "path": "/get/devices/{id}",
106
+ "method": "GET",
107
+ "query": {},
108
+ "body": {},
109
+ "headers": {},
110
+ "handleFailure": "ignore",
111
+ "requestFields": {
112
+ "id": "name"
113
+ },
114
+ "responseFields": {
115
+ "name": "host",
116
+ "ostype": "os",
117
+ "ostypePrefix": "system-",
118
+ "ipaddress": "attributes.ipaddr",
119
+ "port": 443
120
+ }
121
+ }
122
+ ],
123
+ "getDevicesFiltered": [
124
+ {
125
+ "path": "/get/devices",
126
+ "method": "GET",
127
+ "query": {},
128
+ "body": {},
129
+ "headers": {},
130
+ "handleFailure": "ignore",
131
+ "requestFields": {},
132
+ "responseFields": {
133
+ "name": "host",
134
+ "ostype": "os",
135
+ "ostypePrefix": "system-",
136
+ "ipaddress": "attributes.ipaddr",
137
+ "port": 443
138
+ }
139
+ }
140
+ ],
141
+ "isAlive": [
142
+ {
143
+ "path": "/get/devices/{id}/status",
144
+ "method": "GET",
145
+ "query": {},
146
+ "body": {},
147
+ "headers": {},
148
+ "handleFailure": "ignore",
149
+ "statusValue": "online",
150
+ "requestFields": {
151
+ "id": "name"
152
+ },
153
+ "responseFields": {
154
+ "status": "status"
155
+ }
156
+ }
157
+ ],
158
+ "getConfig": [
159
+ {
160
+ "path": "/get/devices/{id}/configPart1",
161
+ "method": "GET",
162
+ "query": {},
163
+ "body": {},
164
+ "headers": {},
165
+ "handleFailure": "ignore",
166
+ "requestFields": {
167
+ "id": "name"
168
+ },
169
+ "responseFields": {}
170
+ }
171
+ ],
172
+ "getCount": [
173
+ {
174
+ "path": "/get/devices",
175
+ "method": "GET",
176
+ "query": {},
177
+ "body": {},
178
+ "headers": {},
179
+ "handleFailure": "ignore"
180
+ }
181
+ ]
100
182
  }
101
183
  },
102
184
  "groups": [],
@@ -54,6 +54,7 @@ global.pronghornProps = {
54
54
  version: '',
55
55
  cache_location: 'none',
56
56
  encode_pathvars: true,
57
+ encode_queryvars: true,
57
58
  save_metric: false,
58
59
  stub,
59
60
  protocol,
@@ -1060,7 +1061,7 @@ describe('[integration] Nokia_altiplano Adapter Test', () => {
1060
1061
  describe('#deleteIbnIntent - errors', () => {
1061
1062
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1062
1063
  try {
1063
- a.deleteIbnIntent(intentIntent, (data, error) => {
1064
+ a.deleteIbnIntent(intentIntent, 'fakedata', (data, error) => {
1064
1065
  try {
1065
1066
  if (stub) {
1066
1067
  const displayE = 'Error 400 received on request';
@@ -317,8 +317,10 @@ describe('[unit] Adapter Base Test', () => {
317
317
  });
318
318
  it('should return a list of functions', (done) => {
319
319
  const returnedFunctions = ['addEntityCache', 'capabilityResults', 'checkActionFiles', 'checkProperties', 'connect', 'encryptProperty',
320
- 'entityInList', 'getAllCapabilities', 'getAllFunctions', 'healthCheck', 'iapFindAdapterPath', 'iapGetAdapterQueue', 'iapGetAdapterWorkflowFunctions', 'iapMakeBrokerCall', 'iapMoveAdapterEntitiesToDB',
321
- 'iapRunAdapterBasicGet', 'iapRunAdapterConnectivity', 'iapRunAdapterHealthcheck', 'iapSuspendAdapter', 'iapTroubleshootAdapter', 'iapUnsuspendAdapter', 'iapUpdateAdapterConfiguration', 'refreshProperties', 'addListener',
320
+ 'entityInList', 'getAllCapabilities', 'getAllFunctions', 'getConfig', 'getDevice', 'getDevicesFiltered', 'hasDevices', 'hasEntities',
321
+ 'healthCheck', 'iapFindAdapterPath', 'iapGetAdapterQueue', 'iapGetAdapterWorkflowFunctions', 'iapGetDeviceCount', 'iapMakeBrokerCall',
322
+ 'iapMoveAdapterEntitiesToDB', 'iapRunAdapterBasicGet', 'iapRunAdapterConnectivity', 'iapRunAdapterHealthcheck', 'iapSuspendAdapter',
323
+ 'iapTroubleshootAdapter', 'iapUnsuspendAdapter', 'iapUpdateAdapterConfiguration', 'isAlive', 'refreshProperties', 'addListener',
322
324
  'emit', 'eventNames', 'getMaxListeners', 'listenerCount', 'listeners', 'off', 'on', 'once', 'prependListener',
323
325
  'prependOnceListener', 'rawListeners', 'removeAllListeners', 'removeListener', 'setMaxListeners'];
324
326
  try {
@@ -817,12 +819,17 @@ describe('[unit] Adapter Base Test', () => {
817
819
  try {
818
820
  assert.notEqual(0, expectedCapabilities.length);
819
821
  assert.equal('.generic', expectedCapabilities[0].entity);
820
- assert.equal(5, expectedCapabilities[0].actions.length);
822
+ assert.equal(10, expectedCapabilities[0].actions.length);
821
823
  assert.equal('getGenerics', expectedCapabilities[0].actions[0]);
822
824
  assert.equal('createGeneric', expectedCapabilities[0].actions[1]);
823
825
  assert.equal('updateGeneric', expectedCapabilities[0].actions[2]);
824
826
  assert.equal('patchGeneric', expectedCapabilities[0].actions[3]);
825
827
  assert.equal('deleteGeneric', expectedCapabilities[0].actions[4]);
828
+ assert.equal('getGenericsNoBase', expectedCapabilities[0].actions[5]);
829
+ assert.equal('createGenericNoBase', expectedCapabilities[0].actions[6]);
830
+ assert.equal('updateGenericNoBase', expectedCapabilities[0].actions[7]);
831
+ assert.equal('patchGenericNoBase', expectedCapabilities[0].actions[8]);
832
+ assert.equal('deleteGenericNoBase', expectedCapabilities[0].actions[9]);
826
833
  assert.equal('.system', expectedCapabilities[1].entity);
827
834
  assert.equal(2, expectedCapabilities[1].actions.length);
828
835
  assert.equal('getToken', expectedCapabilities[1].actions[0]);