fog 1.18.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +6 -0
- data/CONTRIBUTING.md +22 -0
- data/LICENSE.md +20 -0
- data/README.md +41 -60
- data/Rakefile +2 -0
- data/changelog.txt +262 -0
- data/fog.gemspec +3 -3
- data/lib/fog/aws.rb +9 -7
- data/lib/fog/aws/cloud_watch.rb +0 -1
- data/lib/fog/aws/compute.rb +2 -0
- data/lib/fog/aws/dns.rb +2 -1
- data/lib/fog/aws/elb.rb +2 -0
- data/lib/fog/aws/models/auto_scaling/configuration.rb +4 -0
- data/lib/fog/aws/models/compute/address.rb +6 -5
- data/lib/fog/aws/models/compute/flavors.rb +10 -0
- data/lib/fog/aws/models/compute/spot_request.rb +1 -1
- data/lib/fog/aws/models/compute/subnet.rb +4 -0
- data/lib/fog/aws/models/compute/vpc.rb +5 -0
- data/lib/fog/aws/models/dns/records.rb +1 -3
- data/lib/fog/aws/models/elb/load_balancer.rb +10 -0
- data/lib/fog/aws/models/glacier/vault.rb +1 -1
- data/lib/fog/aws/models/rds/server.rb +5 -2
- data/lib/fog/aws/models/rds/subnet_group.rb +15 -1
- data/lib/fog/aws/models/storage/file.rb +2 -2
- data/lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb +6 -0
- data/lib/fog/aws/parsers/compute/assign_private_ip_addresses.rb +25 -0
- data/lib/fog/aws/parsers/compute/describe_addresses.rb +1 -1
- data/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb +40 -0
- data/lib/fog/aws/parsers/rds/delete_db_subnet_group.rb +35 -0
- data/lib/fog/aws/rds.rb +3 -3
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +2 -0
- data/lib/fog/aws/requests/auto_scaling/describe_notification_configurations.rb +1 -1
- data/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb +60 -0
- data/lib/fog/aws/requests/compute/create_route.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_images.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_subnets.rb +8 -0
- data/lib/fog/aws/requests/compute/describe_vpcs.rb +8 -0
- data/lib/fog/aws/requests/compute/modify_vpc_attribute.rb +59 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +26 -9
- data/lib/fog/aws/requests/dns/create_hosted_zone.rb +12 -3
- data/lib/fog/aws/requests/dns/delete_hosted_zone.rb +33 -0
- data/lib/fog/aws/requests/dns/get_change.rb +26 -0
- data/lib/fog/aws/requests/dns/get_hosted_zone.rb +1 -1
- data/lib/fog/aws/requests/dns/list_hosted_zones.rb +3 -8
- data/lib/fog/aws/requests/dns/list_resource_record_sets.rb +68 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -0
- data/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb +54 -0
- data/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb +59 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +7 -1
- data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +7 -1
- data/lib/fog/aws/requests/rds/delete_db_subnet_group.rb +42 -0
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +6 -4
- data/lib/fog/aws/requests/storage/put_bucket.rb +4 -1
- data/lib/fog/aws/sqs.rb +2 -4
- data/lib/fog/aws/storage.rb +14 -1
- data/lib/fog/bluebox/compute.rb +1 -1
- data/lib/fog/brightbox/compute.rb +7 -9
- data/lib/fog/brightbox/compute/image_selector.rb +1 -1
- data/lib/fog/brightbox/compute/shared.rb +8 -10
- data/lib/fog/brightbox/models/compute/api_client.rb +1 -1
- data/lib/fog/brightbox/models/compute/application.rb +1 -4
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +8 -5
- data/lib/fog/brightbox/models/compute/collaboration.rb +0 -2
- data/lib/fog/brightbox/models/compute/collaborations.rb +1 -1
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +2 -4
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +1 -1
- data/lib/fog/brightbox/models/compute/image.rb +1 -3
- data/lib/fog/brightbox/models/compute/load_balancer.rb +11 -8
- data/lib/fog/brightbox/models/compute/server.rb +28 -20
- data/lib/fog/brightbox/models/compute/server_group.rb +9 -11
- data/lib/fog/brightbox/models/compute/zone.rb +1 -1
- data/lib/fog/brightbox/oauth2.rb +3 -3
- data/lib/fog/brightbox/requests/compute/update_server.rb +1 -1
- data/lib/fog/cloudstack.rb +1 -1
- data/lib/fog/compute.rb +2 -2
- data/lib/fog/core.rb +1 -1
- data/lib/fog/core/connection.rb +1 -2
- data/lib/fog/core/errors.rb +3 -3
- data/lib/fog/core/hmac.rb +3 -3
- data/lib/fog/core/mock.rb +9 -2
- data/lib/fog/core/scp.rb +1 -1
- data/lib/fog/core/wait_for.rb +1 -1
- data/lib/fog/core/{timeout.rb → wait_for_defaults.rb} +10 -0
- data/lib/fog/digitalocean/models/compute/server.rb +4 -0
- data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
- data/lib/fog/dnsimple/dns.rb +1 -1
- data/lib/fog/dreamhost/dns.rb +2 -4
- data/lib/fog/ecloud/compute.rb +1 -1
- data/lib/fog/ecloud/models/compute/environments.rb +5 -3
- data/lib/fog/google/compute.rb +105 -68
- data/lib/fog/google/examples/create.rb +1 -0
- data/lib/fog/google/models/compute/disk.rb +7 -1
- data/lib/fog/google/models/compute/operation.rb +42 -0
- data/lib/fog/google/models/compute/operations.rb +26 -0
- data/lib/fog/google/models/compute/server.rb +18 -2
- data/lib/fog/google/models/compute/servers.rb +2 -1
- data/lib/fog/google/models/compute/zones.rb +1 -1
- data/lib/fog/google/models/storage/file.rb +1 -1
- data/lib/fog/google/models/storage/files.rb +1 -1
- data/lib/fog/google/requests/compute/delete_disk.rb +22 -2
- data/lib/fog/google/requests/compute/delete_global_operation.rb +29 -0
- data/lib/fog/google/requests/compute/delete_server.rb +13 -9
- data/lib/fog/google/requests/compute/delete_zone_operation.rb +33 -0
- data/lib/fog/google/requests/compute/get_disk.rb +26 -2
- data/lib/fog/google/requests/compute/{delete_operation.rb → get_global_operation.rb} +5 -6
- data/lib/fog/google/requests/compute/get_image.rb +3 -3
- data/lib/fog/google/requests/compute/get_server.rb +1 -0
- data/lib/fog/google/requests/compute/get_zone_operation.rb +58 -0
- data/lib/fog/google/requests/compute/insert_disk.rb +43 -3
- data/lib/fog/google/requests/compute/insert_firewall.rb +2 -1
- data/lib/fog/google/requests/compute/insert_image.rb +2 -2
- data/lib/fog/google/requests/compute/insert_server.rb +64 -35
- data/lib/fog/google/requests/compute/list_disks.rb +8 -2
- data/lib/fog/google/requests/compute/list_images.rb +2 -2
- data/lib/fog/google/requests/compute/list_machine_types.rb +2 -2
- data/lib/fog/google/requests/compute/list_servers.rb +2 -2
- data/lib/fog/google/requests/compute/list_zone_operations.rb +2 -1
- data/lib/fog/google/requests/compute/list_zones.rb +1 -1
- data/lib/fog/google/requests/storage/copy_object.rb +1 -1
- data/lib/fog/hp.rb +1 -1
- data/lib/fog/hp/README.md +57 -0
- data/lib/fog/hp/articles/auth_caching.md +23 -0
- data/lib/fog/hp/docs/connect.md +152 -0
- data/lib/fog/hp/docs/install.md +133 -0
- data/lib/fog/hp/examples/block_storage.md +296 -0
- data/lib/fog/hp/examples/block_storage_v2.md +446 -0
- data/lib/fog/hp/examples/cdn.md +54 -0
- data/lib/fog/hp/examples/compute.md +794 -0
- data/lib/fog/hp/examples/compute_v2.md +848 -0
- data/lib/fog/hp/examples/getting_started_examples.md +30 -0
- data/lib/fog/hp/examples/networking.md +472 -0
- data/lib/fog/hp/examples/object_storage.md +387 -0
- data/lib/fog/json.rb +6 -3
- data/lib/fog/local/models/storage/directories.rb +8 -4
- data/lib/fog/openstack/compute.rb +3 -0
- data/lib/fog/openstack/examples/compute/basics.rb +74 -0
- data/lib/fog/openstack/identity.rb +2 -3
- data/lib/fog/openstack/image.rb +1 -4
- data/lib/fog/openstack/metering.rb +1 -4
- data/lib/fog/openstack/models/compute/host.rb +5 -1
- data/lib/fog/openstack/models/compute/security_group.rb +18 -4
- data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
- data/lib/fog/openstack/models/compute/security_group_rules.rb +22 -0
- data/lib/fog/openstack/models/volume/volume_type.rb +20 -0
- data/lib/fog/openstack/models/volume/volume_types.rb +26 -0
- data/lib/fog/openstack/network.rb +34 -6
- data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
- data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -1
- data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_key_pair.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_security_group.rb +4 -4
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +2 -2
- data/lib/fog/openstack/requests/compute/create_server.rb +12 -5
- data/lib/fog/openstack/requests/compute/create_volume.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +2 -0
- data/lib/fog/openstack/requests/compute/get_security_group.rb +14 -24
- data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
- data/lib/fog/openstack/requests/compute/list_hosts.rb +3 -3
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
- data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/update_quota.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
- data/lib/fog/openstack/requests/identity/update_user.rb +1 -1
- data/lib/fog/openstack/requests/image/update_image_members.rb +1 -1
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +2 -2
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +1 -1
- data/lib/fog/openstack/requests/storage/get_object_http_url.rb +13 -0
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +0 -14
- data/lib/fog/openstack/requests/volume/create_volume.rb +1 -1
- data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
- data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
- data/lib/fog/openstack/storage.rb +2 -0
- data/lib/fog/openstack/volume.rb +9 -5
- data/lib/fog/rackspace/compute.rb +1 -4
- data/lib/fog/rackspace/compute_v2.rb +1 -0
- data/lib/fog/rackspace/docs/auto_scale.md +9 -9
- data/lib/fog/rackspace/docs/getting_started.md +1 -0
- data/lib/fog/rackspace/docs/queues.md +312 -0
- data/lib/fog/rackspace/examples/queues/claim_messages.rb +60 -0
- data/lib/fog/rackspace/examples/queues/create_queue.rb +45 -0
- data/lib/fog/rackspace/examples/queues/delete_message.rb +72 -0
- data/lib/fog/rackspace/examples/queues/delete_queue.rb +53 -0
- data/lib/fog/rackspace/examples/queues/list_messages.rb +64 -0
- data/lib/fog/rackspace/examples/queues/post_message.rb +59 -0
- data/lib/fog/rackspace/models/compute_v2/key_pairs.rb +1 -1
- data/lib/fog/rackspace/models/compute_v2/server.rb +9 -3
- data/lib/fog/rackspace/models/compute_v2/servers.rb +2 -2
- data/lib/fog/rackspace/models/identity/service_catalog.rb +44 -59
- data/lib/fog/rackspace/models/queues/claim.rb +41 -1
- data/lib/fog/rackspace/models/queues/claims.rb +25 -0
- data/lib/fog/rackspace/models/queues/message.rb +43 -5
- data/lib/fog/rackspace/models/queues/messages.rb +37 -0
- data/lib/fog/rackspace/models/queues/queue.rb +66 -3
- data/lib/fog/rackspace/models/queues/queues.rb +15 -0
- data/lib/fog/rackspace/models/storage/file.rb +8 -1
- data/lib/fog/rackspace/requests/compute_v2/delete_keypair.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/get_keypair.rb +1 -1
- data/lib/fog/rackspace/requests/queues/create_claim.rb +15 -0
- data/lib/fog/rackspace/requests/queues/create_message.rb +15 -0
- data/lib/fog/rackspace/requests/queues/create_queue.rb +11 -0
- data/lib/fog/rackspace/requests/queues/delete_claim.rb +12 -0
- data/lib/fog/rackspace/requests/queues/delete_message.rb +14 -0
- data/lib/fog/rackspace/requests/queues/delete_queue.rb +10 -0
- data/lib/fog/rackspace/requests/queues/get_claim.rb +11 -0
- data/lib/fog/rackspace/requests/queues/get_message.rb +12 -0
- data/lib/fog/rackspace/requests/queues/get_queue.rb +10 -0
- data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +10 -0
- data/lib/fog/rackspace/requests/queues/list_messages.rb +26 -0
- data/lib/fog/rackspace/requests/queues/list_queues.rb +17 -2
- data/lib/fog/rackspace/requests/queues/update_claim.rb +7 -0
- data/lib/fog/rackspace/service.rb +6 -2
- data/lib/fog/rackspace/storage.rb +1 -4
- data/lib/fog/riakcs.rb +2 -2
- data/lib/fog/riakcs/provisioning.rb +1 -3
- data/lib/fog/riakcs/requests/provisioning/create_user.rb +2 -2
- data/lib/fog/riakcs/requests/provisioning/get_user.rb +1 -1
- data/lib/fog/riakcs/requests/provisioning/list_users.rb +1 -1
- data/lib/fog/riakcs/requests/usage/get_usage.rb +1 -1
- data/lib/fog/riakcs/usage.rb +0 -2
- data/lib/fog/vcloud_director/README.md +2 -0
- data/lib/fog/vcloud_director/compute.rb +79 -8
- data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +91 -0
- data/lib/fog/vcloud_director/generators/compute/vapp.rb +30 -0
- data/lib/fog/vcloud_director/generators/compute/vm.rb +33 -0
- data/lib/fog/vcloud_director/models/compute/medias.rb +1 -1
- data/lib/fog/vcloud_director/models/compute/vm_customization.rb +2 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +2 -0
- data/lib/fog/vcloud_director/requests/compute/delete_network.rb +64 -0
- data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +433 -333
- data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +3 -1
- data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +20 -2
- data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +176 -0
- data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +1 -0
- data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +37 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm.rb +39 -0
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vsphere/compute.rb +3 -0
- data/lib/fog/vsphere/models/compute/datastore.rb +1 -0
- data/lib/fog/vsphere/models/compute/interface.rb +50 -2
- data/lib/fog/vsphere/models/compute/interfaces.rb +25 -10
- data/lib/fog/vsphere/models/compute/scsicontroller.rb +19 -0
- data/lib/fog/vsphere/models/compute/server.rb +27 -8
- data/lib/fog/vsphere/requests/compute/create_vm.rb +34 -8
- data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +26 -0
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +9 -8
- data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +9 -6
- data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +19 -0
- data/lib/fog/xenserver.rb +2 -1
- data/lib/fog/xenserver/compute.rb +37 -1
- data/lib/fog/xenserver/models/compute/blob.rb +22 -0
- data/lib/fog/xenserver/models/compute/blobs.rb +25 -0
- data/lib/fog/xenserver/models/compute/bond.rb +23 -0
- data/lib/fog/xenserver/models/compute/bonds.rb +25 -0
- data/lib/fog/xenserver/models/compute/console.rb +3 -1
- data/lib/fog/xenserver/models/compute/crash_dump.rb +19 -0
- data/lib/fog/xenserver/models/compute/crash_dumps.rb +25 -0
- data/lib/fog/xenserver/models/compute/dr_task.rb +17 -0
- data/lib/fog/xenserver/models/compute/dr_tasks.rb +25 -0
- data/lib/fog/xenserver/models/compute/gpu_group.rb +22 -0
- data/lib/fog/xenserver/models/compute/gpu_groups.rb +25 -0
- data/lib/fog/xenserver/models/compute/guest_metrics.rb +2 -1
- data/lib/fog/xenserver/models/compute/host.rb +41 -8
- data/lib/fog/xenserver/models/compute/host_cpu.rb +2 -1
- data/lib/fog/xenserver/models/compute/host_crash_dump.rb +20 -0
- data/lib/fog/xenserver/models/compute/host_crash_dumps.rb +25 -0
- data/lib/fog/xenserver/models/compute/host_metrics.rb +1 -1
- data/lib/fog/xenserver/models/compute/host_patch.rb +25 -0
- data/lib/fog/xenserver/models/compute/host_patchs.rb +25 -0
- data/lib/fog/xenserver/models/compute/network.rb +7 -6
- data/lib/fog/xenserver/models/compute/pbd.rb +3 -1
- data/lib/fog/xenserver/models/compute/pci.rb +22 -0
- data/lib/fog/xenserver/models/compute/pcis.rb +25 -0
- data/lib/fog/xenserver/models/compute/pgpu.rb +20 -0
- data/lib/fog/xenserver/models/compute/pgpus.rb +25 -0
- data/lib/fog/xenserver/models/compute/pif.rb +19 -8
- data/lib/fog/xenserver/models/compute/pif_metrics.rb +28 -0
- data/lib/fog/xenserver/models/compute/pifs_metrics.rb +25 -0
- data/lib/fog/xenserver/models/compute/pool.rb +18 -1
- data/lib/fog/xenserver/models/compute/pool_patch.rb +24 -0
- data/lib/fog/xenserver/models/compute/pool_patchs.rb +25 -0
- data/lib/fog/xenserver/models/compute/role.rb +19 -0
- data/lib/fog/xenserver/models/compute/roles.rb +25 -0
- data/lib/fog/xenserver/models/compute/server.rb +59 -26
- data/lib/fog/xenserver/models/compute/server_appliance.rb +21 -0
- data/lib/fog/xenserver/models/compute/server_appliances.rb +25 -0
- data/lib/fog/xenserver/models/compute/storage_manager.rb +28 -0
- data/lib/fog/xenserver/models/compute/storage_managers.rb +25 -0
- data/lib/fog/xenserver/models/compute/storage_repository.rb +4 -1
- data/lib/fog/xenserver/models/compute/tunnel.rb +20 -0
- data/lib/fog/xenserver/models/compute/tunnels.rb +25 -0
- data/lib/fog/xenserver/models/compute/vbd.rb +3 -2
- data/lib/fog/xenserver/models/compute/vbd_metrics.rb +1 -1
- data/lib/fog/xenserver/models/compute/vdi.rb +4 -1
- data/lib/fog/xenserver/models/compute/vif.rb +11 -2
- data/lib/fog/xenserver/models/compute/vlan.rb +2 -1
- data/lib/fog/xenserver/models/compute/vmpp.rb +35 -0
- data/lib/fog/xenserver/models/compute/vmpps.rb +25 -0
- data/lib/fog/xenserver/models/compute/vtpm.rb +18 -0
- data/lib/fog/xenserver/models/compute/vtpms.rb +25 -0
- data/lib/fog/xenserver/requests/compute/reboot_server.rb +1 -1
- data/lib/tasks/changelog_task.rb +0 -1
- data/tests/aws/models/dns/record_tests.rb +1 -2
- data/tests/aws/models/dns/records_tests.rb +2 -7
- data/tests/aws/models/dns/zone_tests.rb +1 -1
- data/tests/aws/models/dns/zones_tests.rb +1 -1
- data/tests/aws/models/elb/model_tests.rb +10 -0
- data/tests/aws/models/storage/file_tests.rb +4 -0
- data/tests/aws/requests/compute/assign_private_ip_tests.rb +52 -0
- data/tests/aws/requests/compute/vpc_tests.rb +17 -1
- data/tests/aws/requests/dns/dns_tests.rb +1 -26
- data/tests/aws/requests/elb/load_balancer_tests.rb +6 -0
- data/tests/aws/requests/rds/{subnet_groups_test.rb → subnet_groups_tests.rb} +4 -0
- data/tests/aws/requests/storage/bucket_tests.rb +17 -0
- data/tests/aws/requests/storage/delete_multiple_objects_tests.rb +12 -0
- data/tests/brightbox/compute/schema.rb +0 -13
- data/tests/brightbox/models/compute/server_tests.rb +7 -9
- data/tests/brightbox/requests/compute/interface_tests.rb +7 -19
- data/tests/digitalocean/models/compute/server_tests.rb +4 -3
- data/tests/google/models/compute/disk_tests.rb +5 -0
- data/tests/google/models/compute/disks_tests.rb +5 -0
- data/tests/google/models/compute/server_tests.rb +5 -1
- data/tests/google/models/compute/servers_tests.rb +5 -0
- data/tests/google/requests/compute/disk_tests.rb +2 -1
- data/tests/google/requests/compute/firewall_tests.rb +1 -0
- data/tests/google/requests/compute/image_tests.rb +3 -0
- data/tests/google/requests/compute/network_tests.rb +1 -0
- data/tests/google/requests/compute/operation_tests.rb +1 -0
- data/tests/google/requests/compute/server_tests.rb +2 -3
- data/tests/google/requests/compute/zone_tests.rb +1 -6
- data/tests/helpers/collection_helper.rb +10 -2
- data/tests/helpers/mock_helper.rb +4 -5
- data/tests/local/models/directories_tests.rb +17 -0
- data/tests/openstack/models/compute/security_group_tests.rb +54 -0
- data/tests/openstack/requests/compute/security_group_tests.rb +22 -20
- data/tests/openstack/requests/network/network_tests.rb +8 -8
- data/tests/rackspace/compute_tests.rb +0 -5
- data/tests/rackspace/helper.rb +9 -4
- data/tests/rackspace/models/compute_v2/server_tests.rb +29 -1
- data/tests/rackspace/models/identity/service_catalog_tests.rb +87 -39
- data/tests/rackspace/models/queues/message_tests.rb +16 -0
- data/tests/rackspace/models/storage/file_tests.rb +29 -0
- data/tests/rackspace/requests/compute_v2/address_tests.rb +3 -1
- data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -2
- data/tests/rackspace/requests/compute_v2/server_tests.rb +3 -6
- data/tests/vcloud_director/models/compute/media_tests.rb +18 -5
- data/tests/vcloud_director/models/compute/vapp_tests.rb +3 -1
- data/tests/vcloud_director/models/compute/vms_tests.rb +2 -1
- data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +19 -10
- data/tests/vcloud_director/requests/compute/network_tests.rb +64 -3
- data/tests/vcloud_director/requests/compute/query_tests.rb +67 -2
- data/tests/vsphere/requests/compute/set_vm_customvalue_tests.rb +21 -0
- metadata +112 -11
- data/fogkeytest1.pem +0 -27
- data/lib/fog/hp/README_HP.rdoc +0 -61
data/fog.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
## If your rubyforge_project name is different, then edit it and comment out
|
7
7
|
## the sub! line in the Rakefile
|
8
8
|
s.name = 'fog'
|
9
|
-
s.version = '1.
|
10
|
-
s.date = '2013-
|
9
|
+
s.version = '1.19.0'
|
10
|
+
s.date = '2013-12-19'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
13
13
|
## Make sure your summary is short. The description may be as long
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
## List your runtime dependencies here. Runtime dependencies are those
|
43
43
|
## that are needed for an end user to actually USE your code.
|
44
44
|
s.add_dependency('builder')
|
45
|
-
s.add_dependency('excon', '~>0.
|
45
|
+
s.add_dependency('excon', '~>0.31.0')
|
46
46
|
s.add_dependency('formatador', '~>0.2.0')
|
47
47
|
s.add_dependency('multi_json', '~>1.0')
|
48
48
|
s.add_dependency('mime-types')
|
data/lib/fog/aws.rb
CHANGED
@@ -2,12 +2,6 @@ require 'fog/core'
|
|
2
2
|
require 'fog/aws/credential_fetcher'
|
3
3
|
require 'fog/aws/signaturev4'
|
4
4
|
|
5
|
-
begin
|
6
|
-
require 'unf/normalizer'
|
7
|
-
rescue LoadError
|
8
|
-
Fog::Logger.warning("Unable to load the 'unf' gem. Your AWS strings may not be properly encoded.")
|
9
|
-
end
|
10
|
-
|
11
5
|
module Fog
|
12
6
|
module AWS
|
13
7
|
extend Fog::Provider
|
@@ -92,6 +86,14 @@ module Fog
|
|
92
86
|
end
|
93
87
|
|
94
88
|
def self.escape(string)
|
89
|
+
unless @unf_loaded_or_warned
|
90
|
+
begin
|
91
|
+
require('unf/normalizer')
|
92
|
+
rescue LoadError
|
93
|
+
Fog::Logger.warning("Unable to load the 'unf' gem. Your AWS strings may not be properly encoded.")
|
94
|
+
end
|
95
|
+
@unf_loaded_or_warned = true
|
96
|
+
end
|
95
97
|
string = defined?(::UNF::Normalizer) ? ::UNF::Normalizer.normalize(string, :nfc) : string
|
96
98
|
string.gsub(/([^a-zA-Z0-9_.\-~]+)/) {
|
97
99
|
"%" + $1.unpack("H2" * $1.bytesize).join("%").upcase
|
@@ -268,7 +270,7 @@ module Fog
|
|
268
270
|
"zone-#{Fog::Mock.random_hex(8)}"
|
269
271
|
end
|
270
272
|
def self.change_id
|
271
|
-
|
273
|
+
Fog::Mock.random_letters_and_numbers(14)
|
272
274
|
end
|
273
275
|
def self.nameservers
|
274
276
|
[
|
data/lib/fog/aws/cloud_watch.rb
CHANGED
data/lib/fog/aws/compute.rb
CHANGED
@@ -47,6 +47,7 @@ module Fog
|
|
47
47
|
|
48
48
|
request_path 'fog/aws/requests/compute'
|
49
49
|
request :allocate_address
|
50
|
+
request :assign_private_ip_addresses
|
50
51
|
request :associate_address
|
51
52
|
request :associate_dhcp_options
|
52
53
|
request :attach_network_interface
|
@@ -126,6 +127,7 @@ module Fog
|
|
126
127
|
request :modify_network_interface_attribute
|
127
128
|
request :modify_snapshot_attribute
|
128
129
|
request :modify_volume_attribute
|
130
|
+
request :modify_vpc_attribute
|
129
131
|
request :purchase_reserved_instances_offering
|
130
132
|
request :reboot_instances
|
131
133
|
request :release_address
|
data/lib/fog/aws/dns.rb
CHANGED
data/lib/fog/aws/elb.rb
CHANGED
@@ -31,10 +31,12 @@ module Fog
|
|
31
31
|
request :deregister_instances_from_load_balancer
|
32
32
|
request :describe_instance_health
|
33
33
|
request :describe_load_balancers
|
34
|
+
request :describe_load_balancer_attributes
|
34
35
|
request :describe_load_balancer_policies
|
35
36
|
request :describe_load_balancer_policy_types
|
36
37
|
request :disable_availability_zones_for_load_balancer
|
37
38
|
request :enable_availability_zones_for_load_balancer
|
39
|
+
request :modify_load_balancer_attributes
|
38
40
|
request :register_instances_with_load_balancer
|
39
41
|
request :set_load_balancer_listener_ssl_certificate
|
40
42
|
request :set_load_balancer_policies_of_listener
|
@@ -7,8 +7,10 @@ module Fog
|
|
7
7
|
|
8
8
|
identity :id, :aliases => 'LaunchConfigurationName'
|
9
9
|
attribute :arn, :aliases => 'LaunchConfigurationARN'
|
10
|
+
attribute :associate_public_ip, :aliases => 'AssociatePublicIpAddress'
|
10
11
|
attribute :block_device_mappings, :aliases => 'BlockDeviceMappings'
|
11
12
|
attribute :created_at, :aliases => 'CreatedTime'
|
13
|
+
attribute :iam_instance_profile, :aliases => 'IamInstanceProfile'
|
12
14
|
attribute :image_id, :aliases => 'ImageId'
|
13
15
|
#attribute :instance_monitoring, :aliases => 'InstanceMonitoring'
|
14
16
|
attribute :instance_monitoring, :aliases => 'InstanceMonitoring', :squash => 'Enabled'
|
@@ -18,6 +20,8 @@ module Fog
|
|
18
20
|
attribute :ramdisk_id, :aliases => 'RamdiskId'
|
19
21
|
attribute :security_groups, :aliases => 'SecurityGroups'
|
20
22
|
attribute :user_data, :aliases => 'UserData'
|
23
|
+
attribute :spot_price, :aliases => 'SpotPrice'
|
24
|
+
|
21
25
|
|
22
26
|
def initialize(attributes={})
|
23
27
|
#attributes[:availability_zones] ||= %w(us-east-1a us-east-1b us-east-1c us-east-1d)
|
@@ -6,12 +6,13 @@ module Fog
|
|
6
6
|
|
7
7
|
class Address < Fog::Model
|
8
8
|
|
9
|
-
identity :public_ip,
|
9
|
+
identity :public_ip, :aliases => 'publicIp'
|
10
10
|
|
11
|
-
attribute :allocation_id,
|
12
|
-
attribute :association_id,
|
13
|
-
attribute :server_id,
|
14
|
-
attribute :network_interface_id,
|
11
|
+
attribute :allocation_id, :aliases => 'allocationId'
|
12
|
+
attribute :association_id, :aliases => 'associationId'
|
13
|
+
attribute :server_id, :aliases => 'instanceId'
|
14
|
+
attribute :network_interface_id, :aliases => 'networkInterfaceId'
|
15
|
+
attribute :network_interface_owner_id, :aliases => 'networkInterfaceOwnerId'
|
15
16
|
attribute :domain
|
16
17
|
|
17
18
|
def initialize(attributes = {})
|
@@ -16,6 +16,16 @@ module Fog
|
|
16
16
|
{ :bits => 32, :cores => 5, :disk => 350, :id => 'c1.medium', :name => 'High-CPU Medium', :ram => 1740.8},
|
17
17
|
{ :bits => 64, :cores => 20, :disk => 1690, :id => 'c1.xlarge', :name => 'High-CPU Extra Large', :ram => 7168},
|
18
18
|
|
19
|
+
{ :bits => 64, :cores => 7, :disk => 32, :id => 'c3.large', :name => 'C3 Large', :ram => 3750},
|
20
|
+
{ :bits => 64, :cores => 14, :disk => 80, :id => 'c3.xlarge', :name => 'C3 Extra Large', :ram => 7168},
|
21
|
+
{ :bits => 64, :cores => 28, :disk => 160, :id => 'c3.2xlarge', :name => 'C3 Double Extra Large', :ram => 15360},
|
22
|
+
{ :bits => 64, :cores => 55, :disk => 320, :id => 'c3.4xlarge', :name => 'C3 Quadruple Extra Large', :ram => 30720},
|
23
|
+
{ :bits => 64, :cores => 108, :disk => 640, :id => 'c3.8xlarge', :name => 'C3 Eight Extra Large', :ram => 61440},
|
24
|
+
|
25
|
+
{ :bits => 64, :cores => 26, :disk => 60, :id => 'g2.2xlarge', :name => 'GPU Double Extra Large', :ram => 15360},
|
26
|
+
|
27
|
+
{ :bits => 64, :cores => 35, :disk => 50331648, :id => 'hs1.8xlarge', :name => 'High Storage Eight Extra Large', :ram => 119808},
|
28
|
+
|
19
29
|
{ :bits => 64, :cores => 6.5, :disk => 420, :id => 'm2.xlarge', :name => 'High-Memory Extra Large', :ram => 17510.4},
|
20
30
|
{ :bits => 64, :cores => 13, :disk => 850, :id => 'm2.2xlarge', :name => 'High Memory Double Extra Large', :ram => 35020.8},
|
21
31
|
{ :bits => 64, :cores => 26, :disk => 1690, :id => 'm2.4xlarge', :name => 'High Memory Quadruple Extra Large', :ram => 70041.6},
|
@@ -42,7 +42,7 @@ module Fog
|
|
42
42
|
self.groups ||= ["default"]
|
43
43
|
self.flavor_id ||= 't1.micro'
|
44
44
|
self.image_id ||= begin
|
45
|
-
self.username
|
45
|
+
self.username ||= 'ubuntu'
|
46
46
|
|
47
47
|
# Old 'connection' is renamed as service and should be used instead
|
48
48
|
prepare_service_value(attributes)
|
@@ -33,9 +33,7 @@ module Fog
|
|
33
33
|
data['NextRecordIdentifier'] = nil unless data.has_key?('NextRecordIdentifier')
|
34
34
|
|
35
35
|
merge_attributes(data.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextRecordName', 'NextRecordType', 'NextRecordIdentifier'].include?(key)})
|
36
|
-
|
37
|
-
data = data['ResourceRecordSets'].reject {|record| ['NS', 'SOA'].include?(record['Type'])}
|
38
|
-
load(data)
|
36
|
+
load(data['ResourceRecordSets'])
|
39
37
|
end
|
40
38
|
|
41
39
|
#
|
@@ -35,6 +35,16 @@ module Fog
|
|
35
35
|
super
|
36
36
|
end
|
37
37
|
|
38
|
+
def cross_zone_load_balancing?
|
39
|
+
requires :id
|
40
|
+
service.describe_load_balancer_attributes(id).body['DescribeLoadBalancerAttributesResult']['LoadBalancerAttributes']['CrossZoneLoadBalancing']['Enabled']
|
41
|
+
end
|
42
|
+
|
43
|
+
def cross_zone_load_balancing= value
|
44
|
+
requires :id
|
45
|
+
service.modify_load_balancer_attributes(id, 'CrossZoneLoadBalancing' => {'Enabled' => value})
|
46
|
+
end
|
47
|
+
|
38
48
|
def register_instances(instances)
|
39
49
|
requires :id
|
40
50
|
data = service.register_instances_with_load_balancer(instances, id).body['RegisterInstancesWithLoadBalancerResult']
|
@@ -11,6 +11,7 @@ module Fog
|
|
11
11
|
attribute :engine_version, :aliases => 'EngineVersion'
|
12
12
|
attribute :state, :aliases => 'DBInstanceStatus'
|
13
13
|
attribute :allocated_storage, :aliases => 'AllocatedStorage', :type => :integer
|
14
|
+
attribute :iops, :aliases => 'Iops'
|
14
15
|
attribute :availability_zone , :aliases => 'AvailabilityZone'
|
15
16
|
attribute :flavor_id, :aliases => 'DBInstanceClass'
|
16
17
|
attribute :endpoint, :aliases => 'Endpoint'
|
@@ -31,7 +32,7 @@ module Fog
|
|
31
32
|
attribute :license_model, :aliases => 'LicenseModel'
|
32
33
|
attribute :db_subnet_group_name, :aliases => 'DBSubnetGroupName'
|
33
34
|
attribute :publicly_accessible, :aliases => 'PubliclyAccessible'
|
34
|
-
attribute :vpc_security_groups, :aliases => 'VpcSecurityGroups'
|
35
|
+
attribute :vpc_security_groups, :aliases => 'VpcSecurityGroups', :type => :array
|
35
36
|
|
36
37
|
attr_accessor :password, :parameter_group_name, :security_group_names, :port
|
37
38
|
|
@@ -116,6 +117,7 @@ module Fog
|
|
116
117
|
'Port' => port || attributes['Port'],
|
117
118
|
'Engine' => engine,
|
118
119
|
'EngineVersion' => engine_version,
|
120
|
+
'Iops' => iops,
|
119
121
|
'MasterUsername' => master_username,
|
120
122
|
'MasterUserPassword' => password || attributes['MasterUserPassword'],
|
121
123
|
'PreferredMaintenanceWindow' => preferred_maintenance_window,
|
@@ -123,7 +125,8 @@ module Fog
|
|
123
125
|
'MultiAZ' => multi_az,
|
124
126
|
'LicenseModel' => license_model,
|
125
127
|
'DBSubnetGroupName' => db_subnet_group_name,
|
126
|
-
'PubliclyAccessible' => publicly_accessible
|
128
|
+
'PubliclyAccessible' => publicly_accessible,
|
129
|
+
'VpcSecurityGroups' => vpc_security_groups,
|
127
130
|
}
|
128
131
|
|
129
132
|
options.delete_if {|key, value| value.nil?}
|
@@ -12,7 +12,21 @@ module Fog
|
|
12
12
|
attribute :vpc_id, :aliases => 'VpcId'
|
13
13
|
attribute :subnet_ids, :aliases => 'Subnets'
|
14
14
|
|
15
|
-
|
15
|
+
def ready?
|
16
|
+
requires :status
|
17
|
+
status == 'Complete'
|
18
|
+
end
|
19
|
+
|
20
|
+
def save
|
21
|
+
requires :description, :id, :subnet_ids
|
22
|
+
service.create_db_subnet_group(id, subnet_ids, description)
|
23
|
+
reload
|
24
|
+
end
|
25
|
+
|
26
|
+
def destroy
|
27
|
+
requires :id
|
28
|
+
service.delete_db_subnet_group(id)
|
29
|
+
end
|
16
30
|
|
17
31
|
end
|
18
32
|
end
|
@@ -33,13 +33,13 @@ module Fog
|
|
33
33
|
|
34
34
|
# Set file's access control list (ACL).
|
35
35
|
#
|
36
|
-
# valid acls: private, public-read, public-read-write, authenticated-read
|
36
|
+
# valid acls: private, public-read, public-read-write, authenticated-read, bucket-owner-read, bucket-owner-full-control
|
37
37
|
#
|
38
38
|
# @param [String] new_acl one of valid options
|
39
39
|
# @return [String] @acl
|
40
40
|
#
|
41
41
|
def acl=(new_acl)
|
42
|
-
valid_acls = ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
42
|
+
valid_acls = ['private', 'public-read', 'public-read-write', 'authenticated-read', 'bucket-owner-read', 'bucket-owner-full-control']
|
43
43
|
unless valid_acls.include?(new_acl)
|
44
44
|
raise ArgumentError.new("acl must be one of [#{valid_acls.join(', ')}]")
|
45
45
|
end
|
@@ -68,7 +68,13 @@ module Fog
|
|
68
68
|
@launch_configuration[name] = value
|
69
69
|
when 'KernelId', 'RamdiskId', 'UserData'
|
70
70
|
@launch_configuration[name] = value
|
71
|
+
when 'IamInstanceProfile'
|
72
|
+
@launch_configuration[name] = value
|
73
|
+
when 'SpotPrice'
|
74
|
+
@launch_configuration[name] = value.to_f
|
71
75
|
|
76
|
+
when 'AssociatePublicIpAddress'
|
77
|
+
@in_associate_public_ip = false
|
72
78
|
when 'BlockDeviceMappings'
|
73
79
|
@in_block_device_mappings = false
|
74
80
|
when 'LaunchConfigurations'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module AWS
|
5
|
+
|
6
|
+
class AssignPrivateIpAddresses < Fog::Parsers::Base
|
7
|
+
|
8
|
+
def end_element(name)
|
9
|
+
case name
|
10
|
+
when 'requestId'
|
11
|
+
@response[name] = value
|
12
|
+
when 'return'
|
13
|
+
if value == 'true'
|
14
|
+
@response[name] = true
|
15
|
+
else
|
16
|
+
@response[name] = false
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -12,7 +12,7 @@ module Fog
|
|
12
12
|
|
13
13
|
def end_element(name)
|
14
14
|
case name
|
15
|
-
when 'instanceId', 'publicIp', 'domain', 'allocationId', 'associationId'
|
15
|
+
when 'instanceId', 'publicIp', 'domain', 'allocationId', 'associationId', 'networkInterfaceId', 'networkInterfaceOwnerId'
|
16
16
|
@address[name] = value
|
17
17
|
when 'item'
|
18
18
|
@response['addressesSet'] << @address
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module ELB
|
5
|
+
|
6
|
+
class DescribeLoadBalancerAttributes < Fog::Parsers::Base
|
7
|
+
|
8
|
+
def reset
|
9
|
+
@response = { 'DescribeLoadBalancerAttributesResult' => { 'LoadBalancerAttributes' => {} }, 'ResponseMetadata' => {} }
|
10
|
+
@stack = []
|
11
|
+
end
|
12
|
+
|
13
|
+
def start_element(name, attrs = [])
|
14
|
+
super
|
15
|
+
case name
|
16
|
+
when 'CrossZoneLoadBalancing'
|
17
|
+
@cross_zone_load_balancing = {}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def end_element(name)
|
22
|
+
case name
|
23
|
+
when 'Enabled'
|
24
|
+
if @cross_zone_load_balancing
|
25
|
+
@cross_zone_load_balancing['Enabled'] = value == 'true' ? true : false
|
26
|
+
end
|
27
|
+
when 'CrossZoneLoadBalancing'
|
28
|
+
@response['DescribeLoadBalancerAttributesResult']['LoadBalancerAttributes']['CrossZoneLoadBalancing'] = @cross_zone_load_balancing
|
29
|
+
@cross_zone_load_balancing = nil
|
30
|
+
when 'RequestId'
|
31
|
+
@response['ResponseMetadata'][name] = value
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module RDS
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/rds/subnet_group_parser'
|
7
|
+
|
8
|
+
class DeleteDBSubnetGroup < Fog::Parsers::AWS::RDS::SubnetGroupParser
|
9
|
+
|
10
|
+
def reset
|
11
|
+
@response = { 'DeleteDBSubnetGroupResponse' => {}, 'ResponseMetadata' => {} }
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def start_element(name, attrs = [])
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def end_element(name)
|
20
|
+
case name
|
21
|
+
when 'RequestId'
|
22
|
+
@response['ResponseMetadata'][name] = value
|
23
|
+
else
|
24
|
+
super
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
data/lib/fog/aws/rds.rb
CHANGED
@@ -49,7 +49,8 @@ module Fog
|
|
49
49
|
|
50
50
|
request :create_db_subnet_group
|
51
51
|
request :describe_db_subnet_groups
|
52
|
-
|
52
|
+
request :delete_db_subnet_group
|
53
|
+
# TODO: :modify_db_subnet_group
|
53
54
|
|
54
55
|
request :describe_orderable_db_instance_options
|
55
56
|
|
@@ -168,7 +169,7 @@ module Fog
|
|
168
169
|
@port = options[:port] || 443
|
169
170
|
@scheme = options[:scheme] || 'https'
|
170
171
|
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
171
|
-
@version = options[:version] || '
|
172
|
+
@version = options[:version] || '2013-05-15'
|
172
173
|
end
|
173
174
|
|
174
175
|
def owner_id
|
@@ -215,7 +216,6 @@ module Fog
|
|
215
216
|
:expects => 200,
|
216
217
|
:headers => { 'Content-Type' => 'application/x-www-form-urlencoded' },
|
217
218
|
:idempotent => idempotent,
|
218
|
-
:host => @host,
|
219
219
|
:method => 'POST',
|
220
220
|
:parser => parser
|
221
221
|
})
|