@itentialopensource/adapter-gcp_compute 0.2.0 → 1.1.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 (123) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/README.md +85 -12
  3. package/adapter.js +11822 -9796
  4. package/adapterBase.js +40 -3
  5. package/entities/.generic/action.json +5 -5
  6. package/entities/.system/action.json +1 -1
  7. package/entities/AcceleratorTypes/action.json +3 -3
  8. package/entities/Addresses/action.json +5 -5
  9. package/entities/Autoscalers/action.json +7 -7
  10. package/entities/BackendBuckets/action.json +8 -8
  11. package/entities/BackendServices/action.json +11 -11
  12. package/entities/DiskTypes/action.json +3 -3
  13. package/entities/Disks/action.json +13 -13
  14. package/entities/ExternalVpnGateways/action.json +6 -6
  15. package/entities/FirewallPolicies/action.json +382 -0
  16. package/entities/FirewallPolicies/mockdatafiles/addFirewallPolicyAssociation-default.json +45 -0
  17. package/entities/FirewallPolicies/mockdatafiles/addFirewallPolicyRule-default.json +45 -0
  18. package/entities/FirewallPolicies/mockdatafiles/cloneFirewallPolicyRule-default.json +45 -0
  19. package/entities/FirewallPolicies/mockdatafiles/deleteFirewallPolicy-default.json +45 -0
  20. package/entities/FirewallPolicies/mockdatafiles/getFirewallPolicy-default.json +45 -0
  21. package/entities/FirewallPolicies/mockdatafiles/getFirewallPolicyAssociation-default.json +7 -0
  22. package/entities/FirewallPolicies/mockdatafiles/getFirewallPolicyIamPolicy-default.json +26 -0
  23. package/entities/FirewallPolicies/mockdatafiles/getFirewallPolicyRule-default.json +32 -0
  24. package/entities/FirewallPolicies/mockdatafiles/insertFirewallPolicy-default.json +45 -0
  25. package/entities/FirewallPolicies/mockdatafiles/listFirewallPolicy-default.json +75 -0
  26. package/entities/FirewallPolicies/mockdatafiles/listFirewallPolicyAssociations-default.json +12 -0
  27. package/entities/FirewallPolicies/mockdatafiles/moveFirewallPolicy-default.json +45 -0
  28. package/entities/FirewallPolicies/mockdatafiles/patchFirewallPolicy-default.json +57 -0
  29. package/entities/FirewallPolicies/mockdatafiles/patchFirewallPolicyRule-default.json +45 -0
  30. package/entities/FirewallPolicies/mockdatafiles/removeFirewallPolicyAssociation-default.json +45 -0
  31. package/entities/FirewallPolicies/mockdatafiles/removeFirewallPolicyRule-default.json +45 -0
  32. package/entities/FirewallPolicies/mockdatafiles/setFirewallPolicyIamPolicy-default.json +26 -0
  33. package/entities/FirewallPolicies/mockdatafiles/testFirewallPolicyIamPermissions-default.json +6 -0
  34. package/entities/FirewallPolicies/schema.json +47 -0
  35. package/entities/Firewalls/action.json +6 -6
  36. package/entities/ForwardingRules/action.json +7 -7
  37. package/entities/GlobalAddresses/action.json +4 -4
  38. package/entities/GlobalForwardingRules/action.json +6 -6
  39. package/entities/GlobalNetworkEndpointGroups/action.json +7 -7
  40. package/entities/GlobalOperations/action.json +5 -5
  41. package/entities/HealthChecks/action.json +7 -7
  42. package/entities/HttpHealthChecks/action.json +6 -6
  43. package/entities/HttpsHealthChecks/action.json +6 -6
  44. package/entities/Images/action.json +10 -10
  45. package/entities/InstanceGroupManagers/action.json +20 -20
  46. package/entities/InstanceGroups/action.json +9 -9
  47. package/entities/InstanceTemplates/action.json +7 -7
  48. package/entities/Instances/action.json +40 -40
  49. package/entities/InterconnectAttachments/action.json +6 -6
  50. package/entities/InterconnectLocations/action.json +2 -2
  51. package/entities/Interconnects/action.json +6 -6
  52. package/entities/LicenseCodes/action.json +2 -2
  53. package/entities/Licenses/action.json +7 -7
  54. package/entities/MachineTypes/action.json +3 -3
  55. package/entities/NetworkEndpointGroups/action.json +9 -9
  56. package/entities/Networks/action.json +10 -10
  57. package/entities/NodeGroups/action.json +13 -13
  58. package/entities/NodeTemplates/action.json +8 -8
  59. package/entities/NodeTypes/action.json +3 -3
  60. package/entities/PacketMirrorings/action.json +7 -7
  61. package/entities/Projects/action.json +13 -13
  62. package/entities/RegionAutoscalers/action.json +6 -6
  63. package/entities/RegionBackendServices/action.json +7 -7
  64. package/entities/RegionCommitments/action.json +4 -4
  65. package/entities/RegionDiskTypes/action.json +2 -2
  66. package/entities/RegionDisks/action.json +12 -12
  67. package/entities/RegionHealthCheckServices/action.json +5 -5
  68. package/entities/RegionHealthChecks/action.json +6 -6
  69. package/entities/RegionInstanceGroupManagers/action.json +19 -19
  70. package/entities/RegionInstanceGroups/action.json +4 -4
  71. package/entities/RegionNetworkEndpointGroups/action.json +4 -4
  72. package/entities/RegionNotificationEndpoints/action.json +4 -4
  73. package/entities/RegionOperations/action.json +4 -4
  74. package/entities/RegionSslCertificates/action.json +4 -4
  75. package/entities/RegionTargetHttpProxies/action.json +5 -5
  76. package/entities/RegionTargetHttpsProxies/action.json +6 -6
  77. package/entities/RegionUrlMaps/action.json +7 -7
  78. package/entities/Regions/action.json +2 -2
  79. package/entities/Reservations/action.json +9 -9
  80. package/entities/ResourcePolicies/action.json +8 -8
  81. package/entities/Routers/action.json +10 -10
  82. package/entities/Routes/action.json +4 -4
  83. package/entities/SecurityPolicies/action.json +10 -10
  84. package/entities/Snapshots/action.json +7 -7
  85. package/entities/SslCertificates/action.json +5 -5
  86. package/entities/SslPolicies/action.json +6 -6
  87. package/entities/Subnetworks/action.json +12 -12
  88. package/entities/TargetGrpcProxies/action.json +5 -5
  89. package/entities/TargetHttpProxies/action.json +6 -6
  90. package/entities/TargetHttpsProxies/action.json +9 -9
  91. package/entities/TargetInstances/action.json +5 -5
  92. package/entities/TargetPools/action.json +11 -11
  93. package/entities/TargetSslProxies/action.json +8 -8
  94. package/entities/TargetTcpProxies/action.json +6 -6
  95. package/entities/TargetVpnGateways/action.json +5 -5
  96. package/entities/UrlMaps/action.json +9 -9
  97. package/entities/VpnGateways/action.json +8 -8
  98. package/entities/VpnTunnels/action.json +5 -5
  99. package/entities/ZoneOperations/action.json +4 -4
  100. package/entities/Zones/action.json +2 -2
  101. package/error.json +6 -0
  102. package/package.json +19 -18
  103. package/pronghorn.json +11625 -10511
  104. package/propertiesSchema.json +65 -0
  105. package/refs?service=git-upload-pack +0 -0
  106. package/report/updateReport1615068706854.json +95 -0
  107. package/report/updateReport1642776932883.json +95 -0
  108. package/sampleProperties.json +7 -3
  109. package/test/integration/adapterTestBasicGet.js +1 -1
  110. package/test/integration/adapterTestIntegration.js +463 -4
  111. package/test/unit/adapterBaseTestUnit.js +14 -6
  112. package/test/unit/adapterTestUnit.js +1122 -6
  113. package/utils/addAuth.js +94 -0
  114. package/utils/basicGet.js +1 -14
  115. package/utils/entitiesToDB.js +224 -0
  116. package/utils/modify.js +4 -4
  117. package/utils/packModificationScript.js +1 -1
  118. package/utils/patches2bundledDeps.js +90 -0
  119. package/utils/removeHooks.js +20 -0
  120. package/utils/tbScript.js +14 -8
  121. package/utils/tbUtils.js +98 -19
  122. package/utils/troubleshootingAdapter.js +2 -26
  123. package/test/integration/adapterTestIntegration_me.js +0 -464
