fog-google 1.24.0 → 1.25.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -1
- data/CONTRIBUTING.md +11 -11
- data/README.md +7 -7
- data/examples/create_instance_and_attach_disk_later.rb +6 -7
- data/examples/dns/project.rb +1 -1
- data/examples/dns/zones.rb +1 -1
- data/examples/storage.rb +1 -1
- data/examples/storage_json.rb +1 -1
- data/fog-google.gemspec +1 -1
- data/lib/fog/bin/google.rb +23 -25
- data/lib/fog/{compute/google → google/compute}/mock.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/address.rb +8 -8
- data/lib/fog/{compute/google → google/compute}/models/addresses.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/backend_service.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/backend_services.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/disk.rb +5 -5
- data/lib/fog/{compute/google → google/compute}/models/disk_type.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/disk_types.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/disks.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/firewall.rb +6 -6
- data/lib/fog/{compute/google → google/compute}/models/firewalls.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/forwarding_rule.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/forwarding_rules.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/global_address.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/global_addresses.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/global_forwarding_rule.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/global_forwarding_rules.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/http_health_check.rb +5 -5
- data/lib/fog/{compute/google → google/compute}/models/http_health_checks.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/image.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/images.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/instance_group.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/instance_group_manager.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/instance_group_managers.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/instance_groups.rb +5 -5
- data/lib/fog/{compute/google → google/compute}/models/instance_template.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/instance_templates.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/machine_type.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/machine_types.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/network.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/networks.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/operations.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/project.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/projects.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/region.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/regions.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/route.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/routes.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/server.rb +18 -18
- data/lib/fog/{compute/google → google/compute}/models/servers.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/snapshot.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/snapshots.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/ssl_certificate.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/ssl_certificates.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/subnetwork.rb +6 -6
- data/lib/fog/{compute/google → google/compute}/models/subnetworks.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/target_http_proxies.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/target_http_proxy.rb +5 -5
- data/lib/fog/{compute/google → google/compute}/models/target_https_proxies.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/target_https_proxy.rb +7 -7
- data/lib/fog/{compute/google → google/compute}/models/target_instance.rb +4 -4
- data/lib/fog/{compute/google → google/compute}/models/target_instances.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/target_pool.rb +8 -8
- data/lib/fog/{compute/google → google/compute}/models/target_pools.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/url_map.rb +7 -7
- data/lib/fog/{compute/google → google/compute}/models/url_maps.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/models/zone.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/models/zones.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/real.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/abandon_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/add_backend_service_backends.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/add_instance_group_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/add_server_access_config.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/add_target_pool_health_checks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/add_target_pool_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/attach_disk.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/create_disk_snapshot.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_address.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_backend_service.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_disk.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_firewall.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_forwarding_rule.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_global_address.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_global_forwarding_rule.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_global_operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_http_health_check.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_image.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_instance_group.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_instance_group_manager.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_instance_template.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_network.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_region_operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_route.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_server.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_server_access_config.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_snapshot.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_ssl_certificate.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_subnetwork.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_target_http_proxy.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_target_https_proxy.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_target_instance.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_target_pool.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/delete_zone_operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/deprecate_image.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/detach_disk.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/expand_subnetwork_ip_cidr_range.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_address.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_backend_service.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_backend_service_health.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_disk.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_disk_type.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_firewall.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_forwarding_rule.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_global_address.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_global_forwarding_rule.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_global_operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_http_health_check.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_image.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_image_from_family.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_instance_group.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_instance_group_manager.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_instance_template.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_machine_type.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_network.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_project.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_region.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_region_operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_route.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_server.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_server_serial_port_output.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_snapshot.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_ssl_certificate.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_subnetwork.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_target_http_proxy.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_target_https_proxy.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_target_instance.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_target_pool.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_target_pool_health.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_zone.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/get_zone_operation.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_address.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_backend_service.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_disk.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_firewall.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_forwarding_rule.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_global_address.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_global_forwarding_rule.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_http_health_check.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_image.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_instance_group.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_instance_group_manager.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_instance_template.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_network.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_route.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_server.rb +3 -3
- data/lib/fog/{compute/google → google/compute}/requests/insert_ssl_certificate.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_subnetwork.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_target_http_proxy.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_target_https_proxy.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_target_instance.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_target_pool.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/insert_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/invalidate_url_map_cache.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_addresses.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_addresses.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_disk_types.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_disks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_forwarding_rules.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_instance_group_managers.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_instance_groups.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_machine_types.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_servers.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_subnetworks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_target_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_target_pools.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_backend_services.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_disk_types.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_disks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_firewalls.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_forwarding_rules.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_global_addresses.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_global_forwarding_rules.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_global_operations.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_http_health_checks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_images.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_instance_group_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_instance_group_managers.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_instance_groups.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_instance_templates.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_machine_types.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_networks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_region_operations.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_regions.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_routes.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_servers.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_snapshots.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_ssl_certificates.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_subnetworks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_target_http_proxies.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_target_https_proxies.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_target_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_target_pools.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_url_maps.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_zone_operations.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/list_zones.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/patch_firewall.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/patch_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/recreate_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/remove_instance_group_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/remove_target_pool_health_checks.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/remove_target_pool_instance.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/remove_target_pool_instances.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/reset_server.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/reset_windows_password.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_common_instance_metadata.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_forwarding_rule_target.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_global_forwarding_rule_target.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_instance_template.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_server_disk_auto_delete.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_server_machine_type.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_server_metadata.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_server_scheduling.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_server_tags.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_snapshot_labels.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_subnetwork_private_ip_google_access.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_target_http_proxy_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_target_https_proxy_ssl_certificates.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_target_https_proxy_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/set_target_pool_backup.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/start_server.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/stop_server.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/update_firewall.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/update_http_health_check.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/update_url_map.rb +2 -2
- data/lib/fog/{compute/google → google/compute}/requests/validate_url_map.rb +2 -2
- data/lib/fog/{compute/google.rb → google/compute.rb} +6 -6
- data/lib/fog/{dns/google → google/dns}/mock.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/models/change.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/models/changes.rb +8 -6
- data/lib/fog/{dns/google → google/dns}/models/project.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/models/projects.rb +4 -4
- data/lib/fog/{dns/google → google/dns}/models/record.rb +11 -11
- data/lib/fog/{dns/google → google/dns}/models/records.rb +8 -6
- data/lib/fog/{dns/google → google/dns}/models/zone.rb +7 -7
- data/lib/fog/{dns/google → google/dns}/models/zones.rb +6 -5
- data/lib/fog/{dns/google → google/dns}/real.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/create_change.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/create_managed_zone.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/delete_managed_zone.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/get_change.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/get_managed_zone.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/get_project.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/list_changes.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/list_managed_zones.rb +2 -2
- data/lib/fog/{dns/google → google/dns}/requests/list_resource_record_sets.rb +2 -2
- data/lib/fog/{dns/google.rb → google/dns.rb} +6 -6
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/access_control_list.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/copy_object.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket_logging.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket_object_versions.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket_versioning.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_request_payment.rb +3 -3
- data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_service.rb +3 -3
- data/lib/fog/google/parsers/storage.rb +15 -0
- data/lib/fog/google/shared.rb +17 -15
- data/lib/fog/{storage/google_json → google/storage/storage_json}/mock.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/models/directories.rb +4 -3
- data/lib/fog/{storage/google_json → google/storage/storage_json}/models/directory.rb +3 -3
- data/lib/fog/{storage/google_json → google/storage/storage_json}/models/file.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/models/files.rb +8 -7
- data/lib/fog/{storage/google_json → google/storage/storage_json}/real.rb +16 -8
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/copy_object.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/delete_bucket.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/delete_object.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/delete_object_url.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_bucket.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_bucket_acl.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_acl.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_http_url.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_https_url.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_metadata.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_url.rb +4 -4
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_bucket_acl.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_buckets.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_object_acl.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_objects.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_bucket.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_bucket_acl.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_object.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_object_acl.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_object_url.rb +2 -2
- data/lib/fog/{storage/google_json → google/storage/storage_json}/utils.rb +4 -4
- data/lib/fog/{storage/google_json.rb → google/storage/storage_json.rb} +9 -9
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/mock.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/directories.rb +7 -7
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/directory.rb +3 -3
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/file.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/files.rb +11 -11
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/real.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/copy_object.rb +3 -3
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/delete_bucket.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/delete_object.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/delete_object_url.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_bucket.rb +3 -3
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_bucket_acl.rb +3 -3
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_acl.rb +3 -3
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_http_url.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_https_url.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_url.rb +4 -4
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_service.rb +3 -3
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/head_object.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_bucket.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_bucket_acl.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_object.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_object_acl.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_object_url.rb +2 -2
- data/lib/fog/{storage/google_xml → google/storage/storage_xml}/utils.rb +18 -17
- data/lib/fog/{storage/google_xml.rb → google/storage/storage_xml.rb} +7 -7
- data/lib/fog/{storage/google.rb → google/storage.rb} +5 -5
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/google.rb +30 -16
- data/test/integration/compute/core_compute/test_client_options.rb +1 -1
- data/test/integration/compute/core_compute/test_disks.rb +2 -2
- data/test/integration/compute/core_compute/test_snapshots.rb +1 -1
- data/test/integration/factories/collection_factory.rb +2 -2
- data/test/integration/storage/storage_shared.rb +1 -1
- data/test/integration/test_authentication.rb +6 -6
- data/test/unit/compute/test_common_collections.rb +3 -3
- data/test/unit/compute/test_common_models.rb +9 -9
- data/test/unit/compute/test_disk.rb +8 -8
- data/test/unit/compute/test_server.rb +2 -2
- data/test/unit/dns/test_common_collections.rb +3 -3
- data/test/unit/monitoring/test_comon_collections.rb +1 -1
- data/test/unit/pubsub/test_common_collections.rb +1 -1
- data/test/unit/sql/test_common_collections.rb +1 -1
- data/test/unit/storage/test_common_json_collections.rb +2 -2
- data/test/unit/storage/test_common_xml_collections.rb +4 -4
- metadata +319 -322
- data/lib/fog/parsers/storage/google.rb +0 -15
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
4
|
-
autoload :Mock,
|
5
|
-
autoload :Real,
|
2
|
+
module Google
|
3
|
+
class DNS < Fog::Service
|
4
|
+
autoload :Mock, "fog/google/dns/mock"
|
5
|
+
autoload :Real, "fog/google/dns/real"
|
6
6
|
|
7
7
|
requires :google_project
|
8
8
|
recognizes(
|
@@ -24,7 +24,7 @@ module Fog
|
|
24
24
|
|
25
25
|
##
|
26
26
|
# MODELS
|
27
|
-
model_path "fog/dns/
|
27
|
+
model_path "fog/google/dns/models"
|
28
28
|
|
29
29
|
# Zone
|
30
30
|
model :zone
|
@@ -44,7 +44,7 @@ module Fog
|
|
44
44
|
|
45
45
|
##
|
46
46
|
# REQUESTS
|
47
|
-
request_path "fog/dns/
|
47
|
+
request_path "fog/google/dns/requests"
|
48
48
|
|
49
49
|
# Zone
|
50
50
|
request :create_managed_zone
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Fog
|
2
|
+
module Google
|
3
|
+
module Parsers
|
4
|
+
module Storage
|
5
|
+
autoload :AccessControlList, 'fog/google/parsers/storage/access_control_list'
|
6
|
+
autoload :CopyObject, 'fog/google/parsers/storage/copy_object'
|
7
|
+
autoload :GetBucket, 'fog/google/parsers/storage/get_bucket'
|
8
|
+
autoload :GetBucketLogging, 'fog/google/parsers/storage/get_bucket_logging'
|
9
|
+
autoload :GetBucketObjectVersions, 'fog/google/parsers/storage/get_bucket_object_versions'
|
10
|
+
autoload :GetRequestPayment, 'fog/google/parsers/storage/get_request_payment'
|
11
|
+
autoload :GetService, 'fog/google/parsers/storage/get_service'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/fog/google/shared.rb
CHANGED
@@ -40,16 +40,16 @@ module Fog
|
|
40
40
|
begin
|
41
41
|
# TODO: google-api-client is in gemspec now, re-assess if this initialization logic is still needed
|
42
42
|
require "google/apis/monitoring_#{Fog::Google::Monitoring::GOOGLE_MONITORING_API_VERSION}"
|
43
|
-
require "google/apis/compute_#{Fog::Compute::
|
44
|
-
require "google/apis/dns_#{Fog::DNS::
|
43
|
+
require "google/apis/compute_#{Fog::Google::Compute::GOOGLE_COMPUTE_API_VERSION}"
|
44
|
+
require "google/apis/dns_#{Fog::Google::DNS::GOOGLE_DNS_API_VERSION}"
|
45
45
|
require "google/apis/pubsub_#{Fog::Google::Pubsub::GOOGLE_PUBSUB_API_VERSION}"
|
46
46
|
require "google/apis/sqladmin_#{Fog::Google::SQL::GOOGLE_SQL_API_VERSION}"
|
47
|
-
require "google/apis/storage_#{Fog::
|
48
|
-
require "google/apis/iamcredentials_#{Fog::
|
47
|
+
require "google/apis/storage_#{Fog::Google::StorageJSON::GOOGLE_STORAGE_JSON_API_VERSION}"
|
48
|
+
require "google/apis/iamcredentials_#{Fog::Google::StorageJSON::GOOGLE_STORAGE_JSON_IAM_API_VERSION}"
|
49
49
|
require "googleauth"
|
50
|
-
rescue LoadError =>
|
50
|
+
rescue LoadError => e
|
51
51
|
Fog::Errors::Error.new("Please install the google-api-client (>= 0.9) gem before using this provider")
|
52
|
-
raise
|
52
|
+
raise e
|
53
53
|
end
|
54
54
|
|
55
55
|
validate_client_options(options)
|
@@ -67,20 +67,21 @@ module Fog
|
|
67
67
|
::Google::Apis.logger.level = ::Logger::DEBUG
|
68
68
|
end
|
69
69
|
|
70
|
-
|
70
|
+
initialize_auth(options).tap do |auth|
|
71
|
+
::Google::Apis::RequestOptions.default.authorization = auth
|
72
|
+
end
|
73
|
+
end
|
71
74
|
|
75
|
+
def initialize_auth(options)
|
72
76
|
if options[:google_json_key_location] || options[:google_json_key_string]
|
73
|
-
|
77
|
+
process_key_auth(options)
|
74
78
|
elsif options[:google_auth]
|
75
|
-
|
79
|
+
options[:google_auth]
|
76
80
|
elsif options[:google_application_default]
|
77
|
-
|
81
|
+
process_application_default_auth(options)
|
78
82
|
else
|
79
|
-
|
83
|
+
process_fallback_auth(options)
|
80
84
|
end
|
81
|
-
|
82
|
-
::Google::Apis::RequestOptions.default.authorization = auth
|
83
|
-
auth
|
84
85
|
end
|
85
86
|
|
86
87
|
##
|
@@ -92,6 +93,7 @@ module Fog
|
|
92
93
|
def apply_client_options(service, options = {})
|
93
94
|
google_client_options = options[:google_client_options]
|
94
95
|
return if google_client_options.nil? || google_client_options.empty?
|
96
|
+
|
95
97
|
(service.client_options.members & google_client_options.keys).each do |option|
|
96
98
|
service.client_options[option] = google_client_options[option]
|
97
99
|
end
|
@@ -175,7 +177,7 @@ module Fog
|
|
175
177
|
)
|
176
178
|
begin
|
177
179
|
return process_application_default_auth(options)
|
178
|
-
rescue
|
180
|
+
rescue StandardError
|
179
181
|
raise Fog::Errors::Error.new(
|
180
182
|
"Fallback auth failed, could not configure authentication for Fog client.\n" \
|
181
183
|
"Check your auth options, must be one of:\n" \
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class StorageJSON
|
4
4
|
class Directories < Fog::Collection
|
5
|
-
model Fog::
|
5
|
+
model Fog::Google::StorageJSON::Directory
|
6
6
|
|
7
7
|
def all(opts = {})
|
8
8
|
data = service.list_buckets(**opts).to_h[:items] || []
|
@@ -33,6 +33,7 @@ module Fog
|
|
33
33
|
rescue ::Google::Apis::ClientError => e
|
34
34
|
# metageneration check failures returns HTTP 412 Precondition Failed
|
35
35
|
raise e unless e.status_code == 404 || e.status_code == 412
|
36
|
+
|
36
37
|
nil
|
37
38
|
end
|
38
39
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class StorageJSON
|
4
4
|
##
|
5
5
|
# Represents a Google Storage bucket
|
6
6
|
class Directory < Fog::Model
|
@@ -39,7 +39,7 @@ module Fog
|
|
39
39
|
|
40
40
|
def files(attr = {})
|
41
41
|
@files ||= begin
|
42
|
-
Fog::
|
42
|
+
Fog::Google::StorageJSON::Files.new(
|
43
43
|
attr.merge(:directory => self, :service => service)
|
44
44
|
)
|
45
45
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class StorageJSON
|
4
4
|
class Files < Fog::Collection
|
5
|
-
model Fog::
|
5
|
+
model Fog::Google::StorageJSON::File
|
6
6
|
|
7
7
|
extend Fog::Deprecation
|
8
8
|
deprecate :get_url, :get_https_url
|
@@ -11,7 +11,7 @@ module Fog
|
|
11
11
|
attribute :delimiter, :aliases => "Delimiter"
|
12
12
|
attribute :directory
|
13
13
|
attribute :page_token, :aliases => %w(pageToken page_token)
|
14
|
-
attribute :max_results, :aliases =>
|
14
|
+
attribute :max_results, :aliases => %w(MaxKeys max-keys)
|
15
15
|
attribute :prefix, :aliases => "Prefix"
|
16
16
|
attribute :next_page_token
|
17
17
|
|
@@ -24,14 +24,14 @@ module Fog
|
|
24
24
|
end
|
25
25
|
|
26
26
|
alias_method :each_file_this_page, :each
|
27
|
-
def each
|
27
|
+
def each(&block)
|
28
28
|
if block_given?
|
29
29
|
subset = dup.all
|
30
30
|
|
31
|
-
subset.each_file_this_page
|
31
|
+
subset.each_file_this_page(&block)
|
32
32
|
while subset.next_page_token
|
33
33
|
subset = subset.all(:page_token => subset.next_page_token)
|
34
|
-
subset.each_file_this_page
|
34
|
+
subset.each_file_this_page(&block)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
self
|
@@ -43,6 +43,7 @@ module Fog
|
|
43
43
|
new(data)
|
44
44
|
rescue ::Google::Apis::ClientError => e
|
45
45
|
raise e unless e.status_code == 404
|
46
|
+
|
46
47
|
nil
|
47
48
|
end
|
48
49
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class StorageJSON
|
4
4
|
class Real
|
5
5
|
include Utils
|
6
6
|
include Fog::Google::Shared
|
@@ -10,16 +10,12 @@ module Fog
|
|
10
10
|
|
11
11
|
def initialize(options = {})
|
12
12
|
shared_initialize(options[:google_project], GOOGLE_STORAGE_JSON_API_VERSION, GOOGLE_STORAGE_JSON_BASE_URL)
|
13
|
+
@options = options.dup
|
13
14
|
options[:google_api_scope_url] = GOOGLE_STORAGE_JSON_API_SCOPE_URLS.join(" ")
|
14
15
|
@host = options[:host] || "storage.googleapis.com"
|
15
16
|
|
16
17
|
# TODO(temikus): Do we even need this client?
|
17
18
|
@client = initialize_google_client(options)
|
18
|
-
# IAM client used for SignBlob API
|
19
|
-
@iam_service = ::Google::Apis::IamcredentialsV1::IAMCredentialsService.new
|
20
|
-
apply_client_options(@iam_service, {
|
21
|
-
google_api_scope_url: GOOGLE_STORAGE_JSON_IAM_API_SCOPE_URLS.join(" ")
|
22
|
-
})
|
23
19
|
|
24
20
|
@storage_json = ::Google::Apis::StorageV1::StorageService.new
|
25
21
|
apply_client_options(@storage_json, options)
|
@@ -141,6 +137,18 @@ DATA
|
|
141
137
|
return key.sign(digest, string_to_sign)
|
142
138
|
end
|
143
139
|
|
140
|
+
# IAM client used for SignBlob API.
|
141
|
+
# Lazily initialize this since it requires another authorization request.
|
142
|
+
def iam_service
|
143
|
+
return @iam_service if defined?(@iam_service)
|
144
|
+
|
145
|
+
@iam_service = ::Google::Apis::IamcredentialsV1::IAMCredentialsService.new
|
146
|
+
apply_client_options(@iam_service, @options)
|
147
|
+
iam_options = @options.merge(google_api_scope_url: GOOGLE_STORAGE_JSON_IAM_API_SCOPE_URLS.join(" "))
|
148
|
+
@iam_service.authorization = initialize_auth(iam_options)
|
149
|
+
@iam_service
|
150
|
+
end
|
151
|
+
|
144
152
|
##
|
145
153
|
# Fallback URL signer using the IAM SignServiceAccountBlob API, see
|
146
154
|
# Google::Apis::IamcredentialsV1::IAMCredentialsService#sign_service_account_blob
|
@@ -162,7 +170,7 @@ DATA
|
|
162
170
|
)
|
163
171
|
|
164
172
|
resource = "projects/-/serviceAccounts/#{google_access_id}"
|
165
|
-
response =
|
173
|
+
response = iam_service.sign_service_account_blob(resource, request)
|
166
174
|
|
167
175
|
return response.signed_blob
|
168
176
|
end
|
@@ -1,18 +1,18 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class StorageJSON
|
4
4
|
class Real
|
5
5
|
# Get an expiring object url from GCS
|
6
6
|
# Deprecated, redirects to get_object_https_url.rb
|
7
7
|
def get_object_url(bucket_name, object_name, expires, options = {})
|
8
|
-
Fog::Logger.deprecation("Fog::Storage
|
8
|
+
Fog::Logger.deprecation("Fog::Google::Storage => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
|
9
9
|
get_object_https_url(bucket_name, object_name, expires, **options)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
class Mock # :nodoc:all
|
14
14
|
def get_object_url(bucket_name, object_name, expires, options = {})
|
15
|
-
Fog::Logger.deprecation("Fog::Storage
|
15
|
+
Fog::Logger.deprecation("Fog::Google::Storage => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
|
16
16
|
get_object_https_url(bucket_name, object_name, expires, **options)
|
17
17
|
end
|
18
18
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
1
|
+
require "addressable"
|
2
2
|
|
3
3
|
module Fog
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module Google
|
5
|
+
class StorageJSON
|
6
6
|
module Utils
|
7
7
|
def http_url(params, expires)
|
8
8
|
"http://" << host_path_query(params, expires)
|
@@ -13,7 +13,7 @@ module Fog
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def url(params, expires)
|
16
|
-
Fog::Logger.deprecation("Fog::Storage
|
16
|
+
Fog::Logger.deprecation("Fog::Google::Storage => #url is deprecated, use #https_url instead [light_black](#{caller.first})[/]")
|
17
17
|
https_url(params, expires)
|
18
18
|
end
|
19
19
|
|