fog 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/changelog.txt +743 -0
- data/fog.gemspec +3 -5
- data/lib/fog/aws.rb +1 -0
- data/lib/fog/aws/credential_fetcher.rb +1 -1
- data/lib/fog/aws/data_pipeline.rb +114 -0
- data/lib/fog/aws/dynamodb.rb +1 -1
- data/lib/fog/aws/models/compute/flavors.rb +1 -1
- data/lib/fog/aws/models/compute/spot_request.rb +2 -0
- data/lib/fog/aws/models/data_pipeline/pipeline.rb +67 -0
- data/lib/fog/aws/models/data_pipeline/pipelines.rb +36 -0
- data/lib/fog/aws/parsers/cloud_watch/list_metrics.rb +1 -1
- data/lib/fog/aws/parsers/compute/describe_instances.rb +1 -1
- data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +2 -0
- data/lib/fog/aws/requests/compute/request_spot_instances.rb +1 -0
- data/lib/fog/aws/requests/data_pipeline/activate_pipeline.rb +35 -0
- data/lib/fog/aws/requests/data_pipeline/create_pipeline.rb +41 -0
- data/lib/fog/aws/requests/data_pipeline/delete_pipeline.rb +35 -0
- data/lib/fog/aws/requests/data_pipeline/describe_pipelines.rb +36 -0
- data/lib/fog/aws/requests/data_pipeline/list_pipelines.rb +36 -0
- data/lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb +72 -0
- data/lib/fog/aws/requests/rds/describe_db_instances.rb +8 -9
- data/lib/fog/aws/requests/storage/get_service.rb +1 -2
- data/lib/fog/aws/requests/storage/list_multipart_uploads.rb +3 -3
- data/lib/fog/aws/requests/storage/put_bucket_policy.rb +2 -2
- data/lib/fog/aws/storage.rb +1 -1
- data/lib/fog/bin.rb +2 -1
- data/lib/fog/bin/aws.rb +4 -0
- data/lib/fog/bin/bluebox.rb +2 -0
- data/lib/fog/bin/dreamhost.rb +31 -0
- data/lib/fog/bin/hp.rb +7 -0
- data/lib/fog/bin/internet_archive.rb +34 -0
- data/lib/fog/bin/openstack.rb +17 -2
- data/lib/fog/bluebox.rb +1 -0
- data/lib/fog/bluebox/blb.rb +85 -0
- data/lib/fog/bluebox/models/blb/lb_application.rb +32 -0
- data/lib/fog/bluebox/models/blb/lb_applications.rb +26 -0
- data/lib/fog/bluebox/models/blb/lb_backend.rb +22 -0
- data/lib/fog/bluebox/models/blb/lb_backends.rb +30 -0
- data/lib/fog/bluebox/models/blb/lb_service.rb +35 -0
- data/lib/fog/bluebox/models/blb/lb_services.rb +29 -0
- data/lib/fog/bluebox/requests/blb/add_machine_to_lb_application.rb +33 -0
- data/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb +31 -0
- data/lib/fog/bluebox/requests/blb/get_lb_application.rb +33 -0
- data/lib/fog/bluebox/requests/blb/get_lb_applications.rb +31 -0
- data/lib/fog/bluebox/requests/blb/get_lb_backend.rb +36 -0
- data/lib/fog/bluebox/requests/blb/get_lb_backends.rb +36 -0
- data/lib/fog/bluebox/requests/blb/get_lb_machine.rb +35 -0
- data/lib/fog/bluebox/requests/blb/get_lb_machines.rb +35 -0
- data/lib/fog/bluebox/requests/blb/get_lb_service.rb +36 -0
- data/lib/fog/bluebox/requests/blb/get_lb_services.rb +36 -0
- data/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb +28 -0
- data/lib/fog/bluebox/requests/blb/update_lb_backend_machine.rb +29 -0
- data/lib/fog/brightbox/compute.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +25 -0
- data/lib/fog/brightbox/requests/compute/update_server.rb +1 -0
- data/lib/fog/cdn.rb +5 -12
- data/lib/fog/compute.rb +7 -68
- data/lib/fog/core/errors.rb +5 -1
- data/lib/fog/core/scp.rb +1 -0
- data/lib/fog/core/ssh.rb +1 -0
- data/lib/fog/dns.rb +7 -27
- data/lib/fog/dreamhost.rb +11 -0
- data/lib/fog/dreamhost/dns.rb +86 -0
- data/lib/fog/dreamhost/examples/dns/getting_started.md +105 -0
- data/lib/fog/dreamhost/models/dns/record.rb +35 -0
- data/lib/fog/dreamhost/models/dns/records.rb +38 -0
- data/lib/fog/dreamhost/models/dns/zone.rb +59 -0
- data/lib/fog/dreamhost/models/dns/zones.rb +41 -0
- data/lib/fog/dreamhost/requests/dns/create_record.rb +32 -0
- data/lib/fog/dreamhost/requests/dns/delete_record.rb +31 -0
- data/lib/fog/dreamhost/requests/dns/list_records.rb +25 -0
- data/lib/fog/ecloud/models/compute/detached_disks.rb +1 -5
- data/lib/fog/ecloud/models/compute/internet_services.rb +1 -5
- data/lib/fog/ecloud/models/compute/nodes.rb +1 -5
- data/lib/fog/ecloud/models/compute/public_ips.rb +1 -5
- data/lib/fog/ecloud/models/compute/servers.rb +2 -6
- data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +1 -1
- data/lib/fog/ecloud/requests/compute/get_internet_service.rb +1 -1
- data/lib/fog/ecloud/requests/compute/get_node.rb +1 -1
- data/lib/fog/ecloud/requests/compute/get_public_ip.rb +1 -1
- data/lib/fog/ecloud/requests/compute/get_server.rb +1 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +1 -1
- data/lib/fog/glesys/compute.rb +5 -1
- data/lib/fog/glesys/models/compute/ip.rb +47 -46
- data/lib/fog/glesys/models/compute/ips.rb +95 -12
- data/lib/fog/glesys/models/compute/server.rb +66 -5
- data/lib/fog/glesys/models/compute/servers.rb +7 -1
- data/lib/fog/glesys/models/compute/template.rb +8 -16
- data/lib/fog/glesys/models/compute/templates.rb +23 -5
- data/lib/fog/glesys/requests/compute/ip_details.rb +2 -2
- data/lib/fog/glesys/requests/compute/server_details.rb +2 -2
- data/lib/fog/glesys/requests/compute/template_list.rb +2 -2
- data/lib/fog/hp.rb +56 -26
- data/lib/fog/hp/CHANGELOG.hp +113 -0
- data/lib/fog/hp/README_HP.rdoc +7 -6
- data/lib/fog/hp/block_storage.rb +169 -0
- data/lib/fog/hp/cdn.rb +29 -7
- data/lib/fog/hp/compute.rb +88 -17
- data/lib/fog/hp/models/block_storage/bootable_volumes.rb +28 -0
- data/lib/fog/hp/models/block_storage/snapshot.rb +56 -0
- data/lib/fog/hp/models/block_storage/snapshots.rb +29 -0
- data/lib/fog/hp/models/block_storage/volume.rb +102 -0
- data/lib/fog/hp/models/block_storage/volumes.rb +28 -0
- data/lib/fog/hp/models/compute/address.rb +0 -1
- data/lib/fog/hp/models/compute/image.rb +43 -4
- data/lib/fog/hp/models/compute/images.rb +0 -5
- data/lib/fog/hp/models/compute/key_pair.rb +0 -5
- data/lib/fog/hp/models/compute/meta.rb +29 -0
- data/lib/fog/hp/models/compute/metadata.rb +79 -0
- data/lib/fog/hp/models/compute/server.rb +84 -20
- data/lib/fog/hp/models/meta_parent.rb +33 -0
- data/lib/fog/hp/models/storage/directories.rb +34 -9
- data/lib/fog/hp/models/storage/directory.rb +111 -26
- data/lib/fog/hp/models/storage/file.rb +10 -0
- data/lib/fog/hp/models/storage/files.rb +8 -0
- data/lib/fog/hp/models/storage/shared_directories.rb +55 -0
- data/lib/fog/hp/models/storage/shared_directory.rb +39 -0
- data/lib/fog/hp/models/storage/shared_file.rb +67 -0
- data/lib/fog/hp/models/storage/shared_files.rb +64 -0
- data/lib/fog/hp/requests/block_storage/create_snapshot.rb +76 -0
- data/lib/fog/hp/requests/block_storage/create_volume.rb +87 -0
- data/lib/fog/hp/requests/block_storage/delete_snapshot.rb +38 -0
- data/lib/fog/hp/requests/block_storage/delete_volume.rb +38 -0
- data/lib/fog/hp/requests/block_storage/get_bootable_volume_details.rb +59 -0
- data/lib/fog/hp/requests/block_storage/get_snapshot_details.rb +54 -0
- data/lib/fog/hp/requests/block_storage/get_volume_details.rb +58 -0
- data/lib/fog/hp/requests/block_storage/list_bootable_volumes.rb +53 -0
- data/lib/fog/hp/requests/block_storage/list_snapshots.rb +48 -0
- data/lib/fog/hp/requests/block_storage/list_volumes.rb +52 -0
- data/lib/fog/hp/requests/compute/attach_volume.rb +78 -0
- data/lib/fog/hp/requests/compute/create_image.rb +5 -8
- data/lib/fog/hp/requests/compute/create_persistent_server.rb +168 -0
- data/lib/fog/hp/requests/compute/create_server.rb +36 -20
- data/lib/fog/hp/requests/compute/delete_meta.rb +55 -0
- data/lib/fog/hp/requests/compute/delete_security_group_rule.rb +4 -4
- data/lib/fog/hp/requests/compute/detach_volume.rb +47 -0
- data/lib/fog/hp/requests/compute/get_console_output.rb +43 -0
- data/lib/fog/hp/requests/compute/get_meta.rb +57 -0
- data/lib/fog/hp/requests/compute/get_windows_password.rb +43 -0
- data/lib/fog/hp/requests/compute/list_metadata.rb +56 -0
- data/lib/fog/hp/requests/compute/list_server_volumes.rb +49 -0
- data/lib/fog/hp/requests/compute/set_metadata.rb +60 -0
- data/lib/fog/hp/requests/compute/update_meta.rb +61 -0
- data/lib/fog/hp/requests/compute/update_metadata.rb +60 -0
- data/lib/fog/hp/requests/storage/delete_shared_object.rb +38 -0
- data/lib/fog/hp/requests/storage/get_object.rb +12 -10
- data/lib/fog/hp/requests/storage/get_object_temp_url.rb +31 -0
- data/lib/fog/hp/requests/storage/get_shared_container.rb +75 -0
- data/lib/fog/hp/requests/storage/get_shared_object.rb +66 -0
- data/lib/fog/hp/requests/storage/head_container.rb +1 -0
- data/lib/fog/hp/requests/storage/head_object.rb +1 -0
- data/lib/fog/hp/requests/storage/head_shared_container.rb +45 -0
- data/lib/fog/hp/requests/storage/head_shared_object.rb +39 -0
- data/lib/fog/hp/requests/storage/put_container.rb +6 -6
- data/lib/fog/hp/requests/storage/put_object.rb +12 -1
- data/lib/fog/hp/requests/storage/put_shared_object.rb +85 -0
- data/lib/fog/hp/storage.rb +175 -33
- data/lib/fog/identity.rb +5 -4
- data/lib/fog/image.rb +5 -6
- data/lib/fog/internet_archive.rb +290 -0
- data/lib/fog/internet_archive/models/storage/directories.rb +43 -0
- data/lib/fog/internet_archive/models/storage/directory.rb +126 -0
- data/lib/fog/internet_archive/models/storage/file.rb +286 -0
- data/lib/fog/internet_archive/models/storage/files.rb +122 -0
- data/lib/fog/internet_archive/models/storage/version.rb +36 -0
- data/lib/fog/internet_archive/models/storage/versions.rb +38 -0
- data/lib/fog/internet_archive/parsers/storage/access_control_list.rb +46 -0
- data/lib/fog/internet_archive/parsers/storage/complete_multipart_upload.rb +24 -0
- data/lib/fog/internet_archive/parsers/storage/copy_object.rb +22 -0
- data/lib/fog/internet_archive/parsers/storage/cors_configuration.rb +41 -0
- data/lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb +50 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket.rb +62 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket_lifecycle.rb +66 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket_location.rb +20 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket_logging.rb +40 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket_object_versions.rb +88 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket_versioning.rb +24 -0
- data/lib/fog/internet_archive/parsers/storage/get_bucket_website.rb +26 -0
- data/lib/fog/internet_archive/parsers/storage/get_request_payment.rb +20 -0
- data/lib/fog/internet_archive/parsers/storage/get_service.rb +32 -0
- data/lib/fog/internet_archive/parsers/storage/initiate_multipart_upload.rb +24 -0
- data/lib/fog/internet_archive/parsers/storage/list_multipart_uploads.rb +56 -0
- data/lib/fog/internet_archive/parsers/storage/list_parts.rb +40 -0
- data/lib/fog/internet_archive/requests/storage/abort_multipart_upload.rb +28 -0
- data/lib/fog/internet_archive/requests/storage/acl_utils.rb +62 -0
- data/lib/fog/internet_archive/requests/storage/complete_multipart_upload.rb +48 -0
- data/lib/fog/internet_archive/requests/storage/copy_object.rb +81 -0
- data/lib/fog/internet_archive/requests/storage/cors_utils.rb +41 -0
- data/lib/fog/internet_archive/requests/storage/delete_bucket.rb +47 -0
- data/lib/fog/internet_archive/requests/storage/delete_bucket_cors.rb +29 -0
- data/lib/fog/internet_archive/requests/storage/delete_bucket_lifecycle.rb +27 -0
- data/lib/fog/internet_archive/requests/storage/delete_bucket_policy.rb +29 -0
- data/lib/fog/internet_archive/requests/storage/delete_bucket_website.rb +29 -0
- data/lib/fog/internet_archive/requests/storage/delete_multiple_objects.rb +167 -0
- data/lib/fog/internet_archive/requests/storage/delete_object.rb +118 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket.rb +112 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_acl.rb +69 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_cors.rb +65 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_lifecycle.rb +38 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_location.rb +58 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_logging.rb +47 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_object_versions.rb +162 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_policy.rb +34 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_versioning.rb +69 -0
- data/lib/fog/internet_archive/requests/storage/get_bucket_website.rb +40 -0
- data/lib/fog/internet_archive/requests/storage/get_object.rb +188 -0
- data/lib/fog/internet_archive/requests/storage/get_object_acl.rb +80 -0
- data/lib/fog/internet_archive/requests/storage/get_object_http_url.rb +55 -0
- data/lib/fog/internet_archive/requests/storage/get_object_https_url.rb +37 -0
- data/lib/fog/internet_archive/requests/storage/get_object_torrent.rb +47 -0
- data/lib/fog/internet_archive/requests/storage/get_object_url.rb +55 -0
- data/lib/fog/internet_archive/requests/storage/get_request_payment.rb +49 -0
- data/lib/fog/internet_archive/requests/storage/get_service.rb +55 -0
- data/lib/fog/internet_archive/requests/storage/head_object.rb +66 -0
- data/lib/fog/internet_archive/requests/storage/initiate_multipart_upload.rb +44 -0
- data/lib/fog/internet_archive/requests/storage/list_multipart_uploads.rb +55 -0
- data/lib/fog/internet_archive/requests/storage/list_parts.rb +55 -0
- data/lib/fog/internet_archive/requests/storage/post_object_hidden_fields.rb +38 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket.rb +74 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_acl.rb +71 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_cors.rb +49 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_lifecycle.rb +77 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_logging.rb +81 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_policy.rb +28 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_versioning.rb +75 -0
- data/lib/fog/internet_archive/requests/storage/put_bucket_website.rb +64 -0
- data/lib/fog/internet_archive/requests/storage/put_object.rb +113 -0
- data/lib/fog/internet_archive/requests/storage/put_object_acl.rb +80 -0
- data/lib/fog/internet_archive/requests/storage/put_object_url.rb +48 -0
- data/lib/fog/internet_archive/requests/storage/put_request_payment.rb +49 -0
- data/lib/fog/internet_archive/requests/storage/sync_clock.rb +28 -0
- data/lib/fog/internet_archive/requests/storage/upload_part.rb +41 -0
- data/lib/fog/internet_archive/signaturev4.rb +73 -0
- data/lib/fog/internet_archive/storage.rb +402 -0
- data/lib/fog/joyent/models/compute/server.rb +1 -1
- data/lib/fog/joyent/requests/compute/resize_machine.rb +2 -0
- data/lib/fog/libvirt/models/compute/volume.rb +1 -1
- data/lib/fog/network.rb +5 -6
- data/lib/fog/openstack.rb +10 -0
- data/lib/fog/openstack/compute.rb +11 -4
- data/lib/fog/openstack/identity.rb +5 -2
- data/lib/fog/openstack/models/compute/images.rb +2 -1
- data/lib/fog/openstack/models/compute/metadata.rb +4 -5
- data/lib/fog/openstack/models/compute/server.rb +36 -21
- data/lib/fog/openstack/models/identity/role.rb +1 -1
- data/lib/fog/openstack/models/network/floating_ip.rb +1 -1
- data/lib/fog/openstack/models/network/floating_ips.rb +2 -2
- data/lib/fog/openstack/models/network/network.rb +8 -0
- data/lib/fog/openstack/models/storage/directories.rb +39 -0
- data/lib/fog/openstack/models/storage/directory.rb +50 -0
- data/lib/fog/openstack/models/storage/file.rb +150 -0
- data/lib/fog/openstack/models/storage/files.rb +94 -0
- data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_meta.rb +43 -0
- data/lib/fog/openstack/requests/compute/get_limits.rb +1 -1
- data/lib/fog/openstack/requests/compute/get_snapshot_details.rb +1 -1
- data/lib/fog/openstack/requests/compute/get_volume_details.rb +1 -1
- data/lib/fog/openstack/requests/compute/list_servers.rb +1 -1
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
- data/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +1 -1
- data/lib/fog/openstack/requests/compute/update_meta.rb +46 -0
- data/lib/fog/openstack/requests/compute/update_server.rb +1 -1
- data/lib/fog/openstack/requests/identity/delete_user_role.rb +2 -2
- data/lib/fog/openstack/requests/identity/get_user_by_name.rb +2 -2
- data/lib/fog/openstack/requests/image/create_image.rb +1 -1
- data/lib/fog/openstack/requests/network/associate_floating_ip.rb +3 -3
- data/lib/fog/openstack/requests/network/create_floating_ip.rb +3 -3
- data/lib/fog/openstack/requests/network/delete_floating_ip.rb +1 -1
- data/lib/fog/openstack/requests/network/disassociate_floating_ip.rb +3 -3
- data/lib/fog/openstack/requests/network/get_floating_ip.rb +1 -1
- data/lib/fog/openstack/requests/network/list_floating_ips.rb +1 -1
- data/lib/fog/openstack/requests/storage/copy_object.rb +27 -0
- data/lib/fog/openstack/requests/storage/delete_container.rb +22 -0
- data/lib/fog/openstack/requests/storage/delete_object.rb +23 -0
- data/lib/fog/openstack/requests/storage/get_container.rb +44 -0
- data/lib/fog/openstack/requests/storage/get_containers.rb +33 -0
- data/lib/fog/openstack/requests/storage/get_object.rb +29 -0
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +51 -0
- data/lib/fog/openstack/requests/storage/head_container.rb +28 -0
- data/lib/fog/openstack/requests/storage/head_containers.rb +25 -0
- data/lib/fog/openstack/requests/storage/head_object.rb +23 -0
- data/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +37 -0
- data/lib/fog/openstack/requests/storage/put_container.rb +22 -0
- data/lib/fog/openstack/requests/storage/put_object.rb +30 -0
- data/lib/fog/openstack/requests/storage/put_object_manifest.rb +25 -0
- data/lib/fog/openstack/storage.rb +159 -0
- data/lib/fog/openstack/volume.rb +4 -2
- data/lib/fog/ovirt/compute.rb +1 -0
- data/lib/fog/ovirt/models/compute/server.rb +2 -2
- data/lib/fog/ovirt/models/compute/volume.rb +1 -0
- data/lib/fog/ovirt/requests/compute/get_api_version.rb +16 -0
- data/lib/fog/providers.rb +2 -1
- data/lib/fog/rackspace/block_storage.rb +1 -0
- data/lib/fog/rackspace/cdn.rb +61 -7
- data/lib/fog/rackspace/compute_v2.rb +16 -3
- data/lib/fog/rackspace/databases.rb +4 -3
- data/lib/fog/rackspace/docs/compute_v2.md +663 -0
- data/lib/fog/rackspace/docs/getting_started.md +9 -9
- data/lib/fog/rackspace/examples/README.md +47 -0
- data/lib/fog/rackspace/examples/compute_v2/README.md +47 -0
- data/lib/fog/rackspace/examples/compute_v2/create_image.rb +61 -0
- data/lib/fog/rackspace/examples/compute_v2/create_server.rb +89 -0
- data/lib/fog/rackspace/examples/compute_v2/delete_image.rb +61 -0
- data/lib/fog/rackspace/examples/compute_v2/delete_server.rb +56 -0
- data/lib/fog/rackspace/examples/compute_v2/detach_volume.rb +93 -0
- data/lib/fog/rackspace/examples/compute_v2/resize_server.rb +106 -0
- data/lib/fog/rackspace/examples/compute_v2/server_attachments.rb +69 -0
- data/lib/fog/rackspace/examples/compute_v2/server_metadata.rb +85 -0
- data/lib/fog/rackspace/identity.rb +1 -1
- data/lib/fog/rackspace/load_balancers.rb +2 -2
- data/lib/fog/rackspace/mock_data.rb +114 -96
- data/lib/fog/rackspace/models/compute_v2/attachment.rb +16 -0
- data/lib/fog/rackspace/models/compute_v2/attachments.rb +6 -0
- data/lib/fog/rackspace/models/compute_v2/flavor.rb +18 -0
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +9 -1
- data/lib/fog/rackspace/models/compute_v2/image.rb +52 -7
- data/lib/fog/rackspace/models/compute_v2/images.rb +9 -0
- data/lib/fog/rackspace/models/compute_v2/meta_parent.rb +9 -0
- data/lib/fog/rackspace/models/compute_v2/metadata.rb +30 -7
- data/lib/fog/rackspace/models/compute_v2/metadatum.rb +4 -0
- data/lib/fog/rackspace/models/compute_v2/network.rb +27 -0
- data/lib/fog/rackspace/models/compute_v2/networks.rb +23 -0
- data/lib/fog/rackspace/models/compute_v2/server.rb +235 -24
- data/lib/fog/rackspace/models/compute_v2/servers.rb +19 -1
- data/lib/fog/rackspace/models/dns/zones.rb +35 -2
- data/lib/fog/rackspace/models/identity/credentials.rb +3 -2
- data/lib/fog/rackspace/models/storage/account.rb +24 -0
- data/lib/fog/rackspace/models/storage/directories.rb +3 -0
- data/lib/fog/rackspace/models/storage/directory.rb +68 -39
- data/lib/fog/rackspace/models/storage/file.rb +38 -67
- data/lib/fog/rackspace/models/storage/files.rb +11 -4
- data/lib/fog/rackspace/models/storage/metadata.rb +129 -0
- data/lib/fog/rackspace/requests/cdn/delete_object.rb +37 -0
- data/lib/fog/rackspace/requests/cdn/get_containers.rb +34 -0
- data/lib/fog/rackspace/requests/cdn/head_container.rb +24 -0
- data/lib/fog/rackspace/requests/cdn/post_container.rb +21 -0
- data/lib/fog/rackspace/requests/cdn/put_container.rb +21 -0
- data/lib/fog/rackspace/requests/compute_v2/attach_volume.rb +13 -0
- data/lib/fog/rackspace/requests/compute_v2/change_server_password.rb +7 -0
- data/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb +9 -0
- data/lib/fog/rackspace/requests/compute_v2/create_image.rb +9 -5
- data/lib/fog/rackspace/requests/compute_v2/create_network.rb +36 -0
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +38 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb +5 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +2 -4
- data/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb +6 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_network.rb +21 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +4 -0
- data/lib/fog/rackspace/requests/compute_v2/get_attachment.rb +12 -0
- data/lib/fog/rackspace/requests/compute_v2/get_flavor.rb +14 -0
- data/lib/fog/rackspace/requests/compute_v2/get_image.rb +18 -0
- data/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb +9 -0
- data/lib/fog/rackspace/requests/compute_v2/get_network.rb +21 -0
- data/lib/fog/rackspace/requests/compute_v2/get_server.rb +32 -0
- data/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +5 -0
- data/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +12 -0
- data/lib/fog/rackspace/requests/compute_v2/list_attachments.rb +12 -0
- data/lib/fog/rackspace/requests/compute_v2/list_flavors.rb +10 -0
- data/lib/fog/rackspace/requests/compute_v2/list_images.rb +10 -0
- data/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +8 -0
- data/lib/fog/rackspace/requests/compute_v2/list_networks.rb +18 -0
- data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +31 -0
- data/lib/fog/rackspace/requests/compute_v2/reboot_server.rb +5 -0
- data/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb +37 -0
- data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +10 -0
- data/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb +10 -0
- data/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +9 -0
- data/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +10 -0
- data/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +9 -0
- data/lib/fog/rackspace/requests/compute_v2/update_server.rb +9 -0
- data/lib/fog/rackspace/requests/storage/get_object.rb +0 -1
- data/lib/fog/rackspace/requests/storage/put_container.rb +2 -1
- data/lib/fog/rackspace/storage.rb +14 -2
- data/lib/fog/schema/data_validator.rb +154 -0
- data/lib/fog/storage.rb +8 -24
- data/lib/fog/terremark/models/shared/server.rb +5 -3
- data/lib/fog/terremark/parser.rb +14 -13
- data/lib/fog/terremark/parsers/shared/get_catalog.rb +5 -19
- data/lib/fog/terremark/parsers/shared/get_catalog_item.rb +4 -14
- data/lib/fog/terremark/parsers/shared/get_internet_services.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_keys_list.rb +4 -18
- data/lib/fog/terremark/parsers/shared/get_network_ips.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_node_services.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_organization.rb +4 -3
- data/lib/fog/terremark/parsers/shared/get_organizations.rb +3 -2
- data/lib/fog/terremark/parsers/shared/get_public_ips.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_tasks_list.rb +4 -17
- data/lib/fog/terremark/parsers/shared/get_vapp_template.rb +3 -14
- data/lib/fog/terremark/parsers/shared/get_vdc.rb +6 -38
- data/lib/fog/terremark/parsers/shared/instantiate_vapp_template.rb +3 -14
- data/lib/fog/terremark/parsers/shared/internet_service.rb +2 -5
- data/lib/fog/terremark/parsers/shared/network.rb +3 -11
- data/lib/fog/terremark/parsers/shared/node_service.rb +1 -1
- data/lib/fog/terremark/parsers/shared/public_ip.rb +1 -1
- data/lib/fog/terremark/parsers/shared/task.rb +3 -14
- data/lib/fog/terremark/parsers/shared/vapp.rb +3 -14
- data/lib/fog/vcloud/compute.rb +1 -0
- data/lib/fog/vcloud/models/compute/server.rb +15 -2
- data/lib/fog/vcloud/models/compute/vapp.rb +11 -0
- data/lib/fog/vcloud/requests/compute/configure_vm_network.rb +37 -0
- data/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +8 -4
- data/lib/fog/version.rb +1 -1
- data/lib/fog/volume.rb +6 -6
- data/lib/fog/vsphere/requests/compute/create_vm.rb +18 -3
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +1 -1
- data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -1
- data/tests/aws/models/data_pipeline/pipeline_tests.rb +8 -0
- data/tests/aws/models/data_pipeline/pipelines_tests.rb +8 -0
- data/tests/aws/models/rds/server_tests.rb +10 -9
- data/tests/aws/requests/compute/image_tests.rb +2 -2
- data/tests/aws/requests/compute/security_group_tests.rb +1 -1
- data/tests/aws/requests/compute/spot_instance_tests.rb +3 -2
- data/tests/aws/requests/data_pipeline/helper.rb +44 -0
- data/tests/aws/requests/data_pipeline/pipeline_tests.rb +54 -0
- data/tests/aws/requests/rds/instance_tests.rb +8 -5
- data/tests/bluebox/requests/blb/helper.rb +64 -0
- data/tests/bluebox/requests/blb/lb_tests.rb +75 -0
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +7 -0
- data/tests/brightbox/requests/compute/helper.rb +4 -2
- data/tests/compute/helper.rb +8 -0
- data/tests/core/user_agent_tests.rb +6 -0
- data/tests/dreamhost/README.md +56 -0
- data/tests/dreamhost/dns_tests.rb +20 -0
- data/tests/dreamhost/helper.rb +19 -0
- data/tests/dreamhost/models/dns/record_tests.rb +73 -0
- data/tests/dreamhost/models/dns/records_tests.rb +29 -0
- data/tests/dreamhost/models/dns/zone_tests.rb +62 -0
- data/tests/dreamhost/models/dns/zones_tests.rb +29 -0
- data/tests/dreamhost/requests/dns/create_record_tests.rb +39 -0
- data/tests/dreamhost/requests/dns/delete_record_tests.rb +26 -0
- data/tests/dreamhost/requests/dns/list_records_tests.rb +31 -0
- data/tests/glesys/requests/compute/helper.rb +5 -5
- data/tests/helper.rb +1 -1
- data/tests/helpers/formats_helper.rb +63 -50
- data/tests/helpers/formats_helper_tests.rb +87 -36
- data/tests/helpers/mock_helper.rb +4 -1
- data/tests/helpers/schema_validator_tests.rb +107 -0
- data/tests/hp/models/block_storage/bootable_volume_tests.rb +23 -0
- data/tests/hp/models/block_storage/snapshot_tests.rb +23 -0
- data/tests/hp/models/block_storage/volume_tests.rb +21 -0
- 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/metadata_image_tests.rb +60 -0
- data/tests/hp/models/compute/metadata_server_tests.rb +54 -0
- data/tests/hp/models/compute/security_group_tests.rb +3 -1
- data/tests/hp/models/compute/security_groups_tests.rb +1 -1
- data/tests/hp/models/storage/directories_tests.rb +23 -0
- data/tests/hp/models/storage/directory_tests.rb +62 -0
- data/tests/hp/models/storage/file_tests.rb +44 -0
- data/tests/hp/models/storage/files_tests.rb +38 -0
- data/tests/hp/requests/block_storage/bootable_volume_tests.rb +78 -0
- data/tests/hp/requests/block_storage/snapshot_tests.rb +56 -0
- data/tests/hp/requests/block_storage/volume_tests.rb +94 -0
- data/tests/hp/requests/cdn/container_tests.rb +1 -1
- data/tests/hp/requests/compute/address_tests.rb +5 -6
- 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/metadata_tests.rb +70 -0
- data/tests/hp/requests/compute/persistent_server_tests.rb +66 -0
- 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 +5 -6
- data/tests/hp/requests/compute/server_volume_tests.rb +76 -0
- data/tests/hp/requests/storage/container_tests.rb +1 -1
- data/tests/hp/requests/storage/object_tests.rb +9 -1
- data/tests/hp/user_agent_tests.rb +13 -0
- data/tests/internet_archive/models/storage/directory_tests.rb +51 -0
- data/tests/internet_archive/models/storage/file_tests.rb +80 -0
- data/tests/internet_archive/models/storage/files_tests.rb +56 -0
- data/tests/internet_archive/models/storage/url_tests.rb +28 -0
- data/tests/internet_archive/models/storage/version_tests.rb +52 -0
- data/tests/internet_archive/models/storage/versions_tests.rb +56 -0
- data/tests/internet_archive/requests/storage/acl_utils_tests.rb +209 -0
- data/tests/internet_archive/requests/storage/bucket_tests.rb +328 -0
- data/tests/internet_archive/requests/storage/cors_utils_tests.rb +108 -0
- data/tests/internet_archive/requests/storage/multipart_upload_tests.rb +132 -0
- data/tests/internet_archive/requests/storage/object_tests.rb +166 -0
- data/tests/internet_archive/requests/storage/versioning_tests.rb +258 -0
- data/tests/internet_archive/signaturev4_tests.rb +41 -0
- data/tests/internet_archive/signed_params_tests.rb +5 -0
- data/tests/openstack/models/compute/images_tests.rb +14 -0
- data/tests/openstack/models/compute/server_tests.rb +42 -1
- data/tests/openstack/models/identity/roles_tests.rb +1 -0
- data/tests/openstack/models/identity/user_tests.rb +2 -2
- data/tests/openstack/models/network/network_tests.rb +21 -1
- data/tests/openstack/models/storage/file_tests.rb +178 -0
- data/tests/openstack/requests/compute/limit_tests.rb +1 -1
- data/tests/openstack/requests/compute/tenant_tests.rb +2 -2
- data/tests/openstack/requests/identity/ec2_credentials_tests.rb +7 -4
- data/tests/openstack/requests/identity/helper.rb +17 -0
- data/tests/openstack/requests/identity/role_tests.rb +6 -0
- data/tests/openstack/requests/identity/tenant_tests.rb +14 -12
- data/tests/openstack/requests/identity/user_tests.rb +9 -5
- data/tests/openstack/requests/storage/container_tests.rb +64 -0
- data/tests/openstack/requests/storage/large_object_tests.rb +47 -0
- data/tests/openstack/requests/storage/object_tests.rb +84 -0
- data/tests/openstack/volume_tests.rb +15 -0
- data/tests/rackspace/cdn_tests.rb +78 -0
- data/tests/rackspace/helper.rb +9 -0
- data/tests/rackspace/models/compute_v2/flavors_tests.rb +1 -1
- data/tests/rackspace/models/compute_v2/image_tests.rb +2 -4
- data/tests/rackspace/models/compute_v2/images_tests.rb +1 -1
- data/tests/rackspace/models/compute_v2/metadata_tests.rb +5 -3
- data/tests/rackspace/models/compute_v2/network_tests.rb +10 -0
- data/tests/rackspace/models/compute_v2/networks_tests.rb +10 -0
- data/tests/rackspace/models/compute_v2/server_tests.rb +8 -7
- data/tests/rackspace/models/compute_v2/servers_tests.rb +5 -7
- data/tests/rackspace/models/dns/zones_tests.rb +22 -0
- data/tests/rackspace/models/identity/credentials_tests.rb +14 -5
- data/tests/rackspace/models/storage/account_tests.rb +28 -0
- data/tests/rackspace/models/storage/directories_tests.rb +29 -0
- data/tests/rackspace/models/storage/directory_tests.rb +141 -0
- data/tests/rackspace/models/storage/file_tests.rb +86 -11
- data/tests/rackspace/models/storage/metadata_tests.rb +174 -0
- data/tests/rackspace/requests/cdn/cdn_tests.rb +76 -0
- data/tests/rackspace/requests/compute/image_tests.rb +2 -2
- data/tests/rackspace/requests/compute_v2/image_tests.rb +6 -6
- data/tests/rackspace/requests/compute_v2/network_tests.rb +49 -0
- data/tests/rackspace/requests/identity/user_tests.rb +0 -4
- data/tests/rackspace/requests/storage/container_tests.rb +8 -1
- data/tests/rackspace/storage_tests.rb +8 -0
- data/tests/storage/helper.rb +3 -0
- metadata +341 -40
- data/docs/storage/aws.markdown +0 -21
- data/lib/fog/bin/virtual_box.rb +0 -57
- data/lib/fog/rackspace/docs/cloud_servers.md +0 -65
- data/lib/fog/rackspace/requests/identity/get_credentials.rb +0 -15
- data/lib/fog/virtual_box.rb +0 -11
- data/lib/fog/virtual_box/compute.rb +0 -59
- data/lib/fog/virtual_box/models/compute/medium.rb +0 -87
- data/lib/fog/virtual_box/models/compute/medium_format.rb +0 -34
- data/lib/fog/virtual_box/models/compute/mediums.rb +0 -32
- data/lib/fog/virtual_box/models/compute/nat_engine.rb +0 -65
- data/lib/fog/virtual_box/models/compute/nat_redirect.rb +0 -91
- data/lib/fog/virtual_box/models/compute/nat_redirects.rb +0 -41
- data/lib/fog/virtual_box/models/compute/network_adapter.rb +0 -82
- data/lib/fog/virtual_box/models/compute/network_adapters.rb +0 -42
- data/lib/fog/virtual_box/models/compute/server.rb +0 -199
- data/lib/fog/virtual_box/models/compute/servers.rb +0 -41
- data/lib/fog/virtual_box/models/compute/storage_controller.rb +0 -83
- data/lib/fog/virtual_box/models/compute/storage_controllers.rb +0 -38
@@ -0,0 +1,53 @@
|
|
1
|
+
module Fog
|
2
|
+
module HP
|
3
|
+
class BlockStorage
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# List existing block storage bootbale volumes
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# None
|
10
|
+
#
|
11
|
+
# ==== Returns
|
12
|
+
# * response<~Excon::Response>:
|
13
|
+
# * body<~Array>:
|
14
|
+
# * volumes<~Hash>:
|
15
|
+
# * 'id'<~Integer>: - Id for the volume
|
16
|
+
# * 'displayName'<~String>: - Name of the volume
|
17
|
+
# * 'displayDescription'<~String>: - Description of the volume
|
18
|
+
# * 'size'<~Integer>: - Size in GB for the volume
|
19
|
+
# * 'status'<~String>: - Status of the volume i.e. "available"
|
20
|
+
# * 'volumeType'<~String>: - Type of the volume
|
21
|
+
# * 'snapshotId'<~String>: - Id of the source snapshot used to create volume
|
22
|
+
# * 'sourceImageRef'<~String>: - Id of the source image used to create volume
|
23
|
+
# * 'createdAt'<~String>: - Timestamp in UTC when volume was created
|
24
|
+
# * 'availabilityZone'<~String>: - Availability zone i.e. "nova"
|
25
|
+
# * attachments<~Array>: Array of hashes of attachments
|
26
|
+
# * metadata<~Hash>: Hash of metadata for the volume
|
27
|
+
def list_bootable_volumes
|
28
|
+
response = request(
|
29
|
+
:expects => 200,
|
30
|
+
:method => 'GET',
|
31
|
+
:path => "hp-bootable-volumes"
|
32
|
+
)
|
33
|
+
response
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
class Mock # :nodoc:all
|
39
|
+
|
40
|
+
def list_bootable_volumes
|
41
|
+
response = Excon::Response.new
|
42
|
+
volumes = []
|
43
|
+
volumes = self.data[:volumes].values unless self.data[:volumes].nil?
|
44
|
+
|
45
|
+
response.status = 200
|
46
|
+
response.body = { 'volumes' => volumes }
|
47
|
+
response
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Fog
|
2
|
+
module HP
|
3
|
+
class BlockStorage
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# List existing block storage snapshots
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# None
|
10
|
+
#
|
11
|
+
# ==== Returns
|
12
|
+
# * response<~Excon::Response>:
|
13
|
+
# * body<~Array>:
|
14
|
+
# * snapshots<~Hash>:
|
15
|
+
# * 'id'<~Integer>: - Id for the snapshot
|
16
|
+
# * 'displayName'<~String>: - Name of the snapshot
|
17
|
+
# * 'displayDescription'<~String>: - Description of the snapshot
|
18
|
+
# * 'size'<~Integer>: - Size in GB for the snapshot
|
19
|
+
# * 'status'<~String>: - Status of the snapshot i.e. "available"
|
20
|
+
# * 'volumeId'<~Integer>: - Id of the volume from which the snapshot was created
|
21
|
+
# * 'createdAt'<~String>: - Timestamp in UTC when volume was created
|
22
|
+
def list_snapshots
|
23
|
+
response = request(
|
24
|
+
:expects => 200,
|
25
|
+
:method => 'GET',
|
26
|
+
:path => 'os-snapshots'
|
27
|
+
)
|
28
|
+
response
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
class Mock # :nodoc:all
|
34
|
+
|
35
|
+
def list_snapshots
|
36
|
+
response = Excon::Response.new
|
37
|
+
snapshots = []
|
38
|
+
snapshots = self.data[:snapshots].values unless self.data[:snapshots].nil?
|
39
|
+
|
40
|
+
response.status = 200
|
41
|
+
response.body = { 'snapshots' => snapshots }
|
42
|
+
response
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Fog
|
2
|
+
module HP
|
3
|
+
class BlockStorage
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# List existing block storage volumes
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# None
|
10
|
+
#
|
11
|
+
# ==== Returns
|
12
|
+
# * response<~Excon::Response>:
|
13
|
+
# * body<~Array>:
|
14
|
+
# * volumes<~Hash>:
|
15
|
+
# * 'id'<~Integer>: - Id for the volume
|
16
|
+
# * 'displayName'<~String>: - Name of the volume
|
17
|
+
# * 'displayDescription'<~String>: - Description of the volume
|
18
|
+
# * 'size'<~Integer>: - Size in GB for the volume
|
19
|
+
# * 'status'<~String>: - Status of the volume i.e. "available"
|
20
|
+
# * 'volumeType'<~String>: - Type of the volume
|
21
|
+
# * 'snapshotId'<~String>: - Id of the volume snapshot
|
22
|
+
# * 'createdAt'<~String>: - Timestamp in UTC when volume was created
|
23
|
+
# * 'availabilityZone'<~String>: - Availability zone i.e. "nova"
|
24
|
+
# * attachments<~Array>: Array of hashes of attachments
|
25
|
+
# * metadata<~Hash>: Hash of metadata for the volume
|
26
|
+
def list_volumes
|
27
|
+
response = request(
|
28
|
+
:expects => 200,
|
29
|
+
:method => 'GET',
|
30
|
+
:path => 'os-volumes'
|
31
|
+
)
|
32
|
+
response
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
class Mock # :nodoc:all
|
38
|
+
|
39
|
+
def list_volumes
|
40
|
+
response = Excon::Response.new
|
41
|
+
volumes = []
|
42
|
+
volumes = self.data[:volumes].values unless self.data[:volumes].nil?
|
43
|
+
|
44
|
+
response.status = 200
|
45
|
+
response.body = { 'volumes' => volumes }
|
46
|
+
response
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class HP
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Attach a block storage volume to an existing server
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * server_id<~Integer> - Id of server to attach the volume to
|
10
|
+
# * volume_id<~Integer> - Id of the volume to be attached to the server
|
11
|
+
# * device<~String> - Device name that is the mount point that the volume will be attached to. e.g. /dev/sdf
|
12
|
+
#
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
# * 'volumeAttachment'<~Hash>:
|
17
|
+
# * <~Hash>
|
18
|
+
# * 'volumeId':<~Integer> - The volume id
|
19
|
+
# * 'device':<~String> - The name of the device
|
20
|
+
def attach_volume(server_id, volume_id, device)
|
21
|
+
data = { 'volumeAttachment' =>
|
22
|
+
{ 'volumeId' => volume_id,
|
23
|
+
'device' => device
|
24
|
+
}
|
25
|
+
}
|
26
|
+
response = request(
|
27
|
+
:body => Fog::JSON.encode(data),
|
28
|
+
:expects => 200,
|
29
|
+
:method => 'POST',
|
30
|
+
:path => "servers/#{server_id}/os-volume_attachments"
|
31
|
+
)
|
32
|
+
response
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
class Mock # :nodoc:all
|
38
|
+
|
39
|
+
def attach_volume(server_id, volume_id, device)
|
40
|
+
response = Excon::Response.new
|
41
|
+
if server = self.data[:servers][server_id]
|
42
|
+
# mock the case when the volume is already attached to the server
|
43
|
+
if server['volumeAttachments'] && server['volumeAttachments'].select {|v| v['id'] == volume_id}
|
44
|
+
response.status = 400
|
45
|
+
response.body = '{"badRequest": {"message": "Volume status must be available", "code": 400}}'
|
46
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
47
|
+
else
|
48
|
+
resp_data = { "volumeAttachment" =>
|
49
|
+
{
|
50
|
+
"volumeId" => volume_id,
|
51
|
+
"id" => volume_id
|
52
|
+
}
|
53
|
+
}
|
54
|
+
response.body = resp_data
|
55
|
+
response.status = 200
|
56
|
+
|
57
|
+
data = {
|
58
|
+
"device" => device,
|
59
|
+
"serverId" => server_id,
|
60
|
+
"id" => volume_id,
|
61
|
+
"volumeId" => volume_id,
|
62
|
+
}
|
63
|
+
if server['volumeAttachments']
|
64
|
+
server['volumeAttachments'] << data
|
65
|
+
else
|
66
|
+
server['volumeAttachments'] = [data]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
else
|
70
|
+
raise Fog::Compute::HP::NotFound
|
71
|
+
end
|
72
|
+
response
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -18,10 +18,7 @@ module Fog
|
|
18
18
|
def create_image(server_id, name, metadata = {})
|
19
19
|
body = { 'createImage' =>
|
20
20
|
{ 'name' => name,
|
21
|
-
'metadata' =>
|
22
|
-
{ 'ImageType' => metadata[:image_type],
|
23
|
-
'ImageVersion' => metadata[:image_version]
|
24
|
-
}
|
21
|
+
'metadata' => metadata
|
25
22
|
}
|
26
23
|
}
|
27
24
|
server_action(server_id, body)
|
@@ -39,19 +36,19 @@ module Fog
|
|
39
36
|
|
40
37
|
data = {
|
41
38
|
'id' => image_id,
|
42
|
-
'server' => {"id"=>
|
39
|
+
'server' => {"id"=>server_id, "links"=>[{"href"=>"http://nova1:8774/v1.1/servers/#{server_id}", "rel"=>"bookmark"}]},
|
43
40
|
'links' => [{"href"=>"http://nova1:8774/v1.1/tenantid/images/#{image_id}", "rel"=>"self"}, {"href"=>"http://nova1:8774/tenantid/images/#{image_id}", "rel"=>"bookmark"}],
|
44
41
|
'metadata' => metadata || {},
|
45
42
|
'name' => name || "image_#{rand(999)}",
|
46
43
|
'progress' => 0,
|
47
44
|
'status' => 'SAVING',
|
48
|
-
'updated' => "",
|
49
|
-
'created' => ""
|
45
|
+
'updated' => "2012-01-01T13:32:20Z",
|
46
|
+
'created' => "2012-01-01T13:32:20Z"
|
50
47
|
}
|
51
48
|
|
52
49
|
self.data[:last_modified][:images][data['id']] = Time.now
|
53
50
|
self.data[:images][data['id']] = data
|
54
|
-
response.headers = {'Content-Length' => '0', 'Content-Type' => 'text/html; charset=UTF-8', 'Date' => Time.now, 'Location' => "http://nova1:8774/v1.1/images/#{
|
51
|
+
response.headers = {'Content-Length' => '0', 'Content-Type' => 'text/html; charset=UTF-8', 'Date' => Time.now, 'Location' => "http://nova1:8774/v1.1/images/#{image_id}"}
|
55
52
|
response.body = "" # { 'image' => data } no data is sent
|
56
53
|
response
|
57
54
|
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class HP
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Create a new persistent server i.e. use a bootable volume instead of an image
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * name<~String> - Name of server
|
10
|
+
# * flavor_id<~Integer> - Id of flavor for server
|
11
|
+
# * block_device_mapping<~Array>: Use bootable volumes to create persistent instances
|
12
|
+
# * <~Hash>:
|
13
|
+
# * 'volume_size'<~String> - Size of the volume. Ignored, and automatically picked up from the volume
|
14
|
+
# * 'volume_id'<~String> - Id of the bootable volume to use
|
15
|
+
# * 'delete_on_termination'<~String> - Setting this to '1' (True) means that the volume gets deleted when the instance is killed. Set it to '0' to preserve the volume.
|
16
|
+
# * 'device_name'<~String> - Block device name e.g. "vda"
|
17
|
+
# * options<~Hash>:
|
18
|
+
# * 'metadata'<~Hash> - Up to 5 key value pairs containing 255 bytes of info
|
19
|
+
# * 'min_count'<~Integer> - Number of servers to create. Defaults to 1.
|
20
|
+
# * 'max_count'<~Integer> - Max. number of servers to create. Defaults to being equal to min_count.
|
21
|
+
# * 'key_name'<~String> - Name of keypair to be used
|
22
|
+
# * 'security_groups'<~Array> - one or more security groups to be used
|
23
|
+
# * 'personality'<~Array>: Up to 5 files to customize server
|
24
|
+
# * 'file'<~Hash>:
|
25
|
+
# * 'contents'<~String> - Contents of file (10kb total of contents)
|
26
|
+
# * 'path'<~String> - Path to file (255 bytes total of path strings)
|
27
|
+
# * 'accessIPv4'<~String> - IPv4 IP address
|
28
|
+
# * 'accessIPv6'<~String> - IPv6 IP address
|
29
|
+
#
|
30
|
+
# ==== Returns
|
31
|
+
# * response<~Excon::Response>:
|
32
|
+
# * body<~Hash>:
|
33
|
+
# * 'server'<~Hash>:
|
34
|
+
# * 'addresses'<~Hash>:
|
35
|
+
# * 'private'<~Array> - private and public fixed and floating ip addresses
|
36
|
+
# * 'flavor'<~Hash>
|
37
|
+
# * 'id'<~String> - id of the flavor
|
38
|
+
# * 'links'<~Array> - array of flavor links
|
39
|
+
# * 'id'<~Integer> - id of server
|
40
|
+
# * 'links'<~Array> - array of server links
|
41
|
+
# * 'hostId'<~String>
|
42
|
+
# * 'metadata'<~Hash> - metadata
|
43
|
+
# * 'name'<~String> - name of server
|
44
|
+
# * 'accessIPv4'<~String> - IPv4 ip address
|
45
|
+
# * 'accessIPv6'<~String> - IPv6 ip address
|
46
|
+
# * 'progress'<~Integer> - progress through current status
|
47
|
+
# * 'status'<~String> - current server status
|
48
|
+
# * 'created'<~String> - created date time stamp
|
49
|
+
# * 'updated'<~String> - updated date time stamp
|
50
|
+
# * 'user_id'<~String> - user id
|
51
|
+
# * 'tenant_id'<~String> - tenant id
|
52
|
+
# * 'uuid'<~String> - uuid of the server
|
53
|
+
# * 'config_drive'<~String> - config drive
|
54
|
+
# * 'security_groups'<~Array of Hash>
|
55
|
+
# * 'id'<~Integer> - id of the security group
|
56
|
+
# * 'name'<~String> - name of the security group
|
57
|
+
# * 'links'<~Array> - array of security group links
|
58
|
+
# * 'key_name'<~String> - name of the keypair
|
59
|
+
# * 'adminPass'<~String> - admin password for server
|
60
|
+
def create_persistent_server(name, flavor_id, block_device_mapping = [], options = {})
|
61
|
+
data = {
|
62
|
+
'server' => {
|
63
|
+
'flavorRef' => flavor_id,
|
64
|
+
'imageRef' => nil,
|
65
|
+
'name' => name
|
66
|
+
}
|
67
|
+
}
|
68
|
+
if options['metadata']
|
69
|
+
data['server']['metadata'] = options['metadata']
|
70
|
+
end
|
71
|
+
if options['accessIPv4']
|
72
|
+
data['server']['accessIPv4'] = options['accessIPv4']
|
73
|
+
end
|
74
|
+
if options['accessIPv6']
|
75
|
+
data['server']['accessIPv6'] = options['accessIPv6']
|
76
|
+
end
|
77
|
+
if options['personality']
|
78
|
+
data['server']['personality'] = []
|
79
|
+
for file in options['personality']
|
80
|
+
data['server']['personality'] << {
|
81
|
+
'contents' => Base64.encode64(file['contents']),
|
82
|
+
'path' => file['path']
|
83
|
+
}
|
84
|
+
end
|
85
|
+
end
|
86
|
+
min_count = options['min_count'] || 1
|
87
|
+
max_count = options['max_count'] || min_count
|
88
|
+
data['server']['min_count'] = min_count
|
89
|
+
data['server']['max_count'] = max_count
|
90
|
+
|
91
|
+
if options['key_name']
|
92
|
+
data['server']['key_name'] = options['key_name']
|
93
|
+
end
|
94
|
+
if options['security_groups']
|
95
|
+
data['server']['security_groups'] = []
|
96
|
+
for sg in options['security_groups']
|
97
|
+
data['server']['security_groups'] << {
|
98
|
+
'name' => sg
|
99
|
+
}
|
100
|
+
end
|
101
|
+
end
|
102
|
+
if options['config_drive']
|
103
|
+
data['server']['config_drive'] = options['config_drive']
|
104
|
+
end
|
105
|
+
if block_device_mapping
|
106
|
+
data['server']['block_device_mapping'] = block_device_mapping
|
107
|
+
end
|
108
|
+
|
109
|
+
request(
|
110
|
+
:body => Fog::JSON.encode(data),
|
111
|
+
:expects => 200,
|
112
|
+
:method => 'POST',
|
113
|
+
:path => 'os-volumes_boot'
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
class Mock
|
120
|
+
|
121
|
+
def create_persistent_server(name, flavor_id, block_device_mapping = [], options = {})
|
122
|
+
response = Excon::Response.new
|
123
|
+
|
124
|
+
if block_device_mapping && !block_device_mapping.empty?
|
125
|
+
|
126
|
+
if options['security_groups']
|
127
|
+
sec_group_name = options['security_groups'][0]
|
128
|
+
else
|
129
|
+
sec_group_name = "default"
|
130
|
+
end
|
131
|
+
|
132
|
+
data = {
|
133
|
+
'addresses' => { "private"=>[{"version"=>4, "addr"=>Fog::HP::Mock.ip_address}] },
|
134
|
+
'flavor' => {"id"=>"#{flavor_id}", "links"=>[{"href"=>"http://nova1:8774/admin/flavors/#{flavor_id}", "rel"=>"bookmark"}]},
|
135
|
+
'id' => Fog::Mock.random_numbers(6).to_i,
|
136
|
+
'links' => [{"href"=>"http://nova1:8774/v1.1/admin/servers/5", "rel"=>"self"}, {"href"=>"http://nova1:8774/admin/servers/5", "rel"=>"bookmark"}],
|
137
|
+
'hostId' => "123456789ABCDEF01234567890ABCDEF",
|
138
|
+
'metadata' => options['metadata'] || {},
|
139
|
+
'name' => name || "server_#{rand(999)}",
|
140
|
+
'accessIPv4' => options['accessIPv4'] || "",
|
141
|
+
'accessIPv6' => options['accessIPv6'] || "",
|
142
|
+
'progress' => 0,
|
143
|
+
'status' => 'BUILD',
|
144
|
+
'created' => "2012-01-01T13:32:20Z",
|
145
|
+
'updated' => "2012-01-01T13:32:20Z",
|
146
|
+
'user_id' => Fog::HP::Mock.user_id.to_s,
|
147
|
+
'tenant_id' => Fog::HP::Mock.user_id.to_s,
|
148
|
+
'uuid' => "95253a45-9ead-43c6-90b3-65da2ef048b3",
|
149
|
+
'config_drive' => "",
|
150
|
+
'security_groups' => [{"name"=>"#{sec_group_name}", "links"=>[{"href"=>"http://nova1:8774/v1.1/admin//os-security-groups/111", "rel"=>"bookmark"}], "id"=>111}],
|
151
|
+
'key_name' => options['key_name'] || ""
|
152
|
+
}
|
153
|
+
self.data[:last_modified][:servers][data['id']] = Time.now
|
154
|
+
self.data[:servers][data['id']] = data
|
155
|
+
response.body = { 'server' => data.merge({'adminPass' => 'password'}) }
|
156
|
+
response.status = 200
|
157
|
+
response
|
158
|
+
else
|
159
|
+
response.status = 400
|
160
|
+
raise(Excon::Errors::BadRequest, "No boot volume or boot image specified")
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -8,16 +8,15 @@ module Fog
|
|
8
8
|
# ==== Parameters
|
9
9
|
# * name<~String> - Name of server
|
10
10
|
# * flavor_id<~Integer> - Id of flavor for server
|
11
|
-
# * image_id<~Integer> - Id of image for server
|
11
|
+
# * image_id<~Integer> - Id of image for server. If block_device_mapping is passed, this is ignored.
|
12
12
|
# * options<~Hash>:
|
13
13
|
# * 'metadata'<~Hash> - Up to 5 key value pairs containing 255 bytes of info
|
14
14
|
# * 'min_count'<~Integer> - Number of servers to create. Defaults to 1.
|
15
15
|
# * 'max_count'<~Integer> - Max. number of servers to create. Defaults to being equal to min_count.
|
16
16
|
# * 'key_name'<~String> - Name of keypair to be used
|
17
17
|
# * 'security_groups'<~Array> - one or more security groups to be used
|
18
|
-
# * 'availability_zone'<~String> - the availability zone to be used
|
19
18
|
# * 'personality'<~Array>: Up to 5 files to customize server
|
20
|
-
# * file<~Hash>:
|
19
|
+
# * 'file'<~Hash>:
|
21
20
|
# * 'contents'<~String> - Contents of file (10kb total of contents)
|
22
21
|
# * 'path'<~String> - Path to file (255 bytes total of path strings)
|
23
22
|
# * 'accessIPv4'<~String> - IPv4 IP address
|
@@ -28,17 +27,34 @@ module Fog
|
|
28
27
|
# * body<~Hash>:
|
29
28
|
# * 'server'<~Hash>:
|
30
29
|
# * 'addresses'<~Hash>:
|
31
|
-
# * '
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
30
|
+
# * 'private'<~Array> - private and public fixed and floating ip addresses
|
31
|
+
# * 'flavor'<~Hash>
|
32
|
+
# * 'id'<~String> - id of the flavor
|
33
|
+
# * 'links'<~Array> - array of flavor links
|
34
|
+
# * 'id'<~Integer> - id of server
|
35
|
+
# * 'image'<~Hash> - id of image used to boot server
|
36
|
+
# * 'id'<~String> - id of the image
|
37
|
+
# * 'links'<~Array> - array of image links
|
38
|
+
# * 'links'<~Array> - array of server links
|
35
39
|
# * 'hostId'<~String>
|
36
|
-
# * 'id'<~Integer> - Id of server
|
37
|
-
# * 'imageId'<~Integer> - Id of image used to boot server
|
38
40
|
# * 'metadata'<~Hash> - metadata
|
39
|
-
# * 'name'<~String> -
|
40
|
-
# * '
|
41
|
-
# * '
|
41
|
+
# * 'name'<~String> - name of server
|
42
|
+
# * 'accessIPv4'<~String> - IPv4 ip address
|
43
|
+
# * 'accessIPv6'<~String> - IPv6 ip address
|
44
|
+
# * 'progress'<~Integer> - progress through current status
|
45
|
+
# * 'status'<~String> - current server status
|
46
|
+
# * 'created'<~String> - created date time stamp
|
47
|
+
# * 'updated'<~String> - updated date time stamp
|
48
|
+
# * 'user_id'<~String> - user id
|
49
|
+
# * 'tenant_id'<~String> - tenant id
|
50
|
+
# * 'uuid'<~String> - uuid of the server
|
51
|
+
# * 'config_drive'<~String> - config drive
|
52
|
+
# * 'security_groups'<~Array of Hash>
|
53
|
+
# * 'id'<~Integer> - id of the security group
|
54
|
+
# * 'name'<~String> - name of the security group
|
55
|
+
# * 'links'<~Array> - array of security group links
|
56
|
+
# * 'key_name'<~String> - name of the keypair
|
57
|
+
# * 'adminPass'<~String> - admin password for server
|
42
58
|
def create_server(name, flavor_id, image_id, options = {})
|
43
59
|
data = {
|
44
60
|
'server' => {
|
@@ -81,8 +97,8 @@ module Fog
|
|
81
97
|
}
|
82
98
|
end
|
83
99
|
end
|
84
|
-
if options['
|
85
|
-
data['server']['
|
100
|
+
if options['config_drive']
|
101
|
+
data['server']['config_drive'] = options['config_drive']
|
86
102
|
end
|
87
103
|
|
88
104
|
request(
|
@@ -101,11 +117,11 @@ module Fog
|
|
101
117
|
response = Excon::Response.new
|
102
118
|
response.status = 202
|
103
119
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
120
|
+
if options['security_groups']
|
121
|
+
sec_group_name = options['security_groups'][0]
|
122
|
+
else
|
123
|
+
sec_group_name = "default"
|
124
|
+
end
|
109
125
|
data = {
|
110
126
|
'addresses' => { "private"=>[{"version"=>4, "addr"=>Fog::HP::Mock.ip_address}] },
|
111
127
|
'flavor' => {"id"=>"#{flavor_id}", "links"=>[{"href"=>"http://nova1:8774/admin/flavors/#{flavor_id}", "rel"=>"bookmark"}]},
|
@@ -125,7 +141,7 @@ module Fog
|
|
125
141
|
'tenant_id' => Fog::HP::Mock.user_id.to_s,
|
126
142
|
'uuid' => "95253a45-9ead-43c6-90b3-65da2ef048b3",
|
127
143
|
'config_drive' => "",
|
128
|
-
|
144
|
+
'security_groups' => [{"name"=>"#{sec_group_name}", "links"=>[{"href"=>"http://nova1:8774/v1.1/admin//os-security-groups/111", "rel"=>"bookmark"}], "id"=>111}],
|
129
145
|
'key_name' => options['key_name'] || ""
|
130
146
|
}
|
131
147
|
self.data[:last_modified][:servers][data['id']] = Time.now
|