fog 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +21 -0
- data/README.md +3 -1
- data/Rakefile +4 -1
- data/changelog.txt +462 -0
- data/docs/storage/index.markdown +4 -4
- data/fog.gemspec +2 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/atmos.rb +11 -0
- data/lib/fog/atmos/models/storage/directories.rb +48 -0
- data/lib/fog/atmos/models/storage/directory.rb +53 -0
- data/lib/fog/atmos/models/storage/file.rb +107 -0
- data/lib/fog/atmos/models/storage/files.rb +73 -0
- data/lib/fog/atmos/requests/storage/delete_namespace.rb +19 -0
- data/lib/fog/atmos/requests/storage/get_namespace.rb +20 -0
- data/lib/fog/atmos/requests/storage/head_namespace.rb +20 -0
- data/lib/fog/atmos/requests/storage/post_namespace.rb +20 -0
- data/lib/fog/atmos/requests/storage/put_namespace.rb +20 -0
- data/lib/fog/atmos/storage.rb +186 -0
- data/lib/fog/aws.rb +2 -0
- data/lib/fog/aws/auto_scaling.rb +15 -1
- data/lib/fog/aws/compute.rb +26 -17
- data/lib/fog/aws/elb.rb +14 -2
- data/lib/fog/aws/glacier.rb +172 -0
- data/lib/fog/aws/iam.rb +35 -29
- data/lib/fog/aws/models/auto_scaling/group.rb +1 -1
- data/lib/fog/aws/models/compute/flavors.rb +11 -0
- data/lib/fog/aws/models/compute/security_group.rb +22 -6
- data/lib/fog/aws/models/compute/server.rb +5 -1
- data/lib/fog/aws/models/compute/spot_request.rb +12 -0
- data/lib/fog/aws/models/compute/spot_requests.rb +1 -2
- data/lib/fog/aws/models/compute/volume.rb +7 -1
- data/lib/fog/aws/models/glacier/archive.rb +70 -0
- data/lib/fog/aws/models/glacier/archives.rb +30 -0
- data/lib/fog/aws/models/glacier/job.rb +65 -0
- data/lib/fog/aws/models/glacier/jobs.rb +45 -0
- data/lib/fog/aws/models/glacier/vault.rb +53 -0
- data/lib/fog/aws/models/glacier/vaults.rb +28 -0
- data/lib/fog/aws/models/rds/server.rb +3 -1
- data/lib/fog/aws/models/rds/snapshot.rb +1 -0
- data/lib/fog/aws/models/rds/snapshots.rb +3 -0
- data/lib/fog/aws/models/storage/file.rb +4 -3
- data/lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_groups.rb +8 -1
- data/lib/fog/aws/parsers/compute/create_volume.rb +2 -2
- data/lib/fog/aws/parsers/compute/describe_instance_status.rb +8 -1
- data/lib/fog/aws/parsers/compute/describe_instances.rb +2 -0
- data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
- data/lib/fog/aws/parsers/compute/describe_volumes.rb +2 -2
- data/lib/fog/aws/parsers/compute/run_instances.rb +2 -0
- data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +1 -1
- data/lib/fog/aws/parsers/dns/list_resource_record_sets.rb +3 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +3 -1
- data/lib/fog/aws/parsers/rds/snapshot_parser.rb +1 -0
- data/lib/fog/aws/rds.rb +9 -9
- data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +1 -0
- data/lib/fog/aws/requests/auto_scaling/delete_auto_scaling_group.rb +1 -1
- data/lib/fog/aws/requests/compute/create_volume.rb +53 -14
- data/lib/fog/aws/requests/compute/describe_instance_status.rb +2 -0
- data/lib/fog/aws/requests/compute/describe_instances.rb +3 -1
- data/lib/fog/aws/requests/compute/describe_internet_gateways.rb +13 -7
- data/lib/fog/aws/requests/compute/describe_spot_instance_requests.rb +1 -0
- data/lib/fog/aws/requests/compute/describe_subnets.rb +13 -7
- data/lib/fog/aws/requests/compute/describe_volumes.rb +2 -0
- data/lib/fog/aws/requests/compute/describe_vpcs.rb +12 -6
- data/lib/fog/aws/requests/compute/request_spot_instances.rb +2 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +8 -2
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +20 -1
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +2 -2
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +1 -1
- data/lib/fog/aws/requests/glacier/abort_multipart_upload.rb +35 -0
- data/lib/fog/aws/requests/glacier/complete_multipart_upload.rb +42 -0
- data/lib/fog/aws/requests/glacier/create_archive.rb +43 -0
- data/lib/fog/aws/requests/glacier/create_vault.rb +34 -0
- data/lib/fog/aws/requests/glacier/delete_archive.rb +35 -0
- data/lib/fog/aws/requests/glacier/delete_vault.rb +34 -0
- data/lib/fog/aws/requests/glacier/delete_vault_notification_configuration.rb +33 -0
- data/lib/fog/aws/requests/glacier/describe_job.rb +35 -0
- data/lib/fog/aws/requests/glacier/describe_vault.rb +34 -0
- data/lib/fog/aws/requests/glacier/get_job_output.rb +41 -0
- data/lib/fog/aws/requests/glacier/get_vault_notification_configuration.rb +34 -0
- data/lib/fog/aws/requests/glacier/initiate_job.rb +41 -0
- data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +38 -0
- data/lib/fog/aws/requests/glacier/list_jobs.rb +39 -0
- data/lib/fog/aws/requests/glacier/list_multipart_uploads.rb +37 -0
- data/lib/fog/aws/requests/glacier/list_parts.rb +37 -0
- data/lib/fog/aws/requests/glacier/list_vaults.rb +36 -0
- data/lib/fog/aws/requests/glacier/set_vault_notification_configuration.rb +37 -0
- data/lib/fog/aws/requests/glacier/upload_part.rb +46 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +7 -5
- data/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb +41 -1
- data/lib/fog/aws/requests/rds/create_db_snapshot.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_instances.rb +8 -10
- data/lib/fog/aws/requests/rds/describe_db_security_groups.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +2 -0
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +7 -6
- data/lib/fog/aws/requests/rds/reboot_db_instance.rb +6 -5
- data/lib/fog/aws/requests/storage/get_object.rb +45 -2
- data/lib/fog/aws/requests/storage/upload_part.rb +1 -0
- data/lib/fog/aws/signaturev4.rb +73 -0
- data/lib/fog/aws/sqs.rb +2 -6
- data/lib/fog/bare_metal_cloud/compute.rb +3 -1
- data/lib/fog/bare_metal_cloud/requests/compute/add_server_by_configuration.rb +33 -0
- data/lib/fog/bare_metal_cloud/requests/compute/get_server.rb +17 -12
- data/lib/fog/bare_metal_cloud/requests/compute/list_configurations.rb +27 -0
- data/lib/fog/bare_metal_cloud/requests/compute/list_images.rb +4 -4
- data/lib/fog/bare_metal_cloud/requests/compute/list_plans.rb +7 -7
- data/lib/fog/bare_metal_cloud/requests/compute/list_servers.rb +2 -2
- data/lib/fog/bin.rb +7 -0
- data/lib/fog/bin/atmos.rb +31 -0
- data/lib/fog/bin/aws.rb +4 -0
- data/lib/fog/bin/ecloud.rb +4 -0
- data/lib/fog/bin/rackspace.rb +7 -0
- data/lib/fog/bin/serverlove.rb +31 -0
- data/lib/fog/bluebox/requests/compute/create_block.rb +18 -4
- data/lib/fog/brightbox/compute.rb +52 -0
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +2 -0
- data/lib/fog/brightbox/models/compute/image.rb +1 -0
- data/lib/fog/brightbox/models/compute/server.rb +46 -3
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +3 -3
- data/lib/fog/cloudstack/compute.rb +4 -1
- data/lib/fog/cloudstack/models/compute/images.rb +15 -6
- data/lib/fog/cloudstack/models/compute/job.rb +1 -1
- data/lib/fog/cloudstack/requests/compute/attach_volume.rb +1 -1
- data/lib/fog/cloudstack/requests/compute/register_template.rb +35 -0
- data/lib/fog/compute.rb +15 -3
- data/lib/fog/core/errors.rb +1 -0
- data/lib/fog/core/time.rb +4 -0
- data/lib/fog/dynect/dns.rb +5 -5
- data/lib/fog/ecloud.rb +6 -0
- data/lib/fog/ecloud/compute.rb +3 -1
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +1 -0
- data/lib/fog/ecloud/models/compute/networks.rb +1 -0
- data/lib/fog/ecloud/models/compute/server.rb +31 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_add_ip.rb +40 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_upload_file.rb +31 -0
- data/lib/fog/google/models/storage/directory.rb +2 -2
- data/lib/fog/google/models/storage/file.rb +2 -2
- data/lib/fog/google/requests/storage/get_bucket.rb +1 -2
- data/lib/fog/google/requests/storage/put_object.rb +1 -2
- data/lib/fog/google/storage.rb +1 -1
- data/lib/fog/hp/models/compute/image.rb +1 -1
- data/lib/fog/hp/models/compute/server.rb +4 -0
- data/lib/fog/hp/requests/compute/delete_security_group_rule.rb +4 -4
- data/lib/fog/hp/requests/storage/get_object.rb +8 -2
- data/lib/fog/hp/storage.rb +1 -0
- data/lib/fog/libvirt/models/compute/server.rb +1 -1
- data/lib/fog/libvirt/models/compute/templates/server.xml.erb +1 -1
- data/lib/fog/openstack.rb +7 -0
- data/lib/fog/openstack/compute.rb +4 -1
- data/lib/fog/openstack/models/compute/server.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_server.rb +8 -2
- data/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +1 -1
- data/lib/fog/openstack/requests/identity/list_tenants.rb +1 -0
- data/lib/fog/providers.rb +2 -0
- data/lib/fog/rackspace.rb +9 -7
- data/lib/fog/rackspace/block_storage.rb +114 -0
- data/lib/fog/rackspace/compute_v2.rb +123 -0
- data/lib/fog/rackspace/models/block_storage/snapshot.rb +46 -0
- data/lib/fog/rackspace/models/block_storage/snapshots.rb +25 -0
- data/lib/fog/rackspace/models/block_storage/volume.rb +58 -0
- data/lib/fog/rackspace/models/block_storage/volume_type.rb +14 -0
- data/lib/fog/rackspace/models/block_storage/volume_types.rb +25 -0
- data/lib/fog/rackspace/models/block_storage/volumes.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/attachment.rb +34 -0
- data/lib/fog/rackspace/models/compute_v2/attachments.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/flavor.rb +17 -0
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/image.rb +30 -0
- data/lib/fog/rackspace/models/compute_v2/images.rb +25 -0
- data/lib/fog/rackspace/models/compute_v2/server.rb +147 -0
- data/lib/fog/rackspace/models/compute_v2/servers.rb +25 -0
- data/lib/fog/rackspace/models/storage/directory.rb +3 -3
- data/lib/fog/rackspace/requests/block_storage/create_snapshot.rb +26 -0
- data/lib/fog/rackspace/requests/block_storage/create_volume.rb +27 -0
- data/lib/fog/rackspace/requests/block_storage/delete_snapshot.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/delete_volume.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/get_snapshot.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/get_volume.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/get_volume_type.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/list_snapshots.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/list_volume_types.rb +15 -0
- data/lib/fog/rackspace/requests/block_storage/list_volumes.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/attach_volume.rb +23 -0
- data/lib/fog/rackspace/requests/compute_v2/change_server_password.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb +20 -0
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +28 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_attachment.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_flavor.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_image.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/get_server.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_attachments.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_flavors.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_images.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +15 -0
- data/lib/fog/rackspace/requests/compute_v2/reboot_server.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +22 -0
- data/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb +20 -0
- data/lib/fog/rackspace/requests/compute_v2/update_server.rb +22 -0
- data/lib/fog/rackspace/requests/storage/delete_object.rb +1 -1
- data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +51 -0
- data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +37 -0
- data/lib/fog/rackspace/storage.rb +4 -0
- data/lib/fog/serverlove.rb +10 -0
- data/lib/fog/serverlove/compute.rb +97 -0
- data/lib/fog/serverlove/models/compute/image.rb +57 -0
- data/lib/fog/serverlove/models/compute/images.rb +26 -0
- data/lib/fog/serverlove/models/compute/server.rb +72 -0
- data/lib/fog/serverlove/models/compute/servers.rb +26 -0
- data/lib/fog/serverlove/requests/compute/create_image.rb +32 -0
- data/lib/fog/serverlove/requests/compute/create_server.rb +34 -0
- data/lib/fog/serverlove/requests/compute/destroy_image.rb +13 -0
- data/lib/fog/serverlove/requests/compute/destroy_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_image.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_images.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/get_servers.rb +13 -0
- data/lib/fog/serverlove/requests/compute/load_standard_image.rb +13 -0
- data/lib/fog/serverlove/requests/compute/reset_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/shutdown_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/start_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/stop_server.rb +13 -0
- data/lib/fog/serverlove/requests/compute/update_image.rb +15 -0
- data/lib/fog/serverlove/requests/compute/update_server.rb +15 -0
- data/lib/fog/serverlove/util/compute/password_generator.rb +11 -0
- data/lib/fog/storage.rb +3 -0
- data/lib/fog/terremark/models/shared/image.rb +22 -0
- data/lib/fog/terremark/models/shared/images.rb +48 -0
- data/lib/fog/terremark/models/shared/internetservice.rb +67 -0
- data/lib/fog/terremark/models/shared/internetservices.rb +42 -0
- data/lib/fog/terremark/models/shared/nodeservice.rb +52 -0
- data/lib/fog/terremark/models/shared/nodeservices.rb +32 -0
- data/lib/fog/terremark/models/shared/server.rb +114 -15
- data/lib/fog/terremark/models/shared/servers.rb +7 -8
- data/lib/fog/terremark/models/shared/vdc.rb +6 -1
- data/lib/fog/terremark/parsers/shared/get_catalog.rb +7 -2
- data/lib/fog/terremark/parsers/shared/get_keys_list.rb +56 -0
- data/lib/fog/terremark/requests/shared/add_internet_service.rb +10 -9
- data/lib/fog/terremark/requests/shared/add_node_service.rb +10 -12
- data/lib/fog/terremark/requests/shared/configure_vapp.rb +61 -0
- data/lib/fog/terremark/requests/shared/create_internet_service.rb +16 -11
- data/lib/fog/terremark/requests/shared/delete_internet_service.rb +2 -1
- data/lib/fog/terremark/requests/shared/delete_node_service.rb +2 -1
- data/lib/fog/terremark/requests/shared/delete_public_ip.rb +2 -1
- data/lib/fog/terremark/requests/shared/get_internet_services.rb +2 -1
- data/lib/fog/terremark/requests/shared/get_keys_list.rb +36 -0
- data/lib/fog/terremark/requests/shared/get_node_services.rb +2 -1
- data/lib/fog/terremark/requests/shared/instantiate_vapp_template.rb +11 -1
- data/lib/fog/terremark/shared.rb +19 -1
- data/lib/fog/terremark/vcloud.rb +10 -1
- data/lib/fog/vcloud/compute.rb +13 -13
- data/lib/fog/vcloud/models/compute/catalog_items.rb +6 -2
- data/lib/fog/vcloud/models/compute/organizations.rb +1 -2
- data/lib/fog/vcloud/models/compute/server.rb +37 -3
- data/lib/fog/vcloud/models/compute/vapps.rb +1 -1
- data/lib/fog/vcloud/requests/compute/configure_org_network.rb +141 -0
- data/lib/fog/vcloud/requests/compute/configure_vm_cpus.rb +38 -0
- data/lib/fog/vcloud/requests/compute/configure_vm_memory.rb +11 -12
- data/lib/fog/vcloud/requests/compute/configure_vm_password.rb +39 -0
- data/lib/fog/vcloud/requests/compute/undeploy.rb +9 -1
- data/lib/fog/vsphere/requests/compute/vm_reboot.rb +1 -1
- data/tests/atmos/models/storage/file_update_tests.rb +19 -0
- data/tests/atmos/models/storage/nested_directories_tests.rb +23 -0
- data/tests/aws/models/compute/security_group_tests.rb +21 -12
- data/tests/aws/models/dns/records_tests.rb +8 -2
- data/tests/aws/models/glacier/model_tests.rb +47 -0
- data/tests/aws/models/iam/policies_tests.rb +2 -2
- data/tests/aws/models/rds/server_tests.rb +5 -2
- data/tests/aws/models/storage/directory_tests.rb +1 -1
- data/tests/aws/models/storage/file_tests.rb +1 -1
- data/tests/aws/models/storage/files_tests.rb +1 -1
- data/tests/aws/models/storage/url_tests.rb +8 -8
- data/tests/aws/models/storage/version_tests.rb +1 -1
- data/tests/aws/models/storage/versions_tests.rb +1 -1
- data/tests/aws/requests/auto_scaling/auto_scaling_tests.rb +5 -0
- data/tests/aws/requests/auto_scaling/helper.rb +2 -1
- data/tests/aws/requests/compute/instance_tests.rb +17 -23
- data/tests/aws/requests/compute/spot_instance_tests.rb +2 -1
- data/tests/aws/requests/compute/tag_tests.rb +1 -0
- data/tests/aws/requests/compute/volume_tests.rb +45 -4
- data/tests/aws/requests/elb/helper.rb +2 -2
- data/tests/aws/requests/elb/listener_tests.rb +2 -2
- data/tests/aws/requests/elb/load_balancer_tests.rb +1 -1
- data/tests/aws/requests/glacier/archive_tests.rb +13 -0
- data/tests/aws/requests/glacier/multipart_upload_tests.rb +30 -0
- data/tests/aws/requests/glacier/tree_hash_tests.rb +63 -0
- data/tests/aws/requests/glacier/vault_tests.rb +35 -0
- data/tests/aws/requests/rds/helper.rb +11 -5
- data/tests/aws/requests/rds/instance_tests.rb +0 -2
- data/tests/aws/requests/storage/acl_utils_tests.rb +1 -1
- data/tests/aws/requests/storage/bucket_tests.rb +1 -1
- data/tests/aws/requests/storage/multipart_upload_tests.rb +1 -1
- data/tests/aws/requests/storage/object_tests.rb +8 -0
- data/tests/aws/requests/storage/versioning_tests.rb +1 -1
- data/tests/aws/signaturev4_tests.rb +41 -0
- data/tests/brightbox/compute_tests.rb +9 -0
- data/tests/brightbox/requests/compute/helper.rb +21 -6
- data/tests/cloudstack/compute/models/volume_tests.rb +1 -1
- data/tests/cloudstack/requests/volume_tests.rb +1 -1
- data/tests/compute/helper.rb +10 -4
- data/tests/dynect/requests/dns/dns_tests.rb +39 -0
- data/tests/google/requests/storage/bucket_tests.rb +2 -3
- data/tests/google/requests/storage/object_tests.rb +1 -1
- data/tests/helper.rb +10 -3
- data/tests/helpers/formats_helper.rb +4 -2
- data/tests/helpers/formats_helper_tests.rb +9 -0
- data/tests/helpers/mock_helper.rb +6 -1
- data/tests/helpers/model_helper.rb +0 -3
- data/tests/hp/models/compute/address_tests.rb +1 -1
- data/tests/hp/models/compute/addresses_tests.rb +1 -1
- data/tests/hp/models/compute/key_pair_tests.rb +1 -1
- data/tests/hp/models/compute/key_pairs_tests.rb +1 -1
- data/tests/hp/models/compute/security_group_tests.rb +1 -1
- data/tests/hp/models/compute/security_groups_tests.rb +1 -1
- data/tests/hp/requests/cdn/container_tests.rb +1 -1
- data/tests/hp/requests/compute/address_tests.rb +1 -1
- data/tests/hp/requests/compute/flavor_tests.rb +1 -1
- data/tests/hp/requests/compute/image_tests.rb +1 -1
- data/tests/hp/requests/compute/key_pair_tests.rb +1 -1
- data/tests/hp/requests/compute/security_group_rule_tests.rb +1 -1
- data/tests/hp/requests/compute/security_group_tests.rb +1 -1
- data/tests/hp/requests/compute/server_address_tests.rb +1 -1
- data/tests/hp/requests/compute/server_tests.rb +1 -1
- data/tests/hp/requests/storage/container_tests.rb +1 -1
- data/tests/hp/requests/storage/object_tests.rb +1 -1
- data/tests/local/models/file_tests.rb +1 -1
- data/tests/rackspace/models/block_storage/snapshot_tests.rb +20 -0
- data/tests/rackspace/models/block_storage/snapshots_tests.rb +20 -0
- data/tests/rackspace/models/block_storage/volume_tests.rb +27 -0
- data/tests/rackspace/models/block_storage/volume_types_tests.rb +20 -0
- data/tests/rackspace/models/block_storage/volumes_tests.rb +11 -0
- data/tests/rackspace/models/compute_v2/flavors_tests.rb +20 -0
- data/tests/rackspace/models/compute_v2/images_tests.rb +22 -0
- data/tests/rackspace/models/compute_v2/server_tests.rb +62 -0
- data/tests/rackspace/models/compute_v2/servers_tests.rb +14 -0
- data/tests/rackspace/requests/block_storage/snapshot_tests.rb +81 -0
- data/tests/rackspace/requests/block_storage/volume_tests.rb +61 -0
- data/tests/rackspace/requests/block_storage/volume_type_tests.rb +31 -0
- data/tests/rackspace/requests/compute_v2/attachment_tests.rb +68 -0
- data/tests/rackspace/requests/compute_v2/flavor_tests.rb +43 -0
- data/tests/rackspace/requests/compute_v2/image_tests.rb +47 -0
- data/tests/rackspace/requests/compute_v2/server_tests.rb +147 -0
- data/tests/rackspace/requests/storage/account_tests.rb +17 -0
- data/tests/rackspace/requests/storage/container_tests.rb +1 -1
- data/tests/rackspace/requests/storage/large_object_tests.rb +1 -1
- data/tests/rackspace/requests/storage/object_tests.rb +41 -2
- data/tests/serverlove/requests/compute/image_tests.rb +57 -0
- data/tests/serverlove/requests/compute/server_tests.rb +85 -0
- data/tests/serverlove/util/compute/password_generator_tests.rb +19 -0
- data/tests/storage/models/directories_tests.rb +1 -1
- data/tests/storage/models/directory_test.rb +1 -1
- data/tests/storage/models/file_tests.rb +1 -1
- data/tests/storage/models/files_tests.rb +1 -1
- metadata +188 -3
@@ -6,6 +6,7 @@ Shindo.tests("Fog::Compute[:aws] | security_group", ['aws']) do
|
|
6
6
|
@group = Fog::Compute[:aws].security_groups.create(:name => "foggroup", :description => "fog group desc")
|
7
7
|
|
8
8
|
@other_group = Fog::Compute[:aws].security_groups.create(:name => 'fog other group', :description => 'another fog group')
|
9
|
+
@other_group.reload
|
9
10
|
|
10
11
|
test("authorize access by another security group") do
|
11
12
|
@group.authorize_group_and_owner(@other_group.name)
|
@@ -31,18 +32,26 @@ Shindo.tests("Fog::Compute[:aws] | security_group", ['aws']) do
|
|
31
32
|
@group.ip_permissions.empty?
|
32
33
|
end
|
33
34
|
|
34
|
-
|
35
|
-
@other_group.
|
36
|
-
@
|
37
|
-
@
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
35
|
+
group_forms = [
|
36
|
+
"#{@other_group.owner_id}:#{@other_group.group_id}", # deprecated form
|
37
|
+
@other_group.group_id,
|
38
|
+
{@other_group.owner_id => @other_group.group_id}
|
39
|
+
]
|
40
|
+
|
41
|
+
group_forms.each do |group_arg|
|
42
|
+
test("authorize port range access by another security group #{group_arg.inspect}") do
|
43
|
+
@other_group.reload
|
44
|
+
@group.authorize_port_range(5000..6000, {:group => group_arg})
|
45
|
+
@group.reload
|
46
|
+
@group.ip_permissions.size == 1
|
47
|
+
end
|
48
|
+
|
49
|
+
test("revoke port range access by another security group") do
|
50
|
+
@other_group.reload
|
51
|
+
@group.revoke_port_range(5000..6000, {:group => group_arg})
|
52
|
+
@group.reload
|
53
|
+
@group.ip_permissions.empty?
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
@other_group.destroy
|
@@ -22,14 +22,20 @@ Shindo.tests("Fog::DNS[:aws] | records", ['aws', 'dns']) do
|
|
22
22
|
records << @zone.records.create(:name => "#{i}.#{@zone.domain}", :type => "A", :ttl => 3600, :value => ['1.2.3.4'])
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
records << @zone.records.create(:name => "*.#{@zone.domain}", :type => "A", :ttl => 3600, :value => ['1.2.3.4'])
|
26
|
+
|
27
|
+
tests("#all!").returns(103) do
|
26
28
|
@zone.records.all!.size
|
27
29
|
end
|
28
30
|
|
29
|
-
tests("#all!").returns(
|
31
|
+
tests("#all!").returns(103) do
|
30
32
|
@zone.records.all!.size
|
31
33
|
end
|
32
34
|
|
35
|
+
tests("#all wildcard parsing").returns(true) do
|
36
|
+
@zone.records.map(&:name).include?("*.#{@zone.domain}")
|
37
|
+
end
|
38
|
+
|
33
39
|
records.each do |record|
|
34
40
|
record.destroy
|
35
41
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
Shindo.tests('AWS::Glacier | models', ['aws', 'glacier']) do
|
2
|
+
pending if Fog.mocking?
|
3
|
+
tests('success') do
|
4
|
+
tests('vaults') do
|
5
|
+
tests('getting a missing vault') do
|
6
|
+
returns(nil) { Fog::AWS[:glacier].vaults.get('no-such-vault') }
|
7
|
+
end
|
8
|
+
|
9
|
+
vault = nil
|
10
|
+
tests('creating a vault') do
|
11
|
+
vault = Fog::AWS[:glacier].vaults.create :id => 'Fog-Test-Vault'
|
12
|
+
tests("id is Fog-Test-Vault").returns('Fog-Test-Vault') {vault.id}
|
13
|
+
end
|
14
|
+
|
15
|
+
tests('all') do
|
16
|
+
tests('contains vault').returns(true) { Fog::AWS[:glacier].vaults.collect {|vault| vault.id}.include?(vault.id)}
|
17
|
+
end
|
18
|
+
|
19
|
+
tests('destroy') do
|
20
|
+
vault.destroy
|
21
|
+
tests('removes vault').returns(nil) {Fog::AWS[:glacier].vaults.get(vault.id)}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
tests("archives") do
|
26
|
+
vault = Fog::AWS[:glacier].vaults.create :id => 'Fog-Test-Vault-upload'
|
27
|
+
tests('create') do
|
28
|
+
archive = vault.archives.create(:body => 'data')
|
29
|
+
tests('sets id').returns(true) {!archive.id.nil?}
|
30
|
+
archive.destroy
|
31
|
+
end
|
32
|
+
tests('create multipart') do
|
33
|
+
body = StringIO.new('x'*1024*1024*2)
|
34
|
+
body.rewind
|
35
|
+
archive = vault.archives.create(:body => body, :multipart_chunk_size => 1024*1024)
|
36
|
+
tests('sets id').returns(true) {!archive.id.nil?}
|
37
|
+
archive.destroy
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
vault = Fog::AWS[:glacier].vaults.create :id => 'Fog-Test-Vault'
|
42
|
+
tests("jobs") do
|
43
|
+
tests('all').returns([]) {vault.jobs}
|
44
|
+
end
|
45
|
+
vault.destroy
|
46
|
+
end
|
47
|
+
end
|
@@ -14,7 +14,7 @@ Shindo.tests("Fog::Compute[:iam] | policies", ['aws','iam']) do
|
|
14
14
|
|
15
15
|
tests('#create') do
|
16
16
|
tests('a valid policy').succeeds do
|
17
|
-
policy = @user.policies.create(id
|
17
|
+
policy = @user.policies.create(:id => @policy_name, :document => @policy_document)
|
18
18
|
policy.id == @policy_name
|
19
19
|
policy.username == @username
|
20
20
|
policy.document == @policy_document
|
@@ -26,7 +26,7 @@ Shindo.tests("Fog::Compute[:iam] | policies", ['aws','iam']) do
|
|
26
26
|
#end
|
27
27
|
end
|
28
28
|
|
29
|
-
@user.policies.create(id
|
29
|
+
@user.policies.create(:id => 'another-policy', :document => {})
|
30
30
|
|
31
31
|
tests('#all','there are two policies').succeeds do
|
32
32
|
@user.policies.size == 2
|
@@ -6,6 +6,10 @@ Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
|
6
6
|
|
7
7
|
@instance.wait_for(20*60) { ready? }
|
8
8
|
|
9
|
+
test('#read_replica_identifiers is []') do
|
10
|
+
returns([]) { @instance.read_replica_identifiers }
|
11
|
+
end
|
12
|
+
|
9
13
|
tests('#snapshots') do
|
10
14
|
snapshot = nil
|
11
15
|
|
@@ -26,7 +30,7 @@ Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
|
26
30
|
pending if Fog.mocking?
|
27
31
|
|
28
32
|
orig_parameter_group = @instance.db_parameter_groups.first['DBParameterGroupName']
|
29
|
-
parameter_group = Fog::AWS[:rds].parameter_groups.create(:id => uniq_id, :family => 'mysql5.
|
33
|
+
parameter_group = Fog::AWS[:rds].parameter_groups.create(:id => uniq_id, :family => 'mysql5.5', :description => 'fog-test')
|
30
34
|
|
31
35
|
orig_security_groups = @instance.db_security_groups.map{|h| h['DBSecurityGroupName']}
|
32
36
|
security_group = Fog::AWS[:rds].security_groups.create(:id => uniq_id, :description => 'fog-test')
|
@@ -77,7 +81,6 @@ Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
|
77
81
|
@instance.reload.wait_for { ready? }
|
78
82
|
|
79
83
|
tests('#create_read_replica').succeeds do
|
80
|
-
pending if Fog.mocking?
|
81
84
|
|
82
85
|
replica = @instance_with_final_snapshot.create_read_replica(uniq_id('fog-replica'))
|
83
86
|
@instance_with_final_snapshot.reload
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
Shindo.tests('AWS | url') do
|
3
|
+
Shindo.tests('AWS | url', ["aws"]) do
|
4
4
|
|
5
|
-
@expires =
|
5
|
+
@expires = Time.utc(2013,1,1).utc.to_i
|
6
6
|
|
7
7
|
@storage = Fog::Storage.new(
|
8
|
-
provider
|
9
|
-
aws_access_key_id
|
10
|
-
aws_secret_access_key
|
11
|
-
region
|
8
|
+
:provider => 'AWS',
|
9
|
+
:aws_access_key_id => '123',
|
10
|
+
:aws_secret_access_key => 'abc',
|
11
|
+
:region => 'us-east-1'
|
12
12
|
)
|
13
13
|
|
14
|
-
@file = @storage.directories.new(key
|
14
|
+
@file = @storage.directories.new(:key => 'fognonbucket').files.new(:key => 'test.txt')
|
15
15
|
|
16
16
|
if Fog.mock?
|
17
17
|
signature = Fog::Storage::AWS.new.signature(nil)
|
@@ -22,7 +22,7 @@ Shindo.tests('AWS | url') do
|
|
22
22
|
tests('#url w/ response-cache-control').returns(
|
23
23
|
"https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&AWSAccessKeyId=123&Signature=#{signature}&Expires=1356998400"
|
24
24
|
) do
|
25
|
-
@file.url(@expires, query
|
25
|
+
@file.url(@expires, :query => { 'response-cache-control' => 'No-cache' })
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
@@ -75,6 +75,11 @@ Shindo.tests('AWS::AutoScaling | auto_scaling_tests', ['aws', 'auto_scaling']) d
|
|
75
75
|
tests("#delete_auto_scaling_group").formats(AWS::AutoScaling::Formats::BASIC) do
|
76
76
|
Fog::AWS[:auto_scaling].delete_auto_scaling_group(@asg_name).body
|
77
77
|
end
|
78
|
+
|
79
|
+
tests("#delete_auto_scaling_group that does not exists").raises(Fog::AWS::AutoScaling::ValidationError) do
|
80
|
+
Fog::AWS[:auto_scaling].delete_auto_scaling_group("group that does not exist")
|
81
|
+
end
|
82
|
+
|
78
83
|
tests("#delete_launch_configuration").formats(AWS::AutoScaling::Formats::BASIC) do
|
79
84
|
Fog::AWS[:auto_scaling].delete_launch_configuration(@lc_name).body
|
80
85
|
end
|
@@ -81,7 +81,8 @@ class AWS
|
|
81
81
|
'MinSize' => Integer,
|
82
82
|
'PlacementGroup' => Fog::Nullable::String,
|
83
83
|
'SuspendedProcesses' => [SUSPENDED_PROCESS],
|
84
|
-
'VPCZoneIdentifier' => Fog::Nullable::String
|
84
|
+
'VPCZoneIdentifier' => Fog::Nullable::String,
|
85
|
+
'TerminationPolicies' => [String]
|
85
86
|
}
|
86
87
|
|
87
88
|
AUTO_SCALING_INSTANCE_DETAILS = INSTANCE.merge({
|
@@ -1,11 +1,12 @@
|
|
1
1
|
Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
2
2
|
|
3
3
|
@instance_format = {
|
4
|
-
|
4
|
+
'architecture' => String,
|
5
5
|
'amiLaunchIndex' => Integer,
|
6
6
|
'blockDeviceMapping' => [],
|
7
7
|
'clientToken' => Fog::Nullable::String,
|
8
8
|
'dnsName' => NilClass,
|
9
|
+
'ebsOptimized' => Fog::Boolean,
|
9
10
|
'imageId' => String,
|
10
11
|
'instanceId' => String,
|
11
12
|
'instanceState' => {'code' => Integer, 'name' => String},
|
@@ -33,7 +34,7 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
|
33
34
|
@run_instances_format = {
|
34
35
|
'groupSet' => [String],
|
35
36
|
'instancesSet' => [@instance_format],
|
36
|
-
'ownerId' => String,
|
37
|
+
'ownerId' => Fog::Nullable::String,
|
37
38
|
'requestId' => String,
|
38
39
|
'reservationId' => String
|
39
40
|
}
|
@@ -41,16 +42,20 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
|
41
42
|
@describe_instances_format = {
|
42
43
|
'reservationSet' => [{
|
43
44
|
'groupSet' => [String],
|
45
|
+
'groupIds' => [String],
|
44
46
|
'instancesSet' => [@instance_format.merge(
|
45
47
|
'architecture' => String,
|
46
48
|
'dnsName' => Fog::Nullable::String,
|
49
|
+
'iamInstanceProfile' => {},
|
47
50
|
'ipAddress' => Fog::Nullable::String,
|
51
|
+
'networkInterfaces' => [],
|
52
|
+
'ownerId' => String,
|
48
53
|
'privateDnsName' => Fog::Nullable::String,
|
49
54
|
'privateIpAddress' => Fog::Nullable::String,
|
50
55
|
'stateReason' => Hash,
|
51
56
|
'tagSet' => Hash
|
52
57
|
)],
|
53
|
-
'ownerId' => String,
|
58
|
+
'ownerId' => Fog::Nullable::String,
|
54
59
|
'reservationId' => String
|
55
60
|
}],
|
56
61
|
'requestId' => String
|
@@ -145,12 +150,12 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
|
145
150
|
'status' => String
|
146
151
|
}]
|
147
152
|
},
|
148
|
-
'
|
153
|
+
'eventsSet' => [{
|
149
154
|
'code' => String,
|
150
155
|
'description' => String,
|
151
156
|
'notBefore' => Time,
|
152
157
|
'notAfter' => Time
|
153
|
-
}
|
158
|
+
}]
|
154
159
|
}]
|
155
160
|
|
156
161
|
}
|
@@ -158,34 +163,23 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
|
158
163
|
tests('success') do
|
159
164
|
|
160
165
|
@instance_id = nil
|
161
|
-
|
162
|
-
|
166
|
+
@ami = if ENV['FASTER_TEST_PLEASE']
|
167
|
+
'ami-6bbb1302' # ubuntu 12.04 daily build 20120728
|
168
|
+
else
|
169
|
+
# Use a MS Windows AMI to test #get_password_data
|
170
|
+
'ami-71b50018' # Amazon Public Images - Windows_Server-2008-SP2-English-64Bit-Base-2012.07.11
|
171
|
+
end
|
163
172
|
|
164
173
|
# Create a keypair for decrypting the password
|
165
174
|
key_name = 'fog-test-key'
|
166
175
|
key = Fog::Compute[:aws].key_pairs.create(:name => key_name)
|
167
176
|
|
168
177
|
tests("#run_instances").formats(@run_instances_format) do
|
169
|
-
data = Fog::Compute[:aws].run_instances(@
|
178
|
+
data = Fog::Compute[:aws].run_instances(@ami, 1, 1, 'InstanceType' => 't1.micro', 'KeyName' => key_name).body
|
170
179
|
@instance_id = data['instancesSet'].first['instanceId']
|
171
180
|
data
|
172
181
|
end
|
173
182
|
|
174
|
-
if Fog.mocking?
|
175
|
-
# Ensure the new instance doesn't show up in mock describe_instances right away
|
176
|
-
tests("#describe_instances").formats(@describe_instances_format) do
|
177
|
-
body = Fog::Compute[:aws].describe_instances.body
|
178
|
-
instance_ids = body['reservationSet'].map {|reservation| reservation['instancesSet'].map {|instance| instance['instanceId'] } }.flatten
|
179
|
-
test("doesn't include the new instance") { !instance_ids.include?(@instance_id) }
|
180
|
-
body
|
181
|
-
end
|
182
|
-
|
183
|
-
# But querying for the new instance directly should raise an error
|
184
|
-
tests("#describe_instances('instance-id' => '#{@instance_id}')").raises(Fog::Compute::AWS::NotFound) do
|
185
|
-
Fog::Compute[:aws].describe_instances('instance-id' => @instance_id)
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
183
|
server = Fog::Compute[:aws].servers.get(@instance_id)
|
190
184
|
while server.nil? do
|
191
185
|
# It may take a moment to get the server after launching it
|
@@ -11,7 +11,8 @@ Shindo.tests('Fog::Compute[:aws] | spot instance requests', ['aws']) do
|
|
11
11
|
'keyName' => Fog::Nullable::String,
|
12
12
|
'imageId' => String,
|
13
13
|
'instanceType' => String,
|
14
|
-
'monitoring' => Fog::Boolean
|
14
|
+
'monitoring' => Fog::Boolean,
|
15
|
+
'subnetId' => String
|
15
16
|
},
|
16
17
|
'productDescription' => String,
|
17
18
|
'spotInstanceRequestId' => String,
|
@@ -3,11 +3,13 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do
|
|
3
3
|
@volume_format = {
|
4
4
|
'availabilityZone' => String,
|
5
5
|
'createTime' => Time,
|
6
|
+
'iops' => Fog::Nullable::Integer,
|
6
7
|
'requestId' => String,
|
7
8
|
'size' => Integer,
|
8
9
|
'snapshotId' => Fog::Nullable::String,
|
9
10
|
'status' => String,
|
10
|
-
'volumeId' => String
|
11
|
+
'volumeId' => String,
|
12
|
+
'volumeType' => String
|
11
13
|
}
|
12
14
|
|
13
15
|
@volume_attachment_format = {
|
@@ -52,11 +54,13 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do
|
|
52
54
|
'availabilityZone' => String,
|
53
55
|
'attachmentSet' => Array,
|
54
56
|
'createTime' => Time,
|
57
|
+
'iops' => Fog::Nullable::Integer,
|
55
58
|
'size' => Integer,
|
56
59
|
'snapshotId' => Fog::Nullable::String,
|
57
60
|
'status' => String,
|
58
61
|
'tagSet' => Hash,
|
59
|
-
'volumeId' => String
|
62
|
+
'volumeId' => String,
|
63
|
+
'volumeType' => String
|
60
64
|
}],
|
61
65
|
'requestId' => String
|
62
66
|
}
|
@@ -73,18 +77,30 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do
|
|
73
77
|
data
|
74
78
|
end
|
75
79
|
|
80
|
+
Fog::Compute[:aws].delete_volume(@volume_id)
|
81
|
+
|
76
82
|
tests('#create_volume from snapshot').formats(@volume_format) do
|
77
83
|
volume = Fog::Compute[:aws].volumes.create(:availability_zone => 'us-east-1d', :size => 1)
|
78
84
|
snapshot = Fog::Compute[:aws].create_snapshot(volume.identity).body
|
79
|
-
data = Fog::Compute[:aws].create_volume(@server.availability_zone, nil, snapshot['snapshotId']).body
|
85
|
+
data = Fog::Compute[:aws].create_volume(@server.availability_zone, nil, 'SnapshotId' => snapshot['snapshotId']).body
|
80
86
|
@volume_id = data['volumeId']
|
81
87
|
data
|
82
88
|
end
|
83
89
|
|
90
|
+
Fog::Compute[:aws].delete_volume(@volume_id)
|
91
|
+
|
92
|
+
tests('#create_volume with type and iops').formats(@volume_format) do
|
93
|
+
data = Fog::Compute[:aws].create_volume(@server.availability_zone, 10, 'VolumeType' => 'io1', 'Iops' => 100).body
|
94
|
+
@volume_id = data['volumeId']
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
Fog::Compute[:aws].delete_volume(@volume_id)
|
99
|
+
|
84
100
|
tests('#create_volume from snapshot with size').formats(@volume_format) do
|
85
101
|
volume = Fog::Compute[:aws].volumes.create(:availability_zone => 'us-east-1d', :size => 1)
|
86
102
|
snapshot = Fog::Compute[:aws].create_snapshot(volume.identity).body
|
87
|
-
data = Fog::Compute[:aws].create_volume(@server.availability_zone, 1, snapshot['snapshotId']).body
|
103
|
+
data = Fog::Compute[:aws].create_volume(@server.availability_zone, 1, 'SnapshotId' => snapshot['snapshotId']).body
|
88
104
|
@volume_id = data['volumeId']
|
89
105
|
data
|
90
106
|
end
|
@@ -148,6 +164,31 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do
|
|
148
164
|
Fog::Compute[:aws].delete_volume('vol-00000000')
|
149
165
|
end
|
150
166
|
|
167
|
+
# Iops required
|
168
|
+
tests("#create_volume('#{@server.availability_zone}', 10, 'VolumeType' => 'io1')").raises(Fog::Compute::AWS::Error) do
|
169
|
+
Fog::Compute[:aws].create_volume(@server.availability_zone, 10, 'VolumeType' => 'io1')
|
170
|
+
end
|
171
|
+
|
172
|
+
# size too small for iops
|
173
|
+
tests("#create_volume('#{@server.availability_zone}', 9, 'VolumeType' => 'io1', 'Iops' => 100)").raises(Fog::Compute::AWS::Error) do
|
174
|
+
Fog::Compute[:aws].create_volume(@server.availability_zone, 9, 'VolumeType' => 'io1', 'Iops' => 100)
|
175
|
+
end
|
176
|
+
|
177
|
+
# iops:size ratio too big
|
178
|
+
tests("#create_volume('#{@server.availability_zone}', 10, 'VolumeType' => 'io1', 'Iops' => 101)").raises(Fog::Compute::AWS::Error) do
|
179
|
+
Fog::Compute[:aws].create_volume(@server.availability_zone, 10, 'VolumeType' => 'io1', 'Iops' => 101)
|
180
|
+
end
|
181
|
+
|
182
|
+
# iops invalid value (lower than 100)
|
183
|
+
tests("#create_volume('#{@server.availability_zone}', 10, 'VolumeType' => 'io1', 'Iops' => 99)").raises(Fog::Compute::AWS::Error) do
|
184
|
+
Fog::Compute[:aws].create_volume(@server.availability_zone, 10, 'VolumeType' => 'io1', 'Iops' => 99)
|
185
|
+
end
|
186
|
+
|
187
|
+
# iops invalid value (greater than 1000)
|
188
|
+
tests("#create_volume('#{@server.availability_zone}', 10, 'VolumeType' => 'io1', 'Iops' => 1001)").raises(Fog::Compute::AWS::Error) do
|
189
|
+
Fog::Compute[:aws].create_volume(@server.availability_zone, 1000, 'VolumeType' => 'io1', 'Iops' => 1001)
|
190
|
+
end
|
191
|
+
|
151
192
|
@volume.destroy
|
152
193
|
end
|
153
194
|
|