@itentialopensource/adapter-nokia_nsp_nfm_p 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/AUTH.md +17 -18
- package/BROKER.md +31 -19
- package/CALLS.md +83 -23
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +20 -6
- package/TAB1.md +10 -0
- package/TAB2.md +84 -10696
- package/adapter.js +308 -0
- package/entities/APIV3/action.json +84 -0
- package/entities/APIV3/schema.json +22 -0
- package/metadata.json +34 -7
- package/package.json +5 -7
- package/pronghorn.json +1249 -2220
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +7 -7
- package/report/nfmpRest-24.4-v3.json +208 -0
- package/report/updateReport1715046544506.json +120 -0
- package/sampleProperties.json +41 -29
- package/test/integration/adapterTestIntegration.js +105 -0
- package/test/unit/adapterTestUnit.js +48 -2
package/propertiesSchema.json
CHANGED
|
@@ -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
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.3.0",
|
|
3
|
+
"configLines": 96020,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
9
|
-
"wfTasks":
|
|
5
|
+
"codeLines": 129808,
|
|
6
|
+
"testLines": 82718,
|
|
7
|
+
"testCases": 4219,
|
|
8
|
+
"totalCodeLines": 214309,
|
|
9
|
+
"wfTasks": 1619
|
|
10
10
|
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"description": "The SAM-O Restful API endpoints allows to :\n<BR> 1) Convert an XML document to JSON. The conversion is a straightforward conversion of the original XML document. \n<BR> 2) Send a JSON formatted request to the NFMP server. This JSON corresponds to what was converted by this REST service.\n<BR><p><b><u>Access Information:</u></b></p>Prior to accessing the API services below the API client must authenticate the NSP user via the NSP REST Gateway's authentication API service.\n<BR>One authentication method is supported:\n<ul><li>\"Bearer\" token authentication.</li></ul><p><b><u>Note: </u></b></p> XML request bodies which contain CDATA formatted text are not supported.<p><b><u>Deprecation notice: </u></b></p> NFM-P SAM-O (Including SOAP XML, SAM-O REST v1, v2, v3, and JMS Interfaces) are now deprecated. Starting in NSP Release 23, all new greenfield northbound integrations with NSP must be done using the new NSP REST/RESTCONF APIs and Kafka interfaces. <BR>Brownfield upgrades with northbound integrations towards NFM-P SAM-O (SOAP/XML, SAM-O v1,v2,v3 and JMS Interfaces) can continue to use those legacy APIs until end of 2025. NFM-P SAM-O (SOAP/XML, SAM-O v1, v2, v3 and JMS Interfaces) will no longer be available for brownfield upgrades of northbound integrations starting in NSP Release 26. <BR>Customers are encouraged to use the NSP REST/RESTCONF v3 APIs.<BR> <BR>",
|
|
5
|
+
"title": "SAM-O Restful Api Endpoints",
|
|
6
|
+
"version": "v3"
|
|
7
|
+
},
|
|
8
|
+
"basePath": "/nfmpv3service/api",
|
|
9
|
+
"tags": [
|
|
10
|
+
{
|
|
11
|
+
"name": "API v3"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"schemes": [
|
|
15
|
+
"https",
|
|
16
|
+
"http"
|
|
17
|
+
],
|
|
18
|
+
"paths": {
|
|
19
|
+
"/v3/xml-to-json": {
|
|
20
|
+
"post": {
|
|
21
|
+
"tags": [
|
|
22
|
+
"API v3"
|
|
23
|
+
],
|
|
24
|
+
"summary": "NFMP REST-API v3 convert XML to JSON command",
|
|
25
|
+
"description": "Use this endpoint to convert any XML or SOAP XML message, and it will return the proper JSON body that you can use for the v3 api.For example, the client makes the following HTTP request:\n \n\n POST /v3/xml-to-json HTTP/1.1\n Host: server.example.com\n Authorization: Bearer 1eW2zZEKjY3r9WS6Ek7QAiUatKlplVaNWiTM7ElAQ0M%3D\n Content-Type: application/xml\n\n <find xmlns=\"xmlapi_1.0\"><fullClassName>aclfilter.IpFilter</fullClassName></find>\n \n\n\n Which returns: \n\n {\"find\": {\"fullClassName\": \"aclfilter.IpFilter\"}}",
|
|
26
|
+
"operationId": "xmltojsonEndpoint",
|
|
27
|
+
"consumes": [
|
|
28
|
+
"application/xml"
|
|
29
|
+
],
|
|
30
|
+
"produces": [
|
|
31
|
+
"application/json"
|
|
32
|
+
],
|
|
33
|
+
"parameters": [
|
|
34
|
+
{
|
|
35
|
+
"in": "body",
|
|
36
|
+
"name": "body",
|
|
37
|
+
"required": false,
|
|
38
|
+
"schema": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"responses": {
|
|
44
|
+
"200": {
|
|
45
|
+
"description": "Returns a successful object"
|
|
46
|
+
},
|
|
47
|
+
"401": {
|
|
48
|
+
"description": "Unauthorized"
|
|
49
|
+
},
|
|
50
|
+
"404": {
|
|
51
|
+
"description": "Not found"
|
|
52
|
+
},
|
|
53
|
+
"500": {
|
|
54
|
+
"description": "Internal server problems"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"/v3/xml": {
|
|
60
|
+
"post": {
|
|
61
|
+
"tags": [
|
|
62
|
+
"API v3"
|
|
63
|
+
],
|
|
64
|
+
"summary": "NFMP REST-API v3 'xml' command",
|
|
65
|
+
"description": "This is the XML REST_API endpoint. Use this endpoint to send XML directly instead of JSON. For example, the client makes the following HTTP request:\n \n\n POST /v3/xml HTTP/1.1\n Host: server.example.com\n Authorization: Bearer 1eW2zZEKjY3r9WS6Ek7QAiUatKlplVaNWiTM7ElAQ0M%3D\n Content-Type: application/xml\n\n <find><fullClassName>aclfilter.IpFilter</fullClassName></find>",
|
|
66
|
+
"operationId": "xmlEndpoint",
|
|
67
|
+
"consumes": [
|
|
68
|
+
"application/xml"
|
|
69
|
+
],
|
|
70
|
+
"produces": [
|
|
71
|
+
"application/xml"
|
|
72
|
+
],
|
|
73
|
+
"parameters": [
|
|
74
|
+
{
|
|
75
|
+
"in": "body",
|
|
76
|
+
"name": "body",
|
|
77
|
+
"required": false,
|
|
78
|
+
"schema": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"security": [
|
|
84
|
+
{
|
|
85
|
+
"api_key": []
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"responses": {
|
|
89
|
+
"200": {
|
|
90
|
+
"description": "Returns a successful object"
|
|
91
|
+
},
|
|
92
|
+
"401": {
|
|
93
|
+
"description": "Unauthorized"
|
|
94
|
+
},
|
|
95
|
+
"404": {
|
|
96
|
+
"description": "Not found"
|
|
97
|
+
},
|
|
98
|
+
"500": {
|
|
99
|
+
"description": "Internal server problems"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"/v3/request": {
|
|
105
|
+
"post": {
|
|
106
|
+
"tags": [
|
|
107
|
+
"API v3"
|
|
108
|
+
],
|
|
109
|
+
"summary": "NFMP REST-API v3 'request' command",
|
|
110
|
+
"description": "This is the NFMP REST_API endpoint. Use this endpoint to send your converted JSON and obtain a JSON response. For example, the client makes the following HTTP request:\n \n\n POST /v3/request HTTP/1.1\n Host: server.example.com\n Authorization: Bearer 1eW2zZEKjY3r9WS6Ek7QAiUatKlplVaNWiTM7ElAQ0M%3D\n Content-Type: application/json\n\n Example that returns JSON response:\n {\"fullClassName\":[\"netw.NetworkElement\"], \"fileName\": \"myFile.xml\", \"resultFilter\": { \"attributes\": [\"objectFullName\",\"siteId\"] } }\n\n\n<b>Important Note</b>: The /v3/request 'find' response will be in SOAP XML format only. \n It is recommended to use the /v3/find request for REST-API v3 'find' requests and it is mandatory for any v3 request that would result in a large response message greater than 12 MB. \n The return error code will be 500 if a response message size is too large. \n\n<b>Deprecation Notice</b>: The /v3/request 'find' request will be removed in NSP 23.03 release because of the above limitation.\n",
|
|
111
|
+
"operationId": "requestEndpoint",
|
|
112
|
+
"consumes": [
|
|
113
|
+
"application/json"
|
|
114
|
+
],
|
|
115
|
+
"produces": [
|
|
116
|
+
"application/json"
|
|
117
|
+
],
|
|
118
|
+
"parameters": [
|
|
119
|
+
{
|
|
120
|
+
"in": "body",
|
|
121
|
+
"name": "body",
|
|
122
|
+
"required": false,
|
|
123
|
+
"schema": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": {
|
|
126
|
+
"type": "object"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"security": [
|
|
132
|
+
{
|
|
133
|
+
"api_key": []
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"responses": {
|
|
137
|
+
"200": {
|
|
138
|
+
"description": "Returns a successful object"
|
|
139
|
+
},
|
|
140
|
+
"401": {
|
|
141
|
+
"description": "Unauthorized"
|
|
142
|
+
},
|
|
143
|
+
"404": {
|
|
144
|
+
"description": "Not found"
|
|
145
|
+
},
|
|
146
|
+
"500": {
|
|
147
|
+
"description": "Internal server problems"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"/v3/find": {
|
|
153
|
+
"post": {
|
|
154
|
+
"tags": [
|
|
155
|
+
"API v3"
|
|
156
|
+
],
|
|
157
|
+
"summary": "NFMP REST-API v3 'find' command",
|
|
158
|
+
"description": "This is the recommended endpoint for performing a REST- API v3 \"find\" requests and it is mandatory for any finds with a large result set. The response is only in XML format. For example, the client makes the following HTTP request:\n \n \n POST /v3/find HTTP/1.1\n Host: server.example.com\n Authorization: Bearer 1eW2zZEKjY3r9WS6Ek7QAiUatKlplVaNWiTM7ElAQ0M%3D\n Content-Type: application/json\n\n {\"find\": {\n \"fullClassName\": \"security.User\",\n \"resultFilter\": {\n \"children\": \"\",\n \"attribute\": [\n \"objectFullName\",\n \"userName\",\n \"userGroup\"\n ]\n }\n }}\n \n XML response:\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <result>\n <security.User>\n <userName>admin</userName>\n <userGroup>securityManager:userGroup-admin</userGroup>\n <objectFullName>securityManager:user-admin</objectFullName>\n </security.User>\n <security.User>\n <userName>SAMqa</userName>\n <userGroup>securityManager:userGroup-GSAMqa</userGroup>\n <objectFullName>securityManager:user-SAMqa</objectFullName>\n </security.User>\n </result>\n",
|
|
159
|
+
"operationId": "findEndpoint",
|
|
160
|
+
"consumes": [
|
|
161
|
+
"application/json"
|
|
162
|
+
],
|
|
163
|
+
"produces": [
|
|
164
|
+
"application/octet-stream"
|
|
165
|
+
],
|
|
166
|
+
"parameters": [
|
|
167
|
+
{
|
|
168
|
+
"in": "body",
|
|
169
|
+
"name": "body",
|
|
170
|
+
"required": false,
|
|
171
|
+
"schema": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": {
|
|
174
|
+
"type": "object"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"security": [
|
|
180
|
+
{
|
|
181
|
+
"api_key": []
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"responses": {
|
|
185
|
+
"200": {
|
|
186
|
+
"description": "Returns a successful object"
|
|
187
|
+
},
|
|
188
|
+
"401": {
|
|
189
|
+
"description": "Unauthorized"
|
|
190
|
+
},
|
|
191
|
+
"404": {
|
|
192
|
+
"description": "Not found"
|
|
193
|
+
},
|
|
194
|
+
"500": {
|
|
195
|
+
"description": "Internal server problems"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"securityDefinitions": {
|
|
202
|
+
"api_key": {
|
|
203
|
+
"type": "apiKey",
|
|
204
|
+
"name": "Authorization",
|
|
205
|
+
"in": "header"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -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": 35615
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 2542
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 45699
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 1599
|
|
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": 82767
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 4141
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
"stub": true,
|
|
15
15
|
"protocol": "https",
|
|
16
16
|
"authentication": {
|
|
17
|
-
"auth_method": "
|
|
17
|
+
"auth_method": "request_token",
|
|
18
18
|
"username": "username",
|
|
19
19
|
"password": "password",
|
|
20
20
|
"token": "token",
|
|
21
|
-
"token_timeout":
|
|
21
|
+
"token_timeout": 1800000,
|
|
22
22
|
"token_cache": "local",
|
|
23
23
|
"invalid_token_error": 401,
|
|
24
24
|
"auth_field": "header.headers.Authorization",
|
|
25
|
-
"auth_field_format": "
|
|
25
|
+
"auth_field_format": "Bearer {token}",
|
|
26
26
|
"auth_logging": false,
|
|
27
27
|
"client_id": "",
|
|
28
28
|
"client_secret": "",
|
|
29
|
-
"grant_type": "",
|
|
29
|
+
"grant_type": "client_credentials",
|
|
30
30
|
"sensitive": [],
|
|
31
31
|
"sso": {
|
|
32
32
|
"protocol": "",
|
|
@@ -116,30 +116,32 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"devicebroker": {
|
|
119
|
+
"enabled": false,
|
|
119
120
|
"getDevice": [
|
|
120
121
|
{
|
|
121
|
-
"path": "/
|
|
122
|
+
"path": "/not/mapped",
|
|
122
123
|
"method": "GET",
|
|
123
124
|
"query": {},
|
|
124
125
|
"body": {},
|
|
125
126
|
"headers": {},
|
|
126
127
|
"handleFailure": "ignore",
|
|
127
128
|
"requestFields": {
|
|
128
|
-
"
|
|
129
|
+
"insample": "{port}"
|
|
129
130
|
},
|
|
130
131
|
"responseDatakey": "",
|
|
131
132
|
"responseFields": {
|
|
132
|
-
"name": "
|
|
133
|
-
"ostype": "
|
|
134
|
-
"ostypePrefix": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
133
|
+
"name": "{this}{||}{that}",
|
|
134
|
+
"ostype": "{osfield}",
|
|
135
|
+
"ostypePrefix": "meraki-",
|
|
136
|
+
"port": "{port}",
|
|
137
|
+
"ipaddress": "{ip_addr}",
|
|
138
|
+
"serial" : "{serial}"
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
],
|
|
140
142
|
"getDevicesFiltered": [
|
|
141
143
|
{
|
|
142
|
-
"path": "/
|
|
144
|
+
"path": "/not/mapped",
|
|
143
145
|
"method": "GET",
|
|
144
146
|
"pagination": {
|
|
145
147
|
"offsetVar": "",
|
|
@@ -154,42 +156,44 @@
|
|
|
154
156
|
"requestFields": {},
|
|
155
157
|
"responseDatakey": "",
|
|
156
158
|
"responseFields": {
|
|
157
|
-
"name": "
|
|
158
|
-
"ostype": "
|
|
159
|
-
"ostypePrefix": "
|
|
160
|
-
"
|
|
161
|
-
"
|
|
159
|
+
"name": "{this}{||}{that}",
|
|
160
|
+
"ostype": "{osfield}",
|
|
161
|
+
"ostypePrefix": "meraki-",
|
|
162
|
+
"port": "{port}",
|
|
163
|
+
"ipaddress": "{ip_addr}",
|
|
164
|
+
"serial" : "{serial}",
|
|
165
|
+
"id": "{myid}"
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
],
|
|
165
169
|
"isAlive": [
|
|
166
170
|
{
|
|
167
|
-
"path": "/
|
|
171
|
+
"path": "/not/mapped/{devID}",
|
|
168
172
|
"method": "GET",
|
|
169
173
|
"query": {},
|
|
170
174
|
"body": {},
|
|
171
175
|
"headers": {},
|
|
172
176
|
"handleFailure": "ignore",
|
|
173
177
|
"requestFields": {
|
|
174
|
-
"
|
|
178
|
+
"devID": "{id}"
|
|
175
179
|
},
|
|
176
180
|
"responseDatakey": "",
|
|
177
181
|
"responseFields": {
|
|
178
|
-
"status": "
|
|
179
|
-
"statusValue": "
|
|
182
|
+
"status": "return2xx",
|
|
183
|
+
"statusValue": "AD.200"
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
],
|
|
183
187
|
"getConfig": [
|
|
184
188
|
{
|
|
185
|
-
"path": "/
|
|
189
|
+
"path": "/not/mapped/{devID}",
|
|
186
190
|
"method": "GET",
|
|
187
191
|
"query": {},
|
|
188
192
|
"body": {},
|
|
189
193
|
"headers": {},
|
|
190
194
|
"handleFailure": "ignore",
|
|
191
195
|
"requestFields": {
|
|
192
|
-
"
|
|
196
|
+
"devID": "{id}"
|
|
193
197
|
},
|
|
194
198
|
"responseDatakey": "",
|
|
195
199
|
"responseFields": {}
|
|
@@ -197,7 +201,7 @@
|
|
|
197
201
|
],
|
|
198
202
|
"getCount": [
|
|
199
203
|
{
|
|
200
|
-
"path": "/
|
|
204
|
+
"path": "/not/mapped",
|
|
201
205
|
"method": "GET",
|
|
202
206
|
"query": {},
|
|
203
207
|
"body": {},
|
|
@@ -213,15 +217,15 @@
|
|
|
213
217
|
"enabled": false,
|
|
214
218
|
"entities": [
|
|
215
219
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
220
|
+
"entityType": "device",
|
|
221
|
+
"frequency": 3600,
|
|
218
222
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
223
|
+
"limit": 10000,
|
|
220
224
|
"retryAttempts": 5,
|
|
221
225
|
"sort": true,
|
|
222
226
|
"populate": [
|
|
223
227
|
{
|
|
224
|
-
"path": "",
|
|
228
|
+
"path": "/not/mapped",
|
|
225
229
|
"method": "GET",
|
|
226
230
|
"pagination": {
|
|
227
231
|
"offsetVar": "",
|
|
@@ -235,7 +239,15 @@
|
|
|
235
239
|
"handleFailure": "ignore",
|
|
236
240
|
"requestFields": {},
|
|
237
241
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
242
|
+
"responseFields": {
|
|
243
|
+
"name": "{this}{||}{that}",
|
|
244
|
+
"ostype": "{osfield}",
|
|
245
|
+
"ostypePrefix": "meraki-",
|
|
246
|
+
"port": "{port}",
|
|
247
|
+
"ipaddress": "{ip_addr}",
|
|
248
|
+
"serial" : "{serial}",
|
|
249
|
+
"id": "{myid}"
|
|
250
|
+
}
|
|
239
251
|
}
|
|
240
252
|
],
|
|
241
253
|
"cachedTasks": [
|
|
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
|
|
|
46
46
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
47
|
samProps.request.attempt_timeout = 30000;
|
|
48
48
|
}
|
|
49
|
+
samProps.devicebroker.enabled = true;
|
|
49
50
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
51
|
const { stub } = samProps;
|
|
51
52
|
|
|
@@ -45693,5 +45694,109 @@ describe('[integration] Nokia_nsp_nfm_p Adapter Test', () => {
|
|
|
45693
45694
|
}
|
|
45694
45695
|
}).timeout(attemptTimeout);
|
|
45695
45696
|
});
|
|
45697
|
+
|
|
45698
|
+
const aPIV3XmltojsonEndpointBodyParam = {};
|
|
45699
|
+
describe('#xmltojsonEndpoint - errors', () => {
|
|
45700
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
45701
|
+
try {
|
|
45702
|
+
a.xmltojsonEndpoint(aPIV3XmltojsonEndpointBodyParam, (data, error) => {
|
|
45703
|
+
try {
|
|
45704
|
+
if (stub) {
|
|
45705
|
+
const displayE = 'Error 400 received on request';
|
|
45706
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-nokia_nsp_nfm_p-connectorRest-handleEndResponse', displayE);
|
|
45707
|
+
} else {
|
|
45708
|
+
runCommonAsserts(data, error);
|
|
45709
|
+
}
|
|
45710
|
+
saveMockData('APIV3', 'xmltojsonEndpoint', 'default', data);
|
|
45711
|
+
done();
|
|
45712
|
+
} catch (err) {
|
|
45713
|
+
log.error(`Test Failure: ${err}`);
|
|
45714
|
+
done(err);
|
|
45715
|
+
}
|
|
45716
|
+
});
|
|
45717
|
+
} catch (error) {
|
|
45718
|
+
log.error(`Adapter Exception: ${error}`);
|
|
45719
|
+
done(error);
|
|
45720
|
+
}
|
|
45721
|
+
}).timeout(attemptTimeout);
|
|
45722
|
+
});
|
|
45723
|
+
|
|
45724
|
+
const aPIV3XmlEndpointBodyParam = {};
|
|
45725
|
+
describe('#xmlEndpoint - errors', () => {
|
|
45726
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
45727
|
+
try {
|
|
45728
|
+
a.xmlEndpoint(aPIV3XmlEndpointBodyParam, (data, error) => {
|
|
45729
|
+
try {
|
|
45730
|
+
if (stub) {
|
|
45731
|
+
const displayE = 'Error 400 received on request';
|
|
45732
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-nokia_nsp_nfm_p-connectorRest-handleEndResponse', displayE);
|
|
45733
|
+
} else {
|
|
45734
|
+
runCommonAsserts(data, error);
|
|
45735
|
+
}
|
|
45736
|
+
saveMockData('APIV3', 'xmlEndpoint', 'default', data);
|
|
45737
|
+
done();
|
|
45738
|
+
} catch (err) {
|
|
45739
|
+
log.error(`Test Failure: ${err}`);
|
|
45740
|
+
done(err);
|
|
45741
|
+
}
|
|
45742
|
+
});
|
|
45743
|
+
} catch (error) {
|
|
45744
|
+
log.error(`Adapter Exception: ${error}`);
|
|
45745
|
+
done(error);
|
|
45746
|
+
}
|
|
45747
|
+
}).timeout(attemptTimeout);
|
|
45748
|
+
});
|
|
45749
|
+
|
|
45750
|
+
const aPIV3requestEndpointBodyParam = {};
|
|
45751
|
+
describe('#requestEndpoint - errors', () => {
|
|
45752
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
45753
|
+
try {
|
|
45754
|
+
a.requestEndpoint(aPIV3requestEndpointBodyParam, (data, error) => {
|
|
45755
|
+
try {
|
|
45756
|
+
if (stub) {
|
|
45757
|
+
const displayE = 'Error 400 received on request';
|
|
45758
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-nokia_nsp_nfm_p-connectorRest-handleEndResponse', displayE);
|
|
45759
|
+
} else {
|
|
45760
|
+
runCommonAsserts(data, error);
|
|
45761
|
+
}
|
|
45762
|
+
saveMockData('APIV3', 'requestEndpoint', 'default', data);
|
|
45763
|
+
done();
|
|
45764
|
+
} catch (err) {
|
|
45765
|
+
log.error(`Test Failure: ${err}`);
|
|
45766
|
+
done(err);
|
|
45767
|
+
}
|
|
45768
|
+
});
|
|
45769
|
+
} catch (error) {
|
|
45770
|
+
log.error(`Adapter Exception: ${error}`);
|
|
45771
|
+
done(error);
|
|
45772
|
+
}
|
|
45773
|
+
}).timeout(attemptTimeout);
|
|
45774
|
+
});
|
|
45775
|
+
|
|
45776
|
+
const aPIV3FindBodyParam = {};
|
|
45777
|
+
describe('#findEndpoint - errors', () => {
|
|
45778
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
45779
|
+
try {
|
|
45780
|
+
a.findEndpoint(aPIV3FindBodyParam, (data, error) => {
|
|
45781
|
+
try {
|
|
45782
|
+
if (stub) {
|
|
45783
|
+
const displayE = 'Error 400 received on request';
|
|
45784
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-nokia_nsp_nfm_p-connectorRest-handleEndResponse', displayE);
|
|
45785
|
+
} else {
|
|
45786
|
+
runCommonAsserts(data, error);
|
|
45787
|
+
}
|
|
45788
|
+
saveMockData('APIV3', 'findEndpoint', 'default', data);
|
|
45789
|
+
done();
|
|
45790
|
+
} catch (err) {
|
|
45791
|
+
log.error(`Test Failure: ${err}`);
|
|
45792
|
+
done(err);
|
|
45793
|
+
}
|
|
45794
|
+
});
|
|
45795
|
+
} catch (error) {
|
|
45796
|
+
log.error(`Adapter Exception: ${error}`);
|
|
45797
|
+
done(error);
|
|
45798
|
+
}
|
|
45799
|
+
}).timeout(attemptTimeout);
|
|
45800
|
+
});
|
|
45696
45801
|
});
|
|
45697
45802
|
});
|