fog-google 1.24.1 → 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 +12 -0
- 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 +8 -7
- 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 +2 -2
- 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} +8 -8
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87a715866f44c0d1a77d6a2d9eb1c86b9eb1b2ad1926b48ca8f33bff6729f038
|
4
|
+
data.tar.gz: 9d0af9d669834f9859b2a5c1d0b12a377fdc11cc8bcdad1d14a58068f00f1c35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 556ef7cd9ca3e7c33308c9fd8e668f98284fdf7aecbd17c1ceeef2a317b324c2f4cd8e6cd6201fd95507c9a74960d2318dbbf6c6d173cf246d8491367a578523
|
7
|
+
data.tar.gz: 7c00ced8d78888a448c83ee5582580fe10c970aab34dd7d84e52961b8fb796e8d6cf1a776ca704542cd6618b5fdbb591c12bff42014e4389862522da08311db3
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,18 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
|
7
7
|
## Next
|
8
8
|
|
9
|
+
### User-facing
|
10
|
+
|
11
|
+
## 1.25.0
|
12
|
+
|
13
|
+
### User-facing
|
14
|
+
|
15
|
+
fog-core v2.2 and up now requires `Fog::Google:<service>` instead of `Fog::<service>::Google`.
|
16
|
+
There are shims in place that will provide backwards compatibility for the latter with
|
17
|
+
a deprecation warning, but you should update your code accordingly. The next major release
|
18
|
+
will drop support of the old format.
|
19
|
+
|
20
|
+
- #636 Support fog-core 2.5 and up [stanhu]
|
9
21
|
|
10
22
|
## 1.24.1
|
11
23
|
|
data/CONTRIBUTING.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Getting Involved
|
2
2
|
|
3
|
-
New contributors are always welcome, and when in doubt please ask questions!
|
3
|
+
New contributors are always welcome, and when in doubt please ask questions!
|
4
4
|
We strive to be an open and welcoming community. Please be nice to one another.
|
5
5
|
|
6
|
-
We recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md)
|
6
|
+
We recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md)
|
7
7
|
and having a look around as well. It has information and context about the state of the `fog` project as a whole.
|
8
8
|
|
9
9
|
### Coding
|
@@ -62,7 +62,7 @@ $ rake console
|
|
62
62
|
### Documentation
|
63
63
|
|
64
64
|
Code should be documented using [YARDoc](https://yardoc.org/) syntax.
|
65
|
-
We use [inch](https://github.com/rrrene/inch) to keep track of overall doc
|
65
|
+
We use [inch](https://github.com/rrrene/inch) to keep track of overall doc
|
66
66
|
coverage and [inch-ci](https://inch-ci.org/) to keep track of changes over time.
|
67
67
|
|
68
68
|
You can view a doc coverage report by running:
|
@@ -72,19 +72,19 @@ $ inch
|
|
72
72
|
|
73
73
|
Or view suggestions on a specific method:
|
74
74
|
```
|
75
|
-
$ inch show Fog::Compute::
|
75
|
+
$ inch show Fog::Google::Compute::Server#set_metadata
|
76
76
|
```
|
77
77
|
|
78
78
|
### Testing
|
79
79
|
|
80
|
-
This module is tested with [Minitest](https://github.com/seattlerb/minitest).
|
80
|
+
This module is tested with [Minitest](https://github.com/seattlerb/minitest).
|
81
81
|
|
82
82
|
#### Integration tests
|
83
83
|
|
84
|
-
Live integration tests can be found in `test/integration/`.
|
84
|
+
Live integration tests can be found in `test/integration/`.
|
85
85
|
|
86
86
|
Most of the library functionality is currently covered with them. To simplify things for contributors we have a
|
87
|
-
CI system that runs all integration tests in parallel against all pull requests marked with `integrate` label
|
87
|
+
CI system that runs all integration tests in parallel against all pull requests marked with `integrate` label
|
88
88
|
that anyone in `fog-google` team can set. Read [CI section](https://github.com/fog/fog-google/blob/master/CONTRIBUTING.md#continuous-integration)
|
89
89
|
for more info.
|
90
90
|
|
@@ -137,7 +137,7 @@ We're in progress of extending the library with more unit tests and contribution
|
|
137
137
|
|
138
138
|
#### The transition from `shindo` to Minitest
|
139
139
|
|
140
|
-
Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework.
|
140
|
+
Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework.
|
141
141
|
We've moved away from it, and to Minitest, but some artifacts may remain.
|
142
142
|
|
143
143
|
For more information on transition, read [#50](https://github.com/fog/fog-google/issues/50).
|
@@ -158,10 +158,10 @@ and contains the standard tests to run for all resources, (e.g. `test_lifecycle`
|
|
158
158
|
It also calls `cleanup` on the resource's factory during teardown, to make sure
|
159
159
|
that resources are getting destroyed before the next test run.
|
160
160
|
- The **factory**, (e.g. `ServersFactory`, in `test/integration/factories/servers_factory.rb`,)
|
161
|
-
automates the creation of resources and/or supplies parameters for explicit
|
161
|
+
automates the creation of resources and/or supplies parameters for explicit
|
162
162
|
creation of resources. For example, `ServersFactory` initializes a `DisksFactory`
|
163
163
|
to supply disks in order to create servers, and implements the `params` method
|
164
|
-
so that tests can create servers with unique names, correct zones and machine
|
164
|
+
so that tests can create servers with unique names, correct zones and machine
|
165
165
|
types, and automatically-created disks. `ServersFactory` inherits the `create`
|
166
166
|
method from `CollectionFactory`, which allows tests to create servers on-demand.
|
167
167
|
- The **main test**, (e.g. `TestServers`, in `test/integration/compute/test_servers.rb`,)
|
@@ -170,6 +170,6 @@ method from `CollectionFactory`, which allows tests to create servers on-demand.
|
|
170
170
|
it initializes a `ServersFactory`, and it includes any other tests specific to
|
171
171
|
this collection, (e.g. `test_bootstrap_ssh_destroy`).
|
172
172
|
|
173
|
-
If you want to create another resource, you should add live integration tests;
|
173
|
+
If you want to create another resource, you should add live integration tests;
|
174
174
|
all you need to do is create a factory in `test/integration/factories/my_resource_factory.rb`
|
175
175
|
and a main test in `test/integration/compute/test_my_resource.rb` that mixes in `TestCollection`.
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ We're proud to be sponsored by MeisterLabs who are generously funding our CI sta
|
|
24
24
|
|
25
25
|
## Storage
|
26
26
|
|
27
|
-
There are two ways to access [Google Cloud Storage](https://cloud.google.com/storage/). The old S3 API and the new JSON API. `Fog::Storage
|
27
|
+
There are two ways to access [Google Cloud Storage](https://cloud.google.com/storage/). The old S3 API and the new JSON API. `Fog::Google::Storage` will automatically direct you to the appropriate API based on the credentials you provide it.
|
28
28
|
|
29
29
|
* The [XML API](https://cloud.google.com/storage/docs/xml-api-overview/) is almost identical to S3. Use [Google's interoperability keys](https://cloud.google.com/storage/docs/migrating#keys) to access it.
|
30
30
|
* The new [JSON API](https://cloud.google.com/storage/docs/json_api/) is faster and uses auth similarly to the rest of the Google Cloud APIs using a [service account private key](https://developers.google.com/identity/protocols/OAuth2ServiceAccount).
|
@@ -33,7 +33,7 @@ There are two ways to access [Google Cloud Storage](https://cloud.google.com/sto
|
|
33
33
|
|
34
34
|
Google Compute Engine is a Virtual Machine hosting service. Currently it is built on version [v1](https://cloud.google.com/compute/docs/reference/v1/) of the GCE API.
|
35
35
|
|
36
|
-
As of 2017-12-15, we are still working on making Fog for Google Compute engine (`Fog::Compute
|
36
|
+
As of 2017-12-15, we are still working on making Fog for Google Compute engine (`Fog::Google::Compute`) feature complete. If you are using Fog to interact with GCE, please keep Fog up to date and [file issues](https://github.com/fog/fog-google/issues) for any anomalies you see or features you would like.
|
37
37
|
|
38
38
|
## SQL
|
39
39
|
|
@@ -112,10 +112,10 @@ Example workflow for a GCE instance with [service account scopes](https://cloud.
|
|
112
112
|
defined:
|
113
113
|
|
114
114
|
```
|
115
|
-
> connection = Fog::Compute
|
116
|
-
=> #<Fog::Compute::
|
115
|
+
> connection = Fog::Google::Compute.new(:google_project => "my-project", :google_application_default => true)
|
116
|
+
=> #<Fog::Google::Compute::Real:32157700...
|
117
117
|
> connection.servers
|
118
|
-
=> [ <Fog::Compute::
|
118
|
+
=> [ <Fog::Google::Compute::Server ... ]
|
119
119
|
```
|
120
120
|
|
121
121
|
#### CarrierWave integration
|
@@ -166,9 +166,9 @@ Once you've specified your credentials, you should be good to go!
|
|
166
166
|
$ bundle exec pry
|
167
167
|
[1] pry(main)> require 'fog/google'
|
168
168
|
=> true
|
169
|
-
[2] pry(main)> connection = Fog::Compute
|
169
|
+
[2] pry(main)> connection = Fog::Google::Compute.new
|
170
170
|
[3] pry(main)> connection.servers
|
171
|
-
=> [ <Fog::Compute::
|
171
|
+
=> [ <Fog::Google::Compute::Server
|
172
172
|
name="xxxxxxx",
|
173
173
|
kind="compute#instance",
|
174
174
|
```
|
@@ -49,8 +49,8 @@ def example
|
|
49
49
|
|
50
50
|
p "Attach second disk to the running server"
|
51
51
|
device_name = "fog-smoke-test-device-#{Time.now.to_i}"
|
52
|
-
# See https://github.com/fog/fog-google/blob/master/lib/fog/compute/
|
53
|
-
# See https://github.com/fog/fog-google/blob/master/lib/fog/compute/
|
52
|
+
# See https://github.com/fog/fog-google/blob/master/lib/fog/google/compute/models/disk.rb#L75-L107
|
53
|
+
# See https://github.com/fog/fog-google/blob/master/lib/fog/google/compute/models/server.rb#L35-L50
|
54
54
|
config_hash = {
|
55
55
|
:device_name => device_name,
|
56
56
|
:source => "https://www.googleapis.com/compute/v1/projects/#{PROJECT}/zones/#{ZONE}/disks/#{attached_disk.name}"
|
@@ -58,13 +58,13 @@ def example
|
|
58
58
|
raise "Could not attach second disk" unless connection.attach_disk(server.name, ZONE, config_hash)
|
59
59
|
|
60
60
|
p "Waiting for disk to be attached"
|
61
|
-
attached_disk.wait_for { !
|
61
|
+
attached_disk.wait_for { !users.nil? && users != [] }
|
62
62
|
|
63
63
|
p "Detach second disk"
|
64
64
|
raise "Could not detach second disk" unless connection.detach_disk(server.name, ZONE, device_name)
|
65
65
|
|
66
66
|
p "Waiting for second disk to be detached"
|
67
|
-
attached_disk.wait_for { users.nil? || users == []}
|
67
|
+
attached_disk.wait_for { users.nil? || users == [] }
|
68
68
|
|
69
69
|
p "Deleting server"
|
70
70
|
raise "Could not delete server." unless server.destroy
|
@@ -74,9 +74,8 @@ def example
|
|
74
74
|
|
75
75
|
p "Waiting for second disk to be destroyed"
|
76
76
|
begin
|
77
|
-
rc = attached_disk.wait_for { status.nil? || status ==
|
78
|
-
|
79
|
-
rescue => e
|
77
|
+
rc = attached_disk.wait_for { status.nil? || status == "DELETING" }
|
78
|
+
rescue StandardError => e
|
80
79
|
if e.message !~ /not found/ && e.message !~ /notFound/
|
81
80
|
raise e
|
82
81
|
end
|
data/examples/dns/project.rb
CHANGED
data/examples/dns/zones.rb
CHANGED
data/examples/storage.rb
CHANGED
@@ -11,7 +11,7 @@ Bundler.require(:default, :development)
|
|
11
11
|
# Storage -> Storage -> Settings -> "Interoperability" tab -> "Create a new key"
|
12
12
|
|
13
13
|
def test
|
14
|
-
connection = Fog::Storage
|
14
|
+
connection = Fog::Google::Storage.new
|
15
15
|
|
16
16
|
puts "Put a bucket..."
|
17
17
|
puts "----------------"
|
data/examples/storage_json.rb
CHANGED
@@ -11,7 +11,7 @@ Bundler.require(:default, :development)
|
|
11
11
|
# Storage -> Storage -> Settings -> "Interoperability" tab -> "Create a new key"
|
12
12
|
|
13
13
|
def test
|
14
|
-
connection = Fog::Storage
|
14
|
+
connection = Fog::Google::Storage.new
|
15
15
|
|
16
16
|
puts "Put a bucket..."
|
17
17
|
puts "----------------"
|
data/fog-google.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
# As of 0.1.1
|
21
21
|
spec.required_ruby_version = ">= 2.0"
|
22
22
|
|
23
|
-
spec.add_dependency "fog-core", "
|
23
|
+
spec.add_dependency "fog-core", "~> 2.5"
|
24
24
|
spec.add_dependency "fog-json", "~> 1.2"
|
25
25
|
spec.add_dependency "fog-xml", "~> 0.1.0"
|
26
26
|
|
data/lib/fog/bin/google.rb
CHANGED
@@ -4,15 +4,15 @@ module Google
|
|
4
4
|
def class_for(key)
|
5
5
|
case key
|
6
6
|
when :compute
|
7
|
-
Fog::Compute
|
7
|
+
Fog::Google::Compute
|
8
8
|
when :dns
|
9
|
-
Fog::DNS
|
9
|
+
Fog::Google::DNS
|
10
10
|
when :monitoring
|
11
11
|
Fog::Google::Monitoring
|
12
12
|
when :storage
|
13
|
-
Fog::Storage
|
13
|
+
Fog::Google::Storage
|
14
14
|
when :storage_json
|
15
|
-
Fog::Storage
|
15
|
+
Fog::Google::Storage
|
16
16
|
when :sql
|
17
17
|
Fog::Google::SQL
|
18
18
|
when :pubsub
|
@@ -24,25 +24,22 @@ module Google
|
|
24
24
|
|
25
25
|
def [](service)
|
26
26
|
@@connections ||= Hash.new do |hash, key|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
else
|
44
|
-
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
45
|
-
end
|
27
|
+
case key
|
28
|
+
when :compute
|
29
|
+
hash[key] = Fog::Compute.new(:provider => "Google")
|
30
|
+
when :dns
|
31
|
+
hash[key] = Fog::DNS.new(:provider => "Google")
|
32
|
+
when :monitoring
|
33
|
+
hash[key] = Fog::Google::Monitoring.new
|
34
|
+
when :sql
|
35
|
+
hash[key] = Fog::Google::SQL.new
|
36
|
+
when :pubsub
|
37
|
+
hash[key] = Fog::Google::Pubsub.new
|
38
|
+
when :storage
|
39
|
+
hash[key] = Fog::Storage.new(:provider => "Google")
|
40
|
+
else
|
41
|
+
hash[key] = raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
42
|
+
end
|
46
43
|
end
|
47
44
|
@@connections[service]
|
48
45
|
end
|
@@ -74,7 +71,7 @@ module Google
|
|
74
71
|
rescue ArgumentError => e
|
75
72
|
Fog::Logger.warning(e.message)
|
76
73
|
availability = false
|
77
|
-
rescue => e
|
74
|
+
rescue StandardError => e
|
78
75
|
availability = false
|
79
76
|
end
|
80
77
|
end
|
@@ -83,7 +80,8 @@ module Google
|
|
83
80
|
services.each do |service|
|
84
81
|
class_for(service).collections.each do |collection|
|
85
82
|
next if respond_to?(collection)
|
86
|
-
|
83
|
+
|
84
|
+
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
87
85
|
def self.#{collection}
|
88
86
|
self[:#{service}].#{collection}
|
89
87
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
##
|
5
5
|
# Represents an Address resource
|
6
6
|
#
|
@@ -37,7 +37,7 @@ module Fog
|
|
37
37
|
requires :identity, :region
|
38
38
|
|
39
39
|
data = service.insert_address(identity, region, attributes)
|
40
|
-
operation = Fog::Compute::
|
40
|
+
operation = Fog::Google::Compute::Operations
|
41
41
|
.new(service: service)
|
42
42
|
.get(data.name, nil, data.region)
|
43
43
|
operation.wait_for { ready? }
|
@@ -48,7 +48,7 @@ module Fog
|
|
48
48
|
requires :identity, :region
|
49
49
|
|
50
50
|
data = service.delete_address(identity, region.split("/")[-1])
|
51
|
-
operation = Fog::Compute::
|
51
|
+
operation = Fog::Google::Compute::Operations
|
52
52
|
.new(:service => service)
|
53
53
|
.get(data.name, nil, data.region)
|
54
54
|
|
@@ -81,14 +81,14 @@ module Fog
|
|
81
81
|
# standard primary nic - "nic0"
|
82
82
|
# @param [Boolean] async - whether to run the operation asynchronously
|
83
83
|
#
|
84
|
-
# @return [Fog::Compute::
|
84
|
+
# @return [Fog::Google::Compute::Operation]
|
85
85
|
def associate(server, nic_name = "nic0", async = false)
|
86
86
|
requires :address
|
87
87
|
|
88
88
|
data = service.add_server_access_config(
|
89
89
|
server.name, server.zone, nic_name, :nat_ip => address
|
90
90
|
)
|
91
|
-
operation = Fog::Compute::
|
91
|
+
operation = Fog::Google::Compute::Operations
|
92
92
|
.new(:service => service)
|
93
93
|
.get(data.name, data.zone)
|
94
94
|
operation.wait_for { ready? } unless async
|
@@ -98,7 +98,7 @@ module Fog
|
|
98
98
|
#
|
99
99
|
# @param [Boolean] async - whether to run the operation asynchronously
|
100
100
|
#
|
101
|
-
# @return [Fog::Compute::
|
101
|
+
# @return [Fog::Google::Compute::Operation]
|
102
102
|
def disassociate(async = false)
|
103
103
|
requires :address
|
104
104
|
|
@@ -120,7 +120,7 @@ module Fog
|
|
120
120
|
data = service.delete_server_access_config(
|
121
121
|
server.name, server.zone, nic[:name], access_config[:name]
|
122
122
|
)
|
123
|
-
operation = Fog::Compute::
|
123
|
+
operation = Fog::Google::Compute::Operations
|
124
124
|
.new(:service => service)
|
125
125
|
.get(data.name, data.zone)
|
126
126
|
operation.wait_for { ready? } unless async
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class Addresses < Fog::Collection
|
5
|
-
model Fog::Compute::
|
5
|
+
model Fog::Google::Compute::Address
|
6
6
|
|
7
7
|
def all(region: nil, filter: nil, max_results: nil, order_by: nil, page_token: nil)
|
8
8
|
opts = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class BackendService < Fog::Model
|
5
5
|
identity :name
|
6
6
|
|
@@ -30,7 +30,7 @@ module Fog
|
|
30
30
|
}
|
31
31
|
|
32
32
|
data = service.insert_backend_service(name, **options)
|
33
|
-
operation = Fog::Compute::
|
33
|
+
operation = Fog::Google::Compute::Operations.new(:service => service).get(data.name)
|
34
34
|
operation.wait_for { ready? }
|
35
35
|
reload
|
36
36
|
end
|
@@ -39,7 +39,7 @@ module Fog
|
|
39
39
|
requires :name
|
40
40
|
|
41
41
|
data = service.delete_backend_service(name)
|
42
|
-
operation = Fog::Compute::
|
42
|
+
operation = Fog::Google::Compute::Operations.new(:service => service).get(data.name)
|
43
43
|
operation.wait_for { ready? } unless async
|
44
44
|
operation
|
45
45
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class BackendServices < Fog::Collection
|
5
|
-
model Fog::Compute::
|
5
|
+
model Fog::Google::Compute::BackendService
|
6
6
|
|
7
7
|
def all(_filters = {})
|
8
8
|
data = service.list_backend_services.items || []
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class Disk < Fog::Model
|
5
5
|
identity :name
|
6
6
|
|
@@ -52,7 +52,7 @@ module Fog
|
|
52
52
|
# Request needs backward compatibility so source image is specified in
|
53
53
|
# method arguments
|
54
54
|
data = service.insert_disk(name, zone, options[:source_image], **options)
|
55
|
-
operation = Fog::Compute::
|
55
|
+
operation = Fog::Google::Compute::Operations.new(service: service)
|
56
56
|
.get(data.name, data.zone)
|
57
57
|
operation.wait_for { ready? }
|
58
58
|
reload
|
@@ -62,7 +62,7 @@ module Fog
|
|
62
62
|
requires :name, :zone
|
63
63
|
|
64
64
|
data = service.delete_disk(name, zone_name)
|
65
|
-
operation = Fog::Compute::
|
65
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
66
66
|
.get(data.name, data.zone)
|
67
67
|
operation.wait_for { ready? } unless async
|
68
68
|
operation
|
@@ -142,7 +142,7 @@ module Fog
|
|
142
142
|
raise ArgumentError, "Invalid snapshot name" unless snapshot_name
|
143
143
|
|
144
144
|
data = service.create_disk_snapshot(snapshot_name, name, zone_name, snapshot)
|
145
|
-
operation = Fog::Compute::
|
145
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
146
146
|
.get(data.name, data.zone)
|
147
147
|
operation.wait_for { ready? }
|
148
148
|
service.snapshots.get(snapshot_name)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class DiskTypes < Fog::Collection
|
5
|
-
model Fog::Compute::
|
5
|
+
model Fog::Google::Compute::DiskType
|
6
6
|
|
7
7
|
def all(zone: nil, filter: nil, max_results: nil,
|
8
8
|
order_by: nil, page_token: nil)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class Disks < Fog::Collection
|
5
|
-
model Fog::Compute::
|
5
|
+
model Fog::Google::Compute::Disk
|
6
6
|
|
7
7
|
def all(zone: nil, filter: nil, max_results: nil, order_by: nil,
|
8
8
|
page_token: nil)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
##
|
5
5
|
# Represents a Firewall resource
|
6
6
|
#
|
@@ -53,7 +53,7 @@ module Fog
|
|
53
53
|
|
54
54
|
def create
|
55
55
|
data = service.insert_firewall(identity, attributes)
|
56
|
-
operation = Fog::Compute::
|
56
|
+
operation = Fog::Google::Compute::Operations.new(service: service)
|
57
57
|
.get(data.name)
|
58
58
|
operation.wait_for { ready? }
|
59
59
|
reload
|
@@ -63,7 +63,7 @@ module Fog
|
|
63
63
|
requires :identity, :allowed, :network
|
64
64
|
|
65
65
|
data = service.update_firewall(identity, attributes)
|
66
|
-
operation = Fog::Compute::
|
66
|
+
operation = Fog::Google::Compute::Operations.new(service: service)
|
67
67
|
.get(data.name)
|
68
68
|
operation.wait_for { ready? }
|
69
69
|
reload
|
@@ -73,7 +73,7 @@ module Fog
|
|
73
73
|
requires :identity
|
74
74
|
|
75
75
|
data = service.patch_firewall(identity, diff)
|
76
|
-
operation = Fog::Compute::
|
76
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
77
77
|
.get(data.name)
|
78
78
|
operation.wait_for { ready? }
|
79
79
|
reload
|
@@ -83,7 +83,7 @@ module Fog
|
|
83
83
|
requires :identity
|
84
84
|
|
85
85
|
data = service.delete_firewall(identity)
|
86
|
-
operation = Fog::Compute::
|
86
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
87
87
|
.get(data.name)
|
88
88
|
operation.wait_for { ready? } unless async
|
89
89
|
operation
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class ForwardingRule < Fog::Model
|
5
5
|
identity :name
|
6
6
|
|
@@ -25,7 +25,7 @@ module Fog
|
|
25
25
|
requires :identity, :region
|
26
26
|
|
27
27
|
data = service.insert_forwarding_rule(identity, region, attributes)
|
28
|
-
operation = Fog::Compute::
|
28
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
29
29
|
.get(data.name, nil, data.region)
|
30
30
|
operation.wait_for { ready? }
|
31
31
|
reload
|
@@ -45,7 +45,7 @@ module Fog
|
|
45
45
|
def destroy(async = true)
|
46
46
|
requires :identity, :region
|
47
47
|
data = service.delete_forwarding_rule(identity, region)
|
48
|
-
operation = Fog::Compute::
|
48
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
49
49
|
.get(data.name, nil, data.region)
|
50
50
|
operation.wait_for { ready? } unless async
|
51
51
|
operation
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
class ForwardingRules < Fog::Collection
|
5
|
-
model Fog::Compute::
|
5
|
+
model Fog::Google::Compute::ForwardingRule
|
6
6
|
|
7
7
|
def all(region: nil, filter: nil, max_results: nil, order_by: nil, page_token: nil)
|
8
8
|
opts = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Google
|
3
|
+
class Compute
|
4
4
|
##
|
5
5
|
# Represents an Address resource
|
6
6
|
#
|
@@ -25,7 +25,7 @@ module Fog
|
|
25
25
|
requires :identity
|
26
26
|
|
27
27
|
data = service.insert_global_address(identity, attributes)
|
28
|
-
operation = Fog::Compute::
|
28
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
29
29
|
.get(data.name)
|
30
30
|
operation.wait_for { ready? }
|
31
31
|
reload
|
@@ -35,7 +35,7 @@ module Fog
|
|
35
35
|
requires :identity
|
36
36
|
|
37
37
|
data = service.delete_global_address(identity)
|
38
|
-
operation = Fog::Compute::
|
38
|
+
operation = Fog::Google::Compute::Operations.new(:service => service)
|
39
39
|
.get(data.name)
|
40
40
|
operation.wait_for { ready? } unless async
|
41
41
|
operation
|