@@ -232,6 +232,67 @@
232
232
  "type": "boolean",
233
233
  "description": "This property turns on logging of Authentication Information and should only be true when debugging authentication and connectivity",
234
234
  "default": false
235
+ },
236
+ "configureGtoken": {
237
+ "type": "object",
238
+ "properties": {
239
+ "email": {
240
+ "type": "string",
241
+ "description": "email address",
242
+ "default": ""
243
+ },
244
+ "scope": {
245
+ "type": "string",
246
+ "description": "scope",
247
+ "default": "",
248
+ "examples": [
249
+ "https://www.googleapis.com/auth/cloud-platform"
250
+ ]
251
+ },
252
+ "sub": {
253
+ "type": "string",
254
+ "description": "sub",
255
+ "default": ""
256
+ },
257
+ "keyFile": {
258
+ "type": "string",
259
+ "description": "full path to the keyfile",
260
+ "default": "",
261
+ "examples": [
262
+ "/opt/pronghorn/RENAME_TO_YOUR_KEYFILE.json"
263
+ ]
264
+ },
265
+ "key": {
266
+ "type": "string",
267
+ "description": "actual key to use",
268
+ "default": ""
269
+ },
270
+ "additionalClaims": {
271
+ "type": "string",
272
+ "description": "additional claims",
273
+ "default": ""
274
+ },
275
+ "eagerRefreshThresholdMillis": {
276
+ "type": "number",
277
+ "description": "refresh in milliseconds",
278
+ "default": 300000
279
+ }
280
+ }
281
+ },
282
+ "client_id": {
283
+ "type": "string",
284
+ "description": "The client id for OAuth requests - can also use username depending on schema",
285
+ "default": ""
286
+ },
287
+ "client_secret": {
288
+ "type": "string",
289
+ "description": "The client secret for OAuth requests - can also use password depending on schema",
290
+ "default": ""
291
+ },
292
+ "grant_type": {
293
+ "type": "string",
294
+ "description": "The grant type for OAuth requests - can also provide in schema",
295
+ "default": ""
235
296
  }
