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
@@ -1,7 +1,5 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | claims', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
3
|
service = Fog::Rackspace::Queues.new
|
6
4
|
queue = service.queues.create({
|
7
5
|
:name => "fog_queue_#{Time.now.to_i.to_s}",
|
@@ -16,7 +14,7 @@ Shindo.tests('Fog::Rackspace::Queues | claims', ['rackspace']) do
|
|
16
14
|
}
|
17
15
|
|
18
16
|
begin
|
19
|
-
collection_tests(queue.claims, params
|
17
|
+
collection_tests(queue.claims, params)
|
20
18
|
|
21
19
|
tests('creating claims when there are no messages') do
|
22
20
|
|
@@ -1,7 +1,5 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | message', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
3
|
service = Fog::Rackspace::Queues.new
|
6
4
|
queue = service.queues.create({
|
7
5
|
:name => "fog_instance_#{Time.now.to_i.to_s}",
|
@@ -11,7 +9,7 @@ Shindo.tests('Fog::Rackspace::Queues | message', ['rackspace']) do
|
|
11
9
|
:body => { :key => 'value' }
|
12
10
|
}
|
13
11
|
begin
|
14
|
-
model_tests(queue.messages, options
|
12
|
+
model_tests(queue.messages, options) do
|
15
13
|
tests('#href').returns(true) do
|
16
14
|
!@instance.href.nil?
|
17
15
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | messages', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
3
|
service = Fog::Rackspace::Queues.new
|
6
4
|
queue = service.queues.create({
|
7
5
|
:name => "fog_queue_#{Time.now.to_i.to_s}",
|
@@ -12,7 +10,7 @@ Shindo.tests('Fog::Rackspace::Queues | messages', ['rackspace']) do
|
|
12
10
|
:body => "blah"
|
13
11
|
}
|
14
12
|
|
15
|
-
collection_tests(queue.messages, options
|
13
|
+
collection_tests(queue.messages, options)
|
16
14
|
|
17
15
|
queue.destroy
|
18
16
|
end
|
@@ -1,12 +1,10 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | queue', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
3
|
service = Fog::Rackspace::Queues.new
|
6
4
|
options = {
|
7
5
|
:name => "fog_instance_#{Time.now.to_i.to_s}",
|
8
6
|
}
|
9
|
-
model_tests(service.queues, options
|
7
|
+
model_tests(service.queues, options) do
|
10
8
|
|
11
9
|
tests('#stats').formats(QUEUE_STATS_FORMAT['messages']) do
|
12
10
|
@instance.stats
|
@@ -1,10 +1,8 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | queues', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
3
|
service = Fog::Rackspace::Queues.new
|
6
4
|
options = {
|
7
5
|
:name => "fog_instance_#{Time.now.to_i.to_s}",
|
8
6
|
}
|
9
|
-
collection_tests(service.queues, options
|
7
|
+
collection_tests(service.queues, options)
|
10
8
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Storage | directory', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
3
|
@service = Fog::Storage[:rackspace]
|
6
4
|
|
7
5
|
def container_meta_attributes
|
@@ -92,9 +90,8 @@ Shindo.tests('Fog::Rackspace::Storage | directory', ['rackspace']) do
|
|
92
90
|
|
93
91
|
directory_attributes[:metadata] = {:draft => 'true'}
|
94
92
|
|
95
|
-
tests('metadata')
|
96
|
-
|
97
|
-
|
93
|
+
tests('metadata') do
|
94
|
+
|
98
95
|
model_tests(@service.directories, directory_attributes, Fog.mocking?) do
|
99
96
|
tests('sets metadata on create').returns('true') do
|
100
97
|
@instance.metadata.data
|
@@ -30,8 +30,6 @@ Shindo.tests('Fog::Rackspace::Storage | file', ['rackspace']) do
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
pending if Fog.mocking?
|
34
|
-
|
35
33
|
def object_attributes(file=@instance)
|
36
34
|
@instance.service.head_object(@directory.key, file.key).headers
|
37
35
|
end
|
@@ -280,6 +278,55 @@ Shindo.tests('Fog::Rackspace::Storage | file', ['rackspace']) do
|
|
280
278
|
|
281
279
|
end
|
282
280
|
|
281
|
+
tests("#delete_at") do
|
282
|
+
tests("#delete_at should default to nil").returns(nil) do
|
283
|
+
@instance.delete_at
|
284
|
+
end
|
285
|
+
|
286
|
+
@instance.delete_at = 1
|
287
|
+
@instance.save
|
288
|
+
tests("#delete_at should return delete_at attribute").returns(1) do
|
289
|
+
@instance.delete_at
|
290
|
+
end
|
291
|
+
|
292
|
+
@instance.delete_at = 1
|
293
|
+
@instance.save
|
294
|
+
tests("#delete_at= should update delete_at").returns(2) do
|
295
|
+
@instance.delete_at = 2
|
296
|
+
@instance.save
|
297
|
+
@instance.delete_at
|
298
|
+
end
|
299
|
+
|
300
|
+
tests("#delete_at= should not blow up on nil") do
|
301
|
+
@instance.delete_at = nil
|
302
|
+
@instance.save
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
tests("#delete_after") do
|
307
|
+
tests("#delete_after should default to nil").returns(nil) do
|
308
|
+
@instance.delete_after
|
309
|
+
end
|
310
|
+
|
311
|
+
@instance.delete_after = 1
|
312
|
+
@instance.save
|
313
|
+
tests("#delete_after should return delete_after attribute").returns(1) do
|
314
|
+
@instance.delete_after
|
315
|
+
end
|
316
|
+
|
317
|
+
@instance.delete_after = 1
|
318
|
+
@instance.save
|
319
|
+
tests("#delete_after= should update delete_after").returns(2) do
|
320
|
+
@instance.delete_after = 2
|
321
|
+
@instance.save
|
322
|
+
@instance.delete_after
|
323
|
+
end
|
324
|
+
|
325
|
+
tests("#delete_after= should not blow up on nil") do
|
326
|
+
@instance.delete_after = nil
|
327
|
+
@instance.save
|
328
|
+
end
|
329
|
+
end
|
283
330
|
end
|
284
331
|
|
285
332
|
|
@@ -12,8 +12,7 @@ Shindo.tests("Fog::Rackspace::Storage | files", ['rackspace', 'storage']) do
|
|
12
12
|
|
13
13
|
|
14
14
|
tests('success') do
|
15
|
-
|
16
|
-
collection_tests(Fog::Storage[:rackspace].directories.create(directory_attributes).files, file_attributes, false)
|
15
|
+
collection_tests(Fog::Storage[:rackspace].directories.create(directory_attributes).files, file_attributes, Fog.mocking?)
|
17
16
|
|
18
17
|
@service = Fog::Storage.new :provider => 'rackspace', :rackspace_temp_url_key => "my_secret"
|
19
18
|
|
@@ -25,13 +24,11 @@ Shindo.tests("Fog::Rackspace::Storage | files", ['rackspace', 'storage']) do
|
|
25
24
|
end
|
26
25
|
|
27
26
|
tests("#get_http_url('#{@directory.key}')").succeeds do
|
28
|
-
pending if Fog.mocking?
|
29
27
|
expire_time = Time.now + 3600
|
30
28
|
@directory.files.get_http_url(@file.key, expire_time)
|
31
29
|
end
|
32
30
|
|
33
31
|
tests("#get_https_url('#{@directory.key}', '#{@file.key}')").succeeds do
|
34
|
-
pending if Fog.mocking?
|
35
32
|
expire_time = Time.now + 3600
|
36
33
|
@directory.files.get_https_url(@file.key, expire_time)
|
37
34
|
end
|
@@ -1,8 +1,5 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do
|
2
2
|
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
|
-
|
6
3
|
def assert_method(url, method)
|
7
4
|
@service.instance_variable_set "@rackspace_auth_url", url
|
8
5
|
returns(method) { @service.send :authentication_method }
|
@@ -25,16 +22,12 @@ Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do
|
|
25
22
|
end
|
26
23
|
|
27
24
|
tests('authentication v1') do
|
28
|
-
pending if Fog.mocking?
|
29
|
-
|
30
25
|
raises(Fog::Errors::NotImplemented) do
|
31
26
|
@service = Fog::Rackspace::Queues.new :rackspace_auth_url => 'https://identity.api.rackspacecloud.com/v1.0'
|
32
27
|
end
|
33
28
|
end
|
34
29
|
|
35
30
|
tests('authentication v2') do
|
36
|
-
pending if Fog.mocking?
|
37
|
-
|
38
31
|
tests('variables populated').succeeds do
|
39
32
|
@service = Fog::Rackspace::Queues.new :rackspace_auth_url => 'https://identity.api.rackspacecloud.com/v2.0', :connection_options => { :ssl_verify_peer => true }
|
40
33
|
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
@@ -63,8 +56,6 @@ Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do
|
|
63
56
|
end
|
64
57
|
|
65
58
|
tests('default auth') do
|
66
|
-
pending if Fog.mocking?
|
67
|
-
|
68
59
|
tests('no params').succeeds do
|
69
60
|
#We consistently use DFW as our default but queues doesn't have a DFW default region yet.
|
70
61
|
# We can enable this test once they have a DFW region (which they will)
|
@@ -83,8 +74,6 @@ Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do
|
|
83
74
|
end
|
84
75
|
|
85
76
|
tests('reauthentication') do
|
86
|
-
pending if Fog.mocking?
|
87
|
-
|
88
77
|
@service = Fog::Rackspace::Queues.new
|
89
78
|
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
90
79
|
@service.instance_variable_set("@auth_token", "bad_token")
|
@@ -99,8 +88,6 @@ Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do
|
|
99
88
|
end
|
100
89
|
|
101
90
|
tests('client_id') do
|
102
|
-
pending if Fog.mocking?
|
103
|
-
|
104
91
|
tests('should generate uuid if a client id is not provided').succeeds do
|
105
92
|
pending unless Fog::UUID.supported?
|
106
93
|
service = Fog::Rackspace::Queues.new
|
@@ -1,7 +1,4 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Identity | tokens', ['rackspace']) do
|
2
|
-
|
3
|
-
pending if Fog.mock?
|
4
|
-
|
5
2
|
ROLE_FORMAT = {
|
6
3
|
'id' => String,
|
7
4
|
'name' => String,
|
@@ -55,6 +52,7 @@ Shindo.tests('Fog::Rackspace::Identity | tokens', ['rackspace']) do
|
|
55
52
|
end
|
56
53
|
|
57
54
|
tests('uses connection options').returns(true) do
|
55
|
+
pending if Fog.mocking?
|
58
56
|
identity_service = Fog::Rackspace::Identity.new(:connection_options => { :ssl_verify_peer => true })
|
59
57
|
|
60
58
|
connection = identity_service.instance_variable_get("@connection")
|
@@ -3,6 +3,8 @@ Shindo.tests('Fog::Rackspace::Monitoring | agent_tests', ['rackspace','rackspace
|
|
3
3
|
account = Fog::Rackspace::Monitoring.new
|
4
4
|
agent_token = nil
|
5
5
|
options = { "label" => "Bar" }
|
6
|
+
values_format = Hash
|
7
|
+
|
6
8
|
tests('success') do
|
7
9
|
tests('#create new agent token').formats(DATA_FORMAT) do
|
8
10
|
response = account.create_agent_token(options).data
|
@@ -12,13 +14,47 @@ Shindo.tests('Fog::Rackspace::Monitoring | agent_tests', ['rackspace','rackspace
|
|
12
14
|
tests('#list agent tokens').formats(LIST_HEADERS_FORMAT) do
|
13
15
|
account.list_agent_tokens().data[:headers]
|
14
16
|
end
|
17
|
+
tests("#list_agents") do
|
18
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.list_agents.body }
|
19
|
+
end
|
20
|
+
tests("#get_agent") do
|
21
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_agent("agent_id").body }
|
22
|
+
end
|
23
|
+
|
24
|
+
|
15
25
|
tests('#get agent token').formats(LIST_HEADERS_FORMAT) do
|
16
26
|
account.get_agent_token(agent_token).data[:headers]
|
17
27
|
end
|
18
28
|
tests('#delete agent token').formats(DELETE_HEADERS_FORMAT) do
|
19
29
|
account.delete_agent_token(agent_token).data[:headers]
|
20
30
|
end
|
31
|
+
tests("#get_cpus_info") do
|
32
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_cpus_info("agent_id").body }
|
33
|
+
end
|
34
|
+
tests("#get_disks_info") do
|
35
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_disks_info("agent_id").body }
|
36
|
+
end
|
37
|
+
tests("#get_filesystems_info") do
|
38
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_filesystems_info("agent_id").body }
|
39
|
+
end
|
40
|
+
tests("#get_logged_in_user_info") do
|
41
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_logged_in_user_info("agent_id").body }
|
42
|
+
end
|
43
|
+
tests("#get_memory_info") do
|
44
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_memory_info("agent_id").body }
|
45
|
+
end
|
46
|
+
tests("#get_network_interfaces_info") do
|
47
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_network_interfaces_info("agent_id").body }
|
48
|
+
end
|
49
|
+
tests("#get_processes_info") do
|
50
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_processes_info("agent_id").body }
|
51
|
+
end
|
52
|
+
tests("#get_system_info") do
|
53
|
+
data_matches_schema(values_format, {:allow_extra_keys => true}) { account.get_system_info("agent_id").body }
|
54
|
+
end
|
55
|
+
|
21
56
|
end
|
57
|
+
|
22
58
|
tests('failure') do
|
23
59
|
tests('#fail to create agent token(-1)').raises(TypeError) do
|
24
60
|
account.create_agent_token(-1)
|
@@ -29,5 +65,11 @@ Shindo.tests('Fog::Rackspace::Monitoring | agent_tests', ['rackspace','rackspace
|
|
29
65
|
tests('#fail to delete agent token(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
30
66
|
account.delete_agent_token(-1)
|
31
67
|
end
|
68
|
+
tests('#fail to connect to agent(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
|
69
|
+
account.get_cpus_info(-1)
|
70
|
+
end
|
71
|
+
tests('#fail to get agent (-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
72
|
+
account.get_agent(-1)
|
73
|
+
end
|
32
74
|
end
|
33
75
|
end
|
@@ -1,7 +1,4 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | messages_tests', ['rackspace']) do
|
2
|
-
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
2
|
service = Fog::Rackspace::Queues.new
|
6
3
|
|
7
4
|
queue_name = 'fog' + Time.now.to_i.to_s
|
@@ -11,10 +8,7 @@ Shindo.tests('Fog::Rackspace::Queues | messages_tests', ['rackspace']) do
|
|
11
8
|
service.create_queue(queue_name)
|
12
9
|
|
13
10
|
begin
|
14
|
-
|
15
11
|
tests('success') do
|
16
|
-
|
17
|
-
|
18
12
|
tests("#list_message(#{client_id}, #{queue_name}, {:echo => true}) => No Content").returns(204) do
|
19
13
|
service.list_messages(client_id, queue_name, {:echo => true}).status
|
20
14
|
end
|
@@ -1,11 +1,7 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Queues | queue_tests', ['rackspace']) do
|
2
|
-
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
2
|
service = Fog::Rackspace::Queues.new
|
6
3
|
|
7
4
|
tests('success') do
|
8
|
-
|
9
5
|
queue_name = 'fog' + Time.now.to_i.to_s
|
10
6
|
|
11
7
|
tests("#create_queue(#{queue_name})").succeeds do
|
@@ -38,6 +34,5 @@ Shindo.tests('Fog::Rackspace::Queues | queue_tests', ['rackspace']) do
|
|
38
34
|
tests("#get_queue('nonexistentqueue') => Does not exist").raises(Fog::Rackspace::Queues::NotFound) do
|
39
35
|
service.get_queue('nonexistentqueue')
|
40
36
|
end
|
41
|
-
|
42
37
|
end
|
43
38
|
end
|
@@ -3,7 +3,6 @@ Shindo.tests('Fog::Storage[:rackspace] | account requests', ["rackspace"]) do
|
|
3
3
|
tests('success') do
|
4
4
|
|
5
5
|
tests("#post_set_meta_temp_url_key('super_secret_key')").succeeds do
|
6
|
-
pending if Fog.mocking?
|
7
6
|
Fog::Storage[:rackspace].post_set_meta_temp_url_key('super_secret_key')
|
8
7
|
end
|
9
8
|
|
@@ -1,6 +1,12 @@
|
|
1
1
|
Shindo.tests('Fog::Storage[:rackspace] | container requests', ["rackspace"]) do
|
2
2
|
|
3
|
-
@container_format = [
|
3
|
+
@container_format = [{
|
4
|
+
'hash' => String,
|
5
|
+
'last_modified' => String,
|
6
|
+
'bytes' => Integer,
|
7
|
+
'name' => String,
|
8
|
+
'content_type' => String
|
9
|
+
}]
|
4
10
|
|
5
11
|
@containers_format = [{
|
6
12
|
'bytes' => Integer,
|
@@ -11,39 +17,32 @@ Shindo.tests('Fog::Storage[:rackspace] | container requests', ["rackspace"]) do
|
|
11
17
|
tests('success') do
|
12
18
|
|
13
19
|
tests("#put_container('fogcontainertests', {})").succeeds do
|
14
|
-
pending if Fog.mocking?
|
15
20
|
Fog::Storage[:rackspace].put_container('fogcontainertests')
|
16
21
|
end
|
17
22
|
|
18
23
|
tests("#put_container('fogcontainertests', 'X-Container-Meta-Color'=>'green')").succeeds do
|
19
|
-
pending if Fog.mocking?
|
20
24
|
Fog::Storage[:rackspace].put_container('fogcontainertests', 'X-Container-Meta-Color'=>'green')
|
21
25
|
response = Fog::Storage[:rackspace].head_container('fogcontainertests')
|
22
26
|
returns('green') { response.headers['X-Container-Meta-Color'] }
|
23
27
|
end
|
24
28
|
|
25
29
|
tests("#get_container('fogcontainertests')").formats(@container_format) do
|
26
|
-
pending if Fog.mocking?
|
27
30
|
Fog::Storage[:rackspace].get_container('fogcontainertests').body
|
28
31
|
end
|
29
32
|
|
30
33
|
tests("#get_containers").formats(@containers_format) do
|
31
|
-
pending if Fog.mocking?
|
32
34
|
Fog::Storage[:rackspace].get_containers.body
|
33
35
|
end
|
34
36
|
|
35
37
|
tests("#head_container('fogcontainertests')").succeeds do
|
36
|
-
pending if Fog.mocking?
|
37
38
|
Fog::Storage[:rackspace].head_container('fogcontainertests')
|
38
39
|
end
|
39
40
|
|
40
41
|
tests("#head_containers").succeeds do
|
41
|
-
pending if Fog.mocking?
|
42
42
|
Fog::Storage[:rackspace].head_containers
|
43
43
|
end
|
44
44
|
|
45
45
|
tests("#delete_container('fogcontainertests')").succeeds do
|
46
|
-
pending if Fog.mocking?
|
47
46
|
Fog::Storage[:rackspace].delete_container('fogcontainertests')
|
48
47
|
end
|
49
48
|
|
@@ -52,17 +51,14 @@ Shindo.tests('Fog::Storage[:rackspace] | container requests', ["rackspace"]) do
|
|
52
51
|
tests('failure') do
|
53
52
|
|
54
53
|
tests("#get_container('fognoncontainer')").raises(Fog::Storage::Rackspace::NotFound) do
|
55
|
-
pending if Fog.mocking?
|
56
54
|
Fog::Storage[:rackspace].get_container('fognoncontainer')
|
57
55
|
end
|
58
56
|
|
59
57
|
tests("#head_container('fognoncontainer')").raises(Fog::Storage::Rackspace::NotFound) do
|
60
|
-
pending if Fog.mocking?
|
61
58
|
Fog::Storage[:rackspace].head_container('fognoncontainer')
|
62
59
|
end
|
63
60
|
|
64
61
|
tests("#delete_container('fognoncontainer')").raises(Fog::Storage::Rackspace::NotFound) do
|
65
|
-
pending if Fog.mocking?
|
66
62
|
Fog::Storage[:rackspace].delete_container('fognoncontainer')
|
67
63
|
end
|
68
64
|
|