fog-google 1.11.0 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ruby.yml +34 -0
- data/.github/workflows/stale.yml +23 -0
- data/CHANGELOG.md +88 -1
- data/README.md +19 -10
- data/ci/docker-image/Dockerfile +3 -3
- data/fog-google.gemspec +2 -2
- data/lib/fog/compute/google/models/address.rb +1 -1
- data/lib/fog/compute/google/models/addresses.rb +6 -6
- data/lib/fog/compute/google/models/backend_service.rb +1 -1
- data/lib/fog/compute/google/models/disk.rb +3 -3
- data/lib/fog/compute/google/models/disk_types.rb +2 -2
- data/lib/fog/compute/google/models/disks.rb +2 -2
- data/lib/fog/compute/google/models/firewall.rb +2 -2
- data/lib/fog/compute/google/models/firewalls.rb +1 -1
- data/lib/fog/compute/google/models/forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/models/global_addresses.rb +1 -1
- data/lib/fog/compute/google/models/global_forwarding_rules.rb +1 -1
- data/lib/fog/compute/google/models/http_health_check.rb +2 -2
- data/lib/fog/compute/google/models/instance_group_managers.rb +2 -2
- data/lib/fog/compute/google/models/machine_types.rb +2 -2
- data/lib/fog/compute/google/models/operations.rb +3 -3
- data/lib/fog/compute/google/models/servers.rb +3 -3
- data/lib/fog/compute/google/models/subnetworks.rb +2 -2
- data/lib/fog/compute/google/models/target_instances.rb +2 -2
- data/lib/fog/compute/google/models/target_pools.rb +2 -2
- data/lib/fog/compute/google/models/url_maps.rb +1 -1
- data/lib/fog/compute/google/requests/abandon_instances.rb +1 -1
- data/lib/fog/compute/google/requests/add_instance_group_instances.rb +3 -3
- data/lib/fog/compute/google/requests/add_server_access_config.rb +3 -3
- data/lib/fog/compute/google/requests/add_target_pool_health_checks.rb +2 -2
- data/lib/fog/compute/google/requests/add_target_pool_instances.rb +2 -2
- data/lib/fog/compute/google/requests/attach_disk.rb +1 -1
- data/lib/fog/compute/google/requests/create_disk_snapshot.rb +1 -1
- data/lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb +1 -1
- data/lib/fog/compute/google/requests/get_backend_service_health.rb +1 -1
- data/lib/fog/compute/google/requests/get_server_serial_port_output.rb +2 -2
- data/lib/fog/compute/google/requests/get_target_pool_health.rb +1 -1
- data/lib/fog/compute/google/requests/insert_address.rb +2 -2
- data/lib/fog/compute/google/requests/insert_backend_service.rb +1 -1
- data/lib/fog/compute/google/requests/insert_disk.rb +1 -1
- data/lib/fog/compute/google/requests/insert_firewall.rb +1 -1
- data/lib/fog/compute/google/requests/insert_forwarding_rule.rb +1 -1
- data/lib/fog/compute/google/requests/insert_global_address.rb +1 -1
- data/lib/fog/compute/google/requests/insert_global_forwarding_rule.rb +1 -1
- data/lib/fog/compute/google/requests/insert_http_health_check.rb +1 -1
- data/lib/fog/compute/google/requests/insert_image.rb +1 -1
- data/lib/fog/compute/google/requests/insert_instance_group.rb +3 -3
- data/lib/fog/compute/google/requests/insert_instance_group_manager.rb +7 -7
- data/lib/fog/compute/google/requests/insert_instance_template.rb +3 -3
- data/lib/fog/compute/google/requests/insert_network.rb +1 -1
- data/lib/fog/compute/google/requests/insert_route.rb +10 -10
- data/lib/fog/compute/google/requests/insert_server.rb +12 -8
- data/lib/fog/compute/google/requests/insert_ssl_certificate.rb +4 -4
- data/lib/fog/compute/google/requests/insert_subnetwork.rb +1 -1
- data/lib/fog/compute/google/requests/insert_target_http_proxy.rb +3 -3
- data/lib/fog/compute/google/requests/insert_target_https_proxy.rb +4 -4
- data/lib/fog/compute/google/requests/insert_target_instance.rb +1 -1
- data/lib/fog/compute/google/requests/insert_target_pool.rb +1 -1
- data/lib/fog/compute/google/requests/insert_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/invalidate_url_map_cache.rb +1 -1
- data/lib/fog/compute/google/requests/list_addresses.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_addresses.rb +1 -1
- data/lib/fog/compute/google/requests/list_aggregated_disk_types.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_disks.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_instance_group_managers.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_instance_groups.rb +1 -1
- data/lib/fog/compute/google/requests/list_aggregated_machine_types.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_servers.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_subnetworks.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_target_instances.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_target_pools.rb +4 -4
- data/lib/fog/compute/google/requests/list_disk_types.rb +2 -2
- data/lib/fog/compute/google/requests/list_disks.rb +2 -2
- data/lib/fog/compute/google/requests/list_firewalls.rb +4 -4
- data/lib/fog/compute/google/requests/list_forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/requests/list_global_addresses.rb +5 -5
- data/lib/fog/compute/google/requests/list_global_forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/requests/list_global_operations.rb +4 -4
- data/lib/fog/compute/google/requests/list_http_health_checks.rb +2 -2
- data/lib/fog/compute/google/requests/list_images.rb +2 -2
- data/lib/fog/compute/google/requests/list_instance_group_managers.rb +2 -2
- data/lib/fog/compute/google/requests/list_instance_templates.rb +4 -4
- data/lib/fog/compute/google/requests/list_machine_types.rb +4 -4
- data/lib/fog/compute/google/requests/list_networks.rb +4 -4
- data/lib/fog/compute/google/requests/list_subnetworks.rb +4 -4
- data/lib/fog/compute/google/requests/list_target_pools.rb +4 -4
- data/lib/fog/compute/google/requests/list_url_maps.rb +2 -2
- data/lib/fog/compute/google/requests/patch_firewall.rb +1 -1
- data/lib/fog/compute/google/requests/remove_instance_group_instances.rb +3 -3
- data/lib/fog/compute/google/requests/remove_target_pool_health_checks.rb +2 -2
- data/lib/fog/compute/google/requests/remove_target_pool_instance.rb +2 -2
- data/lib/fog/compute/google/requests/remove_target_pool_instances.rb +2 -2
- data/lib/fog/compute/google/requests/set_common_instance_metadata.rb +2 -2
- data/lib/fog/compute/google/requests/set_forwarding_rule_target.rb +1 -1
- data/lib/fog/compute/google/requests/set_global_forwarding_rule_target.rb +1 -1
- data/lib/fog/compute/google/requests/set_server_metadata.rb +2 -2
- data/lib/fog/compute/google/requests/set_server_tags.rb +2 -2
- data/lib/fog/compute/google/requests/set_snapshot_labels.rb +2 -2
- data/lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_http_proxy_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_https_proxy_ssl_certificates.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_https_proxy_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_pool_backup.rb +2 -2
- data/lib/fog/compute/google/requests/update_firewall.rb +1 -1
- data/lib/fog/compute/google/requests/update_http_health_check.rb +1 -1
- data/lib/fog/compute/google/requests/update_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/validate_url_map.rb +1 -1
- data/lib/fog/dns/google/requests/create_change.rb +2 -2
- data/lib/fog/google/models/sql/instance.rb +2 -2
- data/lib/fog/google/requests/monitoring/create_metric_descriptor.rb +8 -8
- data/lib/fog/google/requests/monitoring/create_timeseries.rb +1 -1
- data/lib/fog/google/requests/monitoring/list_timeseries.rb +1 -1
- data/lib/fog/google/requests/pubsub/acknowledge_subscription.rb +1 -1
- data/lib/fog/google/requests/pubsub/create_subscription.rb +3 -3
- data/lib/fog/google/requests/sql/clone_instance.rb +4 -4
- data/lib/fog/google/requests/sql/delete_user.rb +1 -1
- data/lib/fog/google/requests/sql/export_instance.rb +3 -3
- data/lib/fog/google/requests/sql/import_instance.rb +2 -2
- data/lib/fog/google/requests/sql/insert_backup_run.rb +1 -1
- data/lib/fog/google/requests/sql/insert_instance.rb +2 -2
- data/lib/fog/google/requests/sql/insert_ssl_cert.rb +1 -1
- data/lib/fog/google/requests/sql/insert_user.rb +1 -1
- data/lib/fog/google/requests/sql/restore_instance_backup.rb +4 -4
- data/lib/fog/google/requests/sql/update_instance.rb +2 -2
- data/lib/fog/google/shared.rb +3 -3
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json/models/directories.rb +1 -1
- data/lib/fog/storage/google_json/models/directory.rb +1 -1
- data/lib/fog/storage/google_json/models/file.rb +1 -1
- data/lib/fog/storage/google_json/models/files.rb +1 -1
- data/lib/fog/storage/google_json/requests/copy_object.rb +12 -1
- data/lib/fog/storage/google_json/requests/get_object.rb +6 -3
- data/lib/fog/storage/google_json/requests/list_buckets.rb +4 -4
- data/lib/fog/storage/google_json/requests/list_objects.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_bucket.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_bucket_acl.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_object.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_object_acl.rb +1 -1
- data/lib/fog/storage/google_json/utils.rb +5 -1
- data/lib/fog/storage/google_xml/models/file.rb +2 -2
- data/tasks/changelog.rake +5 -3
- data/test/integration/monitoring/test_metric_descriptors.rb +1 -1
- data/test/integration/storage/storage_shared.rb +7 -2
- data/test/integration/storage/test_objects.rb +39 -1
- data/test/unit/storage/test_common_xml_collections.rb +11 -0
- data/test/unit/storage/test_json_requests.rb +8 -0
- metadata +14 -13
- data/.travis.yml +0 -16
@@ -14,8 +14,8 @@ module Fog
|
|
14
14
|
order_by: nil, page_token: nil)
|
15
15
|
@compute.list_http_health_checks(
|
16
16
|
@project,
|
17
|
-
:
|
18
|
-
:
|
17
|
+
filter: filter, max_results: max_results,
|
18
|
+
order_by: order_by, page_token: page_token
|
19
19
|
)
|
20
20
|
end
|
21
21
|
end
|
@@ -15,8 +15,8 @@ module Fog
|
|
15
15
|
order_by: nil, page_token: nil)
|
16
16
|
@compute.list_images(
|
17
17
|
project,
|
18
|
-
:
|
19
|
-
:
|
18
|
+
filter: filter, max_results: max_results,
|
19
|
+
order_by: order_by, page_token: page_token
|
20
20
|
)
|
21
21
|
end
|
22
22
|
end
|
@@ -13,8 +13,8 @@ module Fog
|
|
13
13
|
def list_instance_group_managers(zone, filter: nil, max_results: nil,
|
14
14
|
order_by: nil, page_token: nil)
|
15
15
|
@compute.list_instance_group_managers(
|
16
|
-
@project, zone, :
|
17
|
-
:
|
16
|
+
@project, zone, filter: filter, max_results: max_results,
|
17
|
+
order_by: order_by, page_token: page_token)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -14,10 +14,10 @@ module Fog
|
|
14
14
|
order_by: nil, page_token: nil)
|
15
15
|
@compute.list_instance_templates(
|
16
16
|
@project,
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
17
|
+
filter: filter,
|
18
|
+
max_results: max_results,
|
19
|
+
order_by: order_by,
|
20
|
+
page_token: page_token
|
21
21
|
)
|
22
22
|
end
|
23
23
|
end
|
@@ -14,10 +14,10 @@ module Fog
|
|
14
14
|
page_token: nil, order_by: nil)
|
15
15
|
zone = zone.split("/")[-1] if zone.start_with? "http"
|
16
16
|
@compute.list_machine_types(@project, zone,
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
17
|
+
filter: filter,
|
18
|
+
max_results: max_results,
|
19
|
+
page_token: page_token,
|
20
|
+
order_by: order_by)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
def list_networks(filter: nil, max_results: nil,
|
14
14
|
order_by: nil, page_token: nil)
|
15
15
|
@compute.list_networks(@project,
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
16
|
+
filter: filter,
|
17
|
+
max_results: max_results,
|
18
|
+
order_by: order_by,
|
19
|
+
page_token: page_token)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -28,10 +28,10 @@ module Fog
|
|
28
28
|
region_name = region_name.split("/")[-1]
|
29
29
|
end
|
30
30
|
@compute.list_subnetworks(@project, region_name,
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
31
|
+
filter: filter,
|
32
|
+
max_results: max_results,
|
33
|
+
order_by: order_by,
|
34
|
+
page_token: page_token)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -14,10 +14,10 @@ module Fog
|
|
14
14
|
order_by: nil, page_token: nil)
|
15
15
|
@compute.list_target_pools(
|
16
16
|
@project, region.split("/")[-1],
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
17
|
+
filter: filter,
|
18
|
+
max_results: max_results,
|
19
|
+
order_by: order_by,
|
20
|
+
page_token: page_token
|
21
21
|
)
|
22
22
|
end
|
23
23
|
end
|
@@ -15,8 +15,8 @@ module Fog
|
|
15
15
|
order_by: nil, page_token: nil)
|
16
16
|
@compute.list_url_maps(
|
17
17
|
@project,
|
18
|
-
:
|
19
|
-
:
|
18
|
+
filter: filter, max_results: max_results,
|
19
|
+
order_by: order_by, page_token: page_token
|
20
20
|
)
|
21
21
|
end
|
22
22
|
end
|
@@ -13,16 +13,16 @@ module Fog
|
|
13
13
|
def remove_instance_group_instances(group_name, zone, instances)
|
14
14
|
instances.map! do |instance|
|
15
15
|
if instance.start_with?("https:")
|
16
|
-
::Google::Apis::ComputeV1::InstanceReference.new(:
|
16
|
+
::Google::Apis::ComputeV1::InstanceReference.new(instance: instance)
|
17
17
|
else
|
18
18
|
::Google::Apis::ComputeV1::InstanceReference.new(
|
19
|
-
:
|
19
|
+
instance: "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones/#{zone}/instances/#{instance}\n"
|
20
20
|
)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
request = ::Google::Apis::ComputeV1::InstanceGroupsRemoveInstancesRequest.new(
|
25
|
-
:
|
25
|
+
instances: instances
|
26
26
|
)
|
27
27
|
@compute.remove_instance_group_instances(
|
28
28
|
@project,
|
@@ -12,7 +12,7 @@ module Fog
|
|
12
12
|
class Real
|
13
13
|
def remove_target_pool_health_checks(target_pool, region, health_checks)
|
14
14
|
health_check_lst = health_checks.map do |hc|
|
15
|
-
::Google::Apis::ComputeV1::HealthCheckReference.new(:
|
15
|
+
::Google::Apis::ComputeV1::HealthCheckReference.new(health_check: hc)
|
16
16
|
end
|
17
17
|
|
18
18
|
@compute.remove_target_pool_health_check(
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
region.split("/")[-1],
|
21
21
|
target_pool,
|
22
22
|
::Google::Apis::ComputeV1::RemoveTargetPoolsHealthCheckRequest.new(
|
23
|
-
:
|
23
|
+
health_checks: health_check_lst
|
24
24
|
)
|
25
25
|
)
|
26
26
|
end
|
@@ -12,7 +12,7 @@ module Fog
|
|
12
12
|
class Real
|
13
13
|
def remove_target_pool_instances(target_pool, region, instances)
|
14
14
|
instance_lst = instances.map do |instance|
|
15
|
-
::Google::Apis::ComputeV1::InstanceReference.new(:
|
15
|
+
::Google::Apis::ComputeV1::InstanceReference.new(instance: instance)
|
16
16
|
end
|
17
17
|
|
18
18
|
@compute.remove_target_pool_instance(
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
region.split("/")[-1],
|
21
21
|
target_pool,
|
22
22
|
::Google::Apis::ComputeV1::RemoveTargetPoolsInstanceRequest.new(
|
23
|
-
:
|
23
|
+
instances: instance_lst
|
24
24
|
)
|
25
25
|
)
|
26
26
|
end
|
@@ -13,14 +13,14 @@ module Fog
|
|
13
13
|
def remove_target_pool_instances(target_pool, region, instances)
|
14
14
|
instance_lst = instances.map do |link|
|
15
15
|
::Google::Apis::ComputeV1::InstanceReference.new(
|
16
|
-
:
|
16
|
+
instance: link
|
17
17
|
)
|
18
18
|
end
|
19
19
|
|
20
20
|
@compute.remove_target_pool_instance(
|
21
21
|
@project, region.split("/")[-1], target_pool,
|
22
22
|
::Google::Apis::ComputeV1::RemoveTargetPoolsInstanceRequest.new(
|
23
|
-
:
|
23
|
+
instances: instance_lst
|
24
24
|
)
|
25
25
|
)
|
26
26
|
end
|
@@ -12,8 +12,8 @@ module Fog
|
|
12
12
|
class Real
|
13
13
|
def set_common_instance_metadata(project, current_fingerprint, metadata = {})
|
14
14
|
metadata_obj = ::Google::Apis::ComputeV1::Metadata.new(
|
15
|
-
:
|
16
|
-
:
|
15
|
+
fingerprint: current_fingerprint,
|
16
|
+
items: metadata.map { |k, v| { :key => k, :value => v } }
|
17
17
|
)
|
18
18
|
@compute.set_common_instance_metadata(project, metadata_obj)
|
19
19
|
end
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
region = region.split("/")[-1] if region.start_with? "http"
|
15
15
|
@compute.set_forwarding_rule_target(
|
16
16
|
@project, region, rule_name,
|
17
|
-
::Google::Apis::ComputeV1::TargetReference.new(target_opts)
|
17
|
+
::Google::Apis::ComputeV1::TargetReference.new(**target_opts)
|
18
18
|
)
|
19
19
|
end
|
20
20
|
end
|
@@ -13,7 +13,7 @@ module Fog
|
|
13
13
|
def set_global_forwarding_rule_target(rule_name, target_opts)
|
14
14
|
@compute.set_global_forwarding_rule_target(
|
15
15
|
@project, rule_name,
|
16
|
-
::Google::Apis::ComputeV1::TargetReference.new(target_opts)
|
16
|
+
::Google::Apis::ComputeV1::TargetReference.new(**target_opts)
|
17
17
|
)
|
18
18
|
end
|
19
19
|
end
|
@@ -25,11 +25,11 @@ module Fog
|
|
25
25
|
#
|
26
26
|
# @returns [::Google::Apis::ComputeV1::Operation] set operation
|
27
27
|
def set_server_metadata(instance, zone, fingerprint, metadata_items = [])
|
28
|
-
items = metadata_items.map { |item| ::Google::Apis::ComputeV1::Metadata::Item.new(item) }
|
28
|
+
items = metadata_items.map { |item| ::Google::Apis::ComputeV1::Metadata::Item.new(**item) }
|
29
29
|
@compute.set_instance_metadata(
|
30
30
|
@project, zone.split("/")[-1], instance,
|
31
31
|
::Google::Apis::ComputeV1::Metadata.new(
|
32
|
-
:
|
32
|
+
fingerprint: fingerprint, items: items
|
33
33
|
)
|
34
34
|
)
|
35
35
|
end
|
@@ -14,8 +14,8 @@ module Fog
|
|
14
14
|
@compute.set_snapshot_labels(
|
15
15
|
project, snap_name,
|
16
16
|
::Google::Apis::ComputeV1::GlobalSetLabelsRequest.new(
|
17
|
-
:
|
18
|
-
:
|
17
|
+
label_fingerprint: label_fingerprint,
|
18
|
+
labels: labels
|
19
19
|
)
|
20
20
|
)
|
21
21
|
end
|
@@ -32,7 +32,7 @@ module Fog
|
|
32
32
|
@compute.set_subnetwork_private_ip_google_access(
|
33
33
|
@project, region_name, subnetwork_name,
|
34
34
|
::Google::Apis::ComputeV1::SubnetworksSetPrivateIpGoogleAccessRequest.new(
|
35
|
-
:
|
35
|
+
private_ip_google_access: private_ip_google_access
|
36
36
|
)
|
37
37
|
)
|
38
38
|
end
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
@compute.set_target_http_proxy_url_map(
|
15
15
|
@project, proxy_name,
|
16
16
|
::Google::Apis::ComputeV1::UrlMapReference.new(
|
17
|
-
:
|
17
|
+
url_map: url_map.class == String ? url_map : url_map.self_link
|
18
18
|
)
|
19
19
|
)
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
@compute.set_target_https_proxy_url_map(
|
15
15
|
@project, proxy_name,
|
16
16
|
::Google::Apis::ComputeV1::UrlMapReference.new(
|
17
|
-
:
|
17
|
+
url_map: url_map.class == String ? url_map : url_map.self_link
|
18
18
|
)
|
19
19
|
)
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
def set_target_pool_backup(target_pool, region, backup_target,
|
15
15
|
failover_ratio: nil)
|
16
16
|
target_ref = ::Google::Apis::ComputeV1::TargetReference.new(
|
17
|
-
:
|
17
|
+
target: backup_target
|
18
18
|
)
|
19
19
|
|
20
20
|
@compute.set_target_pool_backup(
|
@@ -22,7 +22,7 @@ module Fog
|
|
22
22
|
region.split("/")[-1],
|
23
23
|
target_pool,
|
24
24
|
target_ref,
|
25
|
-
:
|
25
|
+
failover_ratio: failover_ratio
|
26
26
|
)
|
27
27
|
end
|
28
28
|
end
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
@compute.validate_url_map(
|
15
15
|
@project, url_map_name,
|
16
16
|
::Google::Apis::ComputeV1::ValidateUrlMapsRequest.new(
|
17
|
-
:
|
17
|
+
url_map: ::Google::Apis::ComputeV1::UrlMap.new(**url_map)
|
18
18
|
)
|
19
19
|
)
|
20
20
|
end
|
@@ -98,7 +98,7 @@ module Fog
|
|
98
98
|
requires :identity
|
99
99
|
|
100
100
|
data = service.insert_instance(identity, attributes[:tier], attributes)
|
101
|
-
operation = Fog::Google::SQL::Operations.new(:
|
101
|
+
operation = Fog::Google::SQL::Operations.new(service: service).get(data.name)
|
102
102
|
operation.wait_for { ready? } unless async
|
103
103
|
reload
|
104
104
|
end
|
@@ -271,7 +271,7 @@ module Fog
|
|
271
271
|
requires :identity
|
272
272
|
|
273
273
|
data = service.restore_instance_backup(identity, backup_run_id)
|
274
|
-
operation = Fog::Google::SQL::Operations.new(:
|
274
|
+
operation = Fog::Google::SQL::Operations.new(service: service).get(data.name)
|
275
275
|
operation.tap { |o| o.wait_for { ready? } unless async }
|
276
276
|
end
|
277
277
|
|
@@ -25,14 +25,14 @@ module Fog
|
|
25
25
|
def create_metric_descriptor(metric_type: nil, unit: nil, value_type: nil,
|
26
26
|
description: nil, display_name: nil, labels: [], metric_kind: nil)
|
27
27
|
metric_descriptor = ::Google::Apis::MonitoringV3::MetricDescriptor.new(
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
35
|
-
:
|
28
|
+
name: "projects/#{@project}/metricDescriptors/#{metric_type}",
|
29
|
+
type: metric_type,
|
30
|
+
unit: unit,
|
31
|
+
value_type: value_type,
|
32
|
+
description: description,
|
33
|
+
display_name: display_name,
|
34
|
+
labels: labels.map { |l| ::Google::Apis::MonitoringV3::LabelDescriptor.new(**l) },
|
35
|
+
metric_kind: metric_kind
|
36
36
|
)
|
37
37
|
|
38
38
|
@monitoring.create_project_metric_descriptor("projects/#{@project}", metric_descriptor)
|
@@ -11,7 +11,7 @@ module Fog
|
|
11
11
|
#
|
12
12
|
def create_timeseries(timeseries: [])
|
13
13
|
request = ::Google::Apis::MonitoringV3::CreateTimeSeriesRequest.new(
|
14
|
-
:
|
14
|
+
time_series: timeseries
|
15
15
|
)
|
16
16
|
@monitoring.create_project_time_series("projects/#{@project}", request)
|
17
17
|
end
|