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
@@ -47,6 +47,10 @@ module Fog
|
|
47
47
|
# * 'tagSet'<~Array>: - Tags assigned to the resource.
|
48
48
|
# * 'key'<~String> - Tag's key
|
49
49
|
# * 'value'<~String> - Tag's value
|
50
|
+
# * 'privateIpAddresses' <~Array>:
|
51
|
+
# * 'privateIpAddress'<~String> - One of the additional private ip address
|
52
|
+
# * 'privateDnsName'<~String> - The private DNS associate to the ip address
|
53
|
+
# * 'primay'<~String> - Whether main ip associate with NIC true of false
|
50
54
|
#
|
51
55
|
# {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/2012-03-01/APIReference/index.html?ApiReference-query-DescribeNetworkInterfaces.html]
|
52
56
|
def describe_network_interfaces(filters = {})
|
@@ -37,9 +37,10 @@ module Fog
|
|
37
37
|
response.status = 200
|
38
38
|
if address = self.data[:addresses][public_ip]
|
39
39
|
instance_id = address['instanceId']
|
40
|
-
instance = self.data[:instances][instance_id]
|
41
|
-
|
42
|
-
|
40
|
+
if instance = self.data[:instances][instance_id]
|
41
|
+
instance['ipAddress'] = instance['originalIpAddress']
|
42
|
+
instance['dnsName'] = Fog::AWS::Mock.dns_name_for(instance['ipAddress'])
|
43
|
+
end
|
43
44
|
address['instanceId'] = nil
|
44
45
|
response.status = 200
|
45
46
|
response.body = {
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class AWS
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/compute/replace_network_acl_association'
|
6
|
+
|
7
|
+
# Replace the network ACL for a subnet with a
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# * association_id<~String> - The ID of the current association between the original network ACL and the subnet
|
11
|
+
# * network_acl_id<~String> - The ID of the network ACL
|
12
|
+
#
|
13
|
+
# === Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
# * 'requestId'<~String> - Id of request
|
17
|
+
# * 'return'<~Boolean> - Returns true if the request succeeds.
|
18
|
+
#
|
19
|
+
# {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ReplaceNetworkAclAssociation.html]
|
20
|
+
def replace_network_acl_association(association_id, network_acl_id)
|
21
|
+
request({
|
22
|
+
'Action' => 'ReplaceNetworkAclAssociation',
|
23
|
+
'AssociationId' => association_id,
|
24
|
+
'NetworkAclId' => network_acl_id,
|
25
|
+
:parser => Fog::Parsers::Compute::AWS::ReplaceNetworkAclAssociation.new
|
26
|
+
})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
class Mock
|
31
|
+
def replace_network_acl_association(association_id, network_acl_id)
|
32
|
+
response = Excon::Response.new
|
33
|
+
if self.data[:network_acls][network_acl_id]
|
34
|
+
# find the old assoc
|
35
|
+
old_nacl = self.data[:network_acls].values.detect do |n|
|
36
|
+
n['associationSet'].detect { |assoc| assoc['networkAclAssociationId'] == association_id }
|
37
|
+
end
|
38
|
+
|
39
|
+
unless old_nacl
|
40
|
+
raise Fog::Compute::AWS::Error.new("Invalid association_id #{association_id}")
|
41
|
+
end
|
42
|
+
|
43
|
+
subnet_id = old_nacl['associationSet'].detect { |assoc| assoc['networkAclAssociationId'] == association_id }['subnetId']
|
44
|
+
old_nacl['associationSet'].delete_if { |assoc| assoc['networkAclAssociationId'] == association_id }
|
45
|
+
|
46
|
+
id = Fog::AWS::Mock.network_acl_association_id
|
47
|
+
self.data[:network_acls][network_acl_id]['associationSet'] << {
|
48
|
+
'networkAclAssociationId' => id,
|
49
|
+
'networkAclId' => network_acl_id,
|
50
|
+
'subnetId' => subnet_id,
|
51
|
+
}
|
52
|
+
|
53
|
+
response.status = 200
|
54
|
+
response.body = {
|
55
|
+
'requestId' => Fog::AWS::Mock.request_id,
|
56
|
+
'newAssociationId' => id
|
57
|
+
}
|
58
|
+
response
|
59
|
+
else
|
60
|
+
raise Fog::Compute::AWS::NotFound.new("The network ACL '#{network_acl_id}' does not exist")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class AWS
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/compute/basic'
|
6
|
+
|
7
|
+
# Replaces a Network ACL entry with the same rule number
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# * network_acl_id<~String> - The ID of the ACL to add this entry to
|
11
|
+
# * rule_number<~Integer> - The rule number for the entry, between 100 and 32766
|
12
|
+
# * protocol<~Integer> - The IP protocol to which the rule applies. You can use -1 to mean all protocols.
|
13
|
+
# * rule_action<~String> - Allows or denies traffic that matches the rule. (either allow or deny)
|
14
|
+
# * cidr_block<~String> - The CIDR range to allow or deny
|
15
|
+
# * egress<~Boolean> - Indicates whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).
|
16
|
+
# * options<~Hash>:
|
17
|
+
# * 'Icmp.Code' - ICMP code, required if protocol is 1
|
18
|
+
# * 'Icmp.Type' - ICMP type, required if protocol is 1
|
19
|
+
# * 'PortRange.From' - The first port in the range, required if protocol is 6 (TCP) or 17 (UDP)
|
20
|
+
# * 'PortRange.To' - The last port in the range, required if protocol is 6 (TCP) or 17 (UDP)
|
21
|
+
#
|
22
|
+
# === Returns
|
23
|
+
# * response<~Excon::Response>:
|
24
|
+
# * body<~Hash>:
|
25
|
+
# * 'requestId'<~String> - Id of request
|
26
|
+
# * 'return'<~Boolean> - Returns true if the request succeeds.
|
27
|
+
#
|
28
|
+
# {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ReplaceNetworkAclEntry.html]
|
29
|
+
def replace_network_acl_entry(network_acl_id, rule_number, protocol, rule_action, cidr_block, egress, options = {})
|
30
|
+
request({
|
31
|
+
'Action' => 'ReplaceNetworkAclEntry',
|
32
|
+
'NetworkAclId' => network_acl_id,
|
33
|
+
'RuleNumber' => rule_number,
|
34
|
+
'Protocol' => protocol,
|
35
|
+
'RuleAction' => rule_action,
|
36
|
+
'Egress' => egress,
|
37
|
+
'CidrBlock' => cidr_block,
|
38
|
+
:parser => Fog::Parsers::Compute::AWS::Basic.new
|
39
|
+
}.merge!(options))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class Mock
|
44
|
+
def replace_network_acl_entry(network_acl_id, rule_number, protocol, rule_action, cidr_block, egress, options = {})
|
45
|
+
response = Excon::Response.new
|
46
|
+
if self.data[:network_acls][network_acl_id]
|
47
|
+
|
48
|
+
unless self.data[:network_acls][network_acl_id]['entrySet'].detect { |r| r['ruleNumber'] == rule_number && r['egress'] == egress }
|
49
|
+
raise Fog::Compute::AWS::Error.new("No rule with that number")
|
50
|
+
end
|
51
|
+
self.data[:network_acls][network_acl_id]['entrySet'].delete_if { |r| r['ruleNumber'] == rule_number && r['egress'] == egress }
|
52
|
+
|
53
|
+
data = {
|
54
|
+
'ruleNumber' => rule_number,
|
55
|
+
'protocol' => protocol,
|
56
|
+
'ruleAction' => rule_action,
|
57
|
+
'egress' => egress,
|
58
|
+
'cidrBlock' => cidr_block,
|
59
|
+
'icmpTypeCode' => {},
|
60
|
+
'portRange' => {}
|
61
|
+
}
|
62
|
+
data['icmpTypeCode']['code'] = options['Icmp.Code'] if options['Icmp.Code']
|
63
|
+
data['icmpTypeCode']['type'] = options['Icmp.Type'] if options['Icmp.Type']
|
64
|
+
data['portRange']['from'] = options['PortRange.From'] if options['PortRange.From']
|
65
|
+
data['portRange']['to'] = options['PortRange.To'] if options['PortRange.To']
|
66
|
+
self.data[:network_acls][network_acl_id]['entrySet'] << data
|
67
|
+
|
68
|
+
response.status = 200
|
69
|
+
response.body = {
|
70
|
+
'requestId' => Fog::AWS::Mock.request_id,
|
71
|
+
'return' => true
|
72
|
+
}
|
73
|
+
response
|
74
|
+
else
|
75
|
+
raise Fog::Compute::AWS::NotFound.new("The network ACL '#{network_acl_id}' does not exist")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class AWS
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/compute/basic'
|
7
|
+
|
8
|
+
# Replaces a route in a route table within a VPC.
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * RouteTableId<~String> - The ID of the route table for the route.
|
12
|
+
# * options<~Hash>:
|
13
|
+
# * DestinationCidrBlock<~String> - The CIDR address block used for the destination match. Routing decisions are based on the most specific match.
|
14
|
+
# * GatewayId<~String> - The ID of an Internet gateway attached to your VPC.
|
15
|
+
# * InstanceId<~String> - The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
|
16
|
+
# * NetworkInterfaceId<~String> - The ID of a network interface.
|
17
|
+
#
|
18
|
+
# === Returns
|
19
|
+
# * response<~Excon::Response>:
|
20
|
+
# * body<~Hash>:
|
21
|
+
# * 'requestId'<~String> - Id of the request
|
22
|
+
# * 'return'<~Boolean> - Returns true if the request succeeds. Otherwise, returns an error.
|
23
|
+
#
|
24
|
+
# {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ReplaceRoute.html]
|
25
|
+
def replace_route(route_table_id, destination_cidr_block, options = {})
|
26
|
+
options['DestinationCidrBlock'] ||= destination_cidr_block
|
27
|
+
|
28
|
+
request({
|
29
|
+
'Action' => 'ReplaceRoute',
|
30
|
+
'RouteTableId' => route_table_id,
|
31
|
+
:idempotent => true,
|
32
|
+
:parser => Fog::Parsers::Compute::AWS::Basic.new
|
33
|
+
}.merge!(options))
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class Mock
|
39
|
+
|
40
|
+
def replace_route(route_table_id, destination_cidr_block, options = {})
|
41
|
+
options['instanceOwnerId'] ||= nil
|
42
|
+
options['DestinationCidrBlock'] ||= destination_cidr_block
|
43
|
+
|
44
|
+
route_table = self.data[:route_tables].find { |routetable| routetable["routeTableId"].eql? route_table_id }
|
45
|
+
if !route_table.nil? && destination_cidr_block
|
46
|
+
if !options['gatewayId'].nil? || !options['instanceId'].nil? || !options['networkInterfaceId'].nil?
|
47
|
+
if !options['gatewayId'].nil? && self.internet_gateways.all('internet-gateway-id'=>options['gatewayId']).first.nil?
|
48
|
+
raise Fog::Compute::AWS::NotFound.new("The gateway ID '#{options['gatewayId']}' does not exist")
|
49
|
+
elsif !options['instanceId'].nil? && self.servers.all('instance-id'=>options['instanceId']).first.nil?
|
50
|
+
raise Fog::Compute::AWS::NotFound.new("The instance ID '#{options['instanceId']}' does not exist")
|
51
|
+
elsif !options['networkInterfaceId'].nil? && self.network_interfaces.all('networkInterfaceId'=>options['networkInterfaceId']).first.nil?
|
52
|
+
raise Fog::Compute::AWS::NotFound.new("The networkInterface ID '#{options['networkInterfaceId']}' does not exist")
|
53
|
+
elsif route_table['routeSet'].find { |route| route['destinationCidrBlock'].eql? destination_cidr_block }.nil?
|
54
|
+
raise Fog::Compute::AWS::Error, "RouteAlreadyExists => The route identified by #{destination_cidr_block} doesn't exist."
|
55
|
+
else
|
56
|
+
response = Excon::Response.new
|
57
|
+
route_set = route_table['routeSet'].find { |routeset| routeset['destinationCidrBlock'].eql? destination_cidr_block }
|
58
|
+
route_set.merge!(options)
|
59
|
+
route_set['state'] = 'pending'
|
60
|
+
route_set['origin'] = 'ReplaceRoute'
|
61
|
+
|
62
|
+
response.status = 200
|
63
|
+
response.body = {
|
64
|
+
'requestId'=> Fog::AWS::Mock.request_id,
|
65
|
+
'return' => true
|
66
|
+
}
|
67
|
+
response
|
68
|
+
end
|
69
|
+
else
|
70
|
+
message = 'MissingParameter => '
|
71
|
+
message << 'The request must contain either a gateway id, a network interface id, or an instance id'
|
72
|
+
raise Fog::Compute::AWS::Error.new(message)
|
73
|
+
end
|
74
|
+
elsif route_table.nil?
|
75
|
+
raise Fog::Compute::AWS::NotFound.new("The routeTable ID '#{route_table_id}' does not exist")
|
76
|
+
elsif destination_cidr_block.empty?
|
77
|
+
raise Fog::Compute::AWS::InvalidParameterValue.new("Value () for parameter destinationCidrBlock is invalid. This is not a valid CIDR block.")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -75,6 +75,14 @@ module Fog
|
|
75
75
|
options['LaunchSpecification.UserData'] = Base64.encode64(options['LaunchSpecification.UserData'])
|
76
76
|
end
|
77
77
|
|
78
|
+
if options['ValidFrom'] && options['ValidFrom'].is_a?(Time)
|
79
|
+
options['ValidFrom'] = options['ValidFrom'].iso8601
|
80
|
+
end
|
81
|
+
|
82
|
+
if options['ValidUntil'] && options['ValidUntil'].is_a?(Time)
|
83
|
+
options['ValidUntil'] = options['ValidUntil'].iso8601
|
84
|
+
end
|
85
|
+
|
78
86
|
request({
|
79
87
|
'Action' => 'RequestSpotInstances',
|
80
88
|
'LaunchSpecification.ImageId' => image_id,
|
@@ -36,7 +36,7 @@ module Fog
|
|
36
36
|
# * 'SecurityGroupId'<~Array> or <~String> - id's of security group(s) for instances, use this or SecurityGroup
|
37
37
|
# * 'InstanceInitiatedShutdownBehaviour'<~String> - specifies whether volumes are stopped or terminated when instance is shutdown, in [stop, terminate]
|
38
38
|
# * 'InstanceType'<~String> - Type of instance to boot. Valid options
|
39
|
-
# in ['t1.micro', 'm1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge', 'm2.xlarge', m2.2xlarge', 'm2.4xlarge', 'cc1.4xlarge', 'cc2.8xlarge', 'cg1.4xlarge']
|
39
|
+
# in ['t1.micro', 'm1.small', 'm1.medium', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge', 'c3.large', 'c3.xlarge', 'c3.2xlarge', 'c3.4xlarge', 'c3.8xlarge', 'g2.2xlarge', 'hs1.8xlarge', 'm2.xlarge', 'm2.2xlarge', 'm2.4xlarge', 'cr1.8xlarge', 'm3.xlarge', 'm3.2xlarge', 'hi1.4xlarge', 'cc1.4xlarge', 'cc2.8xlarge', 'cg1.4xlarge', 'i2.xlarge', 'i2.2xlarge', 'i2.4xlarge', 'i2.8xlarge']
|
40
40
|
# default is 'm1.small'
|
41
41
|
# * 'KernelId'<~String> - Id of kernel with which to launch
|
42
42
|
# * 'KeyName'<~String> - Name of a keypair to add to booting instances
|
@@ -139,11 +139,31 @@ module Fog
|
|
139
139
|
|
140
140
|
min_count.times do |i|
|
141
141
|
instance_id = Fog::AWS::Mock.instance_id
|
142
|
+
availability_zone = options['Placement.AvailabilityZone'] || Fog::AWS::Mock.availability_zone(@region)
|
143
|
+
|
144
|
+
block_device_mapping = (options['BlockDeviceMapping'] || []).inject([]) do |mapping, device|
|
145
|
+
device_name = device.fetch("DeviceName", "/dev/sda1")
|
146
|
+
volume_size = device.fetch("Ebs.VolumeSize", 15) # @todo should pull this from the image
|
147
|
+
delete_on_termination = device.fetch("Ebs.DeleteOnTermination", true) # @todo should pull this from the image
|
148
|
+
|
149
|
+
volume_id = create_volume(availability_zone, volume_size).data[:body]["volumeId"]
|
150
|
+
|
151
|
+
self.data[:volumes][volume_id].merge!("DeleteOnTermination" => delete_on_termination)
|
152
|
+
|
153
|
+
mapping << {
|
154
|
+
"deviceName" => device_name,
|
155
|
+
"volumeId" => volume_id,
|
156
|
+
"status" => "attached",
|
157
|
+
"attachTime" => Time.now,
|
158
|
+
"deleteOnTermination" => delete_on_termination,
|
159
|
+
}
|
160
|
+
end
|
161
|
+
|
142
162
|
instance = {
|
143
163
|
'amiLaunchIndex' => i,
|
144
164
|
'associatePublicIP' => options['associatePublicIP'] || false,
|
145
165
|
'architecture' => 'i386',
|
146
|
-
'blockDeviceMapping' =>
|
166
|
+
'blockDeviceMapping' => block_device_mapping,
|
147
167
|
'clientToken' => options['clientToken'],
|
148
168
|
'dnsName' => nil,
|
149
169
|
'ebsOptimized' => options['EbsOptimized'] || false,
|
@@ -156,7 +176,7 @@ module Fog
|
|
156
176
|
'keyName' => options['KeyName'],
|
157
177
|
'launchTime' => Time.now,
|
158
178
|
'monitoring' => { 'state' => options['Monitoring.Enabled'] || false },
|
159
|
-
'placement' => { 'availabilityZone' =>
|
179
|
+
'placement' => { 'availabilityZone' => availability_zone, 'groupName' => nil, 'tenancy' => options['Placement.Tenancy'] || 'default' },
|
160
180
|
'privateDnsName' => nil,
|
161
181
|
'productCodes' => [],
|
162
182
|
'reason' => nil,
|
@@ -28,35 +28,43 @@ module Fog
|
|
28
28
|
|
29
29
|
# Take a list of pipeline object hashes as specified in the Data Pipeline JSON format
|
30
30
|
# and transform it into the format expected by the API
|
31
|
-
private
|
32
31
|
def transform_objects(objects)
|
33
|
-
|
32
|
+
objects.map { |object| JSONObject.new(object).to_api }
|
33
|
+
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
class JSONObject
|
36
|
+
def initialize(object)
|
37
|
+
@json_fields = object.clone
|
38
|
+
@id = @json_fields.delete('id')
|
39
|
+
@name = @json_fields.delete('name') || @id
|
40
|
+
end
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
42
|
+
def to_api
|
43
|
+
{
|
44
|
+
'id' => @id,
|
45
|
+
'name' => @name,
|
46
|
+
'fields' => fields
|
47
|
+
}
|
48
|
+
end
|
44
49
|
|
45
|
-
|
46
|
-
value.each do |v|
|
47
|
-
new_object['fields'] << { 'key' => key, 'stringValue' => v }
|
48
|
-
end
|
50
|
+
private
|
49
51
|
|
50
|
-
|
51
|
-
|
52
|
+
def fields
|
53
|
+
@json_fields.map{|k,v| field_for_kv(k,v)}.flatten
|
54
|
+
end
|
52
55
|
|
53
|
-
|
54
|
-
|
56
|
+
def field_for_kv(key, value)
|
57
|
+
if value.is_a?(Hash)
|
58
|
+
{ 'key' => key, 'refValue' => value['ref'] }
|
55
59
|
|
56
|
-
|
57
|
-
|
60
|
+
elsif value.is_a?(Array)
|
61
|
+
value.map { |subvalue| field_for_kv(key, subvalue) }
|
62
|
+
|
63
|
+
else
|
64
|
+
{ 'key' => key, 'stringValue' => value }
|
58
65
|
|
59
|
-
|
66
|
+
end
|
67
|
+
end
|
60
68
|
end
|
61
69
|
|
62
70
|
end
|
@@ -12,6 +12,7 @@ module Fog
|
|
12
12
|
# * options <~Hash> - All optional parameters should be set in this Hash:
|
13
13
|
# * :node_type <~String> - The size (flavor) of the cache Nodes
|
14
14
|
# * :security_group_names <~Array> - Array of Elasticache::SecurityGroup names
|
15
|
+
# * :vpc_security_groups <~Array> - Array
|
15
16
|
# * :num_nodes <~Integer> - The number of nodes in the Cluster
|
16
17
|
# * :auto_minor_version_upgrade <~TrueFalseClass>
|
17
18
|
# * :parameter_group_name <~String> - Name of the Cluster's ParameterGroup
|
@@ -21,20 +22,13 @@ module Fog
|
|
21
22
|
# * :port <~Integer> - The memcached port number
|
22
23
|
# * :preferred_availablility_zone <~String>
|
23
24
|
# * :preferred_maintenance_window <~String>
|
25
|
+
# * :cache_subnet_group_name <~String>
|
24
26
|
# === Returns
|
25
27
|
# * response <~Excon::Response>:
|
26
28
|
# * body <~Hash>
|
27
29
|
def create_cache_cluster(id, options = {})
|
28
|
-
|
29
|
-
|
30
|
-
group_names = options[:security_group_names] || ['default']
|
31
|
-
sec_group_params = group_names.inject({}) do |group_hash, name|
|
32
|
-
index = group_names.index(name) + 1
|
33
|
-
group_hash["CacheSecurityGroupNames.member.#{index}"] = name
|
34
|
-
group_hash
|
35
|
-
end
|
36
|
-
# Merge the Cache Security Group parameters with the normal options
|
37
|
-
request(sec_group_params.merge(
|
30
|
+
|
31
|
+
req_options = {
|
38
32
|
'Action' => 'CreateCacheCluster',
|
39
33
|
'CacheClusterId' => id.strip,
|
40
34
|
'CacheNodeType' => options[:node_type] || 'cache.m1.large',
|
@@ -42,13 +36,25 @@ module Fog
|
|
42
36
|
'NumCacheNodes' => options[:num_nodes] || 1,
|
43
37
|
'AutoMinorVersionUpgrade' => options[:auto_minor_version_upgrade],
|
44
38
|
'CacheParameterGroupName' => options[:parameter_group_name],
|
39
|
+
'CacheSubnetGroupName' => options[:cache_subnet_group_name],
|
45
40
|
'EngineVersion' => options[:engine_version],
|
46
41
|
'NotificationTopicArn' => options[:notification_topic_arn],
|
47
42
|
'Port' => options[:port],
|
48
43
|
'PreferredAvailabilityZone' => options[:preferred_availablility_zone],
|
49
44
|
'PreferredMaintenanceWindow' => options[:preferred_maintenance_window],
|
50
45
|
:parser => Fog::Parsers::AWS::Elasticache::SingleCacheCluster.new
|
51
|
-
|
46
|
+
}
|
47
|
+
|
48
|
+
if cache_security_groups = options.delete(:security_group_names)
|
49
|
+
req_options.merge!(Fog::AWS.indexed_param('CacheSecurityGroupNames.member.%d', [*cache_security_groups]))
|
50
|
+
end
|
51
|
+
|
52
|
+
if vpc_security_groups = options.delete(:vpc_security_groups)
|
53
|
+
req_options.merge!(Fog::AWS.indexed_param('SecurityGroupIds.member.%d', [*vpc_security_groups]))
|
54
|
+
end
|
55
|
+
|
56
|
+
request( req_options )
|
57
|
+
|
52
58
|
end
|
53
59
|
end
|
54
60
|
|
@@ -66,6 +72,7 @@ module Fog
|
|
66
72
|
'CacheSecurityGroups' => [],
|
67
73
|
'CacheParameterGroup' => { 'CacheParameterGroupName' =>
|
68
74
|
options[:parameter_group_name] || 'default.memcached1.4' },
|
75
|
+
'CacheSubnetGroupName' => options[:cache_subnet_group_name],
|
69
76
|
'PendingModifiedValues' => {},
|
70
77
|
'AutoMinorVersionUpgrade' =>
|
71
78
|
options[:auto_minor_version_upgrade] || 'true',
|