@itentialopensource/adapter-apic 0.4.0 → 0.5.0

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 (43) hide show
  1. package/AUTH.md +9 -12
  2. package/CALLS.md +95 -22
  3. package/CHANGELOG.md +8 -0
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +32 -23
  7. package/SYSTEMINFO.md +15 -6
  8. package/adapter.js +157 -329
  9. package/adapterBase.js +549 -879
  10. package/changelogs/changelog.md +78 -0
  11. package/metadata.json +51 -0
  12. package/package.json +25 -25
  13. package/pronghorn.json +470 -138
  14. package/propertiesSchema.json +422 -31
  15. package/refs?service=git-upload-pack +0 -0
  16. package/report/adapter-openapi.json +180 -0
  17. package/report/adapter-openapi.yaml +141 -0
  18. package/report/adapterInfo.json +8 -8
  19. package/report/updateReport1691508801991.json +120 -0
  20. package/report/updateReport1692203261139.json +120 -0
  21. package/report/updateReport1694468837016.json +120 -0
  22. package/sampleProperties.json +63 -2
  23. package/test/integration/adapterTestBasicGet.js +2 -4
  24. package/test/integration/adapterTestConnectivity.js +91 -42
  25. package/test/integration/adapterTestIntegration.js +130 -2
  26. package/test/unit/adapterBaseTestUnit.js +388 -313
  27. package/test/unit/adapterTestUnit.js +338 -112
  28. package/utils/adapterInfo.js +1 -1
  29. package/utils/addAuth.js +1 -1
  30. package/utils/artifactize.js +1 -1
  31. package/utils/checkMigrate.js +1 -1
  32. package/utils/entitiesToDB.js +2 -2
  33. package/utils/findPath.js +1 -1
  34. package/utils/methodDocumentor.js +260 -0
  35. package/utils/modify.js +13 -15
  36. package/utils/packModificationScript.js +1 -1
  37. package/utils/pre-commit.sh +2 -0
  38. package/utils/taskMover.js +309 -0
  39. package/utils/tbScript.js +89 -34
  40. package/utils/tbUtils.js +41 -21
  41. package/utils/testRunner.js +1 -1
  42. package/utils/troubleshootingAdapter.js +9 -6
  43. package/workflows/README.md +0 -3