236
297
  },
237
298
  "required": [
@@ -331,6 +392,10 @@
331
392
  "examples": [
332
393
  "/api/version/ping"
333
394
  ]
395
+ },
396
+ "query_object": {
397
+ "type": "object",
398
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
334
399
  }
335
400
  },
336
401
  "required": [
Binary file
@@ -0,0 +1,95 @@
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": 29
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 12
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": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^4.39.1"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 61
43
+ },
44
+ {
45
+ "owner": "readmeMd",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 615
48
+ },
49
+ {
50
+ "owner": "unitTestJS",
51
+ "description": "Number of lines of code in unit tests",
52
+ "value": 27926
53
+ },
54
+ {
55
+ "owner": "unitTestJS",
56
+ "description": "Number of unit tests",
57
+ "value": 1786
58
+ },
59
+ {
60
+ "owner": "integrationTestJS",
61
+ "description": "Number of lines of code in integration tests",
62
+ "value": 30809
63
+ },
64
+ {
65
+ "owner": "integrationTestJS",
66
+ "description": "Number of integration tests",
67
+ "value": 545
68
+ },
69
+ {
70
+ "owner": "staticFile",
71
+ "description": "Number of lines of code in adapterBase.js",
72
+ "value": 1007
73
+ },
74
+ {
75
+ "owner": "staticFile",
76
+ "description": "Number of static files added",
77
+ "value": 30
78
+ },
79
+ {
80
+ "owner": "Overall",
81
+ "description": "Total lines of Code",
82
+ "value": 59742
83
+ },
84
+ {
85
+ "owner": "Overall",
86
+ "description": "Total Tests",
87
+ "value": 2331
88
+ },
89
+ {
90
+ "owner": "Overall",
91
+ "description": "Total Files",
92
+ "value": 6
93
+ }
94
+ ]
95
+ }
@@ -0,0 +1,95 @@
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": 30
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 13
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": 23
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^4.44.11"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 65
43
+ },
44
+ {
45
+ "owner": "readmeMd",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 688
48
+ },
49
+ {
50
+ "owner": "unitTestJS",
51
+ "description": "Number of lines of code in unit tests",
52
+ "value": 29039
53
+ },
54
+ {
55
+ "owner": "unitTestJS",
56
+ "description": "Number of unit tests",
57
+ "value": 1852
58
+ },
59
+ {
60
+ "owner": "integrationTestJS",
61
+ "description": "Number of lines of code in integration tests",
62
+ "value": 31265
63
+ },
64
+ {
65
+ "owner": "integrationTestJS",
66
+ "description": "Number of integration tests",
67
+ "value": 563
68
+ },
69
+ {
70
+ "owner": "staticFile",
71
+ "description": "Number of lines of code in adapterBase.js",
72
+ "value": 1029
73
+ },
74
+ {
75
+ "owner": "staticFile",
76
+ "description": "Number of static files added",
77
+ "value": 34
78
+ },
79
+ {
80
+ "owner": "Overall",
81
+ "description": "Total lines of Code",
82
+ "value": 61333
83
+ },
84
+ {
85
+ "owner": "Overall",
86
+ "description": "Total Tests",
87
+ "value": 2415
88
+ },
89
+ {
90
+ "owner": "Overall",
91
+ "description": "Total Files",
92
+ "value": 6
93
+ }
94
+ ]
95
+ }
@@ -4,8 +4,8 @@
4
4
  "properties": {
5
5
  "host": "compute.googleapis.com",
6
6
  "port": 443,
7
- "base_path": "/compute/v1/projects",
8
- "version": "",
7
+ "base_path": "/compute",
8
+ "version": "v1",
9
9
  "cache_location": "none",
10
10
  "encode_pathvars": true,
11
11
  "save_metric": true,
@@ -22,6 +22,9 @@
22
22
  "auth_field": "header.headers.Authorization",
23
23
  "auth_field_format": "Bearer {token}",
24
24
  "auth_logging": false,
25
+ "client_id": "",
26
+ "client_secret": "",
27
+ "grant_type": "",
25
28
  "configureGtoken": {
26
29
  "email": "",
27
30
  "scope": "https://www.googleapis.com/auth/cloud-platform",
@@ -34,7 +37,8 @@
34
37
  },
35
38
  "healthcheck": {
36
39
  "type": "startup",
37
- "frequency": 600000
40
+ "frequency": 600000,
41
+ "query_object": {}
38
42
  },
39
43
  "throttle": {
40
44
  "throttle_enabled": false,
@@ -14,7 +14,7 @@ const itParam = require('mocha-param');
14
14
 
15
15
  const utils = require('../../utils/tbUtils');
16
16
  const basicGet = require('../../utils/basicGet');
17
- const { name } = require('../../package');
17
+ const { name } = require('../../package.json');
18
18
  const { methods } = require('../../pronghorn.json');
19
19
 
20
20
  const getPronghornProps = (iapDir) => {