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
@@ -3,9 +3,7 @@ require 'fog/core/model'
|
|
3
3
|
module Fog
|
4
4
|
module Compute
|
5
5
|
class Brightbox
|
6
|
-
|
7
6
|
class Application < Fog::Model
|
8
|
-
|
9
7
|
identity :id
|
10
8
|
attribute :url
|
11
9
|
attribute :name
|
@@ -15,12 +13,11 @@ module Fog
|
|
15
13
|
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
|
16
14
|
options = {
|
17
15
|
:name => name
|
18
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
16
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
19
17
|
data = service.create_application(options)
|
20
18
|
merge_attributes(data)
|
21
19
|
true
|
22
20
|
end
|
23
|
-
|
24
21
|
end
|
25
22
|
end
|
26
23
|
end
|
@@ -26,13 +26,16 @@ module Fog
|
|
26
26
|
attribute :port_translators
|
27
27
|
attribute :name
|
28
28
|
|
29
|
+
# Attempt to map or point the Cloud IP to the destination resource.
|
30
|
+
#
|
31
|
+
# @param [Object] destination
|
32
|
+
#
|
29
33
|
def map(destination)
|
30
34
|
requires :identity
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
final_destination = destination.id
|
35
|
+
if destination.respond_to?(:mapping_identity)
|
36
|
+
final_destination = destination.mapping_identity
|
37
|
+
elsif destination.respond_to?(:identity)
|
38
|
+
final_destination = destination.identity
|
36
39
|
else
|
37
40
|
final_destination = destination
|
38
41
|
end
|
@@ -31,7 +31,7 @@ module Fog
|
|
31
31
|
def invite(email, role)
|
32
32
|
return nil if email.nil? || email == ""
|
33
33
|
return nil if role.nil? || role == ""
|
34
|
-
options = {:email => email, :role => role}
|
34
|
+
options = { :email => email, :role => role }
|
35
35
|
data = service.create_collaboration(options)
|
36
36
|
new(data)
|
37
37
|
end
|
@@ -26,7 +26,7 @@ module Fog
|
|
26
26
|
:server_group => server_group_id,
|
27
27
|
:name => name,
|
28
28
|
:description => description
|
29
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
29
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
30
30
|
data = service.create_firewall_policy(options)
|
31
31
|
merge_attributes(data)
|
32
32
|
true
|
@@ -54,12 +54,10 @@ module Fog
|
|
54
54
|
|
55
55
|
def destroy
|
56
56
|
requires :identity
|
57
|
-
|
57
|
+
service.destroy_firewall_policy(identity)
|
58
58
|
true
|
59
59
|
end
|
60
|
-
|
61
60
|
end
|
62
|
-
|
63
61
|
end
|
64
62
|
end
|
65
63
|
end
|
@@ -35,7 +35,7 @@ module Fog
|
|
35
35
|
:destination => destination,
|
36
36
|
:destination_port => destination_port,
|
37
37
|
:icmp_type_name => icmp_type_name
|
38
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
38
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
39
39
|
data = service.create_firewall_rule(options)
|
40
40
|
merge_attributes(data)
|
41
41
|
true
|
@@ -47,7 +47,7 @@ module Fog
|
|
47
47
|
:name => name,
|
48
48
|
:username => username,
|
49
49
|
:description => description
|
50
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
50
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
51
51
|
data = service.create_image(options)
|
52
52
|
merge_attributes(data)
|
53
53
|
true
|
@@ -58,9 +58,7 @@ module Fog
|
|
58
58
|
service.destroy_image(identity)
|
59
59
|
true
|
60
60
|
end
|
61
|
-
|
62
61
|
end
|
63
|
-
|
64
62
|
end
|
65
63
|
end
|
66
64
|
end
|
@@ -23,7 +23,9 @@ module Fog
|
|
23
23
|
attribute :certificate_private_key
|
24
24
|
|
25
25
|
# These SSL attributes act only as getters for metadata
|
26
|
+
attribute :certificate_valid_from
|
26
27
|
attribute :certificate_expires_at
|
28
|
+
attribute :certificate_issuer
|
27
29
|
attribute :certificate_subject
|
28
30
|
|
29
31
|
# Times
|
@@ -50,7 +52,7 @@ module Fog
|
|
50
52
|
:name => name,
|
51
53
|
:certificate_pem => certificate_pem,
|
52
54
|
:certificate_private_key => certificate_private_key
|
53
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
55
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
54
56
|
data = service.create_load_balancer(options)
|
55
57
|
merge_attributes(data)
|
56
58
|
true
|
@@ -80,24 +82,25 @@ module Fog
|
|
80
82
|
# @private
|
81
83
|
def certificate=(cert_metadata)
|
82
84
|
if cert_metadata
|
85
|
+
attributes[:certificate_valid_from] = time_or_original(cert_metadata["valid_from"])
|
83
86
|
attributes[:certificate_expires_at] = time_or_original(cert_metadata["expires_at"])
|
87
|
+
attributes[:certificate_issuer] = cert_metadata["issuer"]
|
84
88
|
attributes[:certificate_subject] = cert_metadata["subject"]
|
85
89
|
else
|
90
|
+
attributes[:certificate_valid_from] = nil
|
86
91
|
attributes[:certificate_expires_at] = nil
|
92
|
+
attributes[:certificate_issuer] = nil
|
87
93
|
attributes[:certificate_subject] = nil
|
88
94
|
end
|
89
95
|
end
|
90
96
|
|
91
|
-
|
97
|
+
private
|
92
98
|
|
93
99
|
def time_or_original(value)
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
value
|
98
|
-
end
|
100
|
+
Time.parse(value)
|
101
|
+
rescue TypeError, ArgumentError
|
102
|
+
value
|
99
103
|
end
|
100
|
-
|
101
104
|
end
|
102
105
|
end
|
103
106
|
end
|
@@ -37,7 +37,7 @@ module Fog
|
|
37
37
|
attribute :zone
|
38
38
|
attribute :server_type
|
39
39
|
|
40
|
-
def initialize(attributes={})
|
40
|
+
def initialize(attributes = {})
|
41
41
|
# Call super first to initialize the service object for our default image
|
42
42
|
super
|
43
43
|
self.image_id ||= service.default_image
|
@@ -83,10 +83,10 @@ module Fog
|
|
83
83
|
def reboot(use_hard_reboot = true)
|
84
84
|
requires :identity
|
85
85
|
if ready?
|
86
|
-
|
87
|
-
soft_reboot
|
88
|
-
else
|
86
|
+
if use_hard_reboot
|
89
87
|
hard_reboot
|
88
|
+
else
|
89
|
+
soft_reboot
|
90
90
|
end
|
91
91
|
else
|
92
92
|
# Not able to reboot if not ready in the first place
|
@@ -137,23 +137,23 @@ module Fog
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def private_ip_address
|
140
|
-
|
141
|
-
interfaces.first["ipv4_address"]
|
142
|
-
else
|
140
|
+
if interfaces.empty?
|
143
141
|
nil
|
142
|
+
else
|
143
|
+
interfaces.first["ipv4_address"]
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
147
|
def public_ip_address
|
148
|
-
|
149
|
-
cloud_ips.first["public_ip"]
|
150
|
-
else
|
148
|
+
if cloud_ips.empty?
|
151
149
|
nil
|
150
|
+
else
|
151
|
+
cloud_ips.first["public_ip"]
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
155
|
def ready?
|
156
|
-
|
156
|
+
state == "active"
|
157
157
|
end
|
158
158
|
|
159
159
|
def activate_console
|
@@ -171,20 +171,28 @@ module Fog
|
|
171
171
|
:zone => zone_id,
|
172
172
|
:user_data => user_data,
|
173
173
|
:server_groups => server_groups
|
174
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
175
|
-
|
176
|
-
|
177
|
-
|
174
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
175
|
+
|
176
|
+
options.merge!(:server_type => flavor_id) unless flavor_id.nil? || flavor_id == ""
|
177
|
+
|
178
178
|
data = service.create_server(options)
|
179
179
|
merge_attributes(data)
|
180
180
|
true
|
181
181
|
end
|
182
182
|
|
183
|
-
|
183
|
+
# Replaces the server's identifier with it's interface's identifier for Cloud IP mapping
|
184
|
+
#
|
185
|
+
# @return [String] the identifier to pass to a Cloud IP mapping request
|
186
|
+
def mapping_identity
|
187
|
+
interfaces.first["id"]
|
188
|
+
end
|
189
|
+
|
190
|
+
private
|
191
|
+
|
184
192
|
# Hard reboots are fast, avoiding the OS by doing a "power off"
|
185
193
|
def hard_reboot
|
186
194
|
stop
|
187
|
-
wait_for { !
|
195
|
+
wait_for { !ready? }
|
188
196
|
start
|
189
197
|
end
|
190
198
|
|
@@ -194,11 +202,11 @@ module Fog
|
|
194
202
|
# @todo Needs cleaner error handling when the OS times out
|
195
203
|
def soft_reboot
|
196
204
|
shutdown
|
197
|
-
# FIXME Using side effect of wait_for's (evaluated block) to detect timeouts
|
205
|
+
# FIXME: Using side effect of wait_for's (evaluated block) to detect timeouts
|
198
206
|
begin
|
199
|
-
wait_for(20) { !
|
207
|
+
wait_for(20) { !ready? }
|
200
208
|
start
|
201
|
-
rescue Fog::Errors::Timeout
|
209
|
+
rescue Fog::Errors::Timeout
|
202
210
|
false
|
203
211
|
end
|
204
212
|
end
|
@@ -3,7 +3,6 @@ require 'fog/core/model'
|
|
3
3
|
module Fog
|
4
4
|
module Compute
|
5
5
|
class Brightbox
|
6
|
-
|
7
6
|
# A server group is a collection of servers
|
8
7
|
#
|
9
8
|
# Certain actions can accept a server group and affect all members
|
@@ -24,15 +23,15 @@ module Fog
|
|
24
23
|
options = {
|
25
24
|
:name => name,
|
26
25
|
:description => description
|
27
|
-
}.delete_if {|k,v| v.nil? || v == "" }
|
26
|
+
}.delete_if { |k, v| v.nil? || v == "" }
|
28
27
|
data = service.create_server_group(options)
|
29
28
|
merge_attributes(data)
|
30
29
|
true
|
31
30
|
end
|
32
31
|
|
33
32
|
def servers
|
34
|
-
srv_ids = server_ids.
|
35
|
-
srv_ids.
|
33
|
+
srv_ids = server_ids.map { |srv| srv["id"] }
|
34
|
+
srv_ids.map do |srv_id|
|
36
35
|
service.servers.get(srv_id)
|
37
36
|
end
|
38
37
|
end
|
@@ -41,7 +40,7 @@ module Fog
|
|
41
40
|
#
|
42
41
|
# @param [Array] identifiers array of server identifier strings to add
|
43
42
|
# @return [Fog::Compute::ServerGroup]
|
44
|
-
def add_servers
|
43
|
+
def add_servers(identifiers)
|
45
44
|
requires :identity
|
46
45
|
options = {
|
47
46
|
:servers => server_references(identifiers)
|
@@ -54,7 +53,7 @@ module Fog
|
|
54
53
|
#
|
55
54
|
# @param [Array] identifiers array of server identifier strings to remove
|
56
55
|
# @return [Fog::Compute::ServerGroup]
|
57
|
-
def remove_servers
|
56
|
+
def remove_servers(identifiers)
|
58
57
|
requires :identity
|
59
58
|
options = {
|
60
59
|
:servers => server_references(identifiers)
|
@@ -68,7 +67,7 @@ module Fog
|
|
68
67
|
# @param [Array] identifiers array of server identifier strings to move
|
69
68
|
# @param [String] destination_group_id destination server group identifier
|
70
69
|
# @return [Fog::Compute::ServerGroup]
|
71
|
-
def move_servers
|
70
|
+
def move_servers(identifiers, destination_group_id)
|
72
71
|
requires :identity
|
73
72
|
options = {
|
74
73
|
:servers => server_references(identifiers),
|
@@ -84,12 +83,11 @@ module Fog
|
|
84
83
|
true
|
85
84
|
end
|
86
85
|
|
87
|
-
|
86
|
+
protected
|
88
87
|
|
89
|
-
def server_references
|
90
|
-
identifiers.map {|id| {"server" => id} }
|
88
|
+
def server_references(identifiers)
|
89
|
+
identifiers.map { |id| { "server" => id } }
|
91
90
|
end
|
92
|
-
|
93
91
|
end
|
94
92
|
end
|
95
93
|
end
|
data/lib/fog/brightbox/oauth2.rb
CHANGED
@@ -18,7 +18,7 @@ module Fog::Brightbox::OAuth2
|
|
18
18
|
header_content = "#{credentials.client_id}:#{credentials.client_secret}"
|
19
19
|
encoded_credentials = Base64.encode64(header_content).chomp
|
20
20
|
|
21
|
-
connection.request(
|
21
|
+
connection.request(
|
22
22
|
:path => "/token",
|
23
23
|
:expects => 200,
|
24
24
|
:headers => {
|
@@ -27,7 +27,7 @@ module Fog::Brightbox::OAuth2
|
|
27
27
|
},
|
28
28
|
:method => 'POST',
|
29
29
|
:body => Fog::JSON.encode(token_strategy.authorization_body_data)
|
30
|
-
|
30
|
+
)
|
31
31
|
end
|
32
32
|
|
33
33
|
# Encapsulates credentials required to request access tokens from the
|
@@ -152,7 +152,7 @@ module Fog::Brightbox::OAuth2
|
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
|
-
private
|
155
|
+
private
|
156
156
|
|
157
157
|
# This updates the current credentials if passed a valid response
|
158
158
|
#
|
@@ -9,7 +9,7 @@ module Fog
|
|
9
9
|
# @option options [String] :name Editable label
|
10
10
|
# @option options [String] :user_data User defined metadata
|
11
11
|
# @option options [Boolean] :compatibility_mode Server needs to be shutdown and restarted for changes to this to take effect
|
12
|
-
# @
|
12
|
+
# @option options [Array] :server_groups Array of Server Groups that this server should be part of
|
13
13
|
#
|
14
14
|
# @return [Hash] if successful Hash version of JSON object
|
15
15
|
# @return [NilClass] if no options were passed
|
data/lib/fog/cloudstack.rb
CHANGED
data/lib/fog/compute.rb
CHANGED
@@ -49,9 +49,9 @@ module Fog
|
|
49
49
|
when :vcloud
|
50
50
|
require 'fog/vcloud/compute'
|
51
51
|
Fog::Vcloud::Compute.new(attributes)
|
52
|
-
when :
|
52
|
+
when :vclouddirector
|
53
53
|
require 'fog/vcloud_director/compute'
|
54
|
-
Fog::VcloudDirector
|
54
|
+
Fog::Compute::VcloudDirector.new(attributes)
|
55
55
|
else
|
56
56
|
if self.providers.include?(provider)
|
57
57
|
require "fog/#{provider}/compute"
|
data/lib/fog/core.rb
CHANGED
@@ -28,8 +28,8 @@ require 'fog/core/service'
|
|
28
28
|
require 'fog/core/ssh'
|
29
29
|
require 'fog/core/scp'
|
30
30
|
require 'fog/core/time'
|
31
|
-
require 'fog/core/timeout'
|
32
31
|
require 'fog/core/wait_for'
|
32
|
+
require 'fog/core/wait_for_defaults'
|
33
33
|
require 'fog/core/class_from_string'
|
34
34
|
require 'fog/core/uuid'
|
35
35
|
|
data/lib/fog/core/connection.rb
CHANGED
@@ -30,8 +30,8 @@ module Fog
|
|
30
30
|
end
|
31
31
|
params[:headers] ||= {}
|
32
32
|
params[:headers]['User-Agent'] ||= "fog/#{Fog::VERSION}"
|
33
|
+
params.merge!(:persistent => params.fetch(:persistent, persistent))
|
33
34
|
@excon = Excon.new(url, params)
|
34
|
-
@persistent = persistent
|
35
35
|
end
|
36
36
|
|
37
37
|
# Makes a request using the connection using Excon
|
@@ -53,7 +53,6 @@ module Fog
|
|
53
53
|
# @raise [Excon::Errors::SocketError]
|
54
54
|
#
|
55
55
|
def request(params, &block)
|
56
|
-
reset unless @persistent
|
57
56
|
@excon.request(params, &block)
|
58
57
|
end
|
59
58
|
|
data/lib/fog/core/errors.rb
CHANGED
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
attr_accessor :verbose
|
6
6
|
|
7
7
|
def self.slurp(error, message = nil)
|
8
|
-
new_error = new(message)
|
8
|
+
new_error = new(message || error.message)
|
9
9
|
new_error.set_backtrace(error.backtrace)
|
10
10
|
new_error.verbose = error.message
|
11
11
|
new_error
|
@@ -17,9 +17,9 @@ module Fog
|
|
17
17
|
class NotFound < Fog::Errors::Error; end
|
18
18
|
|
19
19
|
class LoadError < LoadError; end
|
20
|
-
|
20
|
+
|
21
21
|
class TimeoutError< Fog::Errors::Error; end
|
22
|
-
|
22
|
+
|
23
23
|
class NotImplemented < Fog::Errors::Error; end
|
24
24
|
|
25
25
|
# @return [String] The error message that will be raised, if credentials cannot be found
|