Binary file
@@ -0,0 +1,180 @@
1
+ {
2
+ "openapi": "3.0.2",
3
+ "info": {
4
+ "title": "adapter-apic",
5
+ "version": "1.0.0"
6
+ },
7
+ "paths": {
8
+ "/mo/uni/{tenantName}": {
9
+ "post": {
10
+ "operationId": "createApplicationProfile",
11
+ "responses": {
12
+ "200": {
13
+ "description": "Successful operation",
14
+ "content": {
15
+ "application/json": {
16
+ "schema": {
17
+ "title": "result",
18
+ "type": "object"
19
+ }
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "parameters": [
25
+ {
26
+ "name": "tenantName",
27
+ "in": "path",
28
+ "required": true,
29
+ "schema": {
30
+ "title": "tenantName",
31
+ "type": "string"
32
+ }
33
+ }
34
+ ],
35
+ "requestBody": {
36
+ "content": {
37
+ "application/json": {
38
+ "schema": {
39
+ "type": "object"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "delete": {
46
+ "operationId": "deleteTenant",
47
+ "responses": {
48
+ "200": {
49
+ "description": "Successful operation",
50
+ "content": {
51
+ "application/json": {
52
+ "schema": {
53
+ "title": "result",
54
+ "type": "object"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "parameters": [
61
+ {
62
+ "name": "tenantName",
63
+ "in": "path",
64
+ "required": true,
65
+ "schema": {
66
+ "title": "tenantName",
67
+ "type": "string"
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ },
73
+ "/mo/uni/{tenantName}/{applicationProfile}": {
74
+ "post": {
75
+ "operationId": "createEPG",
76
+ "responses": {
77
+ "200": {
78
+ "description": "Successful operation",
79
+ "content": {
80
+ "application/json": {
81
+ "schema": {
82
+ "title": "result",
83
+ "type": "object"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "parameters": [
90
+ {
91
+ "name": "tenantName",
92
+ "in": "path",
93
+ "required": true,
94
+ "schema": {
95
+ "title": "tenantName",
96
+ "type": "string"
97
+ }
98
+ },
99
+ {
100
+ "name": "applicationProfile",
101
+ "in": "path",
102
+ "required": true,
103
+ "schema": {
104
+ "title": "applicationProfile",
105
+ "type": "string"
106
+ }
107
+ }
108
+ ],
109
+ "requestBody": {
110
+ "content": {
111
+ "application/json": {
112
+ "schema": {
113
+ "type": "object"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "/mo/uni/{tenantName}/{applicationProfile}/{epgName}": {
121
+ "post": {
122
+ "operationId": "assignPort",
123
+ "responses": {
124
+ "200": {
125
+ "description": "Successful operation",
126
+ "content": {
127
+ "application/json": {
128
+ "schema": {
129
+ "title": "result",
130
+ "type": "object"
131
+ }
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "parameters": [
137
+ {
138
+ "name": "tenantName",
139
+ "in": "path",
140
+ "required": true,
141
+ "schema": {
142
+ "title": "tenantName",
143
+ "type": "string"
144
+ }
145
+ },
146
+ {
147
+ "name": "applicationProfile",
148
+ "in": "path",
149
+ "required": true,
150
+ "schema": {
151
+ "title": "applicationProfile",
152
+ "type": "string"
153
+ }
154
+ },
155
+ {
156
+ "name": "epgName",
157
+ "in": "path",
158
+ "required": true,
159
+ "schema": {
160
+ "title": "epgName",
161
+ "type": "string"
162
+ }
163
+ }
164
+ ],
165
+ "requestBody": {
166
+ "content": {
167
+ "application/json": {
168
+ "schema": {
169
+ "type": "object"
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "components": {
178
+ "schemas": {}
179
+ }
180
+ }
@@ -0,0 +1,141 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: adapter-apic
4
+ contact: {}
5
+ version: '1.0.0'
6
+ servers:
7
+ - url: https://{defaultHost}
8
+ variables:
9
+ defaultHost:
10
+ default: www.example.com
11
+ paths:
12
+ /mo/uni/{tenantName}:
13
+ post:
14
+ summary: createApplicationProfile
15
+ description: ''
16
+ operationId: createApplicationProfile
17
+ parameters:
18
+ - name: tenantName
19
+ in: path
20
+ description: ''
21
+ required: true
22
+ style: simple
23
+ schema:
24
+ type: string
25
+ requestBody:
26
+ description: ''
27
+ content:
28
+ application/json:
29
+ schema:
30
+ type: object
31
+ required: false
32
+ responses:
33
+ '200':
34
+ description: Successful operation
35
+ headers: {}
36
+ content:
37
+ application/json:
38
+ schema:
39
+ type: object
40
+ deprecated: false
41
+ delete:
42
+ summary: deleteTenant
43
+ description: ''
44
+ operationId: deleteTenant
45
+ parameters:
46
+ - name: tenantName
47
+ in: path
48
+ description: ''
49
+ required: true
50
+ style: simple
51
+ schema:
52
+ type: string
53
+ responses:
54
+ '200':
55
+ description: Successful operation
56
+ headers: {}
57
+ content:
58
+ application/json:
59
+ schema:
60
+ type: object
61
+ deprecated: false
62
+ /mo/uni/{tenantName}/{applicationProfile}:
63
+ post:
64
+ summary: createEPG
65
+ description: ''
66
+ operationId: createEPG
67
+ parameters:
68
+ - name: tenantName
69
+ in: path
70
+ description: ''
71
+ required: true
72
+ style: simple
73
+ schema:
74
+ type: string
75
+ - name: applicationProfile
76
+ in: path
77
+ description: ''
78
+ required: true
79
+ style: simple
80
+ schema:
81
+ type: string
82
+ requestBody:
83
+ description: ''
84
+ content:
85
+ application/json:
86
+ schema:
87
+ type: object
88
+ required: false
89
+ responses:
90
+ '200':
91
+ description: Successful operation
92
+ headers: {}
93
+ content:
94
+ application/json:
95
+ schema:
96
+ type: object
97
+ deprecated: false
98
+ /mo/uni/{tenantName}/{applicationProfile}/{epgName}:
99
+ post:
100
+ summary: assignPort
101
+ description: ''
102
+ operationId: assignPort
103
+ parameters:
104
+ - name: tenantName
105
+ in: path
106
+ description: ''
107
+ required: true
108
+ style: simple
109
+ schema:
110
+ type: string
111
+ - name: applicationProfile
112
+ in: path
113
+ description: ''
114
+ required: true
115
+ style: simple
116
+ schema:
117
+ type: string
118
+ - name: epgName
119
+ in: path
120
+ description: ''
121
+ required: true
122
+ style: simple
123
+ schema:
124
+ type: string
125
+ requestBody:
126
+ description: ''
127
+ content:
128
+ application/json:
129
+ schema:
130
+ type: object
131
+ required: false
132
+ responses:
133
+ '200':
134
+ description: Successful operation
135
+ headers: {}
136
+ content:
137
+ application/json:
138
+ schema:
139
+ type: object
140
+ deprecated: false
141
+ tags: []
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.3.4",
3
- "configLines": 2383,
4
- "scriptLines": 1707,
5
- "codeLines": 3054,
6
- "testLines": 3140,
7
- "testCases": 138,
8
- "totalCodeLines": 7901,
9
- "wfTasks": 23
2
+ "version": "0.4.0",
3
+ "configLines": 3106,
4
+ "scriptLines": 1783,
5
+ "codeLines": 2552,
6
+ "testLines": 3616,
7
+ "testCases": 168,
8
+ "totalCodeLines": 7951,
9
+ "wfTasks": 31
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": 17
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": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
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": 1728
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 83
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 630
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 15
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1350
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": 3708
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 98
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -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": 17
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": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
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": 1728
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 83
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 630
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 15
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1350
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": 3708
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 98
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -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": 17
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": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.1.7"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 347
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": 1734
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 83
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 630
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 15
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": 3817
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 98
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }