diff --git a/libraries/gcp_backend.rb b/libraries/gcp_backend.rb index 227f2156b..389f2b650 100644 --- a/libraries/gcp_backend.rb +++ b/libraries/gcp_backend.rb @@ -303,7 +303,7 @@ def initialize(link, cred, request_type) end def builder - Net::HTTP.const_get(request_type) + Net::HTTP.const_get(@request_type) end def send diff --git a/libraries/google_bigquery_dataset.rb b/libraries/google_bigquery_dataset.rb index 1d6386fe7..968212a5e 100644 --- a/libraries/google_bigquery_dataset.rb +++ b/libraries/google_bigquery_dataset.rb @@ -40,7 +40,7 @@ class Dataset < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_bigquery_datasets.rb b/libraries/google_bigquery_datasets.rb index 60ae1ed8f..1215bfb14 100644 --- a/libraries/google_bigquery_datasets.rb +++ b/libraries/google_bigquery_datasets.rb @@ -41,7 +41,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_bigquery_table.rb b/libraries/google_bigquery_table.rb index 48124bcac..f8bbb91f0 100644 --- a/libraries/google_bigquery_table.rb +++ b/libraries/google_bigquery_table.rb @@ -64,7 +64,7 @@ class Table < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_bigquery_tables.rb b/libraries/google_bigquery_tables.rb index 1442960cb..4fe2efbe1 100644 --- a/libraries/google_bigquery_tables.rb +++ b/libraries/google_bigquery_tables.rb @@ -55,7 +55,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_cloudbuild_trigger.rb b/libraries/google_cloudbuild_trigger.rb index 0153cd7ff..553efc230 100644 --- a/libraries/google_cloudbuild_trigger.rb +++ b/libraries/google_cloudbuild_trigger.rb @@ -39,7 +39,7 @@ class Trigger < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_cloudbuild_triggers.rb b/libraries/google_cloudbuild_triggers.rb index 3a66e2c83..3d89f1192 100644 --- a/libraries/google_cloudbuild_triggers.rb +++ b/libraries/google_cloudbuild_triggers.rb @@ -44,7 +44,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_cloudfunctions_cloud_function.rb b/libraries/google_cloudfunctions_cloud_function.rb index 78a57e2f5..09a4b890c 100644 --- a/libraries/google_cloudfunctions_cloud_function.rb +++ b/libraries/google_cloudfunctions_cloud_function.rb @@ -47,7 +47,7 @@ class CloudFunction < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_cloudfunctions_cloud_functions.rb b/libraries/google_cloudfunctions_cloud_functions.rb index df0928a04..ceb2c8c75 100644 --- a/libraries/google_cloudfunctions_cloud_functions.rb +++ b/libraries/google_cloudfunctions_cloud_functions.rb @@ -52,7 +52,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_autoscaler.rb b/libraries/google_compute_autoscaler.rb index 38c375f1d..c44e2bc8d 100644 --- a/libraries/google_compute_autoscaler.rb +++ b/libraries/google_compute_autoscaler.rb @@ -37,7 +37,7 @@ class Autoscaler < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_autoscalers.rb b/libraries/google_compute_autoscalers.rb index 951e153bf..885f39c6d 100644 --- a/libraries/google_compute_autoscalers.rb +++ b/libraries/google_compute_autoscalers.rb @@ -41,7 +41,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_backend_bucket.rb b/libraries/google_compute_backend_bucket.rb index 8e58bbc40..f5517e99f 100644 --- a/libraries/google_compute_backend_bucket.rb +++ b/libraries/google_compute_backend_bucket.rb @@ -34,7 +34,7 @@ class BackendBucket < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_backend_buckets.rb b/libraries/google_compute_backend_buckets.rb index 5fa1d5c25..1249c0ab2 100644 --- a/libraries/google_compute_backend_buckets.rb +++ b/libraries/google_compute_backend_buckets.rb @@ -41,7 +41,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_backend_service.rb b/libraries/google_compute_backend_service.rb index 9f884d9ab..f865dd2f3 100644 --- a/libraries/google_compute_backend_service.rb +++ b/libraries/google_compute_backend_service.rb @@ -49,7 +49,7 @@ class BackendService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_backend_services.rb b/libraries/google_compute_backend_services.rb index b8f38b3f6..7682ca7ab 100644 --- a/libraries/google_compute_backend_services.rb +++ b/libraries/google_compute_backend_services.rb @@ -52,7 +52,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_disk.rb b/libraries/google_compute_disk.rb index 32c268c48..9f5fafce9 100644 --- a/libraries/google_compute_disk.rb +++ b/libraries/google_compute_disk.rb @@ -50,7 +50,7 @@ class Disk < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_disks.rb b/libraries/google_compute_disks.rb index fb962254b..9d5f5ae2e 100644 --- a/libraries/google_compute_disks.rb +++ b/libraries/google_compute_disks.rb @@ -55,7 +55,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_global_address.rb b/libraries/google_compute_global_address.rb index c8f2a005d..8343eb24c 100644 --- a/libraries/google_compute_global_address.rb +++ b/libraries/google_compute_global_address.rb @@ -37,7 +37,7 @@ class GlobalAddress < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_global_addresses.rb b/libraries/google_compute_global_addresses.rb index 43edbc236..dca8ebb7e 100644 --- a/libraries/google_compute_global_addresses.rb +++ b/libraries/google_compute_global_addresses.rb @@ -45,7 +45,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_global_forwarding_rule.rb b/libraries/google_compute_global_forwarding_rule.rb index 44ef3f7ab..4528cecbb 100644 --- a/libraries/google_compute_global_forwarding_rule.rb +++ b/libraries/google_compute_global_forwarding_rule.rb @@ -37,7 +37,7 @@ class GlobalForwardingRule < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_global_forwarding_rules.rb b/libraries/google_compute_global_forwarding_rules.rb index 197107f47..b4d3d5c56 100644 --- a/libraries/google_compute_global_forwarding_rules.rb +++ b/libraries/google_compute_global_forwarding_rules.rb @@ -45,7 +45,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_health_check.rb b/libraries/google_compute_health_check.rb index 106e76996..b72cc5962 100644 --- a/libraries/google_compute_health_check.rb +++ b/libraries/google_compute_health_check.rb @@ -43,7 +43,7 @@ class HealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_health_checks.rb b/libraries/google_compute_health_checks.rb index f95e5d53c..7e6509402 100644 --- a/libraries/google_compute_health_checks.rb +++ b/libraries/google_compute_health_checks.rb @@ -47,7 +47,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_http_health_check.rb b/libraries/google_compute_http_health_check.rb index 0eb24f485..f53dae187 100644 --- a/libraries/google_compute_http_health_check.rb +++ b/libraries/google_compute_http_health_check.rb @@ -37,7 +37,7 @@ class HttpHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_http_health_checks.rb b/libraries/google_compute_http_health_checks.rb index 64c5a6c81..888634d9a 100644 --- a/libraries/google_compute_http_health_checks.rb +++ b/libraries/google_compute_http_health_checks.rb @@ -45,7 +45,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_https_health_check.rb b/libraries/google_compute_https_health_check.rb index fd8d76bdc..91326145d 100644 --- a/libraries/google_compute_https_health_check.rb +++ b/libraries/google_compute_https_health_check.rb @@ -37,7 +37,7 @@ class HttpsHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_https_health_checks.rb b/libraries/google_compute_https_health_checks.rb index 8576ef71c..5d6ad9c91 100644 --- a/libraries/google_compute_https_health_checks.rb +++ b/libraries/google_compute_https_health_checks.rb @@ -45,7 +45,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_instance_group_manager.rb b/libraries/google_compute_instance_group_manager.rb index b1797b919..3eb5cb81f 100644 --- a/libraries/google_compute_instance_group_manager.rb +++ b/libraries/google_compute_instance_group_manager.rb @@ -41,7 +41,7 @@ class InstanceGroupManager < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_instance_group_managers.rb b/libraries/google_compute_instance_group_managers.rb index 0a4bee4e4..f0f407cc1 100644 --- a/libraries/google_compute_instance_group_managers.rb +++ b/libraries/google_compute_instance_group_managers.rb @@ -47,7 +47,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_instance_template.rb b/libraries/google_compute_instance_template.rb index 8ad45a23d..23da37294 100644 --- a/libraries/google_compute_instance_template.rb +++ b/libraries/google_compute_instance_template.rb @@ -38,7 +38,7 @@ class InstanceTemplate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_instance_templates.rb b/libraries/google_compute_instance_templates.rb index 53c6cfe26..63156b983 100644 --- a/libraries/google_compute_instance_templates.rb +++ b/libraries/google_compute_instance_templates.rb @@ -39,7 +39,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_region.rb b/libraries/google_compute_region.rb index 8b2fb8bb8..2f4759bf1 100644 --- a/libraries/google_compute_region.rb +++ b/libraries/google_compute_region.rb @@ -36,7 +36,7 @@ class Region < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_region_backend_service.rb b/libraries/google_compute_region_backend_service.rb index 259815db0..5497e9632 100644 --- a/libraries/google_compute_region_backend_service.rb +++ b/libraries/google_compute_region_backend_service.rb @@ -39,7 +39,7 @@ class RegionBackendService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_region_backend_services.rb b/libraries/google_compute_region_backend_services.rb index 740e16bda..a38a73ec2 100644 --- a/libraries/google_compute_region_backend_services.rb +++ b/libraries/google_compute_region_backend_services.rb @@ -45,7 +45,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_regions.rb b/libraries/google_compute_regions.rb index feceb6469..71fe28b35 100644 --- a/libraries/google_compute_regions.rb +++ b/libraries/google_compute_regions.rb @@ -42,7 +42,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_route.rb b/libraries/google_compute_route.rb index 0e28ff37e..25d89b426 100644 --- a/libraries/google_compute_route.rb +++ b/libraries/google_compute_route.rb @@ -37,7 +37,7 @@ class Route < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_router.rb b/libraries/google_compute_router.rb index 6f7a2f069..480bd7f81 100644 --- a/libraries/google_compute_router.rb +++ b/libraries/google_compute_router.rb @@ -35,7 +35,7 @@ class Router < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_routers.rb b/libraries/google_compute_routers.rb index 26ce1710b..e88612b54 100644 --- a/libraries/google_compute_routers.rb +++ b/libraries/google_compute_routers.rb @@ -41,7 +41,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_routes.rb b/libraries/google_compute_routes.rb index 34446a7d4..22f18c6bb 100644 --- a/libraries/google_compute_routes.rb +++ b/libraries/google_compute_routes.rb @@ -45,7 +45,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_snapshot.rb b/libraries/google_compute_snapshot.rb index 4244fb18a..2ae95d3d0 100644 --- a/libraries/google_compute_snapshot.rb +++ b/libraries/google_compute_snapshot.rb @@ -41,7 +41,7 @@ class Snapshot < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_snapshots.rb b/libraries/google_compute_snapshots.rb index 907dd4345..4e2892bca 100644 --- a/libraries/google_compute_snapshots.rb +++ b/libraries/google_compute_snapshots.rb @@ -47,7 +47,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_ssl_certificate.rb b/libraries/google_compute_ssl_certificate.rb index 1fe030795..ce29978d8 100644 --- a/libraries/google_compute_ssl_certificate.rb +++ b/libraries/google_compute_ssl_certificate.rb @@ -32,7 +32,7 @@ class SslCertificate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_ssl_certificates.rb b/libraries/google_compute_ssl_certificates.rb index ba3d09b9c..275fea69d 100644 --- a/libraries/google_compute_ssl_certificates.rb +++ b/libraries/google_compute_ssl_certificates.rb @@ -40,7 +40,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_ssl_policies.rb b/libraries/google_compute_ssl_policies.rb index 85a02d748..8e5c79aa8 100644 --- a/libraries/google_compute_ssl_policies.rb +++ b/libraries/google_compute_ssl_policies.rb @@ -44,7 +44,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_ssl_policy.rb b/libraries/google_compute_ssl_policy.rb index 59febb9f7..afddeaeac 100644 --- a/libraries/google_compute_ssl_policy.rb +++ b/libraries/google_compute_ssl_policy.rb @@ -37,7 +37,7 @@ class SslPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_subnetwork_iam_policy.rb b/libraries/google_compute_subnetwork_iam_policy.rb index cfdaf8443..f35060d37 100644 --- a/libraries/google_compute_subnetwork_iam_policy.rb +++ b/libraries/google_compute_subnetwork_iam_policy.rb @@ -30,7 +30,7 @@ class SubnetworkIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, Get) parse unless @fetched.nil? end diff --git a/libraries/google_compute_target_http_proxies.rb b/libraries/google_compute_target_http_proxies.rb index 4e10faf98..3663c1780 100644 --- a/libraries/google_compute_target_http_proxies.rb +++ b/libraries/google_compute_target_http_proxies.rb @@ -39,7 +39,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_target_http_proxy.rb b/libraries/google_compute_target_http_proxy.rb index eacc4dd74..9eb7206a4 100644 --- a/libraries/google_compute_target_http_proxy.rb +++ b/libraries/google_compute_target_http_proxy.rb @@ -31,7 +31,7 @@ class TargetHttpProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_target_https_proxies.rb b/libraries/google_compute_target_https_proxies.rb index beb420b38..b3d4394a8 100644 --- a/libraries/google_compute_target_https_proxies.rb +++ b/libraries/google_compute_target_https_proxies.rb @@ -42,7 +42,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_target_https_proxy.rb b/libraries/google_compute_target_https_proxy.rb index 59b497734..6c450e84a 100644 --- a/libraries/google_compute_target_https_proxy.rb +++ b/libraries/google_compute_target_https_proxy.rb @@ -34,7 +34,7 @@ class TargetHttpsProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_target_pool.rb b/libraries/google_compute_target_pool.rb index 3b8ebb509..f84b061b4 100644 --- a/libraries/google_compute_target_pool.rb +++ b/libraries/google_compute_target_pool.rb @@ -36,7 +36,7 @@ class TargetPool < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_target_pools.rb b/libraries/google_compute_target_pools.rb index f0bef0ba0..e92d20149 100644 --- a/libraries/google_compute_target_pools.rb +++ b/libraries/google_compute_target_pools.rb @@ -44,7 +44,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_target_tcp_proxies.rb b/libraries/google_compute_target_tcp_proxies.rb index a07c8108b..3d2fd64d9 100644 --- a/libraries/google_compute_target_tcp_proxies.rb +++ b/libraries/google_compute_target_tcp_proxies.rb @@ -40,7 +40,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_compute_target_tcp_proxy.rb b/libraries/google_compute_target_tcp_proxy.rb index c0049ec9b..aa9fcb749 100644 --- a/libraries/google_compute_target_tcp_proxy.rb +++ b/libraries/google_compute_target_tcp_proxy.rb @@ -32,7 +32,7 @@ class TargetTcpProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_url_map.rb b/libraries/google_compute_url_map.rb index 79ace5f17..83b0374a8 100644 --- a/libraries/google_compute_url_map.rb +++ b/libraries/google_compute_url_map.rb @@ -38,7 +38,7 @@ class UrlMap < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_compute_url_maps.rb b/libraries/google_compute_url_maps.rb index 407362fab..04965071c 100644 --- a/libraries/google_compute_url_maps.rb +++ b/libraries/google_compute_url_maps.rb @@ -43,7 +43,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_container_regional_cluster.rb b/libraries/google_container_regional_cluster.rb index 2668fa9bd..97eba5dc9 100644 --- a/libraries/google_container_regional_cluster.rb +++ b/libraries/google_container_regional_cluster.rb @@ -79,7 +79,7 @@ class RegionalCluster < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_container_regional_clusters.rb b/libraries/google_container_regional_clusters.rb index 451567340..69a162879 100644 --- a/libraries/google_container_regional_clusters.rb +++ b/libraries/google_container_regional_clusters.rb @@ -69,7 +69,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_container_regional_node_pool.rb b/libraries/google_container_regional_node_pool.rb index 18efe534a..ee6815c15 100644 --- a/libraries/google_container_regional_node_pool.rb +++ b/libraries/google_container_regional_node_pool.rb @@ -47,7 +47,7 @@ class RegionalNodePool < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_container_regional_node_pools.rb b/libraries/google_container_regional_node_pools.rb index bc5108f0c..740a3f95f 100644 --- a/libraries/google_container_regional_node_pools.rb +++ b/libraries/google_container_regional_node_pools.rb @@ -47,7 +47,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_dns_resource_record_set.rb b/libraries/google_dns_resource_record_set.rb index 93a26067c..c4532a568 100644 --- a/libraries/google_dns_resource_record_set.rb +++ b/libraries/google_dns_resource_record_set.rb @@ -31,7 +31,7 @@ class ResourceRecordSet < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - fetched = @connection.fetch(product_url, resource_base_url, params) + fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') @fetched = unwrap(fetched, params) parse unless @fetched.nil? end diff --git a/libraries/google_dns_resource_record_sets.rb b/libraries/google_dns_resource_record_sets.rb index ce288e71b..31bf32133 100644 --- a/libraries/google_dns_resource_record_sets.rb +++ b/libraries/google_dns_resource_record_sets.rb @@ -39,7 +39,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_logging_organization_log_sink.rb b/libraries/google_logging_organization_log_sink.rb index 4066a904a..ac4632e79 100644 --- a/libraries/google_logging_organization_log_sink.rb +++ b/libraries/google_logging_organization_log_sink.rb @@ -32,7 +32,7 @@ class OrganizationLogSink < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_logging_organization_log_sinks.rb b/libraries/google_logging_organization_log_sinks.rb index 8d0a07538..28a5d7207 100644 --- a/libraries/google_logging_organization_log_sinks.rb +++ b/libraries/google_logging_organization_log_sinks.rb @@ -40,7 +40,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_pubsub_subscription.rb b/libraries/google_pubsub_subscription.rb index 6975ba247..2fadd60b5 100644 --- a/libraries/google_pubsub_subscription.rb +++ b/libraries/google_pubsub_subscription.rb @@ -36,7 +36,7 @@ class Subscription < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_pubsub_subscription_iam_policy.rb b/libraries/google_pubsub_subscription_iam_policy.rb index 0b69b262a..0db94cfbf 100644 --- a/libraries/google_pubsub_subscription_iam_policy.rb +++ b/libraries/google_pubsub_subscription_iam_policy.rb @@ -30,7 +30,7 @@ class SubscriptionIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, Get) parse unless @fetched.nil? end diff --git a/libraries/google_pubsub_subscriptions.rb b/libraries/google_pubsub_subscriptions.rb index a07e976dd..818cad157 100644 --- a/libraries/google_pubsub_subscriptions.rb +++ b/libraries/google_pubsub_subscriptions.rb @@ -42,7 +42,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_pubsub_topic.rb b/libraries/google_pubsub_topic.rb index 26e9ed488..1e82242de 100644 --- a/libraries/google_pubsub_topic.rb +++ b/libraries/google_pubsub_topic.rb @@ -31,7 +31,7 @@ class Topic < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_pubsub_topic_iam_policy.rb b/libraries/google_pubsub_topic_iam_policy.rb index 14571848f..c12afa4d7 100644 --- a/libraries/google_pubsub_topic_iam_policy.rb +++ b/libraries/google_pubsub_topic_iam_policy.rb @@ -30,7 +30,7 @@ class TopicIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, Get) parse unless @fetched.nil? end diff --git a/libraries/google_pubsub_topics.rb b/libraries/google_pubsub_topics.rb index de9c9b45a..8d39d4c77 100644 --- a/libraries/google_pubsub_topics.rb +++ b/libraries/google_pubsub_topics.rb @@ -38,7 +38,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_resourcemanager_folder.rb b/libraries/google_resourcemanager_folder.rb index e206d2cb9..7e9770858 100644 --- a/libraries/google_resourcemanager_folder.rb +++ b/libraries/google_resourcemanager_folder.rb @@ -31,7 +31,7 @@ class Folder < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end diff --git a/libraries/google_resourcemanager_folders.rb b/libraries/google_resourcemanager_folders.rb index 9e46d9bcb..6ee2583f5 100644 --- a/libraries/google_resourcemanager_folders.rb +++ b/libraries/google_resourcemanager_folders.rb @@ -39,7 +39,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_sourcerepo_repositories.rb b/libraries/google_sourcerepo_repositories.rb index 20cd31324..5d0e96e1d 100644 --- a/libraries/google_sourcerepo_repositories.rb +++ b/libraries/google_sourcerepo_repositories.rb @@ -37,7 +37,7 @@ def initialize(params = {}) def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs diff --git a/libraries/google_sourcerepo_repository.rb b/libraries/google_sourcerepo_repository.rb index a5b6740a2..8f11c1875 100644 --- a/libraries/google_sourcerepo_repository.rb +++ b/libraries/google_sourcerepo_repository.rb @@ -29,7 +29,7 @@ class Repository < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params) + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') parse unless @fetched.nil? end