fog 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +21 -0
- data/README.md +3 -1
- data/Rakefile +4 -1
- data/changelog.txt +462 -0
- data/docs/storage/index.markdown +4 -4
- data/fog.gemspec +2 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/atmos.rb +11 -0
- data/lib/fog/atmos/models/storage/directories.rb +48 -0
- data/lib/fog/atmos/models/storage/directory.rb +53 -0
- data/lib/fog/atmos/models/storage/file.rb +107 -0
- data/lib/fog/atmos/models/storage/files.rb +73 -0
- data/lib/fog/atmos/requests/storage/delete_namespace.rb +19 -0
- data/lib/fog/atmos/requests/storage/get_namespace.rb +20 -0
- data/lib/fog/atmos/requests/storage/head_namespace.rb +20 -0
- data/lib/fog/atmos/requests/storage/post_namespace.rb +20 -0
- data/lib/fog/atmos/requests/storage/put_namespace.rb +20 -0
- data/lib/fog/atmos/storage.rb +186 -0
- data/lib/fog/aws.rb +2 -0
- data/lib/fog/aws/auto_scaling.rb +15 -1
- data/lib/fog/aws/compute.rb +26 -17
- data/lib/fog/aws/elb.rb +14 -2
- data/lib/fog/aws/glacier.rb +172 -0
- data/lib/fog/aws/iam.rb +35 -29
- data/lib/fog/aws/models/auto_scaling/group.rb +1 -1
- data/lib/fog/aws/models/compute/flavors.rb +11 -0
- data/lib/fog/aws/models/compute/security_group.rb +22 -6
- data/lib/fog/aws/models/compute/server.rb +5 -1
- data/lib/fog/aws/models/compute/spot_request.rb +12 -0
- data/lib/fog/aws/models/compute/spot_requests.rb +1 -2
- data/lib/fog/aws/models/compute/volume.rb +7 -1
- data/lib/fog/aws/models/glacier/archive.rb +70 -0
- data/lib/fog/aws/models/glacier/archives.rb +30 -0
- data/lib/fog/aws/models/glacier/job.rb +65 -0
- data/lib/fog/aws/models/glacier/jobs.rb +45 -0
- data/lib/fog/aws/models/glacier/vault.rb +53 -0
- data/lib/fog/aws/models/glacier/vaults.rb +28 -0
- data/lib/fog/aws/models/rds/server.rb +3 -1
- data/lib/fog/aws/models/rds/snapshot.rb +1 -0
- data/lib/fog/aws/models/rds/snapshots.rb +3 -0
- data/lib/fog/aws/models/storage/file.rb +4 -3
- data/lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_groups.rb +8 -1
- data/lib/fog/aws/parsers/compute/create_volume.rb +2 -2
- data/lib/fog/aws/parsers/compute/describe_instance_status.rb +8 -1
- data/lib/fog/aws/parsers/compute/describe_instances.rb +2 -0
- data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
- data/lib/fog/aws/parsers/compute/describe_volumes.rb +2 -2
- data/lib/fog/aws/parsers/compute/run_instances.rb +2 -0
- data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +1 -1
- data/lib/fog/aws/parsers/dns/list_resource_record_sets.rb +3 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +3 -1
- data/lib/fog/aws/parsers/rds/snapshot_parser.rb +1 -0
- data/lib/fog/aws/rds.rb +9 -9
- data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +1 -0
- data/lib/fog/aws/requests/auto_scaling/delete_auto_scaling_group.rb +1 -1
- data/lib/fog/aws/requests/compute/create_volume.rb +53 -14
- data/lib/fog/aws/requests/compute/describe_instance_status.rb +2 -0
- data/lib/fog/aws/requests/compute/describe_instances.rb +3 -1
- data/lib/fog/aws/requests/compute/describe_internet_gateways.rb +13 -7
- data/lib/fog/aws/requests/compute/describe_spot_instance_requests.rb +1 -0
- data/lib/fog/aws/requests/compute/describe_subnets.rb +13 -7
- data/lib/fog/aws/requests/compute/describe_volumes.rb +2 -0
- data/lib/fog/aws/requests/compute/describe_vpcs.rb +12 -6
- data/lib/fog/aws/requests/compute/request_spot_instances.rb +2 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +8 -2
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +20 -1
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +2 -2
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +1 -1
- data/lib/fog/aws/requests/glacier/abort_multipart_upload.rb +35 -0
- data/lib/fog/aws/requests/glacier/complete_multipart_upload.rb +42 -0
- data/lib/fog/aws/requests/glacier/create_archive.rb +43 -0
- data/lib/fog/aws/requests/glacier/create_vault.rb +34 -0
- data/lib/fog/aws/requests/glacier/delete_archive.rb +35 -0
- data/lib/fog/aws/requests/glacier/delete_vault.rb +34 -0
- data/lib/fog/aws/requests/glacier/delete_vault_notification_configuration.rb +33 -0
- data/lib/fog/aws/requests/glacier/describe_job.rb +35 -0
- data/lib/fog/aws/requests/glacier/describe_vault.rb +34 -0
- data/lib/fog/aws/requests/glacier/get_job_output.rb +41 -0
- data/lib/fog/aws/requests/glacier/get_vault_notification_configuration.rb +34 -0
- data/lib/fog/aws/requests/glacier/initiate_job.rb +41 -0
- data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +38 -0
- data/lib/fog/aws/requests/glacier/list_jobs.rb +39 -0
- data/lib/fog/aws/requests/glacier/list_multipart_uploads.rb +37 -0
- data/lib/fog/aws/requests/glacier/list_parts.rb +37 -0
- data/lib/fog/aws/requests/glacier/list_vaults.rb +36 -0
- data/lib/fog/aws/requests/glacier/set_vault_notification_configuration.rb +37 -0
- data/lib/fog/aws/requests/glacier/upload_part.rb +46 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +7 -5
- data/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb +41 -1
- data/lib/fog/aws/requests/rds/create_db_snapshot.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_instances.rb +8 -10
- data/lib/fog/aws/requests/rds/describe_db_security_groups.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +2 -0
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +7 -6
- data/lib/fog/aws/requests/rds/reboot_db_instance.rb +6 -5
- data/lib/fog/aws/requests/storage/get_object.rb +45 -2
- data/lib/fog/aws/requests/storage/upload_part.rb +1 -0
- data/lib/fog/aws/signaturev4.rb +73 -0
- data/lib/fog/aws/sqs.rb +2 -6
- data/lib/fog/bare_metal_cloud/compute.rb +3 -1
- data/lib/fog/bare_metal_cloud/requests/compute/add_server_by_configuration.rb +33 -0
- data/lib/fog/bare_metal_cloud/requests/compute/get_server.rb +17 -12
- data/lib/fog/bare_metal_cloud/requests/compute/list_configurations.rb +27 -0
- data/lib/fog/bare_metal_cloud/requests/compute/list_images.rb +4 -4
- data/lib/fog/bare_metal_cloud/requests/compute/list_plans.rb +7 -7
- data/lib/fog/bare_metal_cloud/requests/compute/list_servers.rb +2 -2
- data/lib/fog/bin.rb +7 -0
- data/lib/fog/bin/atmos.rb +31 -0
- data/lib/fog/bin/aws.rb +4 -0
- data/lib/fog/bin/ecloud.rb +4 -0
- data/lib/fog/bin/rackspace.rb +7 -0
- data/lib/fog/bin/serverlove.rb +31 -0
- data/lib/fog/bluebox/requests/compute/create_block.rb +18 -4
- data/lib/fog/brightbox/compute.rb +52 -0
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +2 -0
- data/lib/fog/brightbox/models/compute/image.rb +1 -0
- data/lib/fog/brightbox/models/compute/server.rb +46 -3
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +3 -3
- data/lib/fog/cloudstack/compute.rb +4 -1
- data/lib/fog/cloudstack/models/compute/images.rb +15 -6
- data/lib/fog/cloudstack/models/compute/job.rb +1 -1
- data/lib/fog/cloudstack/requests/compute/attach_volume.rb +1 -1
- data/lib/fog/cloudstack/requests/compute/register_template.rb +35 -0
- data/lib/fog/compute.rb +15 -3
- data/lib/fog/core/errors.rb +1 -0
- data/lib/fog/core/time.rb +4 -0
- data/lib/fog/dynect/dns.rb +5 -5
- data/lib/fog/ecloud.rb +6 -0
- data/lib/fog/ecloud/compute.rb +3 -1
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +1 -0
- data/lib/fog/ecloud/models/compute/networks.rb +1 -0
- data/lib/fog/ecloud/models/compute/server.rb +31 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_add_ip.rb +40 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_upload_file.rb +31 -0
- data/lib/fog/google/models/storage/directory.rb +2 -2
- data/lib/fog/google/models/storage/file.rb +2 -2
- data/lib/fog/google/requests/storage/get_bucket.rb +1 -2
- data/lib/fog/google/requests/storage/put_object.rb +1 -2
- data/lib/fog/google/storage.rb +1 -1
- data/lib/fog/hp/models/compute/image.rb +1 -1
- data/lib/fog/hp/models/compute/server.rb +4 -0
- data/lib/fog/hp/requests/compute/delete_security_group_rule.rb +4 -4
- data/lib/fog/hp/requests/storage/get_object.rb +8 -2
- data/lib/fog/hp/storage.rb +1 -0
- data/lib/fog/libvirt/models/compute/server.rb +1 -1
- data/lib/fog/libvirt/models/compute/templates/server.xml.erb +1 -1
- data/lib/fog/openstack.rb +7 -0
- data/lib/fog/openstack/compute.rb +4 -1
- data/lib/fog/openstack/models/compute/server.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_server.rb +8 -2
- data/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +1 -1
- data/lib/fog/openstack/requests/identity/list_tenants.rb +1 -0
- data/lib/fog/providers.rb +2 -0
- data/lib/fog/rackspace.rb +9 -7
- data/lib/fog/rackspace/block_storage.rb +114 -0
- data/lib/fog/rackspace/compute_v2.rb +123 -0
- data/lib/fog/rackspace/models/block_storage/snapshot.rb +46 -0
- data/lib/fog/rackspace/models/block_storage/snapshots.rb +25 -0
- data/lib/fog/rackspace/models/block_storage/volume.rb +58 -0
- data/lib/fog/rackspace/models/block_storage/volume_type.rb +14 -0
- data/lib/fog/rackspace/models/block_storage/volume_types.rb +25 -0
- data/lib/fog/rackspace/models/block_storage/volumes.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/attachment.rb +34 -0
- data/lib/fog/rackspace/models/compute_v2/attachments.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/flavor.rb +17 -0
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/image.rb +30 -0
- data/lib/fog/rackspace/models/compute_v2/images.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/server.rb +147 -0
- data/lib/fog/rackspace/models/compute_v2/servers.rb +25 -0
- data/lib/fog/rackspace/models/storage/directory.rb +3 -3
- data/lib/fog/rackspace/requests/block_storage/create_snapshot.rb +26 -0
- data/lib/fog/rackspace/requests/block_storage/create_volume.rb +27 -0
- data/lib/fog/rackspace/requests/block_storage/delete_snapshot.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/delete_volume.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/get_snapshot.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/get_volume.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/get_volume_type.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/list_snapshots.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/list_volume_types.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/list_volumes.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/attach_volume.rb +23 -0
- data/lib/fog/rackspace/requests/compute_v2/change_server_password.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb +20 -0
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +28 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_attachment.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_flavor.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_image.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_server.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_attachments.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_flavors.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_images.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/reboot_server.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb +20 -0
- data/lib/fog/rackspace/requests/compute_v2/update_server.rb +22 -0
- data/lib/fog/rackspace/requests/storage/delete_object.rb +1 -1
- data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +51 -0
- data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +37 -0
- data/lib/fog/rackspace/storage.rb +4 -0
- data/lib/fog/serverlove.rb +10 -0
- data/lib/fog/serverlove/compute.rb +97 -0
- data/lib/fog/serverlove/models/compute/image.rb +57 -0
- data/lib/fog/serverlove/models/compute/images.rb +26 -0
- data/lib/fog/serverlove/models/compute/server.rb +72 -0
- data/lib/fog/serverlove/models/compute/servers.rb +26 -0
- data/lib/fog/serverlove/requests/compute/create_image.rb +32 -0
- data/lib/fog/serverlove/requests/compute/create_server.rb +34 -0
- data/lib/fog/serverlove/requests/compute/destroy_image.rb +13 -0
- data/lib/fog/serverlove/requests/compute/destroy_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_image.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_images.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_servers.rb +13 -0
- data/lib/fog/serverlove/requests/compute/load_standard_image.rb +13 -0
- data/lib/fog/serverlove/requests/compute/reset_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/shutdown_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/start_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/stop_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/update_image.rb +15 -0
- data/lib/fog/serverlove/requests/compute/update_server.rb +15 -0
- data/lib/fog/serverlove/util/compute/password_generator.rb +11 -0
- data/lib/fog/storage.rb +3 -0
- data/lib/fog/terremark/models/shared/image.rb +22 -0
- data/lib/fog/terremark/models/shared/images.rb +48 -0
- data/lib/fog/terremark/models/shared/internetservice.rb +67 -0
- data/lib/fog/terremark/models/shared/internetservices.rb +42 -0
- data/lib/fog/terremark/models/shared/nodeservice.rb +52 -0
- data/lib/fog/terremark/models/shared/nodeservices.rb +32 -0
- data/lib/fog/terremark/models/shared/server.rb +114 -15
- data/lib/fog/terremark/models/shared/servers.rb +7 -8
- data/lib/fog/terremark/models/shared/vdc.rb +6 -1
- data/lib/fog/terremark/parsers/shared/get_catalog.rb +7 -2
- data/lib/fog/terremark/parsers/shared/get_keys_list.rb +56 -0
- data/lib/fog/terremark/requests/shared/add_internet_service.rb +10 -9
- data/lib/fog/terremark/requests/shared/add_node_service.rb +10 -12
- data/lib/fog/terremark/requests/shared/configure_vapp.rb +61 -0
- data/lib/fog/terremark/requests/shared/create_internet_service.rb +16 -11
- data/lib/fog/terremark/requests/shared/delete_internet_service.rb +2 -1
- data/lib/fog/terremark/requests/shared/delete_node_service.rb +2 -1
- data/lib/fog/terremark/requests/shared/delete_public_ip.rb +2 -1
- data/lib/fog/terremark/requests/shared/get_internet_services.rb +2 -1
- data/lib/fog/terremark/requests/shared/get_keys_list.rb +36 -0
- data/lib/fog/terremark/requests/shared/get_node_services.rb +2 -1
- data/lib/fog/terremark/requests/shared/instantiate_vapp_template.rb +11 -1
- data/lib/fog/terremark/shared.rb +19 -1
- data/lib/fog/terremark/vcloud.rb +10 -1
- data/lib/fog/vcloud/compute.rb +13 -13
- data/lib/fog/vcloud/models/compute/catalog_items.rb +6 -2
- data/lib/fog/vcloud/models/compute/organizations.rb +1 -2
- data/lib/fog/vcloud/models/compute/server.rb +37 -3
- data/lib/fog/vcloud/models/compute/vapps.rb +1 -1
- data/lib/fog/vcloud/requests/compute/configure_org_network.rb +141 -0
- data/lib/fog/vcloud/requests/compute/configure_vm_cpus.rb +38 -0
- data/lib/fog/vcloud/requests/compute/configure_vm_memory.rb +11 -12
- data/lib/fog/vcloud/requests/compute/configure_vm_password.rb +39 -0
- data/lib/fog/vcloud/requests/compute/undeploy.rb +9 -1
- data/lib/fog/vsphere/requests/compute/vm_reboot.rb +1 -1
- data/tests/atmos/models/storage/file_update_tests.rb +19 -0
- data/tests/atmos/models/storage/nested_directories_tests.rb +23 -0
- data/tests/aws/models/compute/security_group_tests.rb +21 -12
- data/tests/aws/models/dns/records_tests.rb +8 -2
- data/tests/aws/models/glacier/model_tests.rb +47 -0
- data/tests/aws/models/iam/policies_tests.rb +2 -2
- data/tests/aws/models/rds/server_tests.rb +5 -2
- data/tests/aws/models/storage/directory_tests.rb +1 -1
- data/tests/aws/models/storage/file_tests.rb +1 -1
- data/tests/aws/models/storage/files_tests.rb +1 -1
- data/tests/aws/models/storage/url_tests.rb +8 -8
- data/tests/aws/models/storage/version_tests.rb +1 -1
- data/tests/aws/models/storage/versions_tests.rb +1 -1
- data/tests/aws/requests/auto_scaling/auto_scaling_tests.rb +5 -0
- data/tests/aws/requests/auto_scaling/helper.rb +2 -1
- data/tests/aws/requests/compute/instance_tests.rb +17 -23
- data/tests/aws/requests/compute/spot_instance_tests.rb +2 -1
- data/tests/aws/requests/compute/tag_tests.rb +1 -0
- data/tests/aws/requests/compute/volume_tests.rb +45 -4
- data/tests/aws/requests/elb/helper.rb +2 -2
- data/tests/aws/requests/elb/listener_tests.rb +2 -2
- data/tests/aws/requests/elb/load_balancer_tests.rb +1 -1
- data/tests/aws/requests/glacier/archive_tests.rb +13 -0
- data/tests/aws/requests/glacier/multipart_upload_tests.rb +30 -0
- data/tests/aws/requests/glacier/tree_hash_tests.rb +63 -0
- data/tests/aws/requests/glacier/vault_tests.rb +35 -0
- data/tests/aws/requests/rds/helper.rb +11 -5
- data/tests/aws/requests/rds/instance_tests.rb +0 -2
- data/tests/aws/requests/storage/acl_utils_tests.rb +1 -1
- data/tests/aws/requests/storage/bucket_tests.rb +1 -1
- data/tests/aws/requests/storage/multipart_upload_tests.rb +1 -1
- data/tests/aws/requests/storage/object_tests.rb +8 -0
- data/tests/aws/requests/storage/versioning_tests.rb +1 -1
- data/tests/aws/signaturev4_tests.rb +41 -0
- data/tests/brightbox/compute_tests.rb +9 -0
- data/tests/brightbox/requests/compute/helper.rb +21 -6
- data/tests/cloudstack/compute/models/volume_tests.rb +1 -1
- data/tests/cloudstack/requests/volume_tests.rb +1 -1
- data/tests/compute/helper.rb +10 -4
- data/tests/dynect/requests/dns/dns_tests.rb +39 -0
- data/tests/google/requests/storage/bucket_tests.rb +2 -3
- data/tests/google/requests/storage/object_tests.rb +1 -1
- data/tests/helper.rb +10 -3
- data/tests/helpers/formats_helper.rb +4 -2
- data/tests/helpers/formats_helper_tests.rb +9 -0
- data/tests/helpers/mock_helper.rb +6 -1
- data/tests/helpers/model_helper.rb +0 -3
- data/tests/hp/models/compute/address_tests.rb +1 -1
- data/tests/hp/models/compute/addresses_tests.rb +1 -1
- data/tests/hp/models/compute/key_pair_tests.rb +1 -1
- data/tests/hp/models/compute/key_pairs_tests.rb +1 -1
- data/tests/hp/models/compute/security_group_tests.rb +1 -1
- data/tests/hp/models/compute/security_groups_tests.rb +1 -1
- data/tests/hp/requests/cdn/container_tests.rb +1 -1
- data/tests/hp/requests/compute/address_tests.rb +1 -1
- data/tests/hp/requests/compute/flavor_tests.rb +1 -1
- data/tests/hp/requests/compute/image_tests.rb +1 -1
- data/tests/hp/requests/compute/key_pair_tests.rb +1 -1
- data/tests/hp/requests/compute/security_group_rule_tests.rb +1 -1
- data/tests/hp/requests/compute/security_group_tests.rb +1 -1
- data/tests/hp/requests/compute/server_address_tests.rb +1 -1
- data/tests/hp/requests/compute/server_tests.rb +1 -1
- data/tests/hp/requests/storage/container_tests.rb +1 -1
- data/tests/hp/requests/storage/object_tests.rb +1 -1
- data/tests/local/models/file_tests.rb +1 -1
- data/tests/rackspace/models/block_storage/snapshot_tests.rb +20 -0
- data/tests/rackspace/models/block_storage/snapshots_tests.rb +20 -0
- data/tests/rackspace/models/block_storage/volume_tests.rb +27 -0
- data/tests/rackspace/models/block_storage/volume_types_tests.rb +20 -0
- data/tests/rackspace/models/block_storage/volumes_tests.rb +11 -0
- data/tests/rackspace/models/compute_v2/flavors_tests.rb +20 -0
- data/tests/rackspace/models/compute_v2/images_tests.rb +22 -0
- data/tests/rackspace/models/compute_v2/server_tests.rb +62 -0
- data/tests/rackspace/models/compute_v2/servers_tests.rb +14 -0
- data/tests/rackspace/requests/block_storage/snapshot_tests.rb +81 -0
- data/tests/rackspace/requests/block_storage/volume_tests.rb +61 -0
- data/tests/rackspace/requests/block_storage/volume_type_tests.rb +31 -0
- data/tests/rackspace/requests/compute_v2/attachment_tests.rb +68 -0
- data/tests/rackspace/requests/compute_v2/flavor_tests.rb +43 -0
- data/tests/rackspace/requests/compute_v2/image_tests.rb +47 -0
- data/tests/rackspace/requests/compute_v2/server_tests.rb +147 -0
- data/tests/rackspace/requests/storage/account_tests.rb +17 -0
- data/tests/rackspace/requests/storage/container_tests.rb +1 -1
- data/tests/rackspace/requests/storage/large_object_tests.rb +1 -1
- data/tests/rackspace/requests/storage/object_tests.rb +41 -2
- data/tests/serverlove/requests/compute/image_tests.rb +57 -0
- data/tests/serverlove/requests/compute/server_tests.rb +85 -0
- data/tests/serverlove/util/compute/password_generator_tests.rb +19 -0
- data/tests/storage/models/directories_tests.rb +1 -1
- data/tests/storage/models/directory_test.rb +1 -1
- data/tests/storage/models/file_tests.rb +1 -1
- data/tests/storage/models/files_tests.rb +1 -1
- metadata +188 -3
@@ -11,6 +11,7 @@ module Fog
|
|
11
11
|
raise ArgumentError.new("Filters must be a hash, but is a #{filters.class}.") unless filters.is_a?(Hash)
|
12
12
|
next_token = filters.delete('nextToken') || filters.delete('NextToken')
|
13
13
|
max_results = filters.delete('maxResults') || filters.delete('MaxResults')
|
14
|
+
all_instances = filters.delete('includeAllInstances') || filters.delete('IncludeAllInstances')
|
14
15
|
|
15
16
|
params = Fog::AWS.indexed_request_param('InstanceId', filters.delete('InstanceId'))
|
16
17
|
|
@@ -18,6 +19,7 @@ module Fog
|
|
18
19
|
|
19
20
|
params['NextToken'] = next_token if next_token
|
20
21
|
params['MaxResults'] = max_results if max_results
|
22
|
+
params['IncludeAllInstances'] = all_instances if all_instances
|
21
23
|
|
22
24
|
request({
|
23
25
|
'Action' => 'DescribeInstanceStatus',
|
@@ -29,6 +29,7 @@ module Fog
|
|
29
29
|
# * 'status'<~String> - status of attached volume
|
30
30
|
# * 'volumeId'<~String> - Id of attached volume
|
31
31
|
# * 'dnsName'<~String> - public dns name, blank until instance is running
|
32
|
+
# * 'ebsOptimized'<~Boolean> - Whether the instance is optimized for EBS I/O
|
32
33
|
# * 'imageId'<~String> - image id of ami used to launch instance
|
33
34
|
# * 'instanceId'<~String> - id of the instance
|
34
35
|
# * 'instanceState'<~Hash>:
|
@@ -206,11 +207,12 @@ module Fog
|
|
206
207
|
|
207
208
|
reservation_set[instance['reservationId']] ||= {
|
208
209
|
'groupSet' => instance['groupSet'],
|
210
|
+
'groupIds' => instance['groupIds'],
|
209
211
|
'instancesSet' => [],
|
210
212
|
'ownerId' => instance['ownerId'],
|
211
213
|
'reservationId' => instance['reservationId']
|
212
214
|
}
|
213
|
-
reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'architecture', 'blockDeviceMapping', 'clientToken', 'dnsName', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'ipAddress', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'placement', 'platform', 'privateDnsName', 'privateIpAddress', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType', 'stateReason'].include?(key)}.merge('tagSet' => self.data[:tag_sets][instance['instanceId']])
|
215
|
+
reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'architecture', 'blockDeviceMapping', 'clientToken', 'dnsName', 'ebsOptimized', 'iamInstanceProfile', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'ipAddress', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'networkInterfaces', 'ownerId', 'placement', 'platform', 'privateDnsName', 'privateIpAddress', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType', 'stateReason'].include?(key)}.merge('tagSet' => self.data[:tag_sets][instance['instanceId']])
|
214
216
|
end
|
215
217
|
end
|
216
218
|
|
@@ -37,16 +37,22 @@ module Fog
|
|
37
37
|
}.merge!(params))
|
38
38
|
end
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
class Mock
|
42
42
|
def describe_internet_gateways(filters = {})
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
'internetGatewaySet' => self.data[:internet_gateways]
|
48
|
-
}
|
43
|
+
internet_gateways = self.data[:internet_gateways]
|
44
|
+
|
45
|
+
if filters['internet-gateway-id']
|
46
|
+
internet_gateways = internet_gateways.reject {|internet_gateway| internet_gateway['internetGatewayId'] != filters['internet-gateway-id']}
|
49
47
|
end
|
48
|
+
|
49
|
+
Excon::Response.new(
|
50
|
+
:status => 200,
|
51
|
+
:body => {
|
52
|
+
'requestId' => Fog::AWS::Mock.request_id,
|
53
|
+
'internetGatewaySet' => internet_gateways
|
54
|
+
}
|
55
|
+
)
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
@@ -25,6 +25,7 @@ module Fog
|
|
25
25
|
# * 'imageId'<~String> - AMI for instance
|
26
26
|
# * 'instanceType'<~String> - type for instance
|
27
27
|
# * 'monitoring'<~Boolean> - monitoring status for instance
|
28
|
+
# * 'subnetId'<~String> - VPC subnet ID for instance
|
28
29
|
# * 'productDescription'<~String> - general description of AMI
|
29
30
|
# * 'spotInstanceRequestId'<~String> - id of spot instance request
|
30
31
|
# * 'spotPrice'<~Float> - maximum price for instances to be launched
|
@@ -41,16 +41,22 @@ module Fog
|
|
41
41
|
}.merge!(params))
|
42
42
|
end
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
class Mock
|
46
46
|
def describe_subnets(filters = {})
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
'subnetSet' => self.data[:subnets]
|
52
|
-
}
|
47
|
+
subnets = self.data[:subnets]
|
48
|
+
|
49
|
+
if filters['subnet-id']
|
50
|
+
subnets = subnets.reject {|subnet| subnet['subnetId'] != filters['subnet-id']}
|
53
51
|
end
|
52
|
+
|
53
|
+
Excon::Response.new(
|
54
|
+
:status => 200,
|
55
|
+
:body => {
|
56
|
+
'requestId' => Fog::AWS::Mock.request_id,
|
57
|
+
'subnetSet' => subnets
|
58
|
+
}
|
59
|
+
)
|
54
60
|
end
|
55
61
|
end
|
56
62
|
end
|
@@ -16,10 +16,12 @@ module Fog
|
|
16
16
|
# * 'volumeSet'<~Array>:
|
17
17
|
# * 'availabilityZone'<~String> - Availability zone for volume
|
18
18
|
# * 'createTime'<~Time> - Timestamp for creation
|
19
|
+
# * 'iops'<~Integer> - Number of IOPS volume supports
|
19
20
|
# * 'size'<~Integer> - Size in GiBs for volume
|
20
21
|
# * 'snapshotId'<~String> - Snapshot volume was created from, if any
|
21
22
|
# * 'status'<~String> - State of volume
|
22
23
|
# * 'volumeId'<~String> - Reference to volume
|
24
|
+
# * 'volumeType'<~String> - Type of volume
|
23
25
|
# * 'attachmentSet'<~Array>:
|
24
26
|
# * 'attachmentTime'<~Time> - Timestamp for attachment
|
25
27
|
# * 'deleteOnTermination'<~Boolean> - Whether or not to delete volume on instance termination
|
@@ -38,16 +38,22 @@ module Fog
|
|
38
38
|
}.merge!(params))
|
39
39
|
end
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
class Mock
|
43
43
|
def describe_vpcs(filters = {})
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
vpcs = self.data[:vpcs]
|
45
|
+
|
46
|
+
if filters['vpc-id']
|
47
|
+
vpcs = vpcs.reject {|vpc| vpc['vpcId'] != filters['vpc-id']}
|
48
|
+
end
|
49
|
+
|
50
|
+
Excon::Response.new(
|
51
|
+
:status => 200,
|
52
|
+
:body => {
|
47
53
|
'requestId' => Fog::AWS::Mock.request_id,
|
48
|
-
'vpcSet' =>
|
54
|
+
'vpcSet' => vpcs
|
49
55
|
}
|
50
|
-
|
56
|
+
)
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
@@ -24,6 +24,7 @@ module Fog
|
|
24
24
|
# * 'Ebs.DeleteOnTermination'<~String> - specifies whether or not to delete the volume on instance termination
|
25
25
|
# * 'LaunchSpecification.KeyName'<~String> - Name of a keypair to add to booting instances
|
26
26
|
# * 'LaunchSpecification.Monitoring.Enabled'<~Boolean> - Enables monitoring, defaults to disabled
|
27
|
+
# * 'LaunchSpecification.SubnetId'<~String> - VPC subnet ID in which to launch the instance
|
27
28
|
# * 'LaunchSpecification.Placement.AvailabilityZone'<~String> - Placement constraint for instances
|
28
29
|
# * 'LaunchSpecification.SecurityGroup'<~Array> or <~String> - Name of security group(s) for instances, not supported in VPC
|
29
30
|
# * 'LaunchSpecification.SecurityGroupId'<~Array> or <~String> - Id of security group(s) for instances, use this or LaunchSpecification.SecurityGroup
|
@@ -47,6 +48,7 @@ module Fog
|
|
47
48
|
# * 'imageId'<~String> - AMI for instance
|
48
49
|
# * 'instanceType'<~String> - type for instance
|
49
50
|
# * 'monitoring'<~Boolean> - monitoring status for instance
|
51
|
+
# * 'subnetId'<~String> - VPC subnet ID for instance
|
50
52
|
# * 'productDescription'<~String> - general description of AMI
|
51
53
|
# * 'spotInstanceRequestId'<~String> - id of spot instance request
|
52
54
|
# * 'spotPrice'<~Float> - maximum price for instances to be launched
|
@@ -44,6 +44,7 @@ module Fog
|
|
44
44
|
# * 'RamdiskId'<~String> - Id of ramdisk with which to launch
|
45
45
|
# * 'SubnetId'<~String> - VPC option to specify subnet to launch instance into
|
46
46
|
# * 'UserData'<~String> - Additional data to provide to booting instances
|
47
|
+
# * 'EbsOptimized'<~Boolean> - Whether the instance is optimized for EBS I/O
|
47
48
|
#
|
48
49
|
# ==== Returns
|
49
50
|
# * response<~Excon::Response>:
|
@@ -82,6 +83,7 @@ module Fog
|
|
82
83
|
# * 'reason'<~String> - reason for most recent state transition, or blank
|
83
84
|
# * 'rootDeviceName'<~String> - specifies how the root device is exposed to the instance
|
84
85
|
# * 'rootDeviceType'<~String> - root device type used by AMI in [ebs, instance-store]
|
86
|
+
# * 'ebsOptimized'<~Boolean> - Whether the instance is optimized for EBS I/O
|
85
87
|
# * 'ownerId'<~String> - Id of owner
|
86
88
|
# * 'requestId'<~String> - Id of request
|
87
89
|
# * 'reservationId'<~String> - Id of reservation
|
@@ -137,6 +139,7 @@ module Fog
|
|
137
139
|
instance_id = Fog::AWS::Mock.instance_id
|
138
140
|
instance = {
|
139
141
|
'amiLaunchIndex' => i,
|
142
|
+
'architecture' => 'i386',
|
140
143
|
'blockDeviceMapping' => [],
|
141
144
|
'clientToken' => options['clientToken'],
|
142
145
|
'dnsName' => nil,
|
@@ -152,12 +155,15 @@ module Fog
|
|
152
155
|
'privateDnsName' => nil,
|
153
156
|
'productCodes' => [],
|
154
157
|
'reason' => nil,
|
155
|
-
'rootDeviceType' => 'instance-store'
|
158
|
+
'rootDeviceType' => 'instance-store',
|
159
|
+
'ebsOptimized' => options['EbsOptimized'] || false
|
156
160
|
}
|
157
161
|
instances_set << instance
|
158
162
|
self.data[:instances][instance_id] = instance.merge({
|
159
|
-
'
|
163
|
+
'groupIds' => [],
|
160
164
|
'groupSet' => group_set,
|
165
|
+
'iamInstanceProfile' => {},
|
166
|
+
'networkInterfaces' => [],
|
161
167
|
'ownerId' => self.data[:owner_id],
|
162
168
|
'privateIpAddress' => nil,
|
163
169
|
'reservationId' => reservation_id,
|
@@ -106,8 +106,8 @@ module Fog
|
|
106
106
|
alias_target_tag = ''
|
107
107
|
if change_item[:alias_target]
|
108
108
|
# Accept either underscore or camel case for hash keys.
|
109
|
-
hosted_zone_id = change_item[:alias_target][:hosted_zone_id] || change_item[:alias_target][:HostedZoneId]
|
110
109
|
dns_name = change_item[:alias_target][:dns_name] || change_item[:alias_target][:DNSName]
|
110
|
+
hosted_zone_id = change_item[:alias_target][:hosted_zone_id] || change_item[:alias_target][:HostedZoneId] || AWS.hosted_zone_for_alias_target(dns_name)
|
111
111
|
alias_target_tag += %Q{<AliasTarget><HostedZoneId>#{hosted_zone_id}</HostedZoneId><DNSName>#{dns_name}</DNSName></AliasTarget>}
|
112
112
|
end
|
113
113
|
|
@@ -186,6 +186,25 @@ module Fog
|
|
186
186
|
end
|
187
187
|
end
|
188
188
|
end
|
189
|
+
|
190
|
+
def self.hosted_zone_for_alias_target(dns_name)
|
191
|
+
k = elb_hosted_zone_mapping.keys.find do |k|
|
192
|
+
dns_name =~ /\A.+\.#{k}\.elb\.amazonaws\.com\.?\z/
|
193
|
+
end
|
194
|
+
elb_hosted_zone_mapping[k]
|
195
|
+
end
|
196
|
+
|
197
|
+
def self.elb_hosted_zone_mapping
|
198
|
+
@elb_hosted_zone_mapping ||= {
|
199
|
+
"ap-northeast-1" => "Z2YN17T5R711GT",
|
200
|
+
"ap-southeast-1" => "Z1WI8VXHPB1R38",
|
201
|
+
"eu-west-1" => "Z3NF1Z3NOM5OY2",
|
202
|
+
"sa-east-1" => "Z2ES78Y61JGQKS",
|
203
|
+
"us-east-1" => "Z3DZXE0Q79N41H",
|
204
|
+
"us-west-1" => "Z1M58G0W56PQJA",
|
205
|
+
"us-west-2" => "Z33MTJ483KN6FU",
|
206
|
+
}
|
207
|
+
end
|
189
208
|
end
|
190
209
|
end
|
191
210
|
end
|
@@ -75,9 +75,9 @@ module Fog
|
|
75
75
|
dns_name = Fog::AWS::ELB::Mock.dns_name(lb_name, @region)
|
76
76
|
self.data[:load_balancers][lb_name] = {
|
77
77
|
'AvailabilityZones' => availability_zones,
|
78
|
-
'Subnets' => options[:subnet_ids],
|
78
|
+
'Subnets' => options[:subnet_ids] || [],
|
79
79
|
'Scheme' => options[:scheme].nil? ? 'internet-facing' : options[:scheme],
|
80
|
-
'SecurityGroups' => options[:security_groups],
|
80
|
+
'SecurityGroups' => options[:security_groups].nil? ? [] : options[:security_groups],
|
81
81
|
'CanonicalHostedZoneName' => '',
|
82
82
|
'CanonicalHostedZoneNameID' => '',
|
83
83
|
'CreatedTime' => Time.now,
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Glacier
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Abort an upload
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * name<~String> Name of the vault to upload to
|
10
|
+
# * upload_id<~String> The id of the upload to complete
|
11
|
+
# * options<~Hash>
|
12
|
+
# * account_id<~String> - The AWS account id. Defaults to the account owning the credentials making the request
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
#
|
16
|
+
# ==== See Also
|
17
|
+
# http://docs.amazonwebservices.com/amazonglacier/latest/dev/api-multipart-abort-upload.html
|
18
|
+
#
|
19
|
+
def abort_multipart_upload(vault_name, upload_id, options={})
|
20
|
+
account_id = options['account_id'] || '-'
|
21
|
+
path = "/#{account_id}/vaults/#{Fog::AWS.escape(vault_name)}/multipart-uploads/#{upload_id}"
|
22
|
+
|
23
|
+
request(
|
24
|
+
:expects => 204,
|
25
|
+
:idempotent => true,
|
26
|
+
:headers => {},
|
27
|
+
:method => :delete,
|
28
|
+
:path => path
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Glacier
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Complete an upload
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * name<~String> Name of the vault to upload to
|
10
|
+
# * upload_id<~String> The id of the upload to complete
|
11
|
+
# * total_size<~Integer> The total archive size
|
12
|
+
# * tree_hash<~String> the treehash for the archive
|
13
|
+
# * options<~Hash>
|
14
|
+
# * account_id<~String> - The AWS account id. Defaults to the account owning the credentials making the request
|
15
|
+
# ==== Returns
|
16
|
+
# * response<~Excon::Response>:
|
17
|
+
#
|
18
|
+
# ==== See Also
|
19
|
+
# http://docs.amazonwebservices.com/amazonglacier/latest/dev/api-multipart-complete-upload.html
|
20
|
+
#
|
21
|
+
def complete_multipart_upload(vault_name, upload_id, total_size, tree_hash, options={})
|
22
|
+
account_id = options['account_id'] || '-'
|
23
|
+
path = "/#{account_id}/vaults/#{Fog::AWS.escape(vault_name)}/multipart-uploads/#{upload_id}"
|
24
|
+
|
25
|
+
headers = {
|
26
|
+
'x-amz-archive-size' => total_size.to_s,
|
27
|
+
'x-amz-sha256-tree-hash' => tree_hash
|
28
|
+
}
|
29
|
+
|
30
|
+
request(
|
31
|
+
:expects => 201,
|
32
|
+
:idempotent => true,
|
33
|
+
:headers => headers,
|
34
|
+
:method => :post,
|
35
|
+
:path => path
|
36
|
+
)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Glacier
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Upload an archive
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * name<~String> Name of the vault to upload to
|
10
|
+
# * body<~String> The data to upload
|
11
|
+
# * options<~Hash>
|
12
|
+
# * description<~String> - The archive description
|
13
|
+
# * account_id<~String> - The AWS account id. Defaults to the account owning the credentials making the request
|
14
|
+
# ==== Returns
|
15
|
+
# * response<~Excon::Response>:
|
16
|
+
#
|
17
|
+
# ==== See Also
|
18
|
+
# http://docs.amazonwebservices.com/amazonglacier/latest/dev/api-archive-post.html
|
19
|
+
#
|
20
|
+
def create_archive(vault_name, body, options={})
|
21
|
+
account_id = options['account_id'] || '-'
|
22
|
+
path = "/#{account_id}/vaults/#{Fog::AWS.escape(vault_name)}/archives"
|
23
|
+
|
24
|
+
headers = {
|
25
|
+
'Content-Length' => body.bytesize.to_s,
|
26
|
+
'x-amz-content-sha256' => Digest::SHA256.hexdigest(body),
|
27
|
+
'x-amz-sha256-tree-hash' => Fog::AWS::Glacier::TreeHash.digest(body)
|
28
|
+
}
|
29
|
+
headers['x-amz-archive-description'] = options['description'] if options['description']
|
30
|
+
|
31
|
+
request(
|
32
|
+
:expects => 201,
|
33
|
+
:headers => headers,
|
34
|
+
:method => :post,
|
35
|
+
:path => path,
|
36
|
+
:body => body
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Glacier
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# This operation creates a new vault with the specified name. .
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * name<~String> 1-255 characters. must be unique within a region for an AWS account
|
10
|
+
# * options<~Hash>
|
11
|
+
# * account_id<~String> - The AWS account id. Defaults to the account owning the credentials making the request
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
# * body<~Hash>:
|
15
|
+
#
|
16
|
+
# ==== See Also
|
17
|
+
# http://docs.amazonwebservices.com/amazonglacier/latest/dev/api-vault-put.html
|
18
|
+
#
|
19
|
+
def create_vault(name,options={})
|
20
|
+
account_id = options['account_id'] || '-'
|
21
|
+
path = "/#{account_id}/vaults/#{Fog::AWS.escape(name)}"
|
22
|
+
request(options.merge({
|
23
|
+
:expects => 201,
|
24
|
+
:idempotent => true,
|
25
|
+
:headers => {},
|
26
|
+
:method => :put,
|
27
|
+
:path => path,
|
28
|
+
}))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Glacier
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Delete an archive
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * name<~String> Name of the vault to delete
|
10
|
+
# * options<~Hash>
|
11
|
+
# * account_id<~String> - The AWS account id. Defaults to the account owning the credentials making the request
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
# * body<~Hash>:
|
15
|
+
# * 'RequestId'<~String> - Id of the request
|
16
|
+
#
|
17
|
+
# ==== See Also
|
18
|
+
# http://docs.amazonwebservices.com/amazonglacier/latest/dev/api-vault-delete.html
|
19
|
+
#
|
20
|
+
def delete_archive(name,archive_id,options={})
|
21
|
+
account_id = options['account_id'] || '-'
|
22
|
+
path = "/#{account_id}/vaults/#{Fog::AWS.escape(name)}/archives/#{archive_id}"
|
23
|
+
request(
|
24
|
+
:expects => 204,
|
25
|
+
:idempotent => true,
|
26
|
+
:headers => {},
|
27
|
+
:method => :delete,
|
28
|
+
:path => path
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|