@itentialopensource/adapter-nokia_altiplano 0.4.0 → 0.5.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.
Files changed (40) hide show
  1. package/AUTH.md +15 -13
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +163 -89
  4. package/CHANGELOG.md +30 -6
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +9 -9
  8. package/PROPERTIES.md +489 -89
  9. package/README.md +221 -571
  10. package/SUMMARY.md +5 -5
  11. package/SYSTEMINFO.md +6 -7
  12. package/TROUBLESHOOT.md +5 -4
  13. package/adapter.js +623 -481
  14. package/adapterBase.js +1006 -252
  15. package/entities/.generic/action.json +105 -0
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/Entity/action.json +70 -0
  18. package/entities/Entity/schema.json +21 -0
  19. package/entities/Intent/action.json +2 -2
  20. package/error.json +6 -0
  21. package/package.json +5 -3
  22. package/pronghorn.json +877 -573
  23. package/propertiesDecorators.json +14 -0
  24. package/propertiesSchema.json +421 -0
  25. package/refs?service=git-upload-pack +0 -0
  26. package/report/adapterInfo.json +10 -0
  27. package/report/updateReport1651493162166.json +114 -0
  28. package/report/updateReport1652197536783.json +120 -0
  29. package/report/updateReport1652620670443.json +120 -0
  30. package/sampleProperties.json +90 -1
  31. package/test/integration/adapterTestBasicGet.js +1 -1
  32. package/test/integration/adapterTestIntegration.js +101 -108
  33. package/test/unit/adapterBaseTestUnit.js +30 -25
  34. package/test/unit/adapterTestUnit.js +299 -180
  35. package/utils/adapterInfo.js +206 -0
  36. package/utils/entitiesToDB.js +12 -57
  37. package/utils/pre-commit.sh +3 -0
  38. package/utils/tbScript.js +35 -20
  39. package/utils/tbUtils.js +49 -31
  40. package/utils/testRunner.js +16 -16
@@ -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
  }
@@ -0,0 +1,70 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getEntityOntView",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/ema/entity/{pathv1}/ONT/{pathv2}/{pathv3}?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "requestDatatype": "JSON",
13
+ "responseDatatype": "JSON",
14
+ "headers": {
15
+ "Content-Type": "application/yang-data+json"
16
+ },
17
+ "responseObjects": [
18
+ {
19
+ "type": "default",
20
+ "key": "",
21
+ "mockFile": ""
22
+ }
23
+ ]
24
+ },
25
+ {
26
+ "name": "getEntityOntPort",
27
+ "protocol": "REST",
28
+ "method": "GET",
29
+ "entitypath": "{base_path}/{version}/ema/entity/{pathv1}/ONT%20Port/{pathv2}/{pathv3}?{query}",
30
+ "requestSchema": "schema.json",
31
+ "responseSchema": "schema.json",
32
+ "timeout": 0,
33
+ "sendEmpty": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {
37
+ "Content-Type": "application/yang-data+json"
38
+ },
39
+ "responseObjects": [
40
+ {
41
+ "type": "default",
42
+ "key": "",
43
+ "mockFile": ""
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "name": "getEntityOntVlanAssociation",
49
+ "protocol": "REST",
50
+ "method": "GET",
51
+ "entitypath": "{base_path}/{version}/ema/entity/{pathv1}/ONT%20VLAN%20Association/{pathv2}/{pathv3}?{query}",
52
+ "requestSchema": "schema.json",
53
+ "responseSchema": "schema.json",
54
+ "timeout": 0,
55
+ "sendEmpty": false,
56
+ "requestDatatype": "JSON",
57
+ "responseDatatype": "JSON",
58
+ "headers": {
59
+ "Content-Type": "application/yang-data+json"
60
+ },
61
+ "responseObjects": [
62
+ {
63
+ "type": "default",
64
+ "key": "",
65
+ "mockFile": ""
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "getEntityOntView",
12
+ "enum": [
13
+ "getEntityOntView",
14
+ "getEntityOntPort",
15
+ "getEntityOntVlanAssociation"
16
+ ],
17
+ "external_name": "ph_request_type"
18
+ }
19
+ },
20
+ "definitions": {}
21
+ }
@@ -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/error.json CHANGED
@@ -96,6 +96,12 @@
96
96
  "displayString": "Invalid properties: $VARIABLE$",
97
97
  "recommendation": "Verify the properties for the adapter"
98
98
  },
99
+ {
100
+ "key": "Missing Properties",
101
+ "icode": "AD.306",
102
+ "displayString": "Property $VARIABLE$ is required",
103
+ "recommendation": "Please provide the required property"
104
+ },
99
105
  {
100
106
  "key": "Query Not Translated",
101
107
  "icode": "AD.310",
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-nokia_altiplano",
3
- "version": "0.4.0",
3
+ "version": "0.5.2",
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.59.55",
8
+ "engineVersion": "1.61.6",
8
9
  "adapterType": "http",
9
10
  "scripts": {
10
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -54,11 +55,12 @@
54
55
  "author": "Itential",
55
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-nokia_altiplano#readme",
56
57
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^4.44.11",
58
+ "@itentialopensource/adapter-utils": "^4.45.5",
58
59
  "ajv": "^6.12.0",
59
60
  "axios": "^0.21.0",
60
61
  "commander": "^2.20.0",
61
62
  "fs-extra": "^8.1.0",
63
+ "json-query": "^2.2.2",
62
64
  "mocha": "^9.0.1",
63
65
  "mocha-param": "^2.0.1",
64
66
  "mongodb": "^4.1.0",