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
@@ -12,7 +12,7 @@ module Fog
|
|
12
12
|
}
|
13
13
|
|
14
14
|
request(
|
15
|
-
:body =>
|
15
|
+
:body => Fog::JSON.encode(data),
|
16
16
|
:expects => 200,
|
17
17
|
:method => 'POST',
|
18
18
|
:path => 'os-security-groups.json'
|
@@ -23,10 +23,10 @@ module Fog
|
|
23
23
|
|
24
24
|
class Mock
|
25
25
|
def create_security_group(name, description)
|
26
|
-
Fog::Identity.new(:
|
26
|
+
Fog::Identity::OpenStack.new(:openstack_auth_url => credentials[:openstack_auth_url])
|
27
27
|
tenant_id = Fog::Identity::OpenStack::Mock.data[current_tenant][:tenants].keys.first
|
28
28
|
security_group_id = Fog::Mock.random_numbers(2).to_i
|
29
|
-
self.data[:security_groups][security_group_id] = {
|
29
|
+
self.data[:security_groups][security_group_id.to_s] = {
|
30
30
|
'tenant_id' => tenant_id,
|
31
31
|
'rules' => [],
|
32
32
|
'id' => security_group_id,
|
@@ -42,7 +42,7 @@ module Fog
|
|
42
42
|
'Content-Length' => Fog::Mock.random_numbers(3).to_s,
|
43
43
|
'Date' => Date.new}
|
44
44
|
response.body = {
|
45
|
-
'security_group' => self.data[:security_groups][security_group_id]
|
45
|
+
'security_group' => self.data[:security_groups][security_group_id.to_s]
|
46
46
|
}
|
47
47
|
response
|
48
48
|
end
|
@@ -18,7 +18,7 @@ module Fog
|
|
18
18
|
request(
|
19
19
|
:expects => 200,
|
20
20
|
:method => 'POST',
|
21
|
-
:body =>
|
21
|
+
:body => Fog::JSON.encode(data),
|
22
22
|
:path => 'os-security-group-rules.json'
|
23
23
|
)
|
24
24
|
end
|
@@ -47,7 +47,7 @@ module Fog
|
|
47
47
|
'cidr' => cidr
|
48
48
|
}
|
49
49
|
}
|
50
|
-
self.data[:security_groups][parent_group_id]['rules'].push(rule)
|
50
|
+
self.data[:security_groups][parent_group_id.to_s]['rules'].push(rule)
|
51
51
|
response.body = {
|
52
52
|
'security_group_rule' => rule
|
53
53
|
}
|
@@ -13,7 +13,7 @@ module Fog
|
|
13
13
|
}
|
14
14
|
|
15
15
|
vanilla_options = ['metadata', 'accessIPv4', 'accessIPv6',
|
16
|
-
'availability_zone', 'user_data', 'key_name',
|
16
|
+
'availability_zone', 'user_data', 'key_name',
|
17
17
|
'adminPass', 'config_drive', 'min_count', 'max_count',
|
18
18
|
'return_reservation_id'
|
19
19
|
]
|
@@ -107,7 +107,6 @@ module Fog
|
|
107
107
|
response.body["user"]["id"]
|
108
108
|
end
|
109
109
|
|
110
|
-
|
111
110
|
mock_data = {
|
112
111
|
'addresses' => {},
|
113
112
|
'flavor' => {"id" => flavor_ref, "links"=>[{"href"=>"http://nova1:8774/admin/flavors/1", "rel"=>"bookmark"}]},
|
@@ -127,10 +126,18 @@ module Fog
|
|
127
126
|
'config_drive' => options['config_drive'] || '',
|
128
127
|
}
|
129
128
|
|
129
|
+
if nics = options['nics']
|
130
|
+
nics.each do |nic|
|
131
|
+
mock_data["addresses"].merge!(
|
132
|
+
"Public" => [{ 'addr' => Fog::Mock.random_ip }]
|
133
|
+
)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
130
137
|
response_data = {}
|
131
138
|
if options['return_reservation_id'] == 'True' then
|
132
139
|
response_data = { 'reservation_id' => "r-#{Fog::Mock.random_numbers(6).to_s}" }
|
133
|
-
else
|
140
|
+
else
|
134
141
|
response_data = {
|
135
142
|
'adminPass' => 'password',
|
136
143
|
'id' => server_id,
|
@@ -156,12 +163,12 @@ module Fog
|
|
156
163
|
self.data[:last_modified][:servers][server_id] = Time.now
|
157
164
|
self.data[:servers][server_id] = mock_data
|
158
165
|
if options['return_reservation_id'] == 'True' then
|
159
|
-
response.body = response_data
|
166
|
+
response.body = response_data
|
160
167
|
else
|
161
168
|
response.body = { 'server' => response_data }
|
162
169
|
end
|
163
170
|
response
|
164
|
-
end
|
171
|
+
end
|
165
172
|
end
|
166
173
|
end
|
167
174
|
end
|
@@ -15,6 +15,8 @@ module Fog
|
|
15
15
|
|
16
16
|
class Mock
|
17
17
|
def delete_security_group_rule(security_group_rule_id)
|
18
|
+
security_group = self.data[:security_groups].values.detect{|sg| sg["rules"].detect{ |sgr| sgr["id"].to_s == security_group_rule_id.to_s }}
|
19
|
+
security_group["rules"].reject! { |sgr| sgr["id"] == security_group_rule_id }
|
18
20
|
response = Excon::Response.new
|
19
21
|
response.status = 202
|
20
22
|
response.headers = {
|
@@ -15,32 +15,22 @@ module Fog
|
|
15
15
|
|
16
16
|
class Mock
|
17
17
|
def get_security_group(security_group_id)
|
18
|
+
security_group = self.data[:security_groups][security_group_id.to_s]
|
18
19
|
response = Excon::Response.new
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
response.body = {
|
27
|
-
"security_group" => {
|
28
|
-
"rules" => [{
|
29
|
-
"from_port" => 44,
|
30
|
-
"group" => {},
|
31
|
-
"ip_protocol" => "tcp",
|
32
|
-
"to_port" => 55,
|
33
|
-
"parent_group_id" => 1,
|
34
|
-
"ip_range" => {
|
35
|
-
"cidr" => "10.10.10.10/24"
|
36
|
-
}, "id"=>1
|
37
|
-
}],
|
38
|
-
"tenant_id" => "d5183375ab0343f3a0b4b05f547aefc2",
|
39
|
-
"id"=>security_group_id,
|
40
|
-
"name"=>"default",
|
41
|
-
"description"=>"default"
|
20
|
+
if security_group
|
21
|
+
response.status = 200
|
22
|
+
response.headers = {
|
23
|
+
"X-Compute-Request-Id" => "req-63a90344-7c4d-42e2-936c-fd748bced1b3",
|
24
|
+
"Content-Type" => "application/json",
|
25
|
+
"Content-Length" => "167",
|
26
|
+
"Date" => Date.new
|
42
27
|
}
|
43
|
-
|
28
|
+
response.body = {
|
29
|
+
"security_group" => security_group
|
30
|
+
}
|
31
|
+
else
|
32
|
+
raise Fog::Compute::OpenStack::NotFound, "Security group #{security_group_id} does not exist"
|
33
|
+
end
|
44
34
|
response
|
45
35
|
end
|
46
36
|
end # mock
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class OpenStack
|
4
|
+
class Real
|
5
|
+
def get_security_group_rule(security_group_rule_id)
|
6
|
+
request(
|
7
|
+
:expects => [200],
|
8
|
+
:method => 'GET',
|
9
|
+
:path => "os-security-group-rules/#{security_group_rule_id}"
|
10
|
+
)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class Mock
|
15
|
+
def get_security_group_rule(security_group_rule_id)
|
16
|
+
security_group_rule = nil
|
17
|
+
self.data[:security_groups].detect{|id, sg| security_group_rule = sg["rules"].detect{ |sgr| sgr["id"].to_s == security_group_rule_id.to_s }}
|
18
|
+
response = Excon::Response.new
|
19
|
+
if security_group_rule
|
20
|
+
response.status = 200
|
21
|
+
response.headers = {
|
22
|
+
"X-Compute-Request-Id" => "req-63a90344-7c4d-42e2-936c-fd748bced1b3",
|
23
|
+
"Content-Type" => "application/json",
|
24
|
+
"Content-Length" => "167",
|
25
|
+
"Date" => Date.new
|
26
|
+
}
|
27
|
+
response.body = {
|
28
|
+
"security_group_rule" => security_group_rule
|
29
|
+
}
|
30
|
+
else
|
31
|
+
raise Fog::Compute::OpenStack::NotFound, "Security group rule #{security_group_rule_id} does not exist"
|
32
|
+
end
|
33
|
+
response
|
34
|
+
end
|
35
|
+
end # mock
|
36
|
+
end # openstack
|
37
|
+
end #compute
|
38
|
+
end #fog
|
@@ -14,12 +14,12 @@ module Fog
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class Mock
|
17
|
-
|
17
|
+
|
18
18
|
def list_hosts
|
19
19
|
response = Excon::Response.new
|
20
20
|
response.status = 200
|
21
21
|
response.body = { "hosts" => [
|
22
|
-
{"host_name" => "host.test.net", "service"=>"compute"}
|
22
|
+
{"host_name" => "host.test.net", "service"=>"compute", "zone" => "az1"}
|
23
23
|
]
|
24
24
|
}
|
25
25
|
response
|
@@ -29,4 +29,4 @@ module Fog
|
|
29
29
|
end # mock
|
30
30
|
end # openstack
|
31
31
|
end # compute
|
32
|
-
end # fog
|
32
|
+
end # fog
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
def update_quota(tenant_id, options = {})
|
7
7
|
options['tenant_id'] = tenant_id
|
8
8
|
request(
|
9
|
-
:body =>
|
9
|
+
:body => Fog::JSON.encode({ 'quota_set' => options }),
|
10
10
|
:expects => 200,
|
11
11
|
:method => 'PUT',
|
12
12
|
:path => "/os-quota-sets/#{tenant_id}"
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
def update_user(user_id, options = {})
|
7
7
|
url = options.delete('url') || "/users/#{user_id}"
|
8
8
|
request(
|
9
|
-
:body =>
|
9
|
+
:body => Fog::JSON.encode({ 'user' => options }),
|
10
10
|
:expects => 200,
|
11
11
|
:method => 'PUT',
|
12
12
|
:path => url
|
@@ -25,12 +25,12 @@ module Fog
|
|
25
25
|
:expects => 201,
|
26
26
|
:path => 'stacks',
|
27
27
|
:method => 'POST',
|
28
|
-
:body =>
|
28
|
+
:body => Fog::JSON.encode(params)
|
29
29
|
)
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
class Mock
|
35
35
|
def create_stack(stack_name, options = {})
|
36
36
|
stack_id = Fog::Mock.random_hex(32)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Get an expiring object http url
|
2
|
+
#
|
3
|
+
# ==== Parameters
|
4
|
+
# * container<~String> - Name of container containing object
|
5
|
+
# * object<~String> - Name of object to get expiring url for
|
6
|
+
# * expires<~Time> - An expiry time for this url
|
7
|
+
#
|
8
|
+
# ==== Returns
|
9
|
+
# * response<~Excon::Response>:
|
10
|
+
# * body<~String> - url for object
|
11
|
+
def get_object_http_url(container, object, expires, options = {})
|
12
|
+
create_temp_url(container, object, expires, "GET", options.merge(:scheme => "http"))
|
13
|
+
end
|
@@ -18,20 +18,6 @@ module Fog
|
|
18
18
|
create_temp_url(container, object, expires, "GET", options.merge(:scheme => "https"))
|
19
19
|
end
|
20
20
|
|
21
|
-
# Get an expiring object http url
|
22
|
-
#
|
23
|
-
# ==== Parameters
|
24
|
-
# * container<~String> - Name of container containing object
|
25
|
-
# * object<~String> - Name of object to get expiring url for
|
26
|
-
# * expires<~Time> - An expiry time for this url
|
27
|
-
#
|
28
|
-
# ==== Returns
|
29
|
-
# * response<~Excon::Response>:
|
30
|
-
# * body<~String> - url for object
|
31
|
-
def get_object_http_url(container, object, expires, options = {})
|
32
|
-
create_temp_url(container, object, expires, "GET", options.merge(:scheme => "http"))
|
33
|
-
end
|
34
|
-
|
35
21
|
# creates a temporary url
|
36
22
|
#
|
37
23
|
# ==== Parameters
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module Volume
|
3
|
+
class OpenStack
|
4
|
+
class Real
|
5
|
+
def get_volume_type_details(volume_type_id)
|
6
|
+
request(
|
7
|
+
:expects => 200,
|
8
|
+
:method => 'GET',
|
9
|
+
:path => "types/#{volume_type_id}"
|
10
|
+
)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class Mock
|
15
|
+
def get_volume_details(volume_type_id)
|
16
|
+
response = Excon::Response.new
|
17
|
+
response.status = 200
|
18
|
+
response.body = {
|
19
|
+
"volume_type" => {
|
20
|
+
"id" => "1",
|
21
|
+
"name" => "type 1",
|
22
|
+
"extra_specs" => {
|
23
|
+
"volume_backend_name" => "type 1 backend name"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
response
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|