@itentialopensource/adapter-alkira 0.3.1 → 0.4.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.
- package/CALLS.md +10 -10
- package/CHANGELOG.md +8 -0
- package/metadata.json +3 -1
- package/package.json +3 -3
- package/propertiesSchema.json +10 -1
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +2 -2
- package/report/updateReport1698420400445.json +120 -0
- package/utils/methodDocumentor.js +16 -3
package/CALLS.md
CHANGED
|
@@ -983,7 +983,7 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
983
983
|
<td style="padding:15px">Yes</td>
|
|
984
984
|
</tr>
|
|
985
985
|
<tr>
|
|
986
|
-
<td style="padding:15px">listofallproducts(type = CXP, category = INFRA, size = SMALL, provider = CISCO, callback)</td>
|
|
986
|
+
<td style="padding:15px">listofallproducts(type = 'CXP', category = 'INFRA', size = 'SMALL', provider = 'CISCO', callback)</td>
|
|
987
987
|
<td style="padding:15px">List of all products</td>
|
|
988
988
|
<td style="padding:15px">{base_path}/{version}/inventory/products?{query}</td>
|
|
989
989
|
<td style="padding:15px">Yes</td>
|
|
@@ -995,13 +995,13 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
995
995
|
<td style="padding:15px">Yes</td>
|
|
996
996
|
</tr>
|
|
997
997
|
<tr>
|
|
998
|
-
<td style="padding:15px">getResourceUsage(category = UNKNOWN, type = UNKNOWN, scope = UNKNOWN, callback)</td>
|
|
998
|
+
<td style="padding:15px">getResourceUsage(category = 'UNKNOWN', type = 'UNKNOWN', scope = 'UNKNOWN', callback)</td>
|
|
999
999
|
<td style="padding:15px">getResourceUsage</td>
|
|
1000
1000
|
<td style="padding:15px">{base_path}/{version}/resourceusage?{query}</td>
|
|
1001
1001
|
<td style="padding:15px">Yes</td>
|
|
1002
1002
|
</tr>
|
|
1003
1003
|
<tr>
|
|
1004
|
-
<td style="padding:15px">getCXPs(name, state = AVAILABLE, callback)</td>
|
|
1004
|
+
<td style="padding:15px">getCXPs(name, state = 'AVAILABLE', callback)</td>
|
|
1005
1005
|
<td style="padding:15px">getCXPs</td>
|
|
1006
1006
|
<td style="padding:15px">{base_path}/{version}/inventory/cxps?{query}</td>
|
|
1007
1007
|
<td style="padding:15px">Yes</td>
|
|
@@ -1295,7 +1295,7 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
1295
1295
|
<td style="padding:15px">Yes</td>
|
|
1296
1296
|
</tr>
|
|
1297
1297
|
<tr>
|
|
1298
|
-
<td style="padding:15px">getCloudProviderObjects(offset, limit, cloudProvider = AWS, cloudProviderObjectNativeId, cloudProviderAccountId, cloudProviderObjectType, search, sortBy, callback)</td>
|
|
1298
|
+
<td style="padding:15px">getCloudProviderObjects(offset, limit, cloudProvider = 'AWS', cloudProviderObjectNativeId, cloudProviderAccountId, cloudProviderObjectType, search, sortBy, callback)</td>
|
|
1299
1299
|
<td style="padding:15px">getCloudProviderObjects</td>
|
|
1300
1300
|
<td style="padding:15px">{base_path}/{version}/cloud-provider-objects?{query}</td>
|
|
1301
1301
|
<td style="padding:15px">Yes</td>
|
|
@@ -1349,7 +1349,7 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
1349
1349
|
<td style="padding:15px">Yes</td>
|
|
1350
1350
|
</tr>
|
|
1351
1351
|
<tr>
|
|
1352
|
-
<td style="padding:15px">getCloudInsights(offset, limit, cloudProvider = AWS, type = AWS_EIP_UNASSOCIATED, types, category = SECURITY, severity = HIGH, cloudProviderAccountId, expanded, callback)</td>
|
|
1352
|
+
<td style="padding:15px">getCloudInsights(offset, limit, cloudProvider = 'AWS', type = 'AWS_EIP_UNASSOCIATED', types, category = 'SECURITY', severity = 'HIGH', cloudProviderAccountId, expanded, callback)</td>
|
|
1353
1353
|
<td style="padding:15px">getCloudInsights</td>
|
|
1354
1354
|
<td style="padding:15px">{base_path}/{version}/cloud-insights?{query}</td>
|
|
1355
1355
|
<td style="padding:15px">Yes</td>
|
|
@@ -1373,13 +1373,13 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
1373
1373
|
<td style="padding:15px">Yes</td>
|
|
1374
1374
|
</tr>
|
|
1375
1375
|
<tr>
|
|
1376
|
-
<td style="padding:15px">getCloudInsightCategorySummaries(cloudProvider = AWS, cloudProviderAccountId, callback)</td>
|
|
1376
|
+
<td style="padding:15px">getCloudInsightCategorySummaries(cloudProvider = 'AWS', cloudProviderAccountId, callback)</td>
|
|
1377
1377
|
<td style="padding:15px">getCloudInsightCategorySummaries</td>
|
|
1378
1378
|
<td style="padding:15px">{base_path}/{version}/cloud-insights-summary?{query}</td>
|
|
1379
1379
|
<td style="padding:15px">Yes</td>
|
|
1380
1380
|
</tr>
|
|
1381
1381
|
<tr>
|
|
1382
|
-
<td style="padding:15px">getCloudInsightRefreshRequests(offset, limit, state = PENDING, callback)</td>
|
|
1382
|
+
<td style="padding:15px">getCloudInsightRefreshRequests(offset, limit, state = 'PENDING', callback)</td>
|
|
1383
1383
|
<td style="padding:15px">getCloudInsightRefreshRequests</td>
|
|
1384
1384
|
<td style="padding:15px">{base_path}/{version}/cloud-insight-refresh-requests?{query}</td>
|
|
1385
1385
|
<td style="padding:15px">Yes</td>
|
|
@@ -1403,7 +1403,7 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
1403
1403
|
<td style="padding:15px">Yes</td>
|
|
1404
1404
|
</tr>
|
|
1405
1405
|
<tr>
|
|
1406
|
-
<td style="padding:15px">getCloudInsightDefinitions(offset, limit, cloudProvider = AWS, type = AWS_EIP_UNASSOCIATED, category = SECURITY, severity = HIGH, callback)</td>
|
|
1406
|
+
<td style="padding:15px">getCloudInsightDefinitions(offset, limit, cloudProvider = 'AWS', type = 'AWS_EIP_UNASSOCIATED', category = 'SECURITY', severity = 'HIGH', callback)</td>
|
|
1407
1407
|
<td style="padding:15px">getCloudInsightDefinitions</td>
|
|
1408
1408
|
<td style="padding:15px">{base_path}/{version}/cloud-insight-definitions?{query}</td>
|
|
1409
1409
|
<td style="padding:15px">Yes</td>
|
|
@@ -1421,7 +1421,7 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
1421
1421
|
<td style="padding:15px">Yes</td>
|
|
1422
1422
|
</tr>
|
|
1423
1423
|
<tr>
|
|
1424
|
-
<td style="padding:15px">getCloudInsightDefinitionSummaries(offset, limit, cloudProvider = AWS, type = AWS_EIP_UNASSOCIATED, category = SECURITY, severity = HIGH, callback)</td>
|
|
1424
|
+
<td style="padding:15px">getCloudInsightDefinitionSummaries(offset, limit, cloudProvider = 'AWS', type = 'AWS_EIP_UNASSOCIATED', category = 'SECURITY', severity = 'HIGH', callback)</td>
|
|
1425
1425
|
<td style="padding:15px">getCloudInsightDefinitionSummaries</td>
|
|
1426
1426
|
<td style="padding:15px">{base_path}/{version}/cloud-insight-definitions-summary?{query}</td>
|
|
1427
1427
|
<td style="padding:15px">Yes</td>
|
|
@@ -2537,7 +2537,7 @@ Specific adapter calls are built based on the API of the Alkira. The Adapter Bui
|
|
|
2537
2537
|
<td style="padding:15px">Yes</td>
|
|
2538
2538
|
</tr>
|
|
2539
2539
|
<tr>
|
|
2540
|
-
<td style="padding:15px">getRoutes(tenantNetworkId, type = received, cxp, segmentName, segmentId, connectorId, search, lpmPrefix, prefixType, offset, limit, callback)</td>
|
|
2540
|
+
<td style="padding:15px">getRoutes(tenantNetworkId, type = 'received', cxp, segmentName, segmentId, connectorId, search, lpmPrefix, prefixType, offset, limit, callback)</td>
|
|
2541
2541
|
<td style="padding:15px">getRoutes</td>
|
|
2542
2542
|
<td style="padding:15px">{base_path}/{version}/tenantnetworks/{pathv1}/routes?{query}</td>
|
|
2543
2543
|
<td style="padding:15px">Yes</td>
|
package/CHANGELOG.md
CHANGED
package/metadata.json
CHANGED
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"Cloud Networking"
|
|
23
23
|
],
|
|
24
24
|
"useCases": [
|
|
25
|
-
"
|
|
25
|
+
"Add or remove Virtual Networks",
|
|
26
|
+
"Management of Cloud Network Assignments",
|
|
27
|
+
"Create, update, manage or remove Hybrid Cloud Connections"
|
|
26
28
|
],
|
|
27
29
|
"deprecated": {
|
|
28
30
|
"isDeprecated": false
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-alkira",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "This adapter integrates with system described as: alkiraApi.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Alkira",
|
|
7
7
|
"wizardVersion": "2.44.7",
|
|
8
|
-
"engineVersion": "1.67.
|
|
8
|
+
"engineVersion": "1.67.10",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"author": "Itential",
|
|
55
55
|
"homepage": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-alkira#readme",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
57
|
+
"@itentialopensource/adapter-utils": "^5.3.0",
|
|
58
58
|
"acorn": "^8.10.0",
|
|
59
59
|
"ajv": "^8.12.0",
|
|
60
60
|
"axios": "^1.4.0",
|
package/propertiesSchema.json
CHANGED
|
@@ -109,6 +109,14 @@
|
|
|
109
109
|
},
|
|
110
110
|
"cache": {
|
|
111
111
|
"$ref": "#/definitions/cache"
|
|
112
|
+
},
|
|
113
|
+
"service": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Service we are integrating with -- used with AWS Authentication",
|
|
116
|
+
"examples": [
|
|
117
|
+
"ec2",
|
|
118
|
+
"route53"
|
|
119
|
+
]
|
|
112
120
|
}
|
|
113
121
|
},
|
|
114
122
|
"required": [
|
|
@@ -131,7 +139,8 @@
|
|
|
131
139
|
"jwt_token",
|
|
132
140
|
"request_token",
|
|
133
141
|
"no_authentication",
|
|
134
|
-
"multi_step_authentication"
|
|
142
|
+
"multi_step_authentication",
|
|
143
|
+
"aws_authentication"
|
|
135
144
|
]
|
|
136
145
|
},
|
|
137
146
|
"username": {
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -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.3.0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 77
|
|
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": 19318
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 1245
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 12539
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 449
|
|
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": 33310
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 1694
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -77,6 +77,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
77
77
|
// parsing the file to get the function and class declarations.
|
|
78
78
|
const aFileFuncArgs = acorn.parse(aFile, { ecmaVersion: 2020 });
|
|
79
79
|
|
|
80
|
+
let callName = 'identifyRequest';
|
|
80
81
|
// Looping through all the declarations parsed:
|
|
81
82
|
aFileFuncArgs.body.forEach((e) => {
|
|
82
83
|
// Getting only the class declaration as it has our required functions.
|
|
@@ -89,8 +90,10 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
89
90
|
method.value.params.forEach((param) => {
|
|
90
91
|
if (param.type === 'Identifier') {
|
|
91
92
|
funcArgs.push(param.name);
|
|
93
|
+
} else if (param.type === 'RestElement') {
|
|
94
|
+
funcArgs.push(`...${param.argument.name}`);
|
|
92
95
|
} else {
|
|
93
|
-
const args = `${param.left.name} = ${param.right.
|
|
96
|
+
const args = `${param.left.name} = ${param.right.raw}`;
|
|
94
97
|
funcArgs.push(args);
|
|
95
98
|
}
|
|
96
99
|
});
|
|
@@ -102,7 +105,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
102
105
|
});
|
|
103
106
|
const requests = [];
|
|
104
107
|
for (let i = 0; i < callList.length; i += 1) {
|
|
105
|
-
if (callList[i].callee.property && callList[i].callee.property.name ===
|
|
108
|
+
if (callList[i].callee.property && callList[i].callee.property.name === callName) {
|
|
106
109
|
requests.push(callList[i]);
|
|
107
110
|
}
|
|
108
111
|
}
|
|
@@ -114,7 +117,16 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
114
117
|
const entity = expr.arguments[0].value;
|
|
115
118
|
const actionName = expr.arguments[1].value;
|
|
116
119
|
if (expr !== undefined && (expr.arguments[0].type !== 'Literal' || expr.arguments[1].type !== 'Literal')) {
|
|
117
|
-
|
|
120
|
+
const param1 = method.value.params[0];
|
|
121
|
+
const param2 = method.value.params[1];
|
|
122
|
+
if (param1.type !== 'Identifier' || param2.type !== 'Identifier'
|
|
123
|
+
|| expr.arguments[0].type !== 'Identifier' || expr.arguments[1].type !== 'Identifier'
|
|
124
|
+
|| param1.name !== expr.arguments[0].name || param2.name !== expr.arguments[1].name) {
|
|
125
|
+
throw new Error(`identifyRequest proxy method ${funcName} unknown format`);
|
|
126
|
+
} else if (callName !== 'identifyRequest') {
|
|
127
|
+
throw new Error(`MethodDocumentor not yet programmed to handle multiple helper methods: 1) ${callName}, 2) ${funcName}`);
|
|
128
|
+
}
|
|
129
|
+
callName = funcName;
|
|
118
130
|
}
|
|
119
131
|
const entityPath = getPathFromEntity(entity, actionName);
|
|
120
132
|
|
|
@@ -197,6 +209,7 @@ function readMDFile(filename, functionList) {
|
|
|
197
209
|
// Creating the tags for each method to be appended to the file.
|
|
198
210
|
const tdBeginTag = ' <td style="padding:15px">';
|
|
199
211
|
const tdEndTag = '</td>';
|
|
212
|
+
|
|
200
213
|
functionList.forEach((func) => {
|
|
201
214
|
const signCommand = `${tdBeginTag}${func.method_signature}${tdEndTag}`;
|
|
202
215
|
const descCommand = `${tdBeginTag}${func.description}${tdEndTag}`;
|