fog 1.10.1 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +1 -0
- data/Gemfile +2 -0
- data/README.md +4 -3
- data/changelog.txt +207 -0
- data/fog.gemspec +4 -3
- data/lib/fog/aws.rb +0 -2
- data/lib/fog/aws/dynamodb.rb +1 -1
- data/lib/fog/aws/elasticache.rb +0 -2
- data/lib/fog/aws/iam.rb +1 -0
- data/lib/fog/aws/models/compute/volume.rb +1 -0
- data/lib/fog/aws/models/iam/user.rb +1 -0
- data/lib/fog/aws/models/storage/directories.rb +1 -1
- data/lib/fog/aws/models/storage/directory.rb +20 -17
- data/lib/fog/aws/models/storage/file.rb +4 -5
- data/lib/fog/aws/parsers/iam/get_user.rb +2 -0
- data/lib/fog/aws/parsers/iam/list_users.rb +2 -0
- data/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb +2 -2
- data/lib/fog/aws/requests/cdn/put_distribution_config.rb +3 -3
- data/lib/fog/aws/requests/cloud_formation/update_stack.rb +3 -3
- data/lib/fog/aws/requests/cloud_formation/validate_template.rb +5 -5
- data/lib/fog/aws/requests/iam/create_user.rb +5 -4
- data/lib/fog/aws/requests/iam/get_user.rb +5 -4
- data/lib/fog/aws/requests/iam/list_users.rb +5 -4
- data/lib/fog/aws/requests/rds/create_db_instance.rb +25 -25
- data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +3 -3
- data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +2 -2
- data/lib/fog/aws/requests/storage/copy_object.rb +2 -2
- data/lib/fog/aws/requests/storage/delete_bucket.rb +1 -1
- data/lib/fog/aws/requests/storage/delete_bucket_cors.rb +1 -1
- data/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +1 -1
- data/lib/fog/aws/requests/storage/delete_bucket_policy.rb +1 -1
- data/lib/fog/aws/requests/storage/delete_bucket_website.rb +1 -1
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +1 -1
- data/lib/fog/aws/requests/storage/delete_object.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_acl.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_cors.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_location.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_logging.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_policy.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket_website.rb +1 -1
- data/lib/fog/aws/requests/storage/get_object.rb +2 -2
- data/lib/fog/aws/requests/storage/get_object_acl.rb +2 -2
- data/lib/fog/aws/requests/storage/get_object_http_url.rb +1 -19
- data/lib/fog/aws/requests/storage/get_object_torrent.rb +2 -2
- data/lib/fog/aws/requests/storage/get_object_url.rb +5 -14
- data/lib/fog/aws/requests/storage/get_request_payment.rb +1 -1
- data/lib/fog/aws/requests/storage/head_object.rb +2 -2
- data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +2 -2
- data/lib/fog/aws/requests/storage/list_multipart_uploads.rb +7 -8
- data/lib/fog/aws/requests/storage/list_parts.rb +2 -2
- data/lib/fog/aws/requests/storage/put_bucket.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_acl.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_cors.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_logging.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_policy.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_versioning.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_website.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object.rb +2 -2
- data/lib/fog/aws/requests/storage/put_object_acl.rb +8 -8
- data/lib/fog/aws/requests/storage/put_object_url.rb +5 -7
- data/lib/fog/aws/requests/storage/put_request_payment.rb +1 -1
- data/lib/fog/aws/requests/storage/upload_part.rb +2 -2
- data/lib/fog/aws/storage.rb +201 -97
- data/lib/fog/bin/google.rb +47 -1
- data/lib/fog/bluebox/models/compute/server.rb +3 -1
- data/lib/fog/brightbox/compute.rb +11 -26
- data/lib/fog/brightbox/compute/image_selector.rb +45 -0
- data/lib/fog/cloudstack/compute.rb +70 -2
- data/lib/fog/cloudstack/models/compute/disk_offering.rb +46 -0
- data/lib/fog/cloudstack/models/compute/disk_offerings.rb +27 -0
- data/lib/fog/cloudstack/models/compute/image.rb +1 -1
- data/lib/fog/cloudstack/models/compute/servers.rb +3 -2
- data/lib/fog/cloudstack/requests/compute/create_disk_offering.rb +51 -0
- data/lib/fog/cloudstack/requests/compute/delete_disk_offering.rb +31 -0
- data/lib/fog/cloudstack/requests/compute/delete_snapshot.rb +44 -2
- data/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb +9 -0
- data/lib/fog/cloudstack/requests/compute/list_os_types.rb +9 -0
- data/lib/fog/cloudstack/requests/compute/list_snapshots.rb +21 -0
- data/lib/fog/core/errors.rb +3 -0
- data/lib/fog/core/json.rb +48 -7
- data/lib/fog/core/model.rb +11 -10
- data/lib/fog/core/service.rb +1 -1
- data/lib/fog/digitalocean/CHANGELOG.md +1 -1
- data/lib/fog/dreamhost/dns.rb +1 -3
- data/lib/fog/google.rb +1 -0
- data/lib/fog/google/compute.rb +131 -0
- data/lib/fog/google/models/compute/flavor.rb +24 -0
- data/lib/fog/google/models/compute/flavors.rb +28 -0
- data/lib/fog/google/models/compute/image.rb +19 -0
- data/lib/fog/google/models/compute/images.rb +28 -0
- data/lib/fog/google/models/compute/server.rb +80 -0
- data/lib/fog/google/models/compute/servers.rb +61 -0
- data/lib/fog/google/requests/compute/delete_disk.rb +31 -0
- data/lib/fog/google/requests/compute/delete_firewall.rb +30 -0
- data/lib/fog/google/requests/compute/delete_image.rb +30 -0
- data/lib/fog/google/requests/compute/delete_network.rb +30 -0
- data/lib/fog/google/requests/compute/delete_operation.rb +30 -0
- data/lib/fog/google/requests/compute/delete_server.rb +40 -0
- data/lib/fog/google/requests/compute/get_disk.rb +31 -0
- data/lib/fog/google/requests/compute/get_firewall.rb +30 -0
- data/lib/fog/google/requests/compute/get_image.rb +30 -0
- data/lib/fog/google/requests/compute/get_machine_type.rb +30 -0
- data/lib/fog/google/requests/compute/get_network.rb +30 -0
- data/lib/fog/google/requests/compute/get_server.rb +31 -0
- data/lib/fog/google/requests/compute/get_zone.rb +30 -0
- data/lib/fog/google/requests/compute/insert_disk.rb +35 -0
- data/lib/fog/google/requests/compute/insert_firewall.rb +37 -0
- data/lib/fog/google/requests/compute/insert_image.rb +38 -0
- data/lib/fog/google/requests/compute/insert_network.rb +34 -0
- data/lib/fog/google/requests/compute/insert_server.rb +49 -0
- data/lib/fog/google/requests/compute/list_disks.rb +30 -0
- data/lib/fog/google/requests/compute/list_firewalls.rb +29 -0
- data/lib/fog/google/requests/compute/list_global_operations.rb +28 -0
- data/lib/fog/google/requests/compute/list_images.rb +29 -0
- data/lib/fog/google/requests/compute/list_machine_types.rb +29 -0
- data/lib/fog/google/requests/compute/list_networks.rb +29 -0
- data/lib/fog/google/requests/compute/list_servers.rb +30 -0
- data/lib/fog/google/requests/compute/list_zone_operations.rb +28 -0
- data/lib/fog/google/requests/compute/list_zones.rb +29 -0
- data/lib/fog/google/requests/compute/set_metadata.rb +36 -0
- data/lib/fog/hp.rb +1 -1
- data/lib/fog/hp/storage.rb +1 -1
- data/lib/fog/internet_archive/models/storage/ia_attributes.rb +1 -1
- data/lib/fog/internet_archive/requests/storage/head_object.rb +1 -2
- data/lib/fog/internet_archive/requests/storage/list_multipart_uploads.rb +5 -6
- data/lib/fog/openstack.rb +29 -1
- data/lib/fog/openstack/CHANGELOG.md +1 -1
- data/lib/fog/openstack/compute.rb +3 -2
- data/lib/fog/openstack/identity.rb +1 -5
- data/lib/fog/openstack/image.rb +8 -9
- data/lib/fog/openstack/models/compute/server.rb +24 -0
- data/lib/fog/openstack/network.rb +7 -28
- data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
- data/lib/fog/openstack/requests/compute/attach_volume.rb +11 -6
- 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 +1 -1
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_volume.rb +15 -14
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_volume.rb +9 -2
- data/lib/fog/openstack/requests/compute/detach_volume.rb +7 -2
- data/lib/fog/openstack/requests/compute/get_server_volumes.rb +10 -0
- data/lib/fog/openstack/requests/compute/get_volume_details.rb +7 -16
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
- data/lib/fog/openstack/requests/compute/list_volumes.rb +4 -26
- data/lib/fog/openstack/requests/compute/revert_resize_server.rb +2 -2
- 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/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_quota.rb +31 -0
- data/lib/fog/openstack/requests/volume/get_quota_defaults.rb +31 -0
- data/lib/fog/openstack/requests/volume/update_quota.rb +32 -0
- data/lib/fog/openstack/volume.rb +11 -7
- data/lib/fog/rackspace.rb +11 -5
- data/lib/fog/rackspace/block_storage.rb +2 -1
- data/lib/fog/rackspace/cdn.rb +15 -15
- data/lib/fog/rackspace/compute.rb +2 -2
- data/lib/fog/rackspace/compute_v2.rb +8 -5
- data/lib/fog/rackspace/databases.rb +2 -1
- data/lib/fog/rackspace/dns.rb +2 -1
- data/lib/fog/rackspace/errors.rb +27 -0
- data/lib/fog/rackspace/load_balancers.rb +2 -1
- data/lib/fog/rackspace/mock_data.rb +5 -6
- data/lib/fog/rackspace/models/block_storage/snapshot.rb +8 -8
- data/lib/fog/rackspace/models/block_storage/snapshots.rb +8 -8
- data/lib/fog/rackspace/models/block_storage/volume.rb +16 -16
- data/lib/fog/rackspace/models/block_storage/volume_types.rb +8 -8
- data/lib/fog/rackspace/models/block_storage/volumes.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/attachment.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/attachments.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/image.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/images.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/metadata.rb +12 -12
- data/lib/fog/rackspace/models/compute_v2/metadatum.rb +8 -8
- data/lib/fog/rackspace/models/compute_v2/server.rb +94 -55
- data/lib/fog/rackspace/models/compute_v2/servers.rb +12 -12
- data/lib/fog/rackspace/models/dns/records.rb +1 -1
- data/lib/fog/rackspace/models/dns/zones.rb +1 -1
- data/lib/fog/rackspace/models/storage/account.rb +8 -8
- data/lib/fog/rackspace/models/storage/directories.rb +8 -8
- data/lib/fog/rackspace/models/storage/directory.rb +32 -32
- data/lib/fog/rackspace/models/storage/file.rb +36 -36
- data/lib/fog/rackspace/models/storage/files.rb +20 -20
- data/lib/fog/rackspace/requests/block_storage/create_snapshot.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/create_volume.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/delete_snapshot.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/delete_volume.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/get_snapshot.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/get_volume.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/get_volume_type.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/list_snapshots.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/list_volume_types.rb +4 -4
- data/lib/fog/rackspace/requests/block_storage/list_volumes.rb +4 -4
- data/lib/fog/rackspace/requests/cdn/delete_object.rb +4 -4
- data/lib/fog/rackspace/requests/cdn/get_containers.rb +4 -4
- data/lib/fog/rackspace/requests/cdn/head_container.rb +4 -4
- data/lib/fog/rackspace/requests/cdn/post_container.rb +4 -4
- data/lib/fog/rackspace/requests/cdn/put_container.rb +4 -4
- data/lib/fog/rackspace/requests/compute/delete_image.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/attach_volume.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/change_server_password.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/create_image.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +11 -5
- data/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +5 -4
- data/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/get_attachment.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/get_flavor.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/get_image.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/get_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_attachments.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_flavors.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_images.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/reboot_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/rescue_server.rb +43 -0
- data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/unrescue_server.rb +40 -0
- data/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +4 -4
- data/lib/fog/rackspace/requests/compute_v2/update_server.rb +4 -4
- data/lib/fog/rackspace/requests/storage/copy_object.rb +4 -4
- data/lib/fog/rackspace/requests/storage/delete_container.rb +4 -4
- data/lib/fog/rackspace/requests/storage/delete_object.rb +4 -4
- data/lib/fog/rackspace/requests/storage/get_container.rb +4 -4
- data/lib/fog/rackspace/requests/storage/get_containers.rb +4 -4
- data/lib/fog/rackspace/requests/storage/get_object.rb +4 -4
- data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +4 -4
- data/lib/fog/rackspace/requests/storage/head_container.rb +4 -4
- data/lib/fog/rackspace/requests/storage/head_containers.rb +4 -4
- data/lib/fog/rackspace/requests/storage/head_object.rb +4 -4
- data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +4 -4
- data/lib/fog/rackspace/requests/storage/put_container.rb +4 -4
- data/lib/fog/rackspace/requests/storage/put_object.rb +4 -4
- data/lib/fog/rackspace/requests/storage/put_object_manifest.rb +4 -4
- data/lib/fog/rackspace/service.rb +1 -1
- data/lib/fog/rackspace/storage.rb +12 -6
- data/lib/fog/riakcs.rb +3 -3
- 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 -1
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vsphere/compute.rb +21 -14
- data/lib/fog/vsphere/models/compute/networks.rb +2 -2
- data/lib/fog/vsphere/models/compute/server.rb +10 -0
- data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +1 -1
- data/lib/fog/vsphere/requests/compute/get_template.rb +16 -0
- data/lib/fog/vsphere/requests/compute/list_datacenters.rb +1 -1
- data/lib/fog/vsphere/requests/compute/list_templates.rb +49 -0
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +9 -6
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +41 -27
- data/lib/fog/xenserver/CHANGELOG.md +1 -1
- data/lib/fog/xenserver/models/compute/network.rb +2 -2
- data/lib/tasks/changelog_task.rb +2 -1
- data/tests/aws/models/storage/directory_tests.rb +41 -5
- data/tests/aws/models/storage/file_tests.rb +1 -2
- data/tests/aws/models/storage/files_tests.rb +6 -4
- data/tests/aws/models/storage/url_tests.rb +7 -5
- data/tests/aws/models/storage/version_tests.rb +2 -2
- data/tests/aws/models/storage/versions_tests.rb +5 -5
- data/tests/aws/requests/iam/user_tests.rb +10 -8
- data/tests/aws/requests/storage/multipart_upload_tests.rb +1 -1
- data/tests/aws/requests/storage/object_tests.rb +15 -13
- data/tests/brightbox/compute/image_selector_tests.rb +103 -0
- data/tests/cloudstack/compute/models/disk_offering_tests.rb +5 -0
- data/tests/cloudstack/compute/models/snapshot_tests.rb +5 -20
- data/tests/cloudstack/requests/disk_offering_tests.rb +3 -3
- data/tests/cloudstack/requests/os_type_tests.rb +2 -3
- data/tests/compute/helper.rb +9 -0
- data/tests/core/json_tests.rb +62 -0
- data/tests/dynect/requests/dns/dns_tests.rb +0 -3
- data/tests/google/models/compute/server_tests.rb +24 -0
- data/tests/google/requests/compute/disk_tests.rb +88 -0
- data/tests/google/requests/compute/firewall_tests.rb +85 -0
- data/tests/google/requests/compute/image_tests.rb +80 -0
- data/tests/google/requests/compute/network_tests.rb +74 -0
- data/tests/google/requests/compute/operation_tests.rb +19 -0
- data/tests/google/requests/compute/server_tests.rb +84 -0
- data/tests/google/requests/compute/zone_tests.rb +46 -0
- data/tests/helpers/mock_helper.rb +4 -0
- data/tests/openstack/models/compute/server_tests.rb +91 -1
- data/tests/openstack/requests/compute/volume_tests.rb +11 -9
- data/tests/openstack/requests/volume/quota_tests.rb +51 -0
- data/tests/openstack/version_tests.rb +55 -0
- data/tests/rackspace/helper.rb +10 -0
- data/tests/rackspace/models/compute_v2/server_tests.rb +26 -1
- data/tests/rackspace/requests/compute/image_tests.rb +1 -1
- data/tests/rackspace/requests/compute_v2/image_tests.rb +2 -2
- data/tests/rackspace/requests/compute_v2/server_tests.rb +13 -0
- data/tests/rackspace/requests/dns/dns_tests.rb +1 -1
- data/tests/rackspace/requests/dns/records_tests.rb +3 -3
- data/tests/vsphere/requests/compute/vm_clone_tests.rb +10 -0
- metadata +109 -747
@@ -52,10 +52,10 @@ module Fog
|
|
52
52
|
# @param force [Boolean] Set to true to force service to create snapshot
|
53
53
|
# @raise [Fog::Rackspace::BlockStorage::IdentifierTaken] if the snapshot has been previously saved.
|
54
54
|
# @return [Boolean] returns true if snapshot is being created
|
55
|
-
# @raise [Fog::Rackspace::
|
56
|
-
# @raise [Fog::Rackspace::
|
57
|
-
# @raise [Fog::Rackspace::
|
58
|
-
# @raise [Fog::Rackspace::
|
55
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
56
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
57
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
58
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
59
59
|
# @note A snapshot object cannot be updated
|
60
60
|
# @note All writes to the volume should be flushed before creating the snapshot, either by un-mounting any file systems on the volume or by detaching the volume.
|
61
61
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html
|
@@ -73,10 +73,10 @@ module Fog
|
|
73
73
|
|
74
74
|
# Destroys snapshot
|
75
75
|
# @return [Boolean] returns true if snapshot was deleted
|
76
|
-
# @raise [Fog::Rackspace::
|
77
|
-
# @raise [Fog::Rackspace::
|
78
|
-
# @raise [Fog::Rackspace::
|
79
|
-
# @raise [Fog::Rackspace::
|
76
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
77
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
78
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
79
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
80
80
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/DELETE_deleteSnapshot__v1__tenant_id__snapshots.html
|
81
81
|
def destroy
|
82
82
|
requires :identity
|
@@ -10,10 +10,10 @@ module Fog
|
|
10
10
|
|
11
11
|
# Returns list of snapshots
|
12
12
|
# @return [Fog::Rackspace::BlockStorage::Snapshots] Retrieves a snapshots
|
13
|
-
# @raise [Fog::Rackspace::
|
14
|
-
# @raise [Fog::Rackspace::
|
15
|
-
# @raise [Fog::Rackspace::
|
16
|
-
# @raise [Fog::Rackspace::
|
13
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
14
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
15
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
16
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
17
17
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getSnapshotsSimple__v1__tenant_id__snapshots.html
|
18
18
|
def all
|
19
19
|
data = service.list_snapshots.body['snapshots']
|
@@ -23,10 +23,10 @@ module Fog
|
|
23
23
|
# Retrieves snapshot
|
24
24
|
# @param [String] snapshot_id for snapshot to be returned
|
25
25
|
# @return [Fog::Rackspace::BlockStorage::Volume]
|
26
|
-
# @raise [Fog::Rackspace::
|
27
|
-
# @raise [Fog::Rackspace::
|
28
|
-
# @raise [Fog::Rackspace::
|
29
|
-
# @raise [Fog::Rackspace::
|
26
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
27
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
28
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
29
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
30
30
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getSnapshot__v1__tenant_id__snapshots.html
|
31
31
|
def get(snapshot_id)
|
32
32
|
data = service.get_snapshot(snapshot_id).body['snapshot']
|
@@ -62,10 +62,10 @@ module Fog
|
|
62
62
|
|
63
63
|
# Returns a list of snapshots associated with the volume
|
64
64
|
# @return [Fog::Rackspace::BlockStorage::Snapshots]
|
65
|
-
# @raise [Fog::Rackspace::
|
66
|
-
# @raise [Fog::Rackspace::
|
67
|
-
# @raise [Fog::Rackspace::
|
68
|
-
# @raise [Fog::Rackspace::
|
65
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
66
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
67
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
68
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
69
69
|
def snapshots
|
70
70
|
service.snapshots.select { |s| s.volume_id == identity }
|
71
71
|
end
|
@@ -77,10 +77,10 @@ module Fog
|
|
77
77
|
# @option options [String] :display_description of snapshot
|
78
78
|
# @option options [Boolean] :force - If set to true, snapshot will be taken even if volume is still mounted.
|
79
79
|
# @return [Fog::Rackspace::BlockStorage::Snapshot]
|
80
|
-
# @raise [Fog::Rackspace::
|
81
|
-
# @raise [Fog::Rackspace::
|
82
|
-
# @raise [Fog::Rackspace::
|
83
|
-
# @raise [Fog::Rackspace::
|
80
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
81
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
82
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
83
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
84
84
|
# @note All writes to the volume should be flushed before creating the snapshot, either by un-mounting any file systems on the volume or by detaching the volume.
|
85
85
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html
|
86
86
|
def create_snapshot(options={})
|
@@ -91,10 +91,10 @@ module Fog
|
|
91
91
|
# Creates volume
|
92
92
|
# @raise [Fog::Rackspace::BlockStorage::IdentifierTaken] if the volume has been previously saved.
|
93
93
|
# @return [Boolean] returns true if volume was successfully created
|
94
|
-
# @raise [Fog::Rackspace::
|
95
|
-
# @raise [Fog::Rackspace::
|
96
|
-
# @raise [Fog::Rackspace::
|
97
|
-
# @raise [Fog::Rackspace::
|
94
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
95
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
96
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
97
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
98
98
|
# @note A volume object cannot be updated
|
99
99
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createVolume__v1__tenant_id__volumes.html
|
100
100
|
def save
|
@@ -112,10 +112,10 @@ module Fog
|
|
112
112
|
|
113
113
|
# Destroys Volume
|
114
114
|
# @return [Boolean] returns true if volume was deleted
|
115
|
-
# @raise [Fog::Rackspace::
|
116
|
-
# @raise [Fog::Rackspace::
|
117
|
-
# @raise [Fog::Rackspace::
|
118
|
-
# @raise [Fog::Rackspace::
|
115
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
116
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
117
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
118
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
119
119
|
# @note You cannot delete a volume until all of its dependent snaphosts have been deleted.
|
120
120
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/DELETE_deleteVolume__v1__tenant_id__volumes.html
|
121
121
|
def destroy
|
@@ -10,10 +10,10 @@ module Fog
|
|
10
10
|
|
11
11
|
# Returns list of volume types
|
12
12
|
# @return [Fog::Rackspace::BlockStorage::VolumeTypes] Retrieves a list volume types.
|
13
|
-
# @raise [Fog::Rackspace::
|
14
|
-
# @raise [Fog::Rackspace::
|
15
|
-
# @raise [Fog::Rackspace::
|
16
|
-
# @raise [Fog::Rackspace::
|
13
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
14
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
15
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
16
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
17
17
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumeTypes__v1__tenant_id__types.html
|
18
18
|
def all
|
19
19
|
data = service.list_volume_types.body['volume_types']
|
@@ -23,10 +23,10 @@ module Fog
|
|
23
23
|
# Retrieves volume type
|
24
24
|
# @param [String] volume_type_id for volume_type to be returned
|
25
25
|
# @return [Fog::Rackspace::BlockStorage::VolumeType]
|
26
|
-
# @raise [Fog::Rackspace::
|
27
|
-
# @raise [Fog::Rackspace::
|
28
|
-
# @raise [Fog::Rackspace::
|
29
|
-
# @raise [Fog::Rackspace::
|
26
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
27
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
28
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
29
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
30
30
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumeType__v1__tenant_id__types.html
|
31
31
|
def get(volume_type_id)
|
32
32
|
data = service.get_volume_type(volume_type_id).body['volume_type']
|
@@ -10,10 +10,10 @@ module Fog
|
|
10
10
|
|
11
11
|
# Returns list of volumes
|
12
12
|
# @return [Fog::Rackspace::BlockStorage::Volumes] Retrieves a volumes
|
13
|
-
# @raise [Fog::Rackspace::
|
14
|
-
# @raise [Fog::Rackspace::
|
15
|
-
# @raise [Fog::Rackspace::
|
16
|
-
# @raise [Fog::Rackspace::
|
13
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
14
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
15
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
16
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
17
17
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumesSimple__v1__tenant_id__volumes.html
|
18
18
|
def all
|
19
19
|
data = service.list_volumes.body['volumes']
|
@@ -23,10 +23,10 @@ module Fog
|
|
23
23
|
# Retrieves volume
|
24
24
|
# @param [String] volume_id for snapshot to be returned
|
25
25
|
# @return [Fog::Rackspace::BlockStorage::Volume]
|
26
|
-
# @raise [Fog::Rackspace::
|
27
|
-
# @raise [Fog::Rackspace::
|
28
|
-
# @raise [Fog::Rackspace::
|
29
|
-
# @raise [Fog::Rackspace::
|
26
|
+
# @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404
|
27
|
+
# @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
|
28
|
+
# @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
|
29
|
+
# @raise [Fog::Rackspace::BlockStorage::ServiceError]
|
30
30
|
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolume__v1__tenant_id__volumes.html
|
31
31
|
def get(volume_id)
|
32
32
|
data = service.get_volume(volume_id).body['volume']
|
@@ -26,10 +26,10 @@ module Fog
|
|
26
26
|
# Attaches volume to volume to server.
|
27
27
|
# Requires :server_id, :volume_id, and device to be populated
|
28
28
|
# @return [Boolean] true if volume is attaching
|
29
|
-
# @raise [Fog::
|
30
|
-
# @raise [Fog::
|
31
|
-
# @raise [Fog::
|
32
|
-
# @raise [Fog::
|
29
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
30
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
31
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
32
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
33
33
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Attach_Volume_to_Server.html
|
34
34
|
def save
|
35
35
|
requires :server_id, :volume_id, :device
|
@@ -40,10 +40,10 @@ module Fog
|
|
40
40
|
|
41
41
|
# Detaches volume from server
|
42
42
|
# @return [Boolean] true if volume is detaching
|
43
|
-
# @raise [Fog::
|
44
|
-
# @raise [Fog::
|
45
|
-
# @raise [Fog::
|
46
|
-
# @raise [Fog::
|
43
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
44
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
45
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
46
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
47
47
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Volume_Attachment.html
|
48
48
|
def destroy
|
49
49
|
requires :server_id, :volume_id
|
@@ -12,10 +12,10 @@ module Fog
|
|
12
12
|
|
13
13
|
# Retrieves attachments belonging to server
|
14
14
|
# @return [Fog::Compute::RackspaceV2::Attachments] list of attachments
|
15
|
-
# @raise [Fog::
|
16
|
-
# @raise [Fog::
|
17
|
-
# @raise [Fog::
|
18
|
-
# @raise [Fog::
|
15
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
16
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
17
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
18
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
19
19
|
# @see Server#attachments
|
20
20
|
def all
|
21
21
|
data = service.list_attachments(server.id).body['volumeAttachments']
|
@@ -25,10 +25,10 @@ module Fog
|
|
25
25
|
# Retrieves attachment belonging to server
|
26
26
|
# @param [String] volume_id
|
27
27
|
# @return [Fog::Compute::RackspaceV2::Attachment] attachment for volume id
|
28
|
-
# @raise [Fog::
|
29
|
-
# @raise [Fog::
|
30
|
-
# @raise [Fog::
|
31
|
-
# @raise [Fog::
|
28
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
29
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
30
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
31
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
32
32
|
def get(volume_id)
|
33
33
|
data = service.get_attachment(server.id, volume_id).body['volumeAttachment']
|
34
34
|
data && new(data)
|
@@ -10,10 +10,10 @@ module Fog
|
|
10
10
|
|
11
11
|
# Retrieves information for all available flavors
|
12
12
|
# @return [Fog::Compute::RackspaceV2::Flavors] list of flavors
|
13
|
-
# @raise [Fog::
|
14
|
-
# @raise [Fog::
|
15
|
-
# @raise [Fog::
|
16
|
-
# @raise [Fog::
|
13
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
14
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
15
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
16
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
17
17
|
# @note Fog's currentl implementation only returns 1000 flavors.
|
18
18
|
# @note Fog does not retrieve all flavor details. Please use #get to retrieve all details for a specific flavor.
|
19
19
|
def all
|
@@ -24,10 +24,10 @@ module Fog
|
|
24
24
|
# Retrieve image
|
25
25
|
# @param [String] flavor_id id of flavor
|
26
26
|
# @return [Fog::Compute::RackspaceV2::Flavor] flavor
|
27
|
-
# @raise [Fog::
|
28
|
-
# @raise [Fog::
|
29
|
-
# @raise [Fog::
|
30
|
-
# @raise [Fog::
|
27
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
28
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
29
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
30
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
31
31
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Flavor_Details-d1e4317.html
|
32
32
|
def get(flavor_id)
|
33
33
|
data = service.get_flavor(flavor_id).body['flavor']
|
@@ -89,10 +89,10 @@ module Fog
|
|
89
89
|
# @param [String] ready_state By default state is ACTIVE
|
90
90
|
# @param [Array,String] error_states By default state is ERROR
|
91
91
|
# @return [Boolean] returns true if server is in a ready state
|
92
|
-
# @raise [Fog::
|
93
|
-
# @raise [Fog::
|
94
|
-
# @raise [Fog::
|
95
|
-
# @raise [Fog::
|
92
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
93
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
94
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
95
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
96
96
|
# @raise [Fog::Compute::RackspaceV2::InvalidImageStateException] if server state is an error state
|
97
97
|
def ready?(ready_state = ACTIVE, error_states=[ERROR])
|
98
98
|
if error_states
|
@@ -104,10 +104,10 @@ module Fog
|
|
104
104
|
|
105
105
|
|
106
106
|
# Destroy image
|
107
|
-
# @raise [Fog::
|
108
|
-
# @raise [Fog::
|
109
|
-
# @raise [Fog::
|
110
|
-
# @raise [Fog::
|
107
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
108
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
109
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
110
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
111
111
|
def destroy
|
112
112
|
requires :identity
|
113
113
|
service.delete_image(identity)
|
@@ -10,10 +10,10 @@ module Fog
|
|
10
10
|
|
11
11
|
# Returns list of images
|
12
12
|
# @return [Fog::Compute::RackspaceV2::Images] Retrieves a list images.
|
13
|
-
# @raise [Fog::
|
14
|
-
# @raise [Fog::
|
15
|
-
# @raise [Fog::
|
16
|
-
# @raise [Fog::
|
13
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
14
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
15
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
16
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
17
17
|
# @note Fog's current implementation only returns 1000 images.
|
18
18
|
# @note Fog does not retrieve all image details. Please use get to retrieve all details for a specific image.
|
19
19
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Images-d1e4435.html
|
@@ -25,10 +25,10 @@ module Fog
|
|
25
25
|
# Retrieve image
|
26
26
|
# @param [String] image_id id of image
|
27
27
|
# @return [Fog::Compute::RackspaceV2:Image] image
|
28
|
-
# @raise [Fog::
|
29
|
-
# @raise [Fog::
|
30
|
-
# @raise [Fog::
|
31
|
-
# @raise [Fog::
|
28
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
29
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
30
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
31
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
32
32
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Image_Details-d1e4848.html
|
33
33
|
def get(image_id)
|
34
34
|
data = service.get_image(image_id).body['image']
|
@@ -16,10 +16,10 @@ module Fog
|
|
16
16
|
|
17
17
|
# Retrieves all of the metadata from server
|
18
18
|
# @return [Fog::Compute::RackspaceV2::Metadatum] list of metadatum
|
19
|
-
# @raise [Fog::
|
20
|
-
# @raise [Fog::
|
21
|
-
# @raise [Fog::
|
22
|
-
# @raise [Fog::
|
19
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
20
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
21
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
22
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
23
23
|
def all
|
24
24
|
requires :parent
|
25
25
|
return unless parent.identity
|
@@ -30,10 +30,10 @@ module Fog
|
|
30
30
|
# Retrieves specific metadata from server
|
31
31
|
# @param [String] key for metadatum
|
32
32
|
# @return [Fog::Compute::RackspaceV2::Metadatum] metadatum
|
33
|
-
# @raise [Fog::
|
34
|
-
# @raise [Fog::
|
35
|
-
# @raise [Fog::
|
36
|
-
# @raise [Fog::
|
33
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
34
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
35
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
36
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
37
37
|
def get(key)
|
38
38
|
requires :parent
|
39
39
|
data = service.get_metadata_item(collection_name, parent.id, key).body["meta"]
|
@@ -73,10 +73,10 @@ module Fog
|
|
73
73
|
end
|
74
74
|
|
75
75
|
# Saves the current metadata on server
|
76
|
-
# @raise [Fog::
|
77
|
-
# @raise [Fog::
|
78
|
-
# @raise [Fog::
|
79
|
-
# @raise [Fog::
|
76
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
77
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
78
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
79
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
80
80
|
def save
|
81
81
|
requires :parent
|
82
82
|
service.set_metadata(collection_name, parent.id, to_hash)
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
|
14
14
|
# Remove metadatum from server
|
15
15
|
# @return [Boolean] return true if metadatum is deleting
|
16
|
-
# @raise [Fog::
|
17
|
-
# @raise [Fog::
|
18
|
-
# @raise [Fog::
|
19
|
-
# @raise [Fog::
|
16
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
17
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
18
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
19
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
20
20
|
def destroy
|
21
21
|
requires :identity
|
22
22
|
connection.delete_metadata_item(collection_name, parent.id, key)
|
@@ -25,10 +25,10 @@ module Fog
|
|
25
25
|
|
26
26
|
# Save metadatum on server
|
27
27
|
# @return [Boolean] return true if metadatum is saving
|
28
|
-
# @raise [Fog::
|
29
|
-
# @raise [Fog::
|
30
|
-
# @raise [Fog::
|
31
|
-
# @raise [Fog::
|
28
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
29
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
30
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
31
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
32
32
|
def save
|
33
33
|
requires :identity, :value
|
34
34
|
connection.set_metadata_item(collection_name, parent.id, key, value)
|
@@ -180,10 +180,10 @@ module Fog
|
|
180
180
|
# * requires attributes: service:, :name, :image_id, and :flavor_id
|
181
181
|
# * optional attributes :disk_config, :metadata, :personality
|
182
182
|
# @return [Boolean] returns true if server is being created
|
183
|
-
# @raise [Fog::
|
184
|
-
# @raise [Fog::
|
185
|
-
# @raise [Fog::
|
186
|
-
# @raise [Fog::
|
183
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
184
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
185
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
186
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
187
187
|
# @note You should use servers.create to create servers instead calling this method directly
|
188
188
|
# @see Servers#create
|
189
189
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html
|
@@ -194,6 +194,7 @@ module Fog
|
|
194
194
|
def create(options)
|
195
195
|
requires :name, :image_id, :flavor_id
|
196
196
|
|
197
|
+
options[:networks] ||= attributes[:networks]
|
197
198
|
options[:disk_config] = disk_config unless disk_config.nil?
|
198
199
|
options[:metadata] = metadata.to_hash unless @metadata.nil?
|
199
200
|
options[:personality] = personality unless personality.nil?
|
@@ -211,10 +212,10 @@ module Fog
|
|
211
212
|
# This will update :name, :accessIPv4, and :accessIPv6 attributes.
|
212
213
|
# @note If you edit the server name, the server host name does not change. Also, server names are not guaranteed to be unique.
|
213
214
|
# @return true if update has started updating
|
214
|
-
# @raise [Fog::
|
215
|
-
# @raise [Fog::
|
216
|
-
# @raise [Fog::
|
217
|
-
# @raise [Fog::
|
215
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
216
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
217
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
218
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
218
219
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ServerUpdate.html
|
219
220
|
#
|
220
221
|
# * State Transition
|
@@ -234,10 +235,10 @@ module Fog
|
|
234
235
|
|
235
236
|
# Destroy the server
|
236
237
|
# @return [Boolean] returns true if server has started deleting
|
237
|
-
# @raise [Fog::
|
238
|
-
# @raise [Fog::
|
239
|
-
# @raise [Fog::
|
240
|
-
# @raise [Fog::
|
238
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
239
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
240
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
241
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
241
242
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Server-d1e2883.html
|
242
243
|
#
|
243
244
|
# * Status Transition:
|
@@ -251,10 +252,10 @@ module Fog
|
|
251
252
|
|
252
253
|
# Server flavor
|
253
254
|
# @return [Fog::Compute::RackspaceV2::Flavor] server flavor
|
254
|
-
# @raise [Fog::
|
255
|
-
# @raise [Fog::
|
256
|
-
# @raise [Fog::
|
257
|
-
# @raise [Fog::
|
255
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
256
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
257
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
258
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
258
259
|
def flavor
|
259
260
|
requires :flavor_id
|
260
261
|
@flavor ||= service.flavors.get(flavor_id)
|
@@ -262,10 +263,10 @@ module Fog
|
|
262
263
|
|
263
264
|
# Server image
|
264
265
|
# @return [Fog::Compute::RackspaceV2::Image] server image
|
265
|
-
# @raise [Fog::
|
266
|
-
# @raise [Fog::
|
267
|
-
# @raise [Fog::
|
268
|
-
# @raise [Fog::
|
266
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
267
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
268
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
269
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
269
270
|
def image
|
270
271
|
requires :image_id
|
271
272
|
@image ||= service.images.get(image_id)
|
@@ -276,10 +277,10 @@ module Fog
|
|
276
277
|
# @param options [Hash]:
|
277
278
|
# @option options [Hash<String, String>] metadata hash of containing metadata key value pairs.
|
278
279
|
# @return [Fog::ComputeRackspaceV2::Image] image being created
|
279
|
-
# @raise [Fog::
|
280
|
-
# @raise [Fog::
|
281
|
-
# @raise [Fog::
|
282
|
-
# @raise [Fog::
|
280
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
281
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
282
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
283
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
283
284
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Create_Image-d1e4655.html
|
284
285
|
#
|
285
286
|
# * State Transition:
|
@@ -298,10 +299,10 @@ module Fog
|
|
298
299
|
|
299
300
|
# Attached Cloud Block Volumes
|
300
301
|
# @return [Fog::Compute::RackspaceV2::Attachments] attached Cloud Block Volumes
|
301
|
-
# @raise [Fog::
|
302
|
-
# @raise [Fog::
|
303
|
-
# @raise [Fog::
|
304
|
-
# @raise [Fog::
|
302
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
303
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
304
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
305
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
305
306
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Volume_Attachments.html
|
306
307
|
def attachments
|
307
308
|
@attachments ||= begin
|
@@ -316,10 +317,10 @@ module Fog
|
|
316
317
|
# @param [Fog::Rackspace::BlockStorage::Volume, String] volume object or the volume id of volume to mount
|
317
318
|
# @param [String] device name of the device /dev/xvd[a-p] (optional)
|
318
319
|
# @return [Fog::Compute::RackspaceV2::Attachment] resulting attachment object
|
319
|
-
# @raise [Fog::
|
320
|
-
# @raise [Fog::
|
321
|
-
# @raise [Fog::
|
322
|
-
# @raise [Fog::
|
320
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
321
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
322
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
323
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
323
324
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Attach_Volume_to_Server.html
|
324
325
|
def attach_volume(volume, device=nil)
|
325
326
|
requires :identity
|
@@ -355,10 +356,10 @@ module Fog
|
|
355
356
|
# Reboot server
|
356
357
|
# @param [String<SOFT, HARD>] type 'SOFT' will do a soft reboot. 'HARD' will do a hard reboot.
|
357
358
|
# @return [Boolean] returns true if server is being rebooted
|
358
|
-
# @raise [Fog::
|
359
|
-
# @raise [Fog::
|
360
|
-
# @raise [Fog::
|
361
|
-
# @raise [Fog::
|
359
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
360
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
361
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
362
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
362
363
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Reboot_Server-d1e3371.html
|
363
364
|
#
|
364
365
|
# * State transition:
|
@@ -375,10 +376,10 @@ module Fog
|
|
375
376
|
# Rebuild removes all data on the server and replaces it with the specified image. The id and all IP addresses remain the same.
|
376
377
|
# @param [String] image_id image to use for rebuild
|
377
378
|
# @return [Boolean] returns true if rebuild is in process
|
378
|
-
# @raise [Fog::
|
379
|
-
# @raise [Fog::
|
380
|
-
# @raise [Fog::
|
381
|
-
# @raise [Fog::
|
379
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
380
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
381
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
382
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
382
383
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Rebuild_Server-d1e3538.html
|
383
384
|
#
|
384
385
|
# * Status Transition:
|
@@ -394,10 +395,10 @@ module Fog
|
|
394
395
|
# Resize existing server to a different flavor, in essence, scaling the server up or down. The original server is saved for a period of time to allow rollback if there is a problem. All resizes should be tested and explicitly confirmed, at which time the original server is removed. All resizes are automatically confirmed after 24 hours if they are not confirmed or reverted.
|
395
396
|
# @param [String] flavor_id to resize
|
396
397
|
# @return [Boolean] returns true if resize is in process
|
397
|
-
# @raise [Fog::
|
398
|
-
# @raise [Fog::
|
399
|
-
# @raise [Fog::
|
400
|
-
# @raise [Fog::
|
398
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
399
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
400
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
401
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
401
402
|
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
402
403
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Resize_Server-d1e3707.html
|
403
404
|
# @see #confirm_resize
|
@@ -415,10 +416,10 @@ module Fog
|
|
415
416
|
|
416
417
|
# Confirms server resize operation
|
417
418
|
# @return [Boolean] returns true if resize has been confirmed
|
418
|
-
# @raise [Fog::
|
419
|
-
# @raise [Fog::
|
420
|
-
# @raise [Fog::
|
421
|
-
# @raise [Fog::
|
419
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
420
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
421
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
422
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
422
423
|
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
423
424
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Confirm_Resized_Server-d1e3868.html
|
424
425
|
# @see #resize
|
@@ -434,10 +435,10 @@ module Fog
|
|
434
435
|
|
435
436
|
# Reverts server resize operation
|
436
437
|
# @return [Boolean] returns true if resize is being reverted
|
437
|
-
# @raise [Fog::
|
438
|
-
# @raise [Fog::
|
439
|
-
# @raise [Fog::
|
440
|
-
# @raise [Fog::
|
438
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
439
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
440
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
441
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
441
442
|
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
442
443
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Revert_Resized_Server-d1e4024.html
|
443
444
|
# @see #resize
|
@@ -451,13 +452,51 @@ module Fog
|
|
451
452
|
true
|
452
453
|
end
|
453
454
|
|
454
|
-
#
|
455
|
-
# @
|
456
|
-
# @return [Boolean] returns true if operation was scheduled
|
455
|
+
# Place existing server into rescue mode, allowing for offline editing of configuration. The original server's disk is attached to a new instance of the same base image for a period of time to facilitate working within rescue mode. The original server will be automatically restored after 90 minutes.
|
456
|
+
# @return [Boolean] returns true if call to put server in rescue mode reports success
|
457
457
|
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
458
458
|
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
459
459
|
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
460
460
|
# @raise [Fog::Rackspace::Errors::ServiceError]
|
461
|
+
# @note Rescue mode is only guaranteed to be active for 90 minutes.
|
462
|
+
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/rescue_mode.html
|
463
|
+
# @see #unrescue
|
464
|
+
#
|
465
|
+
# * Status Transition:
|
466
|
+
# * ACTIVE -> PREP_RESCUE -> RESCUE
|
467
|
+
def rescue
|
468
|
+
requires :identity
|
469
|
+
data = service.rescue_server(identity)
|
470
|
+
merge_attributes(data.body)
|
471
|
+
true
|
472
|
+
end
|
473
|
+
|
474
|
+
# Remove existing server from rescue mode.
|
475
|
+
# @return [Boolean] returns true if call to remove server from rescue mode reports success
|
476
|
+
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
477
|
+
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
478
|
+
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
479
|
+
# @raise [Fog::Rackspace::Errors::ServiceError]
|
480
|
+
# @note Rescue mode is only guaranteed to be active for 90 minutes.
|
481
|
+
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/exit_rescue_mode.html
|
482
|
+
# @see #rescue
|
483
|
+
#
|
484
|
+
# * Status Transition:
|
485
|
+
# * PREP_UNRESCUE -> ACTIVE
|
486
|
+
def unrescue
|
487
|
+
requires :identity
|
488
|
+
service.unrescue_server(identity)
|
489
|
+
self.state = ACTIVE
|
490
|
+
true
|
491
|
+
end
|
492
|
+
|
493
|
+
# Change admin password
|
494
|
+
# @param [String] password The administrator password.
|
495
|
+
# @return [Boolean] returns true if operation was scheduled
|
496
|
+
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
497
|
+
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
498
|
+
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
499
|
+
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
461
500
|
# @note Though Rackspace does not enforce complexity requirements for the password, the operating system might. If the password is not complex enough, the server might enter an ERROR state.
|
462
501
|
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Change_Password-d1e3234.html
|
463
502
|
#
|