fog-maestrodev 1.19.0.20140212012611 → 1.20.0.20140305101305
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +2 -0
- data/.travis.yml +10 -0
- data/CONTRIBUTORS.md +694 -0
- data/Gemfile.1.8.7 +1 -1
- data/LICENSE.md +17 -17
- data/Rakefile +1 -1
- data/benchs/each_provider.sh +6 -0
- data/benchs/each_service.sh +6 -0
- data/benchs/load_times.rb +6 -0
- data/changelog.txt +312 -0
- data/fog.gemspec +3 -5
- data/lib/fog.rb +1 -0
- data/lib/fog/atmos.rb +1 -11
- data/lib/fog/atmos/core.rb +11 -0
- data/lib/fog/atmos/requests/storage/get_namespace.rb +1 -1
- data/lib/fog/atmos/requests/storage/head_namespace.rb +1 -1
- data/lib/fog/atmos/storage.rb +1 -1
- data/lib/fog/aws.rb +22 -323
- data/lib/fog/aws/auto_scaling.rb +1 -1
- data/lib/fog/aws/beanstalk.rb +1 -1
- data/lib/fog/aws/cdn.rb +1 -1
- data/lib/fog/aws/cloud_formation.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +1 -1
- data/lib/fog/aws/compute.rb +12 -1
- data/lib/fog/aws/core.rb +329 -0
- data/lib/fog/aws/data_pipeline.rb +1 -1
- data/lib/fog/aws/dns.rb +1 -1
- data/lib/fog/aws/dynamodb.rb +1 -1
- data/lib/fog/aws/elasticache.rb +10 -3
- data/lib/fog/aws/elb.rb +1 -1
- data/lib/fog/aws/emr.rb +1 -2
- data/lib/fog/aws/glacier.rb +1 -1
- data/lib/fog/aws/iam.rb +1 -1
- data/lib/fog/aws/models/compute/dhcp_option.rb +2 -2
- data/lib/fog/aws/models/compute/flavor.rb +2 -0
- data/lib/fog/aws/models/compute/flavors.rb +363 -49
- data/lib/fog/aws/models/compute/network_acl.rb +170 -0
- data/lib/fog/aws/models/compute/network_acls.rb +138 -0
- data/lib/fog/aws/models/compute/server.rb +2 -2
- data/lib/fog/aws/models/compute/servers.rb +7 -2
- data/lib/fog/aws/models/compute/subnet.rb +2 -2
- data/lib/fog/aws/models/elasticache/cluster.rb +6 -0
- data/lib/fog/aws/models/elasticache/subnet_group.rb +35 -0
- data/lib/fog/aws/models/elasticache/subnet_groups.rb +27 -0
- data/lib/fog/aws/models/rds/snapshot.rb +1 -0
- data/lib/fog/aws/models/storage/file.rb +1 -1
- data/lib/fog/aws/parsers/compute/create_network_acl.rb +28 -0
- data/lib/fog/aws/parsers/compute/create_subnet.rb +2 -3
- data/lib/fog/aws/parsers/compute/describe_network_acls.rb +42 -0
- data/lib/fog/aws/parsers/compute/describe_reserved_instances.rb +29 -3
- data/lib/fog/aws/parsers/compute/network_acl_parser.rb +105 -0
- data/lib/fog/aws/parsers/compute/network_interface_parser.rb +16 -0
- data/lib/fog/aws/parsers/compute/replace_network_acl_association.rb +20 -0
- data/lib/fog/aws/parsers/compute/run_instances.rb +1 -1
- data/lib/fog/aws/parsers/elasticache/cache_cluster_parser.rb +2 -2
- data/lib/fog/aws/parsers/elasticache/create_cache_subnet_group.rb +38 -0
- data/lib/fog/aws/parsers/elasticache/describe_cache_subnet_groups.rb +38 -0
- data/lib/fog/aws/parsers/elasticache/subnet_group_parser.rb +38 -0
- data/lib/fog/aws/parsers/iam/upload_server_certificate.rb +1 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +6 -0
- data/lib/fog/aws/parsers/rds/snapshot_parser.rb +1 -0
- data/lib/fog/aws/rds.rb +1 -1
- data/lib/fog/aws/redshift.rb +1 -1
- data/lib/fog/aws/requests/compute/create_network_acl.rb +105 -0
- data/lib/fog/aws/requests/compute/create_network_acl_entry.rb +80 -0
- data/lib/fog/aws/requests/compute/create_subnet.rb +14 -4
- data/lib/fog/aws/requests/compute/create_vpc.rb +7 -1
- data/lib/fog/aws/requests/compute/delete_network_acl.rb +52 -0
- data/lib/fog/aws/requests/compute/delete_network_acl_entry.rb +55 -0
- data/lib/fog/aws/requests/compute/delete_vpc.rb +4 -0
- data/lib/fog/aws/requests/compute/describe_network_acls.rb +104 -0
- data/lib/fog/aws/requests/compute/describe_network_interfaces.rb +4 -0
- data/lib/fog/aws/requests/compute/disassociate_address.rb +4 -3
- data/lib/fog/aws/requests/compute/replace_network_acl_association.rb +66 -0
- data/lib/fog/aws/requests/compute/replace_network_acl_entry.rb +81 -0
- data/lib/fog/aws/requests/compute/replace_route.rb +84 -0
- data/lib/fog/aws/requests/compute/request_spot_instances.rb +8 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +23 -3
- data/lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb +29 -21
- data/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +18 -11
- data/lib/fog/aws/requests/elasticache/create_cache_subnet_group.rb +66 -0
- data/lib/fog/aws/requests/elasticache/delete_cache_subnet_group.rb +40 -0
- data/lib/fog/aws/requests/elasticache/describe_cache_subnet_groups.rb +63 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +3 -2
- data/lib/fog/aws/requests/iam/delete_server_certificate.rb +3 -1
- data/lib/fog/aws/requests/rds/create_db_instance.rb +2 -0
- data/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb +1 -0
- data/lib/fog/aws/requests/rds/create_db_snapshot.rb +1 -1
- data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +2 -0
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +1 -0
- data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +18 -0
- data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +23 -0
- data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +24 -0
- data/lib/fog/aws/requests/storage/put_object.rb +18 -54
- data/lib/fog/aws/requests/storage/shared_mock_methods.rb +87 -0
- data/lib/fog/aws/requests/storage/upload_part.rb +18 -0
- data/lib/fog/aws/ses.rb +1 -1
- data/lib/fog/aws/simpledb.rb +1 -1
- data/lib/fog/aws/sns.rb +1 -2
- data/lib/fog/aws/sqs.rb +5 -4
- data/lib/fog/aws/storage.rb +15 -5
- data/lib/fog/aws/sts.rb +1 -1
- data/lib/fog/bare_metal_cloud.rb +1 -11
- data/lib/fog/bare_metal_cloud/compute.rb +1 -1
- data/lib/fog/bare_metal_cloud/core.rb +11 -0
- data/lib/fog/bin.rb +1 -0
- data/lib/fog/bin/rage4.rb +31 -0
- data/lib/fog/bluebox.rb +3 -13
- data/lib/fog/bluebox/blb.rb +2 -2
- data/lib/fog/bluebox/compute.rb +1 -1
- data/lib/fog/bluebox/core.rb +13 -0
- data/lib/fog/bluebox/dns.rb +2 -2
- data/lib/fog/bluebox/models/compute/server.rb +1 -1
- data/lib/fog/brightbox.rb +1 -10
- data/lib/fog/brightbox/compute.rb +20 -1
- data/lib/fog/brightbox/core.rb +10 -0
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +5 -0
- data/lib/fog/brightbox/models/compute/database_server.rb +91 -0
- data/lib/fog/brightbox/models/compute/database_servers.rb +28 -0
- data/lib/fog/brightbox/models/compute/database_snapshot.rb +52 -0
- data/lib/fog/brightbox/models/compute/database_snapshots.rb +24 -0
- data/lib/fog/brightbox/models/compute/database_type.rb +19 -0
- data/lib/fog/brightbox/models/compute/database_types.rb +26 -0
- data/lib/fog/brightbox/requests/compute/create_database_server.rb +25 -0
- data/lib/fog/brightbox/requests/compute/delete_database_server.rb +26 -0
- data/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +26 -0
- data/lib/fog/brightbox/requests/compute/get_database_server.rb +19 -0
- data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +19 -0
- data/lib/fog/brightbox/requests/compute/get_database_type.rb +21 -0
- data/lib/fog/brightbox/requests/compute/list_database_servers.rb +17 -0
- data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +17 -0
- data/lib/fog/brightbox/requests/compute/list_database_types.rb +19 -0
- data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +19 -0
- data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +19 -0
- data/lib/fog/brightbox/requests/compute/update_database_server.rb +25 -0
- data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +26 -0
- data/lib/fog/clodo.rb +1 -34
- data/lib/fog/clodo/compute.rb +2 -0
- data/lib/fog/clodo/core.rb +34 -0
- data/lib/fog/clodo/models/compute/server.rb +2 -2
- data/lib/fog/cloudsigma.rb +1 -9
- data/lib/fog/cloudsigma/compute.rb +2 -2
- data/lib/fog/cloudsigma/core.rb +9 -0
- data/lib/fog/cloudstack.rb +1 -40
- data/lib/fog/cloudstack/compute.rb +1 -1
- data/lib/fog/cloudstack/core.rb +40 -0
- data/lib/fog/cloudstack/models/compute/server.rb +3 -0
- data/lib/fog/compute/models/server.rb +33 -7
- data/lib/fog/core/collection.rb +1 -3
- data/lib/fog/core/errors.rb +2 -0
- data/lib/fog/core/hmac.rb +3 -16
- data/lib/fog/core/logger.rb +3 -3
- data/lib/fog/core/provider.rb +1 -2
- data/lib/fog/digitalocean.rb +1 -9
- data/lib/fog/digitalocean/compute.rb +1 -1
- data/lib/fog/digitalocean/core.rb +9 -0
- data/lib/fog/digitalocean/models/compute/server.rb +3 -2
- data/lib/fog/digitalocean/models/compute/servers.rb +23 -4
- data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -1
- data/lib/fog/digitalocean/requests/compute/destroy_server.rb +3 -1
- data/lib/fog/dnsimple.rb +1 -11
- data/lib/fog/dnsimple/core.rb +11 -0
- data/lib/fog/dnsimple/dns.rb +5 -2
- data/lib/fog/dnsimple/models/dns/record.rb +3 -3
- data/lib/fog/dnsimple/requests/dns/create_domain.rb +26 -22
- data/lib/fog/dnsimple/requests/dns/create_record.rb +21 -24
- data/lib/fog/dnsimple/requests/dns/delete_domain.rb +7 -6
- data/lib/fog/dnsimple/requests/dns/delete_record.rb +7 -5
- data/lib/fog/dnsimple/requests/dns/get_domain.rb +12 -18
- data/lib/fog/dnsimple/requests/dns/get_record.rb +11 -17
- data/lib/fog/dnsimple/requests/dns/list_domains.rb +7 -15
- data/lib/fog/dnsimple/requests/dns/list_records.rb +10 -15
- data/lib/fog/dnsimple/requests/dns/update_record.rb +14 -19
- data/lib/fog/dnsmadeeasy.rb +1 -11
- data/lib/fog/dnsmadeeasy/core.rb +11 -0
- data/lib/fog/dnsmadeeasy/dns.rb +1 -1
- data/lib/fog/dreamhost.rb +1 -11
- data/lib/fog/dreamhost/core.rb +11 -0
- data/lib/fog/dreamhost/dns.rb +1 -1
- data/lib/fog/dynect.rb +1 -26
- data/lib/fog/dynect/core.rb +26 -0
- data/lib/fog/dynect/dns.rb +1 -1
- data/lib/fog/dynect/requests/dns/put_record.rb +5 -4
- data/lib/fog/dynect/requests/dns/put_zone.rb +5 -4
- data/lib/fog/ecloud.rb +1 -31
- data/lib/fog/ecloud/compute.rb +1 -0
- data/lib/fog/ecloud/core.rb +31 -0
- data/lib/fog/glesys.rb +1 -11
- data/lib/fog/glesys/compute.rb +6 -4
- data/lib/fog/glesys/core.rb +11 -0
- data/lib/fog/glesys/models/compute/server.rb +2 -2
- data/lib/fog/go_grid.rb +1 -11
- data/lib/fog/go_grid/compute.rb +1 -1
- data/lib/fog/go_grid/core.rb +11 -0
- data/lib/fog/go_grid/models/compute/server.rb +2 -2
- data/lib/fog/google.rb +2 -24
- data/lib/fog/google/README.md +8 -5
- data/lib/fog/google/compute.rb +10 -3
- data/lib/fog/google/core.rb +24 -0
- data/lib/fog/google/models/compute/flavors.rb +1 -1
- data/lib/fog/google/models/compute/images.rb +2 -0
- data/lib/fog/google/models/compute/servers.rb +1 -1
- data/lib/fog/google/models/compute/zones.rb +1 -1
- data/lib/fog/google/requests/compute/attach_disk.rb +29 -0
- data/lib/fog/google/requests/compute/delete_address.rb +31 -0
- data/lib/fog/google/requests/compute/delete_snapshot.rb +35 -0
- data/lib/fog/google/requests/compute/detach_disk.rb +29 -0
- data/lib/fog/google/requests/compute/get_address.rb +31 -0
- data/lib/fog/google/requests/compute/insert_address.rb +30 -0
- data/lib/fog/google/requests/compute/insert_firewall.rb +6 -9
- data/lib/fog/google/requests/compute/list_addresses.rb +28 -0
- data/lib/fog/google/requests/compute/set_metadata.rb +4 -5
- data/lib/fog/google/requests/compute/set_tags.rb +33 -0
- data/lib/fog/google/requests/storage/get_bucket_acl.rb +2 -2
- data/lib/fog/google/requests/storage/put_bucket_acl.rb +39 -48
- data/lib/fog/google/requests/storage/put_object_acl.rb +55 -0
- data/lib/fog/google/storage.rb +2 -1
- data/lib/fog/hp.rb +9 -352
- data/lib/fog/hp/block_storage.rb +1 -1
- data/lib/fog/hp/block_storage_v2.rb +1 -1
- data/lib/fog/hp/cdn.rb +1 -1
- data/lib/fog/hp/compute.rb +1 -1
- data/lib/fog/hp/compute_v2.rb +1 -1
- data/lib/fog/hp/core.rb +352 -0
- data/lib/fog/hp/dns.rb +1 -1
- data/lib/fog/hp/lb.rb +1 -1
- data/lib/fog/hp/models/compute/server.rb +2 -2
- data/lib/fog/hp/models/compute_v2/server.rb +2 -2
- data/lib/fog/hp/models/storage/directory.rb +12 -6
- data/lib/fog/hp/network.rb +1 -1
- data/lib/fog/hp/storage.rb +1 -1
- data/lib/fog/ibm.rb +2 -176
- data/lib/fog/ibm/compute.rb +1 -1
- data/lib/fog/ibm/core.rb +176 -0
- data/lib/fog/ibm/storage.rb +1 -1
- data/lib/fog/internet_archive.rb +1 -292
- data/lib/fog/internet_archive/core.rb +292 -0
- data/lib/fog/internet_archive/models/storage/file.rb +1 -1
- data/lib/fog/internet_archive/storage.rb +1 -1
- data/lib/fog/joyent.rb +2 -10
- data/lib/fog/joyent/compute.rb +1 -1
- data/lib/fog/joyent/core.rb +10 -0
- data/lib/fog/joyent/errors.rb +1 -0
- data/lib/fog/libvirt.rb +1 -11
- data/lib/fog/libvirt/compute.rb +1 -1
- data/lib/fog/libvirt/core.rb +11 -0
- data/lib/fog/libvirt/models/compute/README.md +1 -1
- data/lib/fog/libvirt/models/compute/server.rb +6 -6
- data/lib/fog/libvirt/models/compute/templates/volume.xml.erb +12 -0
- data/lib/fog/libvirt/models/compute/volume.rb +1 -0
- data/lib/fog/linode.rb +2 -10
- data/lib/fog/linode/compute.rb +1 -1
- data/lib/fog/linode/core.rb +10 -0
- data/lib/fog/linode/dns.rb +1 -1
- data/lib/fog/local.rb +1 -11
- data/lib/fog/local/core.rb +11 -0
- data/lib/fog/local/storage.rb +1 -1
- data/lib/fog/ninefold.rb +1 -12
- data/lib/fog/ninefold/compute.rb +1 -1
- data/lib/fog/ninefold/core.rb +12 -0
- data/lib/fog/openstack.rb +8 -249
- data/lib/fog/openstack/compute.rb +3 -1
- data/lib/fog/openstack/core.rb +249 -0
- data/lib/fog/openstack/docs/compute.md +681 -0
- data/lib/fog/openstack/docs/getting_started.md +81 -0
- data/lib/fog/openstack/docs/storage.md +441 -0
- data/lib/fog/openstack/identity.rb +1 -1
- data/lib/fog/openstack/image.rb +1 -1
- data/lib/fog/openstack/metering.rb +1 -1
- data/lib/fog/openstack/models/compute/server.rb +13 -5
- data/lib/fog/openstack/models/compute/servers.rb +13 -0
- data/lib/fog/openstack/models/network/network.rb +9 -11
- data/lib/fog/openstack/models/network/security_group.rb +32 -0
- data/lib/fog/openstack/models/network/security_group_rule.rb +33 -0
- data/lib/fog/openstack/models/network/security_group_rules.rb +33 -0
- data/lib/fog/openstack/models/network/security_groups.rb +34 -0
- data/lib/fog/openstack/models/storage/directories.rb +1 -0
- data/lib/fog/openstack/network.rb +19 -1
- data/lib/fog/openstack/orchestration.rb +1 -1
- data/lib/fog/openstack/requests/compute/add_security_group.rb +24 -0
- data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_server.rb +3 -3
- data/lib/fog/openstack/requests/compute/remove_security_group.rb +24 -0
- data/lib/fog/openstack/requests/image/update_image_members.rb +2 -2
- data/lib/fog/openstack/requests/network/create_security_group.rb +94 -0
- data/lib/fog/openstack/requests/network/create_security_group_rule.rb +79 -0
- data/lib/fog/openstack/requests/network/delete_security_group.rb +32 -0
- data/lib/fog/openstack/requests/network/delete_security_group_rule.rb +36 -0
- data/lib/fog/openstack/requests/network/get_security_group.rb +52 -0
- data/lib/fog/openstack/requests/network/get_security_group_rule.rb +47 -0
- data/lib/fog/openstack/requests/network/list_networks.rb +0 -1
- data/lib/fog/openstack/requests/network/list_security_group_rules.rb +52 -0
- data/lib/fog/openstack/requests/network/list_security_groups.rb +57 -0
- data/lib/fog/openstack/storage.rb +2 -2
- data/lib/fog/openstack/volume.rb +1 -1
- data/lib/fog/openvz.rb +1 -9
- data/lib/fog/openvz/compute.rb +1 -1
- data/lib/fog/openvz/core.rb +9 -0
- data/lib/fog/ovirt.rb +1 -17
- data/lib/fog/ovirt/compute.rb +2 -0
- data/lib/fog/ovirt/core.rb +17 -0
- data/lib/fog/rackspace.rb +12 -145
- data/lib/fog/rackspace/auto_scale.rb +1 -1
- data/lib/fog/rackspace/block_storage.rb +5 -1
- data/lib/fog/rackspace/cdn.rb +22 -16
- data/lib/fog/rackspace/compute.rb +1 -1
- data/lib/fog/rackspace/compute_v2.rb +6 -2
- data/lib/fog/rackspace/core.rb +145 -0
- data/lib/fog/rackspace/databases.rb +5 -1
- data/lib/fog/rackspace/dns.rb +1 -1
- data/lib/fog/rackspace/docs/compute_v2.md +2 -10
- data/lib/fog/rackspace/errors.rb +1 -1
- data/lib/fog/rackspace/examples/storage/upload_file.rb +1 -1
- data/lib/fog/rackspace/identity.rb +26 -16
- data/lib/fog/rackspace/load_balancers.rb +7 -1
- data/lib/fog/rackspace/mock_data.rb +17 -0
- data/lib/fog/rackspace/models/compute/server.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/key_pair.rb +1 -1
- data/lib/fog/rackspace/models/compute_v2/server.rb +42 -5
- data/lib/fog/rackspace/models/monitoring/entities.rb +1 -1
- data/lib/fog/rackspace/models/queues/claim.rb +9 -1
- data/lib/fog/rackspace/models/storage/directory.rb +5 -2
- data/lib/fog/rackspace/models/storage/file.rb +14 -0
- data/lib/fog/rackspace/monitoring.rb +11 -2
- data/lib/fog/rackspace/queues.rb +318 -34
- data/lib/fog/rackspace/requests/compute_v2/create_keypair.rb +16 -5
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +7 -1
- data/lib/fog/rackspace/requests/compute_v2/delete_keypair.rb +1 -1
- data/lib/fog/rackspace/requests/identity/create_token.rb +192 -0
- data/lib/fog/rackspace/requests/identity/list_tenants.rb +23 -0
- data/lib/fog/rackspace/requests/monitoring/get_agent.rb +45 -0
- data/lib/fog/rackspace/requests/monitoring/get_cpus_info.rb +63 -0
- data/lib/fog/rackspace/requests/monitoring/get_disks_info.rb +56 -0
- data/lib/fog/rackspace/requests/monitoring/get_filesystems_info.rb +64 -0
- data/lib/fog/rackspace/requests/monitoring/get_logged_in_user_info.rb +58 -0
- data/lib/fog/rackspace/requests/monitoring/get_memory_info.rb +59 -0
- data/lib/fog/rackspace/requests/monitoring/get_network_interfaces_info.rb +91 -0
- data/lib/fog/rackspace/requests/monitoring/get_processes_info.rb +72 -0
- data/lib/fog/rackspace/requests/monitoring/get_system_info.rb +53 -0
- data/lib/fog/rackspace/requests/monitoring/list_agents.rb +62 -0
- data/lib/fog/rackspace/requests/queues/create_claim.rb +37 -0
- data/lib/fog/rackspace/requests/queues/create_message.rb +23 -0
- data/lib/fog/rackspace/requests/queues/create_queue.rb +15 -1
- data/lib/fog/rackspace/requests/queues/delete_claim.rb +18 -0
- data/lib/fog/rackspace/requests/queues/delete_message.rb +34 -0
- data/lib/fog/rackspace/requests/queues/delete_queue.rb +12 -0
- data/lib/fog/rackspace/requests/queues/get_claim.rb +15 -0
- data/lib/fog/rackspace/requests/queues/get_message.rb +17 -0
- data/lib/fog/rackspace/requests/queues/get_queue.rb +14 -1
- data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +36 -0
- data/lib/fog/rackspace/requests/queues/list_messages.rb +33 -0
- data/lib/fog/rackspace/requests/queues/list_queues.rb +35 -1
- data/lib/fog/rackspace/requests/queues/update_claim.rb +17 -0
- data/lib/fog/rackspace/requests/storage/delete_container.rb +15 -0
- data/lib/fog/rackspace/requests/storage/delete_multiple_objects.rb +57 -0
- data/lib/fog/rackspace/requests/storage/delete_object.rb +14 -0
- data/lib/fog/rackspace/requests/storage/delete_static_large_object.rb +33 -0
- data/lib/fog/rackspace/requests/storage/extract_archive.rb +39 -0
- data/lib/fog/rackspace/requests/storage/get_container.rb +25 -0
- data/lib/fog/rackspace/requests/storage/get_containers.rb +17 -0
- data/lib/fog/rackspace/requests/storage/get_object.rb +26 -0
- data/lib/fog/rackspace/requests/storage/get_object_http_url.rb +9 -2
- data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +8 -1
- data/lib/fog/rackspace/requests/storage/head_container.rb +12 -0
- data/lib/fog/rackspace/requests/storage/head_containers.rb +19 -0
- data/lib/fog/rackspace/requests/storage/head_object.rb +26 -0
- data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +10 -0
- data/lib/fog/rackspace/requests/storage/put_container.rb +16 -0
- data/lib/fog/rackspace/requests/storage/put_dynamic_obj_manifest.rb +23 -0
- data/lib/fog/rackspace/requests/storage/put_object.rb +39 -0
- data/lib/fog/rackspace/requests/storage/put_object_manifest.rb +9 -1
- data/lib/fog/rackspace/requests/storage/put_static_obj_manifest.rb +48 -0
- data/lib/fog/rackspace/storage.rb +320 -67
- data/lib/fog/rage4.rb +2 -0
- data/lib/fog/rage4/core.rb +11 -0
- data/lib/fog/rage4/dns.rb +74 -0
- data/lib/fog/rage4/models/dns/record.rb +77 -0
- data/lib/fog/rage4/models/dns/records.rb +42 -0
- data/lib/fog/rage4/models/dns/zone.rb +46 -0
- data/lib/fog/rage4/models/dns/zones.rb +34 -0
- data/lib/fog/rage4/requests/dns/create_domain.rb +33 -0
- data/lib/fog/rage4/requests/dns/create_domain_vanity.rb +34 -0
- data/lib/fog/rage4/requests/dns/create_record.rb +65 -0
- data/lib/fog/rage4/requests/dns/create_reverse_domain_4.rb +32 -0
- data/lib/fog/rage4/requests/dns/delete_domain.rb +28 -0
- data/lib/fog/rage4/requests/dns/delete_record.rb +28 -0
- data/lib/fog/rage4/requests/dns/get_domain.rb +30 -0
- data/lib/fog/rage4/requests/dns/get_domain_by_name.rb +30 -0
- data/lib/fog/rage4/requests/dns/list_domains.rb +41 -0
- data/lib/fog/rage4/requests/dns/list_geo_regions.rb +27 -0
- data/lib/fog/rage4/requests/dns/list_record_types.rb +26 -0
- data/lib/fog/rage4/requests/dns/list_records.rb +31 -0
- data/lib/fog/rage4/requests/dns/set_record_failover.rb +29 -0
- data/lib/fog/rage4/requests/dns/show_current_usage.rb +25 -0
- data/lib/fog/rage4/requests/dns/show_global_usage.rb +25 -0
- data/lib/fog/rage4/requests/dns/update_domain.rb +43 -0
- data/lib/fog/rage4/requests/dns/update_record.rb +64 -0
- data/lib/fog/riakcs.rb +2 -122
- data/lib/fog/riakcs/core.rb +122 -0
- data/lib/fog/riakcs/provisioning.rb +1 -1
- data/lib/fog/riakcs/usage.rb +1 -1
- data/lib/fog/serverlove.rb +1 -10
- data/lib/fog/serverlove/compute.rb +2 -0
- data/lib/fog/serverlove/core.rb +10 -0
- data/lib/fog/storm_on_demand.rb +9 -20
- data/lib/fog/storm_on_demand/account.rb +1 -1
- data/lib/fog/storm_on_demand/billing.rb +1 -1
- data/lib/fog/storm_on_demand/compute.rb +1 -1
- data/lib/fog/storm_on_demand/core.rb +20 -0
- data/lib/fog/storm_on_demand/dns.rb +1 -1
- data/lib/fog/storm_on_demand/monitoring.rb +1 -1
- data/lib/fog/storm_on_demand/network.rb +1 -1
- data/lib/fog/storm_on_demand/shared.rb +0 -1
- data/lib/fog/storm_on_demand/storage.rb +1 -1
- data/lib/fog/storm_on_demand/support.rb +1 -1
- data/lib/fog/storm_on_demand/vpn.rb +1 -1
- data/lib/fog/vcloud.rb +1 -11
- data/lib/fog/vcloud/compute.rb +1 -1
- data/lib/fog/vcloud/core.rb +11 -0
- data/lib/fog/vcloud_director.rb +1 -67
- data/lib/fog/vcloud_director/compute.rb +1 -1
- data/lib/fog/vcloud_director/core.rb +67 -0
- data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +1 -1
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vmfusion.rb +1 -11
- data/lib/fog/vmfusion/compute.rb +1 -1
- data/lib/fog/vmfusion/core.rb +11 -0
- data/lib/fog/vmfusion/models/compute/server.rb +5 -5
- data/lib/fog/voxel.rb +1 -16
- data/lib/fog/voxel/compute.rb +1 -1
- data/lib/fog/voxel/core.rb +16 -0
- data/lib/fog/vsphere.rb +1 -17
- data/lib/fog/vsphere/compute.rb +1 -0
- data/lib/fog/vsphere/core.rb +17 -0
- data/lib/fog/xenserver.rb +1 -83
- data/lib/fog/xenserver/compute.rb +1 -1
- data/lib/fog/xenserver/core.rb +83 -0
- data/lib/fog/xenserver/models/compute/storage_manager.rb +1 -1
- data/lib/fog/zerigo.rb +1 -11
- data/lib/fog/zerigo/core.rb +11 -0
- data/lib/fog/zerigo/dns.rb +1 -1
- data/lib/tasks/changelog_task.rb +2 -0
- data/tests/aws/models/compute/network_acl_tests.rb +109 -0
- data/tests/aws/models/compute/network_acls_tests.rb +7 -0
- data/tests/aws/models/elasticache/subnet_groups_tests.rb +44 -0
- data/tests/aws/requests/compute/network_acl_tests.rb +86 -0
- data/tests/aws/requests/compute/route_tests.rb +64 -3
- data/tests/aws/requests/compute/subnet_tests.rb +18 -11
- data/tests/aws/requests/elasticache/helper.rb +19 -0
- data/tests/aws/requests/elasticache/subnet_group_tests.rb +52 -0
- data/tests/aws/requests/iam/server_certificate_tests.rb +3 -0
- data/tests/aws/requests/rds/subnet_groups_tests.rb +1 -1
- data/tests/aws/requests/storage/multipart_upload_tests.rb +3 -14
- data/tests/brightbox/compute/schema.rb +118 -2
- data/tests/brightbox/helper.rb +1 -0
- data/tests/brightbox/models/compute/cloud_ip_tests.rb +32 -0
- data/tests/brightbox/models/compute/database_server_tests.rb +66 -0
- data/tests/brightbox/models/compute/database_snapshot_tests.rb +26 -0
- data/tests/brightbox/models/compute/database_type_tests.rb +27 -0
- data/tests/brightbox/requests/compute/database_server_tests.rb +54 -0
- data/tests/brightbox/requests/compute/database_snapsnot_tests.rb +47 -0
- data/tests/brightbox/requests/compute/database_type_tests.rb +17 -0
- data/tests/compute/models/server_tests.rb +20 -2
- data/tests/digitalocean/helper.rb +9 -4
- data/tests/digitalocean/models/compute/server_tests.rb +1 -0
- data/tests/digitalocean/models/compute/servers_tests.rb +19 -4
- data/tests/digitalocean/requests/compute/create_server_tests.rb +13 -6
- data/tests/digitalocean/requests/compute/list_servers_tests.rb +2 -1
- data/tests/dns/helper.rb +3 -0
- data/tests/dns/models/record_tests.rb +1 -1
- data/tests/dns/models/records_tests.rb +1 -1
- data/tests/dns/models/zone_tests.rb +1 -1
- data/tests/dns/models/zones_tests.rb +1 -1
- data/tests/helper.rb +7 -1
- data/tests/helpers/compute/server_helper.rb +1 -0
- data/tests/helpers/compute/servers_helper.rb +1 -0
- data/tests/openstack/models/network/security_group_rule_tests.rb +27 -0
- data/tests/openstack/models/network/security_group_rules_tests.rb +25 -0
- data/tests/openstack/models/network/security_group_tests.rb +17 -0
- data/tests/openstack/models/network/security_groups_tests.rb +16 -0
- data/tests/openstack/requests/compute/helper.rb +5 -0
- data/tests/openstack/requests/compute/server_tests.rb +11 -0
- data/tests/openstack/requests/network/security_group_rule_tests.rb +58 -0
- data/tests/openstack/requests/network/security_group_tests.rb +43 -0
- data/tests/rackspace/identity_tests.rb +0 -4
- data/tests/rackspace/models/compute_v2/server_tests.rb +36 -8
- data/tests/rackspace/models/queues/claim_tests.rb +1 -3
- data/tests/rackspace/models/queues/claims_tests.rb +1 -3
- data/tests/rackspace/models/queues/message_tests.rb +1 -3
- data/tests/rackspace/models/queues/messages_tests.rb +1 -3
- data/tests/rackspace/models/queues/queue_tests.rb +1 -3
- data/tests/rackspace/models/queues/queues_tests.rb +1 -3
- data/tests/rackspace/models/storage/account_tests.rb +0 -2
- data/tests/rackspace/models/storage/directories_tests.rb +0 -3
- data/tests/rackspace/models/storage/directory_tests.rb +2 -5
- data/tests/rackspace/models/storage/file_tests.rb +49 -2
- data/tests/rackspace/models/storage/files_tests.rb +1 -4
- data/tests/rackspace/queues_tests.rb +0 -13
- data/tests/rackspace/requests/identity/token_tests.rb +1 -3
- data/tests/rackspace/requests/monitoring/agent_tests.rb +42 -0
- data/tests/rackspace/requests/queues/claim_tests.rb +1 -3
- data/tests/rackspace/requests/queues/messages_tests.rb +0 -6
- data/tests/rackspace/requests/queues/queues_tests.rb +0 -5
- data/tests/rackspace/requests/storage/account_tests.rb +0 -1
- data/tests/rackspace/requests/storage/container_tests.rb +7 -11
- data/tests/rackspace/requests/storage/large_object_tests.rb +33 -43
- data/tests/rackspace/requests/storage/object_tests.rb +2 -27
- data/tests/rackspace/storage_tests.rb +9 -15
- data/tests/rage4/requests/dns/dns_tests.rb +241 -0
- data/tests/vcloud/requests/compute/disk_configure_tests.rb +0 -8
- metadata +190 -33
- data/lib/fog/brightbox/requests/compute/destroy_user_collaboration.rb +0 -21
@@ -0,0 +1,66 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Elasticache
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/elasticache/create_cache_subnet_group'
|
7
|
+
|
8
|
+
# Creates a cache subnet group
|
9
|
+
# http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# * CacheSubnetGroupName <~String> - A name for the cache subnet group. This value is stored as a lowercase string. Must contain no more than 255 alphanumeric characters or hyphens.
|
13
|
+
# * SubnetIds <~Array> - The VPC subnet IDs for the cache subnet group.
|
14
|
+
# * CacheSubnetGroupDescription <~String> - A description for the cache subnet group.
|
15
|
+
# ==== Returns
|
16
|
+
# * response<~Excon::Response>:
|
17
|
+
# * body<~Hash>:
|
18
|
+
def create_cache_subnet_group(name, subnet_ids, description = name)
|
19
|
+
params = {
|
20
|
+
'Action' => 'CreateCacheSubnetGroup',
|
21
|
+
'CacheSubnetGroupName' => name,
|
22
|
+
'CacheSubnetGroupDescription' => description,
|
23
|
+
:parser => Fog::Parsers::AWS::Elasticache::CreateCacheSubnetGroup.new
|
24
|
+
}
|
25
|
+
params.merge!(Fog::AWS.indexed_param("SubnetIds.member", Array(subnet_ids)))
|
26
|
+
request(params)
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
class Mock
|
32
|
+
|
33
|
+
def create_cache_subnet_group(name, subnet_ids, description = name)
|
34
|
+
response = Excon::Response.new
|
35
|
+
if self.data[:subnet_groups] && self.data[:subnet_groups][name]
|
36
|
+
raise Fog::AWS::Elasticache::IdentifierTaken.new("CacheSubnetGroupAlreadyExists => The subnet group '#{name}' already exists")
|
37
|
+
end
|
38
|
+
|
39
|
+
collection = Fog::Compute[:aws]
|
40
|
+
collection.region = @region
|
41
|
+
subnets = collection.subnets
|
42
|
+
|
43
|
+
subnets = subnet_ids.map { |snid| subnets.get(snid) }
|
44
|
+
vpc_id = subnets.first.vpc_id
|
45
|
+
|
46
|
+
data = {
|
47
|
+
'CacheSubnetGroupName' => name,
|
48
|
+
'CacheSubnetGroupDescription' => description,
|
49
|
+
'SubnetGroupStatus' => 'Complete',
|
50
|
+
'Subnets' => subnet_ids,
|
51
|
+
'VpcId' => vpc_id
|
52
|
+
}
|
53
|
+
self.data[:subnet_groups][name] = data
|
54
|
+
response.body = {
|
55
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
56
|
+
'CreateCacheSubnetGroupResult' => { 'CacheSubnetGroup' => data }
|
57
|
+
}
|
58
|
+
response
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Elasticache
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/elasticache/base'
|
7
|
+
|
8
|
+
# deletes a cache subnet group
|
9
|
+
#
|
10
|
+
# === Parameters
|
11
|
+
# * name <~String> - The name for the Cache Subnet Group
|
12
|
+
# === Returns
|
13
|
+
# * response <~Excon::Response>:
|
14
|
+
# * body <~Hash>
|
15
|
+
def delete_cache_subnet_group(name)
|
16
|
+
request({
|
17
|
+
'Action' => 'DeleteCacheSubnetGroup',
|
18
|
+
'CacheSubnetGroupName' => name,
|
19
|
+
:parser => Fog::Parsers::AWS::Elasticache::Base.new
|
20
|
+
})
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class Mock
|
25
|
+
def delete_cache_subnet_group(name)
|
26
|
+
if self.data[:subnet_groups].delete(name)
|
27
|
+
Excon::Response.new(
|
28
|
+
{
|
29
|
+
:status => 200,
|
30
|
+
:body => { 'ResponseMetadata'=>{ 'RequestId'=> Fog::AWS::Mock.request_id } }
|
31
|
+
}
|
32
|
+
)
|
33
|
+
else
|
34
|
+
raise Fog::AWS::Elasticache::NotFound.new("CacheSubnetGroupNotFound => #{name} not found")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Elasticache
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/elasticache/describe_cache_subnet_groups'
|
7
|
+
|
8
|
+
# This API returns a list of CacheSubnetGroup descriptions. If a CacheSubnetGroupName is specified, the list will contain only
|
9
|
+
# the descriptions of the specified CacheSubnetGroup
|
10
|
+
# http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeCacheSubnetGroups.html
|
11
|
+
# ==== Parameters
|
12
|
+
# * CacheSubnetGroupName <~String> - The name of a specific database subnet group to return details for.
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
def describe_cache_subnet_groups(name = nil, opts = {})
|
17
|
+
params = {}
|
18
|
+
if opts[:marker]
|
19
|
+
params['Marker'] = opts[:marker]
|
20
|
+
end
|
21
|
+
if name
|
22
|
+
params['CacheSubnetGroupName'] = name
|
23
|
+
end
|
24
|
+
if opts[:max_records]
|
25
|
+
params['MaxRecords'] = opts[:max_records]
|
26
|
+
end
|
27
|
+
|
28
|
+
request({
|
29
|
+
'Action' => 'DescribeCacheSubnetGroups',
|
30
|
+
:parser => Fog::Parsers::AWS::Elasticache::DescribeCacheSubnetGroups.new
|
31
|
+
}.merge(params))
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
class Mock
|
37
|
+
|
38
|
+
def describe_cache_subnet_groups(name = nil, opts = {})
|
39
|
+
response = Excon::Response.new
|
40
|
+
|
41
|
+
subnet_group_set = []
|
42
|
+
if name
|
43
|
+
if subnet_group = self.data[:subnet_groups][name]
|
44
|
+
subnet_group_set << subnet_group
|
45
|
+
else
|
46
|
+
raise Fog::AWS::Elasticache::NotFound.new("Subnet Group #{name} not found")
|
47
|
+
end
|
48
|
+
else
|
49
|
+
subnet_group_set = self.data[:subnet_groups].values
|
50
|
+
end
|
51
|
+
|
52
|
+
response.status = 200
|
53
|
+
response.body = {
|
54
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
55
|
+
"DescribeCacheSubnetGroupsResult" => { "CacheSubnetGroups" => subnet_group_set }
|
56
|
+
}
|
57
|
+
response
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -27,7 +27,7 @@ module Fog
|
|
27
27
|
params = Fog::AWS.indexed_param('AvailabilityZones.member', [*availability_zones])
|
28
28
|
params.merge!(Fog::AWS.indexed_param('Subnets.member.%d', options[:subnet_ids]))
|
29
29
|
params.merge!(Fog::AWS.serialize_keys('Scheme', options[:scheme]))
|
30
|
-
params.merge!(Fog::AWS.indexed_param('SecurityGroups.member.%d', options[:security_groups]))
|
30
|
+
params.merge!(Fog::AWS.indexed_param('SecurityGroups.member.%d', options[:security_groups]))
|
31
31
|
|
32
32
|
listener_protocol = []
|
33
33
|
listener_lb_port = []
|
@@ -74,7 +74,8 @@ module Fog
|
|
74
74
|
|
75
75
|
dns_name = Fog::AWS::ELB::Mock.dns_name(lb_name, @region)
|
76
76
|
|
77
|
-
|
77
|
+
availability_zones = [*availability_zones].compact
|
78
|
+
region = availability_zones.empty? ? "us-east-1" : availability_zones.first.gsub(/[a-z]$/, '')
|
78
79
|
supported_platforms = Fog::Compute::AWS::Mock.data[region][@aws_access_key_id][:account_attributes].detect { |h| h["attributeName"] == "supported-platforms" }["values"]
|
79
80
|
security_group = if supported_platforms.include?("EC2")
|
80
81
|
Fog::Compute::AWS::Mock.data[region][@aws_access_key_id][:security_groups]['amazon-elb-sg']
|
@@ -36,7 +36,9 @@ module Fog
|
|
36
36
|
'RequestId' => Fog::AWS::Mock.request_id
|
37
37
|
}
|
38
38
|
|
39
|
-
self.data[:server_certificates].delete(server_certificate_name)
|
39
|
+
unless self.data[:server_certificates].delete(server_certificate_name)
|
40
|
+
raise Fog::AWS::IAM::NotFound.new("The Server Certificate with name #{server_certificate_name} cannot be found.")
|
41
|
+
end
|
40
42
|
|
41
43
|
response
|
42
44
|
end
|
@@ -18,6 +18,7 @@ module Fog
|
|
18
18
|
# @param DBSecurityGroups [Array] A list of DB Security Groups to authorize on this DB Instance
|
19
19
|
# @param Engine [String] The name of the database engine to be used for this instance.
|
20
20
|
# @param EngineVersion [String] The version number of the database engine to use.
|
21
|
+
# @param Iops [Integer] IOPS rate
|
21
22
|
# @param MasterUsername [String] The db master user
|
22
23
|
# @param MasterUserPassword [String] The new password for the DB Instance master user
|
23
24
|
# @param MultiAZ [Boolean] Specifies if the DB Instance is a Multi-AZ deployment
|
@@ -98,6 +99,7 @@ module Fog
|
|
98
99
|
"DBInstanceStatus"=>"creating",
|
99
100
|
"BackupRetentionPeriod"=> options["BackupRetentionPeriod"] || 1,
|
100
101
|
"AllocatedStorage"=> options["AllocatedStorage"],
|
102
|
+
"Iops" => options["Iops"],
|
101
103
|
"DBParameterGroups"=> # I think groups should be in the self.data method
|
102
104
|
[{"DBParameterGroupName"=>"default.mysql5.5",
|
103
105
|
"ParameterApplyStatus"=>"in-sync"}],
|
@@ -51,6 +51,7 @@ module Fog
|
|
51
51
|
'Engine' => source['Engine'],
|
52
52
|
'EngineVersion' => options['EngineVersion'] || '5.5.12',
|
53
53
|
'InstanceCreateTime' => nil,
|
54
|
+
'Iops' => source['Iops'],
|
54
55
|
'LatestRestorableTime' => nil,
|
55
56
|
'LicenseModel' => 'general-public-license',
|
56
57
|
'MasterUsername' => source['MasterUsername'],
|
@@ -47,7 +47,7 @@ module Fog
|
|
47
47
|
'InstanceCreateTime' => Time.now
|
48
48
|
}
|
49
49
|
# Copy attributes from server
|
50
|
-
%w(Engine EngineVersion AvailabilityZone AllocatedStorage MasterUsername InstanceCreateTime).each do |key|
|
50
|
+
%w(Engine EngineVersion AvailabilityZone AllocatedStorage Iops MasterUsername InstanceCreateTime).each do |key|
|
51
51
|
snapshot_data[key] = server_data[key]
|
52
52
|
end
|
53
53
|
snapshot_data['Port'] = server_data['Endpoint']['Port']
|
@@ -35,6 +35,8 @@ module Fog
|
|
35
35
|
|
36
36
|
# collection = Fog::Compute::AWS.new(:aws_access_key_id => 'mock key', :aws_secret_access_key => 'mock secret')
|
37
37
|
collection = Fog::Compute[:aws]
|
38
|
+
collection.region = @region
|
39
|
+
|
38
40
|
subnets = subnet_ids.map do |snid|
|
39
41
|
subnet = collection.subnets.get(snid)
|
40
42
|
raise Fog::AWS::RDS::NotFound.new("InvalidSubnet => The subnet '#{snid}' was not found") if subnet.nil?
|
@@ -19,6 +19,7 @@ module Fog
|
|
19
19
|
# * DBParameterGroupName <~String> The name of the DB Parameter Group to apply to this DB Instance
|
20
20
|
# * DBSecurityGroups <~Array> A list of DB Security Groups to authorize on this DB Instance
|
21
21
|
# * EngineVersion <~String> The version number of the database engine to upgrade to.
|
22
|
+
# * Iops <~Integer> IOPS rate
|
22
23
|
# * MasterUserPassword <~String> The new password for the DB Instance master user
|
23
24
|
# * MultiAZ <~Boolean> Specifies if the DB Instance is a Multi-AZ deployment
|
24
25
|
# * PreferredBackupWindow <~String> The daily time range during which automated backups are created if automated backups are enabled
|
@@ -23,6 +23,24 @@ module Fog
|
|
23
23
|
end
|
24
24
|
|
25
25
|
end # Real
|
26
|
+
|
27
|
+
class Mock # :nodoc:all
|
28
|
+
require 'fog/aws/requests/storage/shared_mock_methods'
|
29
|
+
include Fog::Storage::AWS::SharedMockMethods
|
30
|
+
|
31
|
+
def abort_multipart_upload(bucket_name, object_name, upload_id)
|
32
|
+
verify_mock_bucket_exists(bucket_name)
|
33
|
+
upload_info = get_upload_info(bucket_name, upload_id, true)
|
34
|
+
response = Excon::Response.new
|
35
|
+
if upload_info
|
36
|
+
response.status = 204
|
37
|
+
response
|
38
|
+
else
|
39
|
+
response.status = 404
|
40
|
+
raise(Excon::Errors.status_error({:expects => 204}, response))
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end # Mock
|
26
44
|
end # Storage
|
27
45
|
end # AWS
|
28
46
|
end # Fog
|
@@ -47,6 +47,29 @@ module Fog
|
|
47
47
|
end
|
48
48
|
|
49
49
|
end # Real
|
50
|
+
|
51
|
+
class Mock # :nodoc:all
|
52
|
+
require 'fog/aws/requests/storage/shared_mock_methods'
|
53
|
+
include Fog::Storage::AWS::SharedMockMethods
|
54
|
+
|
55
|
+
def complete_multipart_upload(bucket_name, object_name, upload_id, parts)
|
56
|
+
bucket = verify_mock_bucket_exists(bucket_name)
|
57
|
+
upload_info = get_upload_info(bucket_name, upload_id, true)
|
58
|
+
body = parts.map { |pid| upload_info[:parts][pid.to_i] }.join
|
59
|
+
object = store_mock_object(bucket, object_name, body, upload_info[:options])
|
60
|
+
|
61
|
+
response = Excon::Response.new
|
62
|
+
response.status = 200
|
63
|
+
response.body = {
|
64
|
+
'Location' => "http://#{bucket_name}.s3.amazonaws.com/#{object_name}",
|
65
|
+
'Bucket' => bucket_name,
|
66
|
+
'Key' => object_name,
|
67
|
+
'ETag' => object['ETag'],
|
68
|
+
}
|
69
|
+
response.headers['x-amz-version-id'] = object['VersionId'] if object['VersionId'] != 'null'
|
70
|
+
response
|
71
|
+
end
|
72
|
+
end # Mock
|
50
73
|
end # Storage
|
51
74
|
end # AWS
|
52
75
|
end # Fog
|
@@ -39,6 +39,30 @@ module Fog
|
|
39
39
|
end
|
40
40
|
|
41
41
|
end # Real
|
42
|
+
|
43
|
+
class Mock # :nodoc:all
|
44
|
+
require 'fog/aws/requests/storage/shared_mock_methods'
|
45
|
+
include Fog::Storage::AWS::SharedMockMethods
|
46
|
+
|
47
|
+
def initiate_multipart_upload(bucket_name, object_name, options = {})
|
48
|
+
verify_mock_bucket_exists(bucket_name)
|
49
|
+
upload_id = UUID.uuid
|
50
|
+
self.data[:multipart_uploads][bucket_name] ||= {}
|
51
|
+
self.data[:multipart_uploads][bucket_name][upload_id] = {
|
52
|
+
:parts => {},
|
53
|
+
:options => options,
|
54
|
+
}
|
55
|
+
|
56
|
+
response = Excon::Response.new
|
57
|
+
response.status = 200
|
58
|
+
response.body = {
|
59
|
+
"Bucket" => bucket_name,
|
60
|
+
"Key" => object_name,
|
61
|
+
"UploadId" => upload_id,
|
62
|
+
}
|
63
|
+
response
|
64
|
+
end
|
65
|
+
end # Mock
|
42
66
|
end # Storage
|
43
67
|
end # AWS
|
44
68
|
end # Fog
|
@@ -44,66 +44,30 @@ module Fog
|
|
44
44
|
|
45
45
|
class Mock # :nodoc:all
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
|
50
|
-
raise Excon::Errors::BadRequest.new('invalid x-amz-acl')
|
51
|
-
else
|
52
|
-
self.data[:acls][:object][bucket_name] ||= {}
|
53
|
-
self.data[:acls][:object][bucket_name][object_name] = self.class.acls(acl)
|
54
|
-
end
|
55
|
-
|
56
|
-
data = Fog::Storage.parse_data(data)
|
57
|
-
unless data[:body].is_a?(String)
|
58
|
-
data[:body] = data[:body].read
|
59
|
-
end
|
60
|
-
response = Excon::Response.new
|
61
|
-
if (bucket = self.data[:buckets][bucket_name])
|
62
|
-
response.status = 200
|
63
|
-
object = {
|
64
|
-
:body => data[:body],
|
65
|
-
'Content-Type' => options['Content-Type'] || data[:headers]['Content-Type'],
|
66
|
-
'ETag' => Digest::MD5.hexdigest(data[:body]),
|
67
|
-
'Key' => object_name,
|
68
|
-
'Last-Modified' => Fog::Time.now.to_date_header,
|
69
|
-
'Content-Length' => options['Content-Length'] || data[:headers]['Content-Length'],
|
70
|
-
'StorageClass' => options['x-amz-storage-class'] || 'STANDARD',
|
71
|
-
'VersionId' => bucket[:versioning] == 'Enabled' ? Fog::Mock.random_base64(32) : 'null'
|
72
|
-
}
|
47
|
+
require 'fog/aws/requests/storage/shared_mock_methods'
|
48
|
+
include Fog::Storage::AWS::SharedMockMethods
|
73
49
|
|
74
|
-
|
75
|
-
|
76
|
-
when 'Cache-Control', 'Content-Disposition', 'Content-Encoding', 'Content-MD5', 'Expires', /^x-amz-meta-/
|
77
|
-
object[key] = value
|
78
|
-
end
|
79
|
-
end
|
50
|
+
def put_object(bucket_name, object_name, data, options = {})
|
51
|
+
define_mock_acl(bucket_name, object_name, options)
|
80
52
|
|
81
|
-
|
82
|
-
|
53
|
+
data = parse_mock_data(data)
|
54
|
+
bucket = verify_mock_bucket_exists(bucket_name)
|
83
55
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
bucket[:objects][object_name].shift
|
88
|
-
end
|
56
|
+
options['Content-Type'] ||= data[:headers]['Content-Type']
|
57
|
+
options['Content-Length'] ||= data[:headers]['Content-Length']
|
58
|
+
object = store_mock_object(bucket, object_name, data[:body], options)
|
89
59
|
|
90
|
-
|
91
|
-
|
92
|
-
bucket[:objects][object_name] = [object]
|
93
|
-
end
|
60
|
+
response = Excon::Response.new
|
61
|
+
response.status = 200
|
94
62
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
63
|
+
response.headers = {
|
64
|
+
'Content-Length' => object['Content-Length'],
|
65
|
+
'Content-Type' => object['Content-Type'],
|
66
|
+
'ETag' => object['ETag'],
|
67
|
+
'Last-Modified' => object['Last-Modified'],
|
68
|
+
}
|
101
69
|
|
102
|
-
|
103
|
-
else
|
104
|
-
response.status = 404
|
105
|
-
raise(Excon::Errors.status_error({:expects => 200}, response))
|
106
|
-
end
|
70
|
+
response.headers['x-amz-version-id'] = object['VersionId'] if object['VersionId'] != 'null'
|
107
71
|
response
|
108
72
|
end
|
109
73
|
|
@@ -0,0 +1,87 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AWS
|
4
|
+
module SharedMockMethods
|
5
|
+
def define_mock_acl(bucket_name, object_name, options)
|
6
|
+
acl = options['x-amz-acl'] || 'private'
|
7
|
+
if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
|
8
|
+
raise Excon::Errors::BadRequest.new('invalid x-amz-acl')
|
9
|
+
else
|
10
|
+
self.data[:acls][:object][bucket_name] ||= {}
|
11
|
+
self.data[:acls][:object][bucket_name][object_name] = self.class.acls(acl)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def parse_mock_data(data)
|
16
|
+
data = Fog::Storage.parse_data(data)
|
17
|
+
unless data[:body].is_a?(String)
|
18
|
+
data[:body] = data[:body].read
|
19
|
+
end
|
20
|
+
data
|
21
|
+
end
|
22
|
+
|
23
|
+
def verify_mock_bucket_exists(bucket_name)
|
24
|
+
if (bucket = self.data[:buckets][bucket_name])
|
25
|
+
return bucket
|
26
|
+
end
|
27
|
+
|
28
|
+
response = Excon::Response.new
|
29
|
+
response.status = 404
|
30
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_upload_info(bucket_name, upload_id, delete = false)
|
34
|
+
if delete
|
35
|
+
upload_info = self.data[:multipart_uploads][bucket_name].delete(upload_id)
|
36
|
+
else
|
37
|
+
upload_info = self.data[:multipart_uploads][bucket_name][upload_id]
|
38
|
+
end
|
39
|
+
|
40
|
+
if !upload_info
|
41
|
+
response = Excon::Response.new
|
42
|
+
response.status = 404
|
43
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
44
|
+
end
|
45
|
+
|
46
|
+
upload_info
|
47
|
+
end
|
48
|
+
|
49
|
+
def store_mock_object(bucket, object_name, body, options)
|
50
|
+
object = {
|
51
|
+
:body => body,
|
52
|
+
'Content-Type' => options['Content-Type'],
|
53
|
+
'ETag' => Digest::MD5.hexdigest(body),
|
54
|
+
'Key' => object_name,
|
55
|
+
'Last-Modified' => Fog::Time.now.to_date_header,
|
56
|
+
'Content-Length' => options['Content-Length'],
|
57
|
+
'StorageClass' => options['x-amz-storage-class'] || 'STANDARD',
|
58
|
+
'VersionId' => bucket[:versioning] == 'Enabled' ? Fog::Mock.random_base64(32) : 'null'
|
59
|
+
}
|
60
|
+
|
61
|
+
for key, value in options
|
62
|
+
case key
|
63
|
+
when 'Cache-Control', 'Content-Disposition', 'Content-Encoding', 'Content-MD5', 'Expires', /^x-amz-meta-/
|
64
|
+
object[key] = value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
if bucket[:versioning]
|
69
|
+
bucket[:objects][object_name] ||= []
|
70
|
+
|
71
|
+
# When versioning is suspended, putting an object will create a new 'null' version if the latest version
|
72
|
+
# is a value other than 'null', otherwise it will replace the latest version.
|
73
|
+
if bucket[:versioning] == 'Suspended' && bucket[:objects][object_name].first['VersionId'] == 'null'
|
74
|
+
bucket[:objects][object_name].shift
|
75
|
+
end
|
76
|
+
|
77
|
+
bucket[:objects][object_name].unshift(object)
|
78
|
+
else
|
79
|
+
bucket[:objects][object_name] = [object]
|
80
|
+
end
|
81
|
+
|
82
|
+
object
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|