@itentialopensource/adapter-openstack_neutron 0.1.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/.eslintignore +5 -0
- package/.eslintrc.js +18 -0
- package/.jshintrc +3 -0
- package/AUTH.md +44 -0
- package/BROKER.md +199 -0
- package/CALLS.md +2000 -0
- package/CHANGELOG.md +9 -0
- package/CODE_OF_CONDUCT.md +43 -0
- package/CONTRIBUTING.md +172 -0
- package/ENHANCE.md +69 -0
- package/LICENSE +201 -0
- package/PROPERTIES.md +641 -0
- package/README.md +337 -0
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +37134 -0
- package/adapterBase.js +1788 -0
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/.system/action.json +50 -0
- package/entities/.system/mockdatafiles/getToken-default.json +242 -0
- package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
- package/entities/.system/schema.json +19 -0
- package/entities/.system/schemaTokenReq.json +53 -0
- package/entities/.system/schemaTokenResp.json +49 -0
- package/entities/APIVersions/action.json +46 -0
- package/entities/APIVersions/schema.json +20 -0
- package/entities/AddressGroups/action.json +146 -0
- package/entities/AddressGroups/schema.json +69 -0
- package/entities/AddressScopes/action.json +106 -0
- package/entities/AddressScopes/schema.json +78 -0
- package/entities/Agents/action.json +86 -0
- package/entities/Agents/schema.json +88 -0
- package/entities/AutoAllocatedTopologies/action.json +45 -0
- package/entities/AutoAllocatedTopologies/schema.json +31 -0
- package/entities/AvailabilityZones/action.json +25 -0
- package/entities/AvailabilityZones/schema.json +19 -0
- package/entities/BGPPeer/action.json +106 -0
- package/entities/BGPPeer/schema.json +34 -0
- package/entities/BGPSpeaker/action.json +228 -0
- package/entities/BGPSpeaker/schema.json +40 -0
- package/entities/BGPVPNs/action.json +106 -0
- package/entities/BGPVPNs/schema.json +34 -0
- package/entities/DHCPAgentScheduler/action.json +86 -0
- package/entities/DHCPAgentScheduler/schema.json +44 -0
- package/entities/Extensions/action.json +46 -0
- package/entities/Extensions/schema.json +20 -0
- package/entities/FWaaSV20CURRENTFwaasFirewallGroupsFirewallPoliciesFirewallRules/action.json +350 -0
- package/entities/FWaaSV20CURRENTFwaasFirewallGroupsFirewallPoliciesFirewallRules/schema.json +68 -0
- package/entities/FirewallLogs/action.json +106 -0
- package/entities/FirewallLogs/schema.json +45 -0
- package/entities/FloatingIPPoolsFloatingipPools/action.json +25 -0
- package/entities/FloatingIPPoolsFloatingipPools/schema.json +19 -0
- package/entities/FloatingIPsFloatingips/action.json +106 -0
- package/entities/FloatingIPsFloatingips/schema.json +177 -0
- package/entities/FloatingIPsPortForwarding/action.json +106 -0
- package/entities/FloatingIPsPortForwarding/schema.json +100 -0
- package/entities/L3AgentScheduler/action.json +86 -0
- package/entities/L3AgentScheduler/schema.json +44 -0
- package/entities/LocalIPAssociationsPortAssociations/action.json +65 -0
- package/entities/LocalIPAssociationsPortAssociations/schema.json +76 -0
- package/entities/LocalIPsLocalIps/action.json +106 -0
- package/entities/LocalIPsLocalIps/schema.json +122 -0
- package/entities/LogResource/action.json +106 -0
- package/entities/LogResource/schema.json +122 -0
- package/entities/LoggableResource/action.json +25 -0
- package/entities/LoggableResource/schema.json +19 -0
- package/entities/LoggingResources/action.json +106 -0
- package/entities/LoggingResources/schema.json +34 -0
- package/entities/MeteringLabelsAndRulesMeteringLabelsMeteringLabelRules/action.json +168 -0
- package/entities/MeteringLabelsAndRulesMeteringLabelsMeteringLabelRules/schema.json +125 -0
- package/entities/NetworkAssociations/action.json +86 -0
- package/entities/NetworkAssociations/schema.json +44 -0
- package/entities/NetworkIPAvailabilityAndUsageStats/action.json +46 -0
- package/entities/NetworkIPAvailabilityAndUsageStats/schema.json +75 -0
- package/entities/NetworkSegmentRanges/action.json +106 -0
- package/entities/NetworkSegmentRanges/schema.json +133 -0
- package/entities/NetworkingFlavorsFrameworkV20CURRENTFlavorServiceProfile/action.json +248 -0
- package/entities/NetworkingFlavorsFrameworkV20CURRENTFlavorServiceProfile/schema.json +85 -0
- package/entities/Networks/action.json +106 -0
- package/entities/Networks/schema.json +199 -0
- package/entities/PortAssociations/action.json +106 -0
- package/entities/PortAssociations/schema.json +45 -0
- package/entities/Ports/action.json +106 -0
- package/entities/Ports/schema.json +221 -0
- package/entities/QoSBandwidthLimitRules/action.json +106 -0
- package/entities/QoSBandwidthLimitRules/schema.json +89 -0
- package/entities/QoSDSCPMarkingRules/action.json +106 -0
- package/entities/QoSDSCPMarkingRules/schema.json +78 -0
- package/entities/QoSMinimumBandwidthRules/action.json +106 -0
- package/entities/QoSMinimumBandwidthRules/schema.json +78 -0
- package/entities/QoSMinimumPacketRateRules/action.json +106 -0
- package/entities/QoSMinimumPacketRateRules/schema.json +78 -0
- package/entities/QoSPacketRateLimitRules/action.json +106 -0
- package/entities/QoSPacketRateLimitRules/schema.json +89 -0
- package/entities/QoSPoliciesQos/action.json +106 -0
- package/entities/QoSPoliciesQos/schema.json +133 -0
- package/entities/QoSRuleTypes/action.json +46 -0
- package/entities/QoSRuleTypes/schema.json +53 -0
- package/entities/QualityOfServiceMinimumPacketRateRuleAliasAPI/action.json +65 -0
- package/entities/QualityOfServiceMinimumPacketRateRuleAliasAPI/schema.json +32 -0
- package/entities/QualityOfServiceRulesAliasAPI/action.json +187 -0
- package/entities/QualityOfServiceRulesAliasAPI/schema.json +49 -0
- package/entities/QuotasDetailsExtensionQuotaDetails/action.json +25 -0
- package/entities/QuotasDetailsExtensionQuotaDetails/schema.json +30 -0
- package/entities/QuotasExtensionQuotas/action.json +107 -0
- package/entities/QuotasExtensionQuotas/schema.json +34 -0
- package/entities/RBACPolicies/action.json +106 -0
- package/entities/RBACPolicies/schema.json +111 -0
- package/entities/RouterAssociations/action.json +106 -0
- package/entities/RouterAssociations/schema.json +45 -0
- package/entities/RouterNDPProxyNdpProxies/action.json +106 -0
- package/entities/RouterNDPProxyNdpProxies/schema.json +122 -0
- package/entities/RoutersConntrackHelperCTTargetRules/action.json +106 -0
- package/entities/RoutersConntrackHelperCTTargetRules/schema.json +67 -0
- package/entities/RoutersRouters/action.json +186 -0
- package/entities/RoutersRouters/schema.json +137 -0
- package/entities/SecurityGroupRulesSecurityGroupRules/action.json +86 -0
- package/entities/SecurityGroupRulesSecurityGroupRules/schema.json +143 -0
- package/entities/SecurityGroupsSecurityGroups/action.json +106 -0
- package/entities/SecurityGroupsSecurityGroups/schema.json +122 -0
- package/entities/Segments/action.json +106 -0
- package/entities/Segments/schema.json +111 -0
- package/entities/ServiceProviders/action.json +25 -0
- package/entities/ServiceProviders/schema.json +19 -0
- package/entities/SubnetPoolPrefixOperationsSubnetpoolPrefixOps/action.json +44 -0
- package/entities/SubnetPoolPrefixOperationsSubnetpoolPrefixOps/schema.json +31 -0
- package/entities/SubnetPoolsExtensionSubnetpools/action.json +106 -0
- package/entities/SubnetPoolsExtensionSubnetpools/schema.json +199 -0
- package/entities/Subnets/action.json +106 -0
- package/entities/Subnets/schema.json +221 -0
- package/entities/TagExtensionTags/action.json +126 -0
- package/entities/TagExtensionTags/schema.json +46 -0
- package/entities/TapAsAService/action.json +208 -0
- package/entities/TapAsAService/schema.json +72 -0
- package/entities/TrunkNetworking/action.json +167 -0
- package/entities/TrunkNetworking/schema.json +147 -0
- package/entities/VPNaaS20VpnVpnservicesIkepoliciesIpsecpoliciesEndpointGroupsIpsecSiteConnections/action.json +514 -0
- package/entities/VPNaaS20VpnVpnservicesIkepoliciesIpsecpoliciesEndpointGroupsIpsecSiteConnections/schema.json +98 -0
- package/error.json +190 -0
- package/package.json +87 -0
- package/pronghorn.json +17931 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +1284 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/report/creationReport.json +2575 -0
- package/report/neutron-openapi.json +14594 -0
- package/report/updateReport1662381141928.json +120 -0
- package/sampleProperties.json +198 -0
- package/test/integration/adapterTestBasicGet.js +85 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +8868 -0
- package/test/unit/adapterBaseTestUnit.js +952 -0
- package/test/unit/adapterTestUnit.js +9550 -0
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +146 -0
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +179 -0
- package/utils/findPath.js +74 -0
- package/utils/methodDocumentor.js +225 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +35 -0
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +32 -0
- package/utils/removeHooks.js +20 -0
- package/utils/setup.js +33 -0
- package/utils/tbScript.js +184 -0
- package/utils/tbUtils.js +469 -0
- package/utils/testRunner.js +298 -0
- package/utils/troubleshootingAdapter.js +190 -0
- package/workflows/README.md +3 -0
|
@@ -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": 15
|
|
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.47.0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 73
|
|
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": 9551
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 629
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 8869
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 310
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"owner": "staticFile",
|
|
96
|
+
"description": "Number of lines of code in adapterBase.js",
|
|
97
|
+
"value": 1789
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"owner": "staticFile",
|
|
101
|
+
"description": "Number of static files added",
|
|
102
|
+
"value": 37
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"owner": "Overall",
|
|
106
|
+
"description": "Total lines of Code",
|
|
107
|
+
"value": 20209
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 939
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "Adapter-openstack_neutron",
|
|
3
|
+
"type": "OpenstackNeutron",
|
|
4
|
+
"properties": {
|
|
5
|
+
"host": "192.168.0.108",
|
|
6
|
+
"port": 9696,
|
|
7
|
+
"base_path": "",
|
|
8
|
+
"version": "",
|
|
9
|
+
"cache_location": "none",
|
|
10
|
+
"encode_pathvars": true,
|
|
11
|
+
"encode_queryvars": true,
|
|
12
|
+
"save_metric": false,
|
|
13
|
+
"stub": true,
|
|
14
|
+
"protocol": "https",
|
|
15
|
+
"authentication": {
|
|
16
|
+
"auth_method": "request_token",
|
|
17
|
+
"username": "admin",
|
|
18
|
+
"password": "hEJ6Lbtc40bPdDno7NVpYg8kJfN9Bm7Z",
|
|
19
|
+
"token": "",
|
|
20
|
+
"token_timeout": 600000,
|
|
21
|
+
"token_cache": "local",
|
|
22
|
+
"invalid_token_error": 401,
|
|
23
|
+
"auth_field": "header.headers.X-Auth-Token",
|
|
24
|
+
"auth_field_format": "{token}",
|
|
25
|
+
"auth_logging": false,
|
|
26
|
+
"client_id": "",
|
|
27
|
+
"client_secret": "",
|
|
28
|
+
"grant_type": "",
|
|
29
|
+
"os_user_domain_name": "Default",
|
|
30
|
+
"os_project_name": "admin",
|
|
31
|
+
"os_project_domain_name": "Default"
|
|
32
|
+
},
|
|
33
|
+
"healthcheck": {
|
|
34
|
+
"type": "intermittent",
|
|
35
|
+
"frequency": 600000,
|
|
36
|
+
"query_object": {}
|
|
37
|
+
},
|
|
38
|
+
"throttle": {
|
|
39
|
+
"throttle_enabled": false,
|
|
40
|
+
"number_pronghorns": 1,
|
|
41
|
+
"sync_async": "sync",
|
|
42
|
+
"max_in_queue": 1000,
|
|
43
|
+
"concurrent_max": 1,
|
|
44
|
+
"expire_timeout": 0,
|
|
45
|
+
"avg_runtime": 200,
|
|
46
|
+
"priorities": [
|
|
47
|
+
{
|
|
48
|
+
"value": 0,
|
|
49
|
+
"percent": 100
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"request": {
|
|
54
|
+
"number_redirects": 0,
|
|
55
|
+
"number_retries": 3,
|
|
56
|
+
"limit_retry_error": [
|
|
57
|
+
0
|
|
58
|
+
],
|
|
59
|
+
"failover_codes": [],
|
|
60
|
+
"attempt_timeout": 5000,
|
|
61
|
+
"global_request": {
|
|
62
|
+
"payload": {},
|
|
63
|
+
"uriOptions": {},
|
|
64
|
+
"addlHeaders": {},
|
|
65
|
+
"authData": {}
|
|
66
|
+
},
|
|
67
|
+
"healthcheck_on_timeout": true,
|
|
68
|
+
"return_raw": false,
|
|
69
|
+
"archiving": false,
|
|
70
|
+
"return_request": false
|
|
71
|
+
},
|
|
72
|
+
"proxy": {
|
|
73
|
+
"enabled": false,
|
|
74
|
+
"host": "",
|
|
75
|
+
"port": 1,
|
|
76
|
+
"protocol": "http",
|
|
77
|
+
"username": "",
|
|
78
|
+
"password": ""
|
|
79
|
+
},
|
|
80
|
+
"ssl": {
|
|
81
|
+
"ecdhCurve": "",
|
|
82
|
+
"enabled": false,
|
|
83
|
+
"accept_invalid_cert": false,
|
|
84
|
+
"ca_file": "",
|
|
85
|
+
"key_file": "",
|
|
86
|
+
"cert_file": "",
|
|
87
|
+
"secure_protocol": "",
|
|
88
|
+
"ciphers": ""
|
|
89
|
+
},
|
|
90
|
+
"mongo": {
|
|
91
|
+
"host": "",
|
|
92
|
+
"port": 0,
|
|
93
|
+
"database": "",
|
|
94
|
+
"username": "",
|
|
95
|
+
"password": "",
|
|
96
|
+
"replSet": "",
|
|
97
|
+
"db_ssl": {
|
|
98
|
+
"enabled": false,
|
|
99
|
+
"accept_invalid_cert": false,
|
|
100
|
+
"ca_file": "",
|
|
101
|
+
"key_file": "",
|
|
102
|
+
"cert_file": ""
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"devicebroker": {
|
|
106
|
+
"getDevice": [
|
|
107
|
+
{
|
|
108
|
+
"path": "/get/devices/{id}",
|
|
109
|
+
"method": "GET",
|
|
110
|
+
"query": {},
|
|
111
|
+
"body": {},
|
|
112
|
+
"headers": {},
|
|
113
|
+
"handleFailure": "ignore",
|
|
114
|
+
"requestFields": {
|
|
115
|
+
"id": "name"
|
|
116
|
+
},
|
|
117
|
+
"responseDatakey": "",
|
|
118
|
+
"responseFields": {
|
|
119
|
+
"name": "host",
|
|
120
|
+
"ostype": "os",
|
|
121
|
+
"ostypePrefix": "system-",
|
|
122
|
+
"ipaddress": "attributes.ipaddr",
|
|
123
|
+
"port": "443"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"getDevicesFiltered": [
|
|
128
|
+
{
|
|
129
|
+
"path": "/get/devices",
|
|
130
|
+
"method": "GET",
|
|
131
|
+
"query": {},
|
|
132
|
+
"body": {},
|
|
133
|
+
"headers": {},
|
|
134
|
+
"handleFailure": "ignore",
|
|
135
|
+
"requestFields": {},
|
|
136
|
+
"responseDatakey": "",
|
|
137
|
+
"responseFields": {
|
|
138
|
+
"name": "host",
|
|
139
|
+
"ostype": "os",
|
|
140
|
+
"ostypePrefix": "system-",
|
|
141
|
+
"ipaddress": "attributes.ipaddr",
|
|
142
|
+
"port": "443"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"isAlive": [
|
|
147
|
+
{
|
|
148
|
+
"path": "/get/devices/{id}/status",
|
|
149
|
+
"method": "GET",
|
|
150
|
+
"query": {},
|
|
151
|
+
"body": {},
|
|
152
|
+
"headers": {},
|
|
153
|
+
"handleFailure": "ignore",
|
|
154
|
+
"requestFields": {
|
|
155
|
+
"id": "name"
|
|
156
|
+
},
|
|
157
|
+
"responseDatakey": "",
|
|
158
|
+
"responseFields": {
|
|
159
|
+
"status": "status",
|
|
160
|
+
"statusValue": "online"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"getConfig": [
|
|
165
|
+
{
|
|
166
|
+
"path": "/get/devices/{id}/configPart1",
|
|
167
|
+
"method": "GET",
|
|
168
|
+
"query": {},
|
|
169
|
+
"body": {},
|
|
170
|
+
"headers": {},
|
|
171
|
+
"handleFailure": "ignore",
|
|
172
|
+
"requestFields": {
|
|
173
|
+
"id": "name"
|
|
174
|
+
},
|
|
175
|
+
"responseDatakey": "",
|
|
176
|
+
"responseFields": {}
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"getCount": [
|
|
180
|
+
{
|
|
181
|
+
"path": "/get/devices",
|
|
182
|
+
"method": "GET",
|
|
183
|
+
"query": {},
|
|
184
|
+
"body": {},
|
|
185
|
+
"headers": {},
|
|
186
|
+
"handleFailure": "ignore",
|
|
187
|
+
"requestFields": {},
|
|
188
|
+
"responseDatakey": "",
|
|
189
|
+
"responseFields": {}
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"groups": [],
|
|
195
|
+
"brokers": [],
|
|
196
|
+
"logLevel": "none",
|
|
197
|
+
"timeout": 120000
|
|
198
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* @copyright Itential, LLC 2020 */
|
|
2
|
+
|
|
3
|
+
/* global describe context before after */
|
|
4
|
+
/* eslint global-require: warn */
|
|
5
|
+
/* eslint no-unused-vars: warn */
|
|
6
|
+
/* eslint import/no-extraneous-dependencies: warn */
|
|
7
|
+
/* eslint import/no-dynamic-require: warn */
|
|
8
|
+
/* eslint import/no-unresolved: warn */
|
|
9
|
+
|
|
10
|
+
const mocha = require('mocha');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const assert = require('assert');
|
|
13
|
+
const itParam = require('mocha-param');
|
|
14
|
+
|
|
15
|
+
const utils = require('../../utils/tbUtils');
|
|
16
|
+
const basicGet = require('../../utils/basicGet');
|
|
17
|
+
const { name } = require('../../package.json');
|
|
18
|
+
const { methods } = require('../../pronghorn.json');
|
|
19
|
+
|
|
20
|
+
const getPronghornProps = (iapDir) => {
|
|
21
|
+
const { Discovery } = require('@itential/itential-utils');
|
|
22
|
+
console.log('Retrieving properties.json file...');
|
|
23
|
+
const rawProps = require(path.join(iapDir, 'properties.json'));
|
|
24
|
+
console.log('Decrypting properties...');
|
|
25
|
+
const discovery = new Discovery();
|
|
26
|
+
const pronghornProps = utils.decryptProperties(rawProps, path.join(__dirname, '..'), discovery);
|
|
27
|
+
console.log('Found properties.\n');
|
|
28
|
+
return pronghornProps;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
let a;
|
|
32
|
+
|
|
33
|
+
describe('[integration] Adapter BasicGET Test', () => {
|
|
34
|
+
context('Testing GET calls without query parameters', () => {
|
|
35
|
+
before(async () => {
|
|
36
|
+
const iapDir = path.join(__dirname, '../../../../../');
|
|
37
|
+
if (!utils.areWeUnderIAPinstallationDirectory()) {
|
|
38
|
+
const sampleProperties = require('../../sampleProperties.json');
|
|
39
|
+
const adapter = { properties: sampleProperties };
|
|
40
|
+
a = basicGet.getAdapterInstance(adapter);
|
|
41
|
+
} else {
|
|
42
|
+
const pronghornProps = getPronghornProps(iapDir);
|
|
43
|
+
console.log('Connecting to Database...');
|
|
44
|
+
const database = await basicGet.connect(pronghornProps);
|
|
45
|
+
console.log('Connection established.');
|
|
46
|
+
const adapter = await database.collection(utils.SERVICE_CONFIGS_COLLECTION).findOne(
|
|
47
|
+
{ model: name }
|
|
48
|
+
);
|
|
49
|
+
a = basicGet.getAdapterInstance(adapter);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
after((done) => {
|
|
54
|
+
done();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const basicGets = methods.filter((method) => (method.route.verb === 'GET' && method.input.length === 0));
|
|
58
|
+
if (basicGets.length === 0) {
|
|
59
|
+
console.log('No non-parameter GET calls found.');
|
|
60
|
+
process.exit(0);
|
|
61
|
+
}
|
|
62
|
+
const functionNames = basicGets.map((g) => g.name);
|
|
63
|
+
const request = function request(f, ad) {
|
|
64
|
+
return new Promise((resolve, reject) => {
|
|
65
|
+
const getRespCode = (resp) => {
|
|
66
|
+
if (resp) {
|
|
67
|
+
if (resp.metrics.code !== 200) {
|
|
68
|
+
console.log('\x1b[31m', `Testing ${f} \nResponseCode: ${resp.metrics.code}`);
|
|
69
|
+
}
|
|
70
|
+
resolve(resp.metrics.code);
|
|
71
|
+
} else {
|
|
72
|
+
console.log('\x1b[31m', `call ${f} results in failure`);
|
|
73
|
+
reject(new Error(`${f} failed`));
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
ad[f](getRespCode, console.log);
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
itParam('GET call should return 200', functionNames, (fname) => {
|
|
81
|
+
console.log(`\t ${fname}`);
|
|
82
|
+
return request(fname, a).then((result) => assert.equal(result, 200));
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* @copyright Itential, LLC 2020 */
|
|
2
|
+
|
|
3
|
+
/* global describe it context before after */
|
|
4
|
+
/* eslint no-unused-vars: warn */
|
|
5
|
+
|
|
6
|
+
const mocha = require('mocha');
|
|
7
|
+
const assert = require('assert');
|
|
8
|
+
const diagnostics = require('network-diagnostics');
|
|
9
|
+
|
|
10
|
+
let host;
|
|
11
|
+
process.argv.forEach((val) => {
|
|
12
|
+
if (val.indexOf('--HOST') === 0) {
|
|
13
|
+
[, host] = val.split('=');
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('[integration] Adapter Test', () => {
|
|
18
|
+
context(`Testing network connection on ${host}`, () => {
|
|
19
|
+
before(() => {
|
|
20
|
+
diagnostics.setTestURL(host);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
after((done) => {
|
|
24
|
+
done();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('DNS resolve', (done) => {
|
|
28
|
+
diagnostics.haveDNS((result) => {
|
|
29
|
+
try {
|
|
30
|
+
assert.equal(result, true);
|
|
31
|
+
done();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
done(error);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('Responds to ping', (done) => {
|
|
39
|
+
diagnostics.havePing((result) => {
|
|
40
|
+
try {
|
|
41
|
+
assert.equal(result, true);
|
|
42
|
+
done();
|
|
43
|
+
} catch (error) {
|
|
44
|
+
done(error);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('Support HTTP on port 80', (done) => {
|
|
50
|
+
diagnostics.haveHTTP((result) => {
|
|
51
|
+
try {
|
|
52
|
+
assert.equal(result, true);
|
|
53
|
+
done();
|
|
54
|
+
} catch (error) {
|
|
55
|
+
done(error);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('Support HTTPS on port 443', (done) => {
|
|
61
|
+
diagnostics.haveHTTPS((result) => {
|
|
62
|
+
try {
|
|
63
|
+
assert.equal(result, true);
|
|
64
|
+
done();
|
|
65
|
+
} catch (error) {
|
|
66
|
+
done(error);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('Support IPv4', (done) => {
|
|
72
|
+
diagnostics.haveIPv4Async((result) => {
|
|
73
|
+
try {
|
|
74
|
+
assert.equal(result, true);
|
|
75
|
+
done();
|
|
76
|
+
} catch (error) {
|
|
77
|
+
done(error);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('Support IPv6', (done) => {
|
|
83
|
+
diagnostics.haveIPv6Async((result) => {
|
|
84
|
+
try {
|
|
85
|
+
assert.equal(result, true);
|
|
86
|
+
done();
|
|
87
|
+
} catch (error) {
|
|
88
|
+
done(error);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
});
|