fog 1.19.0 → 1.20.0
Sign up to get free protection for your applications and to get access to all the features.
- 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 -327
- 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/associate_address.rb +1 -0
- 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_addresses.rb +1 -1
- 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 +60 -17
- data/lib/fog/google/core.rb +24 -0
- data/lib/fog/google/examples/create.rb +12 -1
- data/lib/fog/google/examples/eric-fail.rb +13 -2
- data/lib/fog/google/examples/image_create.rb +0 -1
- data/lib/fog/google/examples/launch_micro_instance.rb +1 -2
- data/lib/fog/google/examples/metadata.rb +14 -2
- data/lib/fog/google/examples/network.rb +13 -2
- data/lib/fog/google/models/compute/disk.rb +12 -11
- data/lib/fog/google/models/compute/flavor.rb +1 -0
- data/lib/fog/google/models/compute/flavors.rb +1 -1
- data/lib/fog/google/models/compute/image.rb +10 -3
- data/lib/fog/google/models/compute/images.rb +2 -0
- data/lib/fog/google/models/compute/server.rb +27 -4
- data/lib/fog/google/models/compute/servers.rb +26 -10
- data/lib/fog/google/models/compute/zone.rb +1 -0
- 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_disk.rb +38 -20
- data/lib/fog/google/requests/compute/insert_firewall.rb +6 -9
- data/lib/fog/google/requests/compute/insert_image.rb +1 -5
- data/lib/fog/google/requests/compute/insert_server.rb +13 -29
- 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/google/helpers/disk_helper.rb +12 -0
- data/tests/google/models/compute/server_tests.rb +4 -1
- data/tests/google/models/compute/servers_tests.rb +4 -1
- data/tests/google/requests/compute/image_tests.rb +0 -1
- data/tests/google/requests/compute/server_tests.rb +2 -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 +193 -38
- data/lib/fog/brightbox/requests/compute/destroy_user_collaboration.rb +0 -21
@@ -0,0 +1,292 @@
|
|
1
|
+
require 'fog/core'
|
2
|
+
require 'fog/internet_archive/signaturev4'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module InternetArchive
|
6
|
+
|
7
|
+
COMPLIANT_BUCKET_NAMES = /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\-(?![\.])){1,61}[a-z0-9]$/
|
8
|
+
|
9
|
+
DOMAIN_NAME = 'archive.org'
|
10
|
+
|
11
|
+
API_DOMAIN_NAME = 's3.us.' + DOMAIN_NAME
|
12
|
+
|
13
|
+
extend Fog::Provider
|
14
|
+
|
15
|
+
service(:storage, 'Storage')
|
16
|
+
|
17
|
+
def self.indexed_param(key, values)
|
18
|
+
params = {}
|
19
|
+
unless key.include?('%d')
|
20
|
+
key << '.%d'
|
21
|
+
end
|
22
|
+
[*values].each_with_index do |value, index|
|
23
|
+
if value.respond_to?('keys')
|
24
|
+
k = format(key, index + 1)
|
25
|
+
value.each do | vkey, vvalue |
|
26
|
+
params["#{k}.#{vkey}"] = vvalue
|
27
|
+
end
|
28
|
+
else
|
29
|
+
params[format(key, index + 1)] = value
|
30
|
+
end
|
31
|
+
end
|
32
|
+
params
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.serialize_keys(key, value, options = {})
|
36
|
+
case value
|
37
|
+
when Hash
|
38
|
+
value.each do | k, v |
|
39
|
+
options.merge!(serialize_keys("#{key}.#{k}", v))
|
40
|
+
end
|
41
|
+
return options
|
42
|
+
when Array
|
43
|
+
value.each_with_index do | it, idx |
|
44
|
+
options.merge!(serialize_keys("#{key}.member.#{(idx + 1)}", it))
|
45
|
+
end
|
46
|
+
return options
|
47
|
+
else
|
48
|
+
return {key => value}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.indexed_request_param(name, values)
|
53
|
+
idx = -1
|
54
|
+
Array(values).inject({}) do |params, value|
|
55
|
+
params["#{name}.#{idx += 1}"] = value
|
56
|
+
params
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.indexed_filters(filters)
|
61
|
+
params = {}
|
62
|
+
filters.keys.each_with_index do |key, key_index|
|
63
|
+
key_index += 1
|
64
|
+
params[format('Filter.%d.Name', key_index)] = key
|
65
|
+
[*filters[key]].each_with_index do |value, value_index|
|
66
|
+
value_index += 1
|
67
|
+
params[format('Filter.%d.Value.%d', key_index, value_index)] = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
params
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.escape(string)
|
74
|
+
string.gsub(/([^a-zA-Z0-9_.\-~]+)/) {
|
75
|
+
"%" + $1.unpack("H2" * $1.bytesize).join("%").upcase
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.signed_params(params, options = {})
|
80
|
+
params.merge!({
|
81
|
+
'AWSAccessKeyId' => options[:ia_access_key_id],
|
82
|
+
'SignatureMethod' => 'HmacSHA256',
|
83
|
+
'SignatureVersion' => '2',
|
84
|
+
'Timestamp' => Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ"),
|
85
|
+
'Version' => options[:version]
|
86
|
+
})
|
87
|
+
|
88
|
+
params.merge!({
|
89
|
+
'SecurityToken' => options[:ia_session_token]
|
90
|
+
}) if options[:ia_session_token]
|
91
|
+
|
92
|
+
body = ''
|
93
|
+
for key in params.keys.sort
|
94
|
+
unless (value = params[key]).nil?
|
95
|
+
body << "#{key}=#{escape(value.to_s)}&"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
string_to_sign = "POST\n#{options[:host]}:#{options[:port]}\n#{options[:path]}\n" << body.chop
|
99
|
+
signed_string = options[:hmac].sign(string_to_sign)
|
100
|
+
body << "Signature=#{escape(Base64.encode64(signed_string).chomp!)}"
|
101
|
+
|
102
|
+
body
|
103
|
+
end
|
104
|
+
|
105
|
+
class Mock
|
106
|
+
|
107
|
+
def self.arn(vendor, account_id, path, region = nil)
|
108
|
+
"arn:aws:#{vendor}:#{region}:#{account_id}:#{path}"
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.availability_zone(region)
|
112
|
+
"#{region}#{Fog::Mock.random_selection('abcd', 1)}"
|
113
|
+
end
|
114
|
+
|
115
|
+
def self.box_usage
|
116
|
+
sprintf("%0.10f", rand / 100).to_f
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.console_output
|
120
|
+
# "[ 0.000000] Linux version 2.6.18-xenU-ec2-v1.2 (root@domU-12-31-39-07-51-82) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #2 SMP Wed Aug 19 09:04:38 EDT 2009"
|
121
|
+
Base64.decode64("WyAwLjAwMDAwMF0gTGludXggdmVyc2lvbiAyLjYuMTgteGVuVS1lYzItdjEu\nMiAocm9vdEBkb21VLTEyLTMxLTM5LTA3LTUxLTgyKSAoZ2NjIHZlcnNpb24g\nNC4xLjIgMjAwNzA2MjYgKFJlZCBIYXQgNC4xLjItMTMpKSAjMiBTTVAgV2Vk\nIEF1ZyAxOSAwOTowNDozOCBFRFQgMjAwOQ==\n")
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.dns_name_for(ip_address)
|
125
|
+
"ec2-#{ip_address.gsub('.','-')}.compute-1.amazonaws.com"
|
126
|
+
end
|
127
|
+
|
128
|
+
def self.private_dns_name_for(ip_address)
|
129
|
+
"ip-#{ip_address.gsub('.','-')}.ec2.internal"
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.image
|
133
|
+
path = []
|
134
|
+
(rand(3) + 2).times do
|
135
|
+
path << Fog::Mock.random_letters(rand(9) + 8)
|
136
|
+
end
|
137
|
+
{
|
138
|
+
"imageOwnerId" => Fog::Mock.random_letters(rand(5) + 4),
|
139
|
+
"blockDeviceMapping" => [],
|
140
|
+
"productCodes" => [],
|
141
|
+
"kernelId" => kernel_id,
|
142
|
+
"ramdiskId" => ramdisk_id,
|
143
|
+
"imageState" => "available",
|
144
|
+
"imageId" => image_id,
|
145
|
+
"architecture" => "i386",
|
146
|
+
"isPublic" => true,
|
147
|
+
"imageLocation" => path.join('/'),
|
148
|
+
"imageType" => "machine",
|
149
|
+
"rootDeviceType" => ["ebs","instance-store"][rand(2)],
|
150
|
+
"rootDeviceName" => "/dev/sda1"
|
151
|
+
}
|
152
|
+
end
|
153
|
+
|
154
|
+
def self.image_id
|
155
|
+
"ami-#{Fog::Mock.random_hex(8)}"
|
156
|
+
end
|
157
|
+
|
158
|
+
def self.key_fingerprint
|
159
|
+
fingerprint = []
|
160
|
+
20.times do
|
161
|
+
fingerprint << Fog::Mock.random_hex(2)
|
162
|
+
end
|
163
|
+
fingerprint.join(':')
|
164
|
+
end
|
165
|
+
|
166
|
+
def self.instance_id
|
167
|
+
"i-#{Fog::Mock.random_hex(8)}"
|
168
|
+
end
|
169
|
+
|
170
|
+
def self.ip_address
|
171
|
+
ip = []
|
172
|
+
4.times do
|
173
|
+
ip << Fog::Mock.random_numbers(rand(3) + 1).to_i.to_s # remove leading 0
|
174
|
+
end
|
175
|
+
ip.join('.')
|
176
|
+
end
|
177
|
+
|
178
|
+
def self.private_ip_address
|
179
|
+
ip_address.gsub(/^\d{1,3}\./,"10.")
|
180
|
+
end
|
181
|
+
|
182
|
+
def self.kernel_id
|
183
|
+
"aki-#{Fog::Mock.random_hex(8)}"
|
184
|
+
end
|
185
|
+
|
186
|
+
def self.key_material
|
187
|
+
OpenSSL::PKey::RSA.generate(1024).to_s
|
188
|
+
end
|
189
|
+
|
190
|
+
def self.owner_id
|
191
|
+
Fog::Mock.random_numbers(12)
|
192
|
+
end
|
193
|
+
|
194
|
+
def self.ramdisk_id
|
195
|
+
"ari-#{Fog::Mock.random_hex(8)}"
|
196
|
+
end
|
197
|
+
|
198
|
+
def self.request_id
|
199
|
+
request_id = []
|
200
|
+
request_id << Fog::Mock.random_hex(8)
|
201
|
+
3.times do
|
202
|
+
request_id << Fog::Mock.random_hex(4)
|
203
|
+
end
|
204
|
+
request_id << Fog::Mock.random_hex(12)
|
205
|
+
request_id.join('-')
|
206
|
+
end
|
207
|
+
class << self
|
208
|
+
alias :reserved_instances_id :request_id
|
209
|
+
alias :reserved_instances_offering_id :request_id
|
210
|
+
alias :sqs_message_id :request_id
|
211
|
+
alias :sqs_sender_id :request_id
|
212
|
+
end
|
213
|
+
|
214
|
+
def self.reservation_id
|
215
|
+
"r-#{Fog::Mock.random_hex(8)}"
|
216
|
+
end
|
217
|
+
|
218
|
+
def self.snapshot_id
|
219
|
+
"snap-#{Fog::Mock.random_hex(8)}"
|
220
|
+
end
|
221
|
+
|
222
|
+
def self.volume_id
|
223
|
+
"vol-#{Fog::Mock.random_hex(8)}"
|
224
|
+
end
|
225
|
+
|
226
|
+
def self.security_group_id
|
227
|
+
"sg-#{Fog::Mock.random_hex(8)}"
|
228
|
+
end
|
229
|
+
|
230
|
+
def self.network_interface_id
|
231
|
+
"eni-#{Fog::Mock.random_hex(8)}"
|
232
|
+
end
|
233
|
+
def self.internet_gateway_id
|
234
|
+
"igw-#{Fog::Mock.random_hex(8)}"
|
235
|
+
end
|
236
|
+
def self.dhcp_options_id
|
237
|
+
"dopt-#{Fog::Mock.random_hex(8)}"
|
238
|
+
end
|
239
|
+
def self.vpc_id
|
240
|
+
"vpc-#{Fog::Mock.random_hex(8)}"
|
241
|
+
end
|
242
|
+
def self.subnet_id
|
243
|
+
"subnet-#{Fog::Mock.random_hex(8)}"
|
244
|
+
end
|
245
|
+
def self.zone_id
|
246
|
+
"zone-#{Fog::Mock.random_hex(8)}"
|
247
|
+
end
|
248
|
+
def self.change_id
|
249
|
+
"change-#{Fog::Mock.random_hex(8)}"
|
250
|
+
end
|
251
|
+
def self.nameservers
|
252
|
+
[
|
253
|
+
'ns-2048.awsdns-64.com',
|
254
|
+
'ns-2049.awsdns-65.net',
|
255
|
+
'ns-2050.awsdns-66.org',
|
256
|
+
'ns-2051.awsdns-67.co.uk'
|
257
|
+
]
|
258
|
+
end
|
259
|
+
|
260
|
+
def self.key_id(length=21)
|
261
|
+
#Probably close enough
|
262
|
+
Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',length)
|
263
|
+
end
|
264
|
+
|
265
|
+
def self.rds_address(db_name,region)
|
266
|
+
"#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com"
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
def self.parse_security_group_options(group_name, options)
|
271
|
+
options ||= Hash.new
|
272
|
+
if group_name.is_a?(Hash)
|
273
|
+
options = group_name
|
274
|
+
elsif group_name
|
275
|
+
if options.key?('GroupName')
|
276
|
+
raise Fog::Compute::InternetArchive::Error, 'Arguments specified both group_name and GroupName in options'
|
277
|
+
end
|
278
|
+
options = options.clone
|
279
|
+
options['GroupName'] = group_name
|
280
|
+
end
|
281
|
+
name_specified = options.key?('GroupName') && !options['GroupName'].nil?
|
282
|
+
group_id_specified = options.key?('GroupId') && !options['GroupId'].nil?
|
283
|
+
unless name_specified || group_id_specified
|
284
|
+
raise Fog::Compute::InternetArchive::Error, 'Neither GroupName nor GroupId specified'
|
285
|
+
end
|
286
|
+
if name_specified && group_id_specified
|
287
|
+
options.delete('GroupName')
|
288
|
+
end
|
289
|
+
options
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
data/lib/fog/joyent.rb
CHANGED
data/lib/fog/joyent/compute.rb
CHANGED
data/lib/fog/joyent/errors.rb
CHANGED
data/lib/fog/libvirt.rb
CHANGED
data/lib/fog/libvirt/compute.rb
CHANGED
@@ -10,7 +10,7 @@ Only ssh is supported as the transport for remote URI's. TLS is NOT supported, a
|
|
10
10
|
|
11
11
|
## Dependencies
|
12
12
|
|
13
|
-
- the interaction with libvirt is done through the official libvirt gem called 'libvirt
|
13
|
+
- the interaction with libvirt is done through the official libvirt gem called 'ruby-libvirt'.
|
14
14
|
- be aware that there is another libvirt gem called 'libvirt', which is not compatible
|
15
15
|
- If this gem is not installed the models for libvirt will not be available
|
16
16
|
|
@@ -135,7 +135,7 @@ module Fog
|
|
135
135
|
end
|
136
136
|
|
137
137
|
def ssh(commands)
|
138
|
-
requires :
|
138
|
+
requires :ssh_ip_address, :username
|
139
139
|
|
140
140
|
ssh_options={}
|
141
141
|
ssh_options[:password] = password unless password.nil?
|
@@ -153,19 +153,19 @@ module Fog
|
|
153
153
|
|
154
154
|
# Transfers a file
|
155
155
|
def scp(local_path, remote_path, upload_options = {})
|
156
|
-
requires :
|
156
|
+
requires :ssh_ip_address, :username
|
157
157
|
|
158
158
|
scp_options = {}
|
159
159
|
scp_options[:password] = password unless self.password.nil?
|
160
160
|
scp_options[:key_data] = [private_key] if self.private_key
|
161
161
|
scp_options[:proxy]= ssh_proxy unless self.ssh_proxy.nil?
|
162
162
|
|
163
|
-
Fog::SCP.new(
|
163
|
+
Fog::SCP.new(ssh_ip_address, username, scp_options).upload(local_path, remote_path, upload_options)
|
164
164
|
end
|
165
165
|
|
166
166
|
# Sets up a new key
|
167
167
|
def setup(credentials = {})
|
168
|
-
requires :public_key, :
|
168
|
+
requires :public_key, :ssh_ip_address, :username
|
169
169
|
|
170
170
|
credentials[:proxy]= ssh_proxy unless ssh_proxy.nil?
|
171
171
|
credentials[:password] = password unless self.password.nil?
|
@@ -184,7 +184,7 @@ module Fog
|
|
184
184
|
Timeout::timeout(360) do
|
185
185
|
begin
|
186
186
|
Timeout::timeout(8) do
|
187
|
-
Fog::SSH.new(
|
187
|
+
Fog::SSH.new(ssh_ip_address, username, credentials.merge(:timeout => 4)).run('pwd')
|
188
188
|
end
|
189
189
|
rescue Errno::ECONNREFUSED
|
190
190
|
sleep(2)
|
@@ -193,7 +193,7 @@ module Fog
|
|
193
193
|
retry
|
194
194
|
end
|
195
195
|
end
|
196
|
-
Fog::SSH.new(
|
196
|
+
Fog::SSH.new(ssh_ip_address, username, credentials).run(commands)
|
197
197
|
end
|
198
198
|
|
199
199
|
def update_display attrs = {}
|
@@ -11,4 +11,16 @@
|
|
11
11
|
<label>virt_image_t</label>
|
12
12
|
</permissions>
|
13
13
|
</target>
|
14
|
+
<% if backing_volume -%>
|
15
|
+
<backingStore>
|
16
|
+
<path><%= backing_volume.path %></path>
|
17
|
+
<format type="<%= backing_volume.format_type %>"/>
|
18
|
+
<permissions>
|
19
|
+
<owner>0</owner>
|
20
|
+
<group>0</group>
|
21
|
+
<mode>0744</mode>
|
22
|
+
<label>virt_image_t</label>
|
23
|
+
</permissions>
|
24
|
+
</backingStore>
|
25
|
+
<% end -%>
|
14
26
|
</volume>
|