fog 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +7 -4
- data/bin/fog +4 -1
- data/changelog.txt +464 -0
- data/docs/index.markdown +2 -2
- data/fog.gemspec +11 -11
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/auto_scaling.rb +221 -0
- data/lib/fog/aws/cloud_formation.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +110 -0
- data/lib/fog/aws/elb.rb +58 -26
- data/lib/fog/aws/iam.rb +65 -13
- data/lib/fog/aws/models/auto_scaling/activities.rb +30 -0
- data/lib/fog/aws/models/auto_scaling/activity.rb +29 -0
- data/lib/fog/aws/models/auto_scaling/configuration.rb +63 -0
- data/lib/fog/aws/models/auto_scaling/configurations.rb +35 -0
- data/lib/fog/aws/models/auto_scaling/group.rb +140 -0
- data/lib/fog/aws/models/auto_scaling/groups.rb +35 -0
- data/lib/fog/aws/models/auto_scaling/instance.rb +60 -0
- data/lib/fog/aws/models/auto_scaling/instances.rb +30 -0
- data/lib/fog/aws/models/cloud_watch/metric.rb +14 -0
- data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +46 -0
- data/lib/fog/aws/models/cloud_watch/metric_statistics.rb +23 -0
- data/lib/fog/aws/models/cloud_watch/metrics.rb +32 -0
- data/lib/fog/aws/models/elb/listener.rb +6 -0
- data/lib/fog/aws/models/elb/listeners.rb +2 -2
- data/lib/fog/aws/models/elb/load_balancer.rb +8 -5
- data/lib/fog/aws/models/rds/server.rb +3 -1
- data/lib/fog/aws/parsers/auto_scaling/basic.rb +28 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb +39 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_groups.rb +126 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_instances.rb +43 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb +94 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_metric_collection_types.rb +66 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_policies.rb +66 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_scaling_activities.rb +47 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_scaling_process_types.rb +39 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_scheduled_actions.rb +46 -0
- data/lib/fog/aws/parsers/auto_scaling/put_scaling_policy.rb +30 -0
- data/lib/fog/aws/parsers/auto_scaling/terminate_instance_in_auto_scaling_group.rb +35 -0
- data/lib/fog/aws/parsers/cloud_watch/get_metric_statistics.rb +42 -0
- data/lib/fog/aws/parsers/cloud_watch/list_metrics.rb +58 -0
- data/lib/fog/aws/parsers/cloud_watch/put_metric_data.rb +26 -0
- data/lib/fog/aws/parsers/elb/describe_load_balancers.rb +1 -1
- data/lib/fog/aws/parsers/iam/get_group_policy.rb +27 -0
- data/lib/fog/aws/parsers/iam/list_account_aliases.rb +28 -0
- data/lib/fog/aws/parsers/rds/db_engine_version_parser.rb +35 -0
- data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/describe_db_engine_versions.rb +39 -0
- data/lib/fog/aws/parsers/rds/describe_db_reserved_instances.rb +43 -0
- data/lib/fog/aws/parsers/sns/add_permission.rb +24 -0
- data/lib/fog/aws/parsers/sns/confirm_subscription.rb +24 -0
- data/lib/fog/aws/parsers/sns/create_topic.rb +24 -0
- data/lib/fog/aws/parsers/sns/delete_topic.rb +24 -0
- data/lib/fog/aws/parsers/sns/get_topic_attributes.rb +32 -0
- data/lib/fog/aws/parsers/sns/list_subscriptions.rb +29 -0
- data/lib/fog/aws/parsers/sns/list_topics.rb +26 -0
- data/lib/fog/aws/parsers/sns/publish.rb +24 -0
- data/lib/fog/aws/parsers/sns/remove_permission.rb +24 -0
- data/lib/fog/aws/parsers/sns/set_topic_attributes.rb +24 -0
- data/lib/fog/aws/parsers/sns/subscribe.rb +24 -0
- data/lib/fog/aws/parsers/sns/unsubscribe.rb +24 -0
- data/lib/fog/aws/parsers/sqs/basic.rb +23 -0
- data/lib/fog/aws/parsers/sqs/create_queue.rb +26 -0
- data/lib/fog/aws/parsers/sqs/get_queue_attributes.rb +35 -0
- data/lib/fog/aws/parsers/sqs/list_queues.rb +25 -0
- data/lib/fog/aws/parsers/sqs/receive_message.rb +41 -0
- data/lib/fog/aws/parsers/sqs/send_message.rb +28 -0
- data/lib/fog/aws/rds.rb +3 -1
- data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +108 -0
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +105 -0
- data/lib/fog/aws/requests/auto_scaling/delete_auto_scaling_group.rb +45 -0
- data/lib/fog/aws/requests/auto_scaling/delete_launch_configuration.rb +48 -0
- data/lib/fog/aws/requests/auto_scaling/delete_policy.rb +47 -0
- data/lib/fog/aws/requests/auto_scaling/delete_scheduled_action.rb +48 -0
- data/lib/fog/aws/requests/auto_scaling/describe_adjustment_types.rb +52 -0
- data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_groups.rb +128 -0
- data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_instances.rb +96 -0
- data/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb +108 -0
- data/lib/fog/aws/requests/auto_scaling/describe_metric_collection_types.rb +60 -0
- data/lib/fog/aws/requests/auto_scaling/describe_policies.rb +85 -0
- data/lib/fog/aws/requests/auto_scaling/describe_scaling_activities.rb +88 -0
- data/lib/fog/aws/requests/auto_scaling/describe_scaling_process_types.rb +54 -0
- data/lib/fog/aws/requests/auto_scaling/describe_scheduled_actions.rb +83 -0
- data/lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb +56 -0
- data/lib/fog/aws/requests/auto_scaling/enable_metrics_collection.rb +66 -0
- data/lib/fog/aws/requests/auto_scaling/execute_policy.rb +50 -0
- data/lib/fog/aws/requests/auto_scaling/put_scaling_policy.rb +66 -0
- data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +57 -0
- data/lib/fog/aws/requests/auto_scaling/resume_processes.rb +50 -0
- data/lib/fog/aws/requests/auto_scaling/set_desired_capacity.rb +87 -0
- data/lib/fog/aws/requests/auto_scaling/set_instance_health.rb +55 -0
- data/lib/fog/aws/requests/auto_scaling/suspend_processes.rb +57 -0
- data/lib/fog/aws/requests/auto_scaling/terminate_instance_in_auto_scaling_group.rb +65 -0
- data/lib/fog/aws/requests/auto_scaling/update_auto_scaling_group.rb +79 -0
- data/lib/fog/aws/requests/cloud_watch/get_metric_statistics.rb +48 -0
- data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +38 -0
- data/lib/fog/aws/requests/cloud_watch/put_metric_data.rb +73 -0
- data/lib/fog/aws/requests/elb/configure_health_check.rb +24 -0
- data/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +21 -0
- data/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +21 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +55 -0
- data/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +28 -0
- data/lib/fog/aws/requests/elb/delete_load_balancer.rb +18 -0
- data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +20 -1
- data/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +23 -0
- data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +21 -5
- data/lib/fog/aws/requests/elb/describe_instance_health.rb +35 -0
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +29 -0
- data/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +18 -5
- data/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +18 -3
- data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +22 -5
- data/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +40 -0
- data/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +37 -0
- data/lib/fog/aws/requests/iam/create_account_alias.rb +19 -0
- data/lib/fog/aws/requests/iam/delete_account_alias.rb +19 -0
- data/lib/fog/aws/requests/iam/delete_server_certificate.rb +14 -0
- data/lib/fog/aws/requests/iam/get_group_policy.rb +36 -0
- data/lib/fog/aws/requests/iam/get_server_certificate.rb +50 -0
- data/lib/fog/aws/requests/iam/list_account_aliases.rb +18 -0
- data/lib/fog/aws/requests/iam/list_server_certificates.rb +12 -0
- data/lib/fog/aws/requests/iam/put_group_policy.rb +1 -1
- data/lib/fog/aws/requests/iam/put_user_policy.rb +1 -1
- data/lib/fog/aws/requests/iam/upload_server_certificate.rb +53 -5
- data/lib/fog/aws/requests/rds/describe_db_engine_versions.rb +34 -0
- data/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +42 -0
- data/lib/fog/aws/requests/simpledb/get_attributes.rb +29 -17
- data/lib/fog/aws/requests/simpledb/select.rb +11 -3
- data/lib/fog/aws/requests/sns/add_permission.rb +26 -0
- data/lib/fog/aws/requests/sns/confirm_subscription.rb +33 -0
- data/lib/fog/aws/requests/sns/create_topic.rb +29 -0
- data/lib/fog/aws/requests/sns/delete_topic.rb +29 -0
- data/lib/fog/aws/requests/sns/get_topic_attributes.rb +29 -0
- data/lib/fog/aws/requests/sns/list_subscriptions.rb +29 -0
- data/lib/fog/aws/requests/sns/list_subscriptions_by_topic.rb +31 -0
- data/lib/fog/aws/requests/sns/list_topics.rb +29 -0
- data/lib/fog/aws/requests/sns/publish.rb +34 -0
- data/lib/fog/aws/requests/sns/remove_permission.rb +26 -0
- data/lib/fog/aws/requests/sns/set_topic_attributes.rb +33 -0
- data/lib/fog/aws/requests/sns/subscribe.rb +33 -0
- data/lib/fog/aws/requests/sns/unsubscribe.rb +29 -0
- data/lib/fog/aws/requests/sqs/change_message_visibility.rb +33 -0
- data/lib/fog/aws/requests/sqs/create_queue.rb +31 -0
- data/lib/fog/aws/requests/sqs/delete_message.rb +31 -0
- data/lib/fog/aws/requests/sqs/delete_queue.rb +29 -0
- data/lib/fog/aws/requests/sqs/get_queue_attributes.rb +31 -0
- data/lib/fog/aws/requests/sqs/list_queues.rb +28 -0
- data/lib/fog/aws/requests/sqs/receive_message.rb +34 -0
- data/lib/fog/aws/requests/sqs/send_message.rb +31 -0
- data/lib/fog/aws/requests/sqs/set_queue_attributes.rb +33 -0
- data/lib/fog/aws/sns.rb +112 -0
- data/lib/fog/aws/sqs.rb +115 -0
- data/lib/fog/bin.rb +1 -0
- data/lib/fog/bin/aws.rb +16 -0
- data/lib/fog/bin/brightbox.rb +1 -1
- data/lib/fog/bin/ninefold.rb +5 -0
- data/lib/fog/bin/vcloud.rb +30 -0
- data/lib/fog/bin/virtual_box.rb +5 -1
- data/lib/fog/cdn/rackspace.rb +16 -8
- data/lib/fog/compute.rb +4 -1
- data/lib/fog/compute/aws.rb +16 -4
- data/lib/fog/compute/bluebox.rb +2 -2
- data/lib/fog/compute/brightbox.rb +4 -4
- data/lib/fog/compute/go_grid.rb +2 -2
- data/lib/fog/compute/linode.rb +2 -2
- data/lib/fog/compute/models/aws/server.rb +17 -3
- data/lib/fog/compute/models/aws/spot_request.rb +93 -0
- data/lib/fog/compute/models/aws/spot_requests.rb +48 -0
- data/lib/fog/compute/models/aws/volume.rb +13 -13
- data/lib/fog/compute/models/bluebox/server.rb +4 -4
- data/lib/fog/compute/models/go_grid/server.rb +2 -2
- data/lib/fog/compute/models/ninefold/server.rb +18 -14
- data/lib/fog/compute/models/rackspace/flavor.rb +3 -2
- data/lib/fog/compute/models/rackspace/server.rb +2 -2
- data/lib/fog/compute/models/slicehost/server.rb +1 -1
- data/lib/fog/compute/models/vcloud/catalog.rb +22 -0
- data/lib/fog/compute/models/vcloud/catalog_item.rb +29 -0
- data/lib/fog/compute/models/vcloud/catalog_items.rb +32 -0
- data/lib/fog/compute/models/vcloud/catalogs.rb +39 -0
- data/lib/fog/compute/models/vcloud/ip.rb +42 -0
- data/lib/fog/compute/models/vcloud/ips.rb +33 -0
- data/lib/fog/compute/models/vcloud/network.rb +65 -0
- data/lib/fog/compute/models/vcloud/networks.rb +34 -0
- data/lib/fog/compute/models/vcloud/server.rb +291 -0
- data/lib/fog/compute/models/vcloud/servers.rb +58 -0
- data/lib/fog/compute/models/vcloud/task.rb +21 -0
- data/lib/fog/compute/models/vcloud/tasks.rb +32 -0
- data/lib/fog/compute/models/vcloud/vdc.rb +56 -0
- data/lib/fog/compute/models/vcloud/vdcs.rb +40 -0
- data/lib/fog/compute/models/virtual_box/server.rb +2 -2
- data/lib/fog/compute/ninefold.rb +3 -3
- data/lib/fog/compute/parsers/aws/cancel_spot_instance_requests.rb +30 -0
- data/lib/fog/compute/parsers/aws/describe_instances.rb +9 -4
- data/lib/fog/compute/parsers/aws/describe_placement_groups.rb +30 -0
- data/lib/fog/compute/parsers/aws/describe_reserved_instances.rb +1 -1
- data/lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb +2 -2
- data/lib/fog/compute/parsers/aws/describe_spot_price_history.rb +34 -0
- data/lib/fog/compute/parsers/aws/purchase_reserved_instances_offering.rb +24 -0
- data/lib/fog/compute/parsers/aws/run_instances.rb +17 -16
- data/lib/fog/compute/parsers/aws/spot_datafeed_subscription.rb +29 -0
- data/lib/fog/compute/parsers/aws/spot_instance_requests.rb +67 -0
- data/lib/fog/compute/rackspace.rb +6 -5
- data/lib/fog/compute/requests/aws/cancel_spot_instance_requests.rb +34 -0
- data/lib/fog/compute/requests/aws/create_placement_group.rb +34 -0
- data/lib/fog/compute/requests/aws/create_spot_datafeed_subscription.rb +41 -0
- data/lib/fog/compute/requests/aws/delete_placement_group.rb +32 -0
- data/lib/fog/compute/requests/aws/delete_spot_datafeed_subscription.rb +28 -0
- data/lib/fog/compute/requests/aws/describe_placement_groups.rb +35 -0
- data/lib/fog/compute/requests/aws/describe_reserved_instances.rb +14 -0
- data/lib/fog/compute/requests/aws/describe_reserved_instances_offerings.rb +25 -0
- data/lib/fog/compute/requests/aws/describe_spot_datafeed_subscription.rb +35 -0
- data/lib/fog/compute/requests/aws/describe_spot_instance_requests.rb +47 -0
- data/lib/fog/compute/requests/aws/describe_spot_price_history.rb +37 -0
- data/lib/fog/compute/requests/aws/describe_volumes.rb +1 -1
- data/lib/fog/compute/requests/aws/purchase_reserved_instances_offering.rb +63 -0
- data/lib/fog/compute/requests/aws/request_spot_instances.rb +83 -0
- data/lib/fog/compute/requests/aws/run_instances.rb +2 -3
- data/lib/fog/compute/requests/brightbox/activate_console_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/add_listeners_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/add_nodes_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/create_api_client.rb +1 -1
- data/lib/fog/compute/requests/brightbox/create_cloud_ip.rb +1 -1
- data/lib/fog/compute/requests/brightbox/create_image.rb +1 -1
- data/lib/fog/compute/requests/brightbox/create_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/create_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/destroy_api_client.rb +1 -1
- data/lib/fog/compute/requests/brightbox/destroy_cloud_ip.rb +1 -1
- data/lib/fog/compute/requests/brightbox/destroy_image.rb +1 -1
- data/lib/fog/compute/requests/brightbox/destroy_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/destroy_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_account.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_api_client.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_cloud_ip.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_image.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_interface.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_server_type.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_user.rb +1 -1
- data/lib/fog/compute/requests/brightbox/get_zone.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_api_clients.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_cloud_ips.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_images.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_load_balancers.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_server_types.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_servers.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_users.rb +1 -1
- data/lib/fog/compute/requests/brightbox/list_zones.rb +1 -1
- data/lib/fog/compute/requests/brightbox/map_cloud_ip.rb +1 -1
- data/lib/fog/compute/requests/brightbox/remove_listeners_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/remove_nodes_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/reset_ftp_password_account.rb +1 -1
- data/lib/fog/compute/requests/brightbox/resize_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/shutdown_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/snapshot_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/start_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/stop_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/unmap_cloud_ip.rb +1 -1
- data/lib/fog/compute/requests/brightbox/update_account.rb +1 -1
- data/lib/fog/compute/requests/brightbox/update_api_client.rb +1 -1
- data/lib/fog/compute/requests/brightbox/update_image.rb +1 -1
- data/lib/fog/compute/requests/brightbox/update_load_balancer.rb +1 -1
- data/lib/fog/compute/requests/brightbox/update_server.rb +1 -1
- data/lib/fog/compute/requests/brightbox/update_user.rb +1 -1
- data/lib/fog/compute/requests/linode/linode_disk_createfromstackscript.rb +1 -1
- data/lib/fog/compute/requests/rackspace/create_image.rb +1 -1
- data/lib/fog/compute/requests/rackspace/create_server.rb +1 -1
- data/lib/fog/compute/requests/rackspace/server_action.rb +2 -2
- data/lib/fog/compute/requests/rackspace/update_server.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/add_balancer_node.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/clone_server.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/create_server.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/delete_server.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/get_server.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/get_stats.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/list_balancers.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/list_configs.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/list_images.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/list_private_ips.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/list_servers.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/list_templates.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/reboot_server.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/remove_balancer_node.rb +1 -1
- data/lib/fog/compute/requests/storm_on_demand/resize_server.rb +1 -1
- data/lib/fog/compute/requests/vcloud/clone_vapp.rb +40 -0
- data/lib/fog/compute/requests/vcloud/configure_network.rb +43 -0
- data/lib/fog/compute/requests/vcloud/configure_network_ip.rb +46 -0
- data/lib/fog/compute/requests/vcloud/configure_node.rb +38 -0
- data/lib/fog/compute/requests/vcloud/configure_vapp.rb +112 -0
- data/lib/fog/compute/requests/vcloud/configure_vm.rb +247 -0
- data/lib/fog/compute/requests/vcloud/configure_vm_disks.rb +100 -0
- data/lib/fog/compute/requests/vcloud/configure_vm_memory.rb +40 -0
- data/lib/fog/compute/requests/vcloud/configure_vm_name_description.rb +30 -0
- data/lib/fog/compute/requests/vcloud/delete_node.rb +10 -0
- data/lib/fog/compute/requests/vcloud/delete_vapp.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_catalog.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_catalog_item.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_customization_options.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_network.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_network_extensions.rb +11 -0
- data/lib/fog/compute/requests/vcloud/get_network_ip.rb +15 -0
- data/lib/fog/compute/requests/vcloud/get_network_ips.rb +15 -0
- data/lib/fog/compute/requests/vcloud/get_organization.rb +11 -0
- data/lib/fog/compute/requests/vcloud/get_task.rb +11 -0
- data/lib/fog/compute/requests/vcloud/get_task_list.rb +11 -0
- data/lib/fog/compute/requests/vcloud/get_vapp.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_vapp_template.rb +11 -0
- data/lib/fog/compute/requests/vcloud/get_vdc.rb +10 -0
- data/lib/fog/compute/requests/vcloud/get_vm_disks.rb +16 -0
- data/lib/fog/compute/requests/vcloud/get_vm_memory.rb +16 -0
- data/lib/fog/compute/requests/vcloud/instantiate_vapp_template.rb +83 -0
- data/lib/fog/compute/requests/vcloud/login.rb +23 -0
- data/lib/fog/compute/requests/vcloud/power_off.rb +10 -0
- data/lib/fog/compute/requests/vcloud/power_on.rb +11 -0
- data/lib/fog/compute/requests/vcloud/power_reset.rb +11 -0
- data/lib/fog/compute/requests/vcloud/power_shutdown.rb +11 -0
- data/lib/fog/compute/requests/vcloud/undeploy.rb +23 -0
- data/lib/fog/compute/storm_on_demand.rb +2 -2
- data/lib/fog/compute/vcloud.rb +310 -0
- data/lib/fog/core.rb +2 -1
- data/lib/fog/core/attributes.rb +23 -11
- data/lib/fog/core/collection.rb +7 -7
- data/lib/fog/core/credentials.rb +4 -2
- data/lib/fog/core/model.rb +4 -4
- data/lib/fog/core/time.rb +1 -2
- data/lib/fog/core/timeout.rb +11 -0
- data/lib/fog/core/wait_for.rb +2 -2
- data/lib/fog/dns/dnsimple.rb +2 -2
- data/lib/fog/dns/dnsmadeeasy.rb +2 -2
- data/lib/fog/dns/linode.rb +2 -2
- data/lib/fog/dns/requests/dnsimple/create_domain.rb +1 -1
- data/lib/fog/dns/requests/dnsimple/create_record.rb +1 -1
- data/lib/fog/dns/requests/dnsimple/update_record.rb +1 -1
- data/lib/fog/dns/requests/dnsmadeeasy/create_record.rb +1 -1
- data/lib/fog/dns/requests/dnsmadeeasy/create_secondary.rb +1 -1
- data/lib/fog/dns/requests/dnsmadeeasy/update_record.rb +1 -1
- data/lib/fog/dns/requests/dnsmadeeasy/update_secondary.rb +1 -1
- data/lib/fog/providers.rb +1 -0
- data/lib/fog/providers/aws.rb +15 -2
- data/lib/fog/providers/ninefold.rb +1 -0
- data/lib/fog/providers/rackspace.rb +4 -3
- data/lib/fog/providers/vcloud.rb +11 -0
- data/lib/fog/storage.rb +9 -6
- data/lib/fog/storage/aws.rb +18 -1
- data/lib/fog/storage/google.rb +19 -1
- data/lib/fog/storage/models/aws/file.rb +3 -3
- data/lib/fog/storage/models/aws/files.rb +9 -2
- data/lib/fog/storage/models/google/files.rb +9 -2
- data/lib/fog/storage/models/ninefold/directories.rb +48 -0
- data/lib/fog/storage/models/ninefold/directory.rb +53 -0
- data/lib/fog/storage/models/ninefold/file.rb +99 -0
- data/lib/fog/storage/models/ninefold/files.rb +72 -0
- data/lib/fog/storage/models/rackspace/directory.rb +7 -2
- data/lib/fog/storage/ninefold.rb +149 -0
- data/lib/fog/storage/rackspace.rb +8 -2
- data/lib/fog/storage/requests/aws/get_bucket_policy.rb +1 -1
- data/lib/fog/storage/requests/aws/get_object.rb +6 -2
- data/lib/fog/storage/requests/aws/get_object_http_url.rb +51 -0
- data/lib/fog/storage/requests/aws/get_object_https_url.rb +51 -0
- data/lib/fog/storage/requests/aws/get_object_url.rb +4 -24
- data/lib/fog/storage/requests/aws/post_object_hidden_fields.rb +1 -1
- data/lib/fog/storage/requests/aws/put_bucket_policy.rb +1 -1
- data/lib/fog/storage/requests/google/get_object_http_url.rb +51 -0
- data/lib/fog/storage/requests/google/get_object_https_url.rb +51 -0
- data/lib/fog/storage/requests/google/get_object_url.rb +8 -25
- data/lib/fog/storage/requests/ninefold/delete_namespace.rb +19 -0
- data/lib/fog/storage/requests/ninefold/get_namespace.rb +20 -0
- data/lib/fog/storage/requests/ninefold/post_namespace.rb +20 -0
- data/lib/fog/storage/requests/ninefold/put_namespace.rb +20 -0
- data/lib/fog/storage/requests/rackspace/put_object.rb +3 -0
- data/lib/fog/storage/requests/rackspace/put_object_manifest.rb +25 -0
- data/tests/aws/models/auto_scaling/activities_tests.rb +6 -0
- data/tests/aws/models/auto_scaling/configuration_test.rb +13 -0
- data/tests/aws/models/auto_scaling/configurations_tests.rb +11 -0
- data/tests/aws/models/auto_scaling/helper.rb +0 -0
- data/tests/aws/models/auto_scaling/instances_tests.rb +6 -0
- data/tests/aws/models/cloud_watch/metric_statistics_tests.rb +51 -0
- data/tests/aws/models/cloud_watch/metrics_tests.rb +17 -0
- data/tests/aws/{requests → models}/elb/model_tests.rb +82 -18
- data/tests/aws/models/rds/security_group_tests.rb +1 -1
- data/tests/aws/requests/auto_scaling/auto_scaling_tests.rb +80 -0
- data/tests/aws/requests/auto_scaling/helper.rb +185 -0
- data/tests/aws/requests/auto_scaling/model_tests.rb +235 -0
- data/tests/aws/requests/cloud_formation/stack_tests.rb +1 -1
- data/tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb +28 -0
- data/tests/aws/requests/cloud_watch/list_metrics_test.rb +64 -0
- data/tests/aws/requests/cloud_watch/put_metric_data_tests.rb +36 -0
- data/tests/aws/requests/elb/listener_tests.rb +50 -0
- data/tests/aws/requests/elb/load_balancer_tests.rb +23 -44
- data/tests/aws/requests/elb/policy_tests.rb +41 -0
- data/tests/aws/requests/iam/helper.rb +29 -0
- data/tests/aws/requests/iam/login_profile_tests.rb +2 -2
- data/tests/aws/requests/iam/server_certificate_tests.rb +39 -6
- data/tests/aws/requests/rds/helper.rb +1 -0
- data/tests/aws/requests/simpledb/attributes_tests.rb +10 -15
- data/tests/aws/requests/sns/helper.rb +9 -0
- data/tests/aws/requests/sns/subscription_tests.rb +86 -0
- data/tests/aws/requests/sns/topic_tests.rb +50 -0
- data/tests/aws/requests/sqs/helper.rb +15 -0
- data/tests/aws/requests/sqs/message_tests.rb +57 -0
- data/tests/aws/requests/sqs/queue_tests.rb +55 -0
- data/tests/aws/signed_params_tests.rb +3 -1
- data/tests/compute/models/aws/volume_tests.rb +13 -0
- data/tests/compute/models/vcloud/helper.rb +25 -0
- data/tests/compute/models/vcloud/servers_tests.rb +95 -0
- data/tests/compute/requests/aws/address_tests.rb +1 -1
- data/tests/compute/requests/aws/instance_tests.rb +65 -4
- data/tests/compute/requests/aws/placement_group_tests.rb +48 -0
- data/tests/compute/requests/aws/spot_datafeed_subscription_tests.rb +47 -0
- data/tests/compute/requests/aws/spot_instance_tests.rb +53 -0
- data/tests/compute/requests/aws/spot_price_history_tests.rb +24 -0
- data/tests/compute/requests/aws/volume_tests.rb +4 -0
- data/tests/compute/requests/brightbox/helper.rb +2 -1
- data/tests/compute/requests/brightbox/interface_tests.rb +4 -4
- data/tests/compute/requests/ninefold/helper.rb +1 -1
- data/tests/compute/requests/vcloud/disk_configure_tests.rb +114 -0
- data/tests/compute/requests/voxel/server_tests.rb +2 -2
- data/tests/core/attribute_tests.rb +10 -1
- data/tests/core/credential_tests.rb +6 -0
- data/tests/core/timeout_tests.rb +10 -0
- data/tests/helpers/collection_helper.rb +4 -1
- data/tests/helpers/formats_helper.rb +1 -1
- data/tests/helpers/mock_helper.rb +5 -0
- data/tests/storage/helper.rb +4 -1
- data/tests/storage/models/ninefold/file_update_tests.rb +19 -0
- data/tests/storage/models/ninefold/nested_directories_tests.rb +23 -0
- data/tests/storage/requests/aws/multipart_upload_tests.rb +2 -5
- data/tests/storage/requests/rackspace/large_object_tests.rb +47 -0
- metadata +366 -105
@@ -0,0 +1,41 @@
|
|
1
|
+
Shindo.tests('AWS::ELB | policy_tests', ['aws', 'elb']) do
|
2
|
+
@load_balancer_id = 'fog-test-policies'
|
3
|
+
|
4
|
+
tests('success') do
|
5
|
+
listeners = [{'LoadBalancerPort' => 80, 'InstancePort' => 80, 'Protocol' => 'HTTP'}]
|
6
|
+
AWS[:elb].create_load_balancer(['us-east-1a'], @load_balancer_id, listeners)
|
7
|
+
|
8
|
+
tests("#create_app_cookie_stickiness_policy").formats(AWS::ELB::Formats::BASIC) do
|
9
|
+
cookie, policy = 'fog-app-cookie', 'fog-app-policy'
|
10
|
+
AWS[:elb].create_app_cookie_stickiness_policy(@load_balancer_id, policy, cookie).body
|
11
|
+
end
|
12
|
+
|
13
|
+
tests("#create_lb_cookie_stickiness_policy with expiry").formats(AWS::ELB::Formats::BASIC) do
|
14
|
+
policy = 'fog-lb-expiry'
|
15
|
+
expiry = 300
|
16
|
+
AWS[:elb].create_lb_cookie_stickiness_policy(@load_balancer_id, policy, expiry).body
|
17
|
+
end
|
18
|
+
|
19
|
+
tests("#create_lb_cookie_stickiness_policy without expiry").formats(AWS::ELB::Formats::BASIC) do
|
20
|
+
policy = 'fog-lb-no-expiry'
|
21
|
+
AWS[:elb].create_lb_cookie_stickiness_policy(@load_balancer_id, policy).body
|
22
|
+
end
|
23
|
+
|
24
|
+
tests("#delete_load_balancer_policy").formats(AWS::ELB::Formats::BASIC) do
|
25
|
+
policy = 'fog-lb-no-expiry'
|
26
|
+
AWS[:elb].delete_load_balancer_policy(@load_balancer_id, policy).body
|
27
|
+
end
|
28
|
+
|
29
|
+
tests("#set_load_balancer_policies_of_listener adds policy").formats(AWS::ELB::Formats::BASIC) do
|
30
|
+
port, policies = 80, ['fog-lb-expiry']
|
31
|
+
AWS[:elb].set_load_balancer_policies_of_listener(@load_balancer_id, port, policies).body
|
32
|
+
end
|
33
|
+
|
34
|
+
tests("#set_load_balancer_policies_of_listener removes policy").formats(AWS::ELB::Formats::BASIC) do
|
35
|
+
port = 80
|
36
|
+
AWS[:elb].set_load_balancer_policies_of_listener(@load_balancer_id, port, []).body
|
37
|
+
end
|
38
|
+
|
39
|
+
AWS[:elb].delete_load_balancer(@load_balancer_id)
|
40
|
+
end
|
41
|
+
end
|
@@ -41,6 +41,35 @@ c0AQtoYBTJePxiYyd8i32ypkkK83ar+sFoxKO9jYwD1IkZax2xZ0aoTdMindQPR7
|
|
41
41
|
Yjs+QiLmOHcbPqX+GHcCQERsSn0RjzKmKirDntseMB59BB/cEN32+gMDVsZuCfb+
|
42
42
|
fOy2ZavFl13afnhbh2/AjKeDhnb19x/uXjF7JCUtwpA=
|
43
43
|
-----END RSA PRIVATE KEY-----
|
44
|
+
}
|
45
|
+
|
46
|
+
SERVER_CERT_PRIVATE_KEY_MISMATCHED = %{-----BEGIN RSA PRIVATE KEY-----
|
47
|
+
MIIEowIBAAKCAQEAyITMqYJMzkPMcaC+x0W2hnZVW99RXzLR8RYyD3xo2AotdJKx
|
48
|
+
1DXR4ryegAjsnAhJVwVtxqzPcBMq/XS0hNtWFfKzf+vMZl7uAqotGjURUV8SRQPA
|
49
|
+
8tT07MemD929xRSV2vTnVATiPn87vcu5igsZ01+Ewd6rGythmvcZD13vtZ4rx0c8
|
50
|
+
kQJV3ok/CkFaIgDR6Or1NZBCtcIVK9nvqAmYMp6S5mWUMIsl/1qYPerpefrSJjlk
|
51
|
+
J2+jyLp0LHarbzjkzzAdOkBRX1hPkk6cisBeQIpx35shLzfCe8U25XNqquP+ftcu
|
52
|
+
JZ0Wjw+C4pTIzfgdGXmGGtBFY13BwiJvd4/i2wIDAQABAoIBABk8XWWX+IKdFcXX
|
53
|
+
LSt3IpmZmvSNDniktLday8IXLjrCTSY2sBq9C0U159zFQsIAaPqCvGYcqZ65StfL
|
54
|
+
MEzoLdVlTiHzUy4vFFVRhYue0icjh/EXn9jv5ENIfSXSCmgbRyDfYZ25X5/t817X
|
55
|
+
nOo6q21mwBaGJ5KrywTtxEGi2OBKZrIbBrpJLhCXJc5xfuKT6DRa9X/OBSBiGKJP
|
56
|
+
V9wHcZJkPG1HnC8izvQ37kNN/NyYE+8AGdYXQVNbTHq/emNLbEbdcR3tpGZamM9Q
|
57
|
+
TwG5WsDPAnXnRsEEYvlVTOBI6DqdvkyBxM35iqd5aAc6i/Iu04Unfhhc5pAXmmIB
|
58
|
+
a22GHcECgYEA7OheVHDDP8quO2qZjqaTlMbMnXnrFXJ41llFMoivTW9EmlTl9dOC
|
59
|
+
fnkHEBcFCTPV0m6S2AQjt9QOgPqCFAq1r3J/xvEGBtl/UKnPRmjqXFgl0ENtGn5t
|
60
|
+
w9wj/CsOPD05KkXXtXP+MyLPRD6gAxiQCTnXjvsLuVfP+E9BO2EQXScCgYEA2K2x
|
61
|
+
QtcAAalrk3c0KzNVESzyFlf3ddEXThShVblSa7r6Ka9q9sxN/Xe2B+1oemPJm26G
|
62
|
+
PfqKgxdKX0R0jl4f5pRBWKoarzWtUge/su8rx/xzbY/1hFKVuimtc6oTeU5xsOTS
|
63
|
+
PVuCz4bxDTVhrbmKqbmMgqy17jfPA4BrF1FMRS0CgYBdMA4i4vQ6fIxKfOUIMsfs
|
64
|
+
hsJn01RAbHXRwu2wMgnayMDQgEKwjtFO1GaN0rA9bXFXQ/1pET/HiJdn7qIKJihP
|
65
|
+
aheO9rHrMdSdsx4AUTaWummtYUhiWobsuwRApeMEmQSKd0yhaI3+KVwkOQoSDbBi
|
66
|
+
oKkE6gUzk7IPt4UuSUD5kwKBgQCjo/IGr8dieegz08gDhF4PfalLdJ4ATaxTHMOH
|
67
|
+
sVFs6SY7Sy72Ou//qGRCcmsAW9KL35nkvw3S2Ukiz9lTGATxqC/93WIPxvMhy5Zc
|
68
|
+
dcLT43XtXdanW5OWqBlGDEFu0O6OERIyoqUVRC1Ss2kUwdbWPbq/id5Qjbd7RoYa
|
69
|
+
cxyt9QKBgF4bFLw1Iw2RBngQxIzoDbElEqme20FUyGGzyFQtxVwmwNr4OY5UzJzX
|
70
|
+
7G6diyzGrvRX81Yw616ppKJUJVr/zRc13K+eRXXKtNpGkf35B+1NDDjjWZpIHqgx
|
71
|
+
Xb9WSr07saxZQbxBPQyTlb0Q9Tu2djAq2/o/nYD1/50/fXUTuWMB
|
72
|
+
-----END RSA PRIVATE KEY-----
|
44
73
|
}
|
45
74
|
|
46
75
|
module Formats
|
@@ -52,8 +52,8 @@ Shindo.tests('AWS::IAM | user requests', ['aws']) do
|
|
52
52
|
tests('failure') do
|
53
53
|
tests('get login profile for non existing user') do
|
54
54
|
pending if Fog.mocking?
|
55
|
-
raises(
|
56
|
-
raises(
|
55
|
+
raises(Fog::AWS::IAM::NotFound) { AWS[:iam].get_login_profile('idontexist')}
|
56
|
+
raises(Fog::AWS::IAM::NotFound) { AWS[:iam].delete_login_profile('fog_user')}
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -1,7 +1,4 @@
|
|
1
1
|
Shindo.tests('AWS::IAM | server certificate requests', ['aws']) do
|
2
|
-
|
3
|
-
pending if Fog.mocking?
|
4
|
-
|
5
2
|
@key_name = 'fog-test'
|
6
3
|
|
7
4
|
@certificate_format = {
|
@@ -10,15 +7,51 @@ Shindo.tests('AWS::IAM | server certificate requests', ['aws']) do
|
|
10
7
|
'ServerCertificateId' => String,
|
11
8
|
'ServerCertificateName' => String,
|
12
9
|
'UploadDate' => Time
|
13
|
-
}
|
10
|
+
}
|
14
11
|
@upload_format = {
|
15
12
|
'Certificate' => @certificate_format,
|
16
13
|
'RequestId' => String
|
17
14
|
}
|
18
|
-
|
15
|
+
|
16
|
+
tests('#upload_server_certificate') do
|
19
17
|
public_key = AWS::IAM::SERVER_CERT_PUBLIC_KEY
|
20
18
|
private_key = AWS::IAM::SERVER_CERT_PRIVATE_KEY
|
21
|
-
|
19
|
+
private_key_mismatch = AWS::IAM::SERVER_CERT_PRIVATE_KEY_MISMATCHED
|
20
|
+
|
21
|
+
tests('empty public key').raises(Fog::AWS::IAM::ValidationError) do
|
22
|
+
AWS[:iam].upload_server_certificate('', private_key, @key_name)
|
23
|
+
end
|
24
|
+
|
25
|
+
tests('empty private key').raises(Fog::AWS::IAM::ValidationError) do
|
26
|
+
AWS[:iam].upload_server_certificate(public_key, '', @key_name)
|
27
|
+
end
|
28
|
+
|
29
|
+
tests('invalid public key').raises(Fog::AWS::IAM::MalformedCertificate) do
|
30
|
+
AWS[:iam].upload_server_certificate('abcde', private_key, @key_name)
|
31
|
+
end
|
32
|
+
|
33
|
+
tests('invalid private key').raises(Fog::AWS::IAM::MalformedCertificate) do
|
34
|
+
AWS[:iam].upload_server_certificate(public_key, 'abcde', @key_name)
|
35
|
+
end
|
36
|
+
|
37
|
+
tests('mismatched private key').raises(Fog::AWS::IAM::KeyPairMismatch) do
|
38
|
+
AWS[:iam].upload_server_certificate(public_key, private_key_mismatch, @key_name)
|
39
|
+
end
|
40
|
+
|
41
|
+
tests('format').formats(@upload_format) do
|
42
|
+
AWS[:iam].upload_server_certificate(public_key, private_key, @key_name).body
|
43
|
+
end
|
44
|
+
|
45
|
+
tests('duplicate name').raises(Fog::AWS::IAM::EntityAlreadyExists) do
|
46
|
+
AWS[:iam].upload_server_certificate(public_key, private_key, @key_name)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
tests('#get_server_certificate').formats(@upload_format) do
|
51
|
+
tests('raises NotFound').raises(Fog::AWS::IAM::NotFound) do
|
52
|
+
AWS[:iam].get_server_certificate("#{@key_name}fake")
|
53
|
+
end
|
54
|
+
AWS[:iam].get_server_certificate(@key_name).body
|
22
55
|
end
|
23
56
|
|
24
57
|
@list_format = { 'Certificates' => [@certificate_format] }
|
@@ -10,22 +10,17 @@ Shindo.tests('AWS::SimpleDB | attributes requests', ['aws']) do
|
|
10
10
|
AWS[:sdb].batch_put_attributes(@domain_name, { 'a' => { 'b' => 'c', 'd' => 'e' }, 'x' => { 'y' => 'z' } }).body
|
11
11
|
end
|
12
12
|
|
13
|
-
tests("#get_attributes('#{@domain_name}', 'a').body['Attributes']").returns({'b' => ['c'], 'd' => ['e']}) do
|
14
|
-
|
15
|
-
Fog.wait_for {
|
16
|
-
attributes = AWS[:sdb].get_attributes(@domain_name, 'a').body['Attributes']
|
17
|
-
attributes != {}
|
18
|
-
}
|
19
|
-
attributes
|
13
|
+
tests("#get_attributes('#{@domain_name}', 'a', {'ConsistentRead' => true}).body['Attributes']").returns({'b' => ['c'], 'd' => ['e']}) do
|
14
|
+
AWS[:sdb].get_attributes(@domain_name, 'a', {'ConsistentRead' => true}).body['Attributes']
|
20
15
|
end
|
21
16
|
|
22
|
-
tests("#get_attributes('#{@domain_name}', 'notanattribute')").succeeds do
|
23
|
-
AWS[:sdb].get_attributes(@domain_name, 'notanattribute')
|
17
|
+
tests("#get_attributes('#{@domain_name}', 'AttributeName' => 'notanattribute')").succeeds do
|
18
|
+
AWS[:sdb].get_attributes(@domain_name, 'AttributeName' => 'notanattribute')
|
24
19
|
end
|
25
20
|
|
26
|
-
tests("#select('select * from #{@domain_name}').body['Items']").returns({'a' => { 'b' => ['c'], 'd' => ['e']}, 'x' => { 'y' => ['z'] } }) do
|
21
|
+
tests("#select('select * from #{@domain_name}', {'ConsistentRead' => true}).body['Items']").returns({'a' => { 'b' => ['c'], 'd' => ['e']}, 'x' => { 'y' => ['z'] } }) do
|
27
22
|
pending if Fog.mocking?
|
28
|
-
AWS[:sdb].select("select * from #{@domain_name}").body['Items']
|
23
|
+
AWS[:sdb].select("select * from #{@domain_name}", {'ConsistentRead' => true}).body['Items']
|
29
24
|
end
|
30
25
|
|
31
26
|
tests("#put_attributes('#{@domain_name}', 'conditional', { 'version' => '1' }).body").formats(AWS::SimpleDB::Formats::BASIC) do
|
@@ -42,8 +37,8 @@ Shindo.tests('AWS::SimpleDB | attributes requests', ['aws']) do
|
|
42
37
|
end
|
43
38
|
|
44
39
|
# Verify that individually deleted attributes are actually removed.
|
45
|
-
tests("#get_attributes('#{@domain_name}', 'a', ['d']).body['Attributes']").returns({
|
46
|
-
AWS[:sdb].get_attributes(@domain_name, 'a', ['d']).body['Attributes']
|
40
|
+
tests("#get_attributes('#{@domain_name}', 'a', {'AttributeName' => ['d'], 'ConsistentRead' => true}).body['Attributes']").returns({}) do
|
41
|
+
AWS[:sdb].get_attributes(@domain_name, 'a', {'AttributeName' => ['d'], 'ConsistentRead' => true}).body['Attributes']
|
47
42
|
end
|
48
43
|
|
49
44
|
tests("#delete_attributes('#{@domain_name}', 'a').body").formats(AWS::SimpleDB::Formats::BASIC) do
|
@@ -56,8 +51,8 @@ Shindo.tests('AWS::SimpleDB | attributes requests', ['aws']) do
|
|
56
51
|
end
|
57
52
|
|
58
53
|
# Verify that deleting a domain, item combination removes all related attributes.
|
59
|
-
tests("#get_attributes('#{@domain_name}', 'a').body['Attributes']").returns({}) do
|
60
|
-
AWS[:sdb].get_attributes(@domain_name, 'a').body['Attributes']
|
54
|
+
tests("#get_attributes('#{@domain_name}', 'a', {'ConsistentRead' => true}).body['Attributes']").returns({}) do
|
55
|
+
AWS[:sdb].get_attributes(@domain_name, 'a', {'ConsistentRead' => true}).body['Attributes']
|
61
56
|
end
|
62
57
|
|
63
58
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
Shindo.tests('AWS::SES | topic lifecycle tests', ['aws', 'sns']) do
|
2
|
+
|
3
|
+
unless Fog.mocking?
|
4
|
+
@topic_arn = AWS[:sns].create_topic('fog_subscription_tests').body['TopicArn']
|
5
|
+
@queue_url = AWS[:sqs].create_queue('fog_subscription_tests').body['QueueUrl']
|
6
|
+
@queue_arn = AWS[:sqs].get_queue_attributes(@queue_url, 'QueueArn').body['Attributes']['QueueArn']
|
7
|
+
AWS[:sqs].set_queue_attributes(
|
8
|
+
@queue_url,
|
9
|
+
'Policy',
|
10
|
+
MultiJson.encode({
|
11
|
+
'Id' => @topic_arn,
|
12
|
+
'Statement' => {
|
13
|
+
'Action' => 'sqs:SendMessage',
|
14
|
+
'Condition' => {
|
15
|
+
'StringEquals' => { 'aws:SourceArn' => @topic_arn }
|
16
|
+
},
|
17
|
+
'Effect' => 'Allow',
|
18
|
+
'Principal' => { 'AWS' => '*' },
|
19
|
+
'Resource' => @queue_arn,
|
20
|
+
'Sid' => "#{@topic_arn}+sqs:SendMessage"
|
21
|
+
},
|
22
|
+
'Version' => '2008-10-17'
|
23
|
+
})
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
tests('success') do
|
28
|
+
|
29
|
+
tests("#subscribe('#{@topic_arn}', '#{@queue_arn}', 'sqs')").formats(AWS::SNS::Formats::BASIC.merge('SubscriptionArn' => String)) do
|
30
|
+
pending if Fog.mocking?
|
31
|
+
body = AWS[:sns].subscribe(@topic_arn, @queue_arn, 'sqs').body
|
32
|
+
@subscription_arn = body['SubscriptionArn']
|
33
|
+
body
|
34
|
+
end
|
35
|
+
|
36
|
+
list_subscriptions_format = AWS::SNS::Formats::BASIC.merge({
|
37
|
+
'Subscriptions' => [{
|
38
|
+
'Endpoint' => String,
|
39
|
+
'Owner' => String,
|
40
|
+
'Protocol' => String,
|
41
|
+
'SubscriptionArn' => String,
|
42
|
+
'TopicArn' => String
|
43
|
+
}]
|
44
|
+
})
|
45
|
+
|
46
|
+
tests("#list_subscriptions").formats(list_subscriptions_format) do
|
47
|
+
pending if Fog.mocking?
|
48
|
+
AWS[:sns].list_subscriptions.body
|
49
|
+
end
|
50
|
+
|
51
|
+
tests("#list_subscriptions_by_topic('#{@topic_arn}')").formats(list_subscriptions_format) do
|
52
|
+
pending if Fog.mocking?
|
53
|
+
body = AWS[:sns].list_subscriptions_by_topic(@topic_arn).body
|
54
|
+
end
|
55
|
+
|
56
|
+
tests("#publish('#{@topic_arn}', 'message')").formats(AWS::SNS::Formats::BASIC.merge('MessageId' => String)) do
|
57
|
+
pending if Fog.mocking?
|
58
|
+
body = AWS[:sns].publish(@topic_arn, 'message').body
|
59
|
+
end
|
60
|
+
|
61
|
+
tests("#receive_message('#{@queue_url}')...").returns('message') do
|
62
|
+
pending if Fog.mocking?
|
63
|
+
message = nil
|
64
|
+
Fog.wait_for do
|
65
|
+
message = AWS[:sqs].receive_message(@queue_url).body['Message'].first
|
66
|
+
end
|
67
|
+
MultiJson.decode(message['Body'])['Message']
|
68
|
+
end
|
69
|
+
|
70
|
+
tests("#unsubscribe('#{@subscription_arn}')").formats(AWS::SNS::Formats::BASIC) do
|
71
|
+
pending if Fog.mocking?
|
72
|
+
AWS[:sns].unsubscribe(@subscription_arn).body
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
tests('failure') do
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
unless Fog.mocking?
|
82
|
+
AWS[:sns].delete_topic(@topic_arn)
|
83
|
+
AWS[:sqs].delete_queue(@queue_url)
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
Shindo.tests('AWS::SES | topic lifecycle tests', ['aws', 'sns']) do
|
2
|
+
|
3
|
+
tests('success') do
|
4
|
+
|
5
|
+
tests("#create_topic('fog_topic_tests')").formats(AWS::SNS::Formats::BASIC.merge('TopicArn' => String)) do
|
6
|
+
pending if Fog.mocking?
|
7
|
+
body = AWS[:sns].create_topic('fog_topic_tests').body
|
8
|
+
@topic_arn = body["TopicArn"]
|
9
|
+
body
|
10
|
+
end
|
11
|
+
|
12
|
+
tests("#list_topics").formats(AWS::SNS::Formats::BASIC.merge('Topics' => [String])) do
|
13
|
+
pending if Fog.mocking?
|
14
|
+
AWS[:sns].list_topics.body
|
15
|
+
end
|
16
|
+
|
17
|
+
tests("#set_topic_attributes('#{@topic_arn}', 'DisplayName', 'other-fog_topic_tests')").formats(AWS::SNS::Formats::BASIC) do
|
18
|
+
pending if Fog.mocking?
|
19
|
+
AWS[:sns].set_topic_attributes(@topic_arn, 'DisplayName', 'other-fog_topic_tests').body
|
20
|
+
end
|
21
|
+
|
22
|
+
get_topic_attributes_format = AWS::SNS::Formats::BASIC.merge({
|
23
|
+
'Attributes' => {
|
24
|
+
'DisplayName' => String,
|
25
|
+
'Owner' => String,
|
26
|
+
'Policy' => String,
|
27
|
+
'SubscriptionsConfirmed' => Integer,
|
28
|
+
'SubscriptionsDeleted' => Integer,
|
29
|
+
'SubscriptionsPending' => Integer,
|
30
|
+
'TopicArn' => String
|
31
|
+
}
|
32
|
+
})
|
33
|
+
|
34
|
+
tests("#get_topic_attributes('#{@topic_arn})").formats(get_topic_attributes_format) do
|
35
|
+
pending if Fog.mocking?
|
36
|
+
AWS[:sns].get_topic_attributes(@topic_arn).body
|
37
|
+
end
|
38
|
+
|
39
|
+
tests("#delete_topic('#{@topic_arn}')").formats(AWS::SNS::Formats::BASIC) do
|
40
|
+
pending if Fog.mocking?
|
41
|
+
AWS[:sns].delete_topic(@topic_arn).body
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
tests('failure') do
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
Shindo.tests('AWS::SQS | message requests', ['aws']) do
|
2
|
+
|
3
|
+
tests('success') do
|
4
|
+
|
5
|
+
unless Fog.mocking?
|
6
|
+
@queue_url = AWS[:sqs].create_queue('fog_message_tests').body['QueueUrl']
|
7
|
+
end
|
8
|
+
|
9
|
+
send_message_format = AWS::SQS::Formats::BASIC.merge({
|
10
|
+
'MessageId' => String,
|
11
|
+
'MD5OfMessageBody' => String
|
12
|
+
})
|
13
|
+
|
14
|
+
tests("#send_message('#{@queue_url}', 'message')").formats(send_message_format) do
|
15
|
+
pending if Fog.mocking?
|
16
|
+
AWS[:sqs].send_message(@queue_url, 'message').body
|
17
|
+
end
|
18
|
+
|
19
|
+
receive_message_format = AWS::SQS::Formats::BASIC.merge({
|
20
|
+
'Message' => [{
|
21
|
+
'Attributes' => {
|
22
|
+
'ApproximateFirstReceiveTimestamp' => Time,
|
23
|
+
'ApproximateReceiveCount' => Integer,
|
24
|
+
'SenderId' => String,
|
25
|
+
'SentTimestamp' => Time
|
26
|
+
},
|
27
|
+
'Body' => String,
|
28
|
+
'MD5OfBody' => String,
|
29
|
+
'MessageId' => String,
|
30
|
+
'ReceiptHandle' => String
|
31
|
+
}]
|
32
|
+
})
|
33
|
+
|
34
|
+
tests("#receive_message").formats(receive_message_format) do
|
35
|
+
pending if Fog.mocking?
|
36
|
+
data = AWS[:sqs].receive_message(@queue_url).body
|
37
|
+
@receipt_handle = data['Message'].first['ReceiptHandle']
|
38
|
+
data
|
39
|
+
end
|
40
|
+
|
41
|
+
tests("#change_message_visibility('#{@queue_url}, '#{@receipt_handle}', 60)").formats(AWS::SQS::Formats::BASIC) do
|
42
|
+
pending if Fog.mocking?
|
43
|
+
AWS[:sqs].change_message_visibility(@queue_url, @receipt_handle, 60).body
|
44
|
+
end
|
45
|
+
|
46
|
+
tests("#delete_message('#{@queue_url}', '#{@receipt_handle}')").formats(AWS::SQS::Formats::BASIC) do
|
47
|
+
pending if Fog.mocking?
|
48
|
+
AWS[:sqs].delete_message(@queue_url, @receipt_handle).body
|
49
|
+
end
|
50
|
+
|
51
|
+
unless Fog.mocking?
|
52
|
+
AWS[:sqs].delete_queue(@queue_url)
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
Shindo.tests('AWS::SQS | queue requests', ['aws']) do
|
2
|
+
|
3
|
+
tests('success') do
|
4
|
+
|
5
|
+
create_queue_format = AWS::SQS::Formats::BASIC.merge({
|
6
|
+
'QueueUrl' => String
|
7
|
+
})
|
8
|
+
|
9
|
+
tests("#create_queue('fog_queue_tests')").formats(create_queue_format) do
|
10
|
+
pending if Fog.mocking?
|
11
|
+
data = AWS[:sqs].create_queue('fog_queue_tests').body
|
12
|
+
@queue_url = data['QueueUrl']
|
13
|
+
data
|
14
|
+
end
|
15
|
+
|
16
|
+
list_queues_format = AWS::SQS::Formats::BASIC.merge({
|
17
|
+
'QueueUrls' => [String]
|
18
|
+
})
|
19
|
+
|
20
|
+
tests("#list_queues").formats(list_queues_format) do
|
21
|
+
pending if Fog.mocking?
|
22
|
+
AWS[:sqs].list_queues.body
|
23
|
+
end
|
24
|
+
|
25
|
+
tests("#set_queue_attributes('#{@queue_url}', 'VisibilityTimeout', 60)").formats(AWS::SQS::Formats::BASIC) do
|
26
|
+
pending if Fog.mocking?
|
27
|
+
AWS[:sqs].set_queue_attributes(@queue_url, 'VisibilityTimeout', 60).body
|
28
|
+
end
|
29
|
+
|
30
|
+
get_queue_attributes_format = AWS::SQS::Formats::BASIC.merge({
|
31
|
+
'Attributes' => {
|
32
|
+
'ApproximateNumberOfMessages' => Integer,
|
33
|
+
'ApproximateNumberOfMessagesNotVisible' => Integer,
|
34
|
+
'CreatedTimestamp' => Time,
|
35
|
+
'MaximumMessageSize' => Integer,
|
36
|
+
'LastModifiedTimestamp' => Time,
|
37
|
+
'MessageRetentionPeriod' => Integer,
|
38
|
+
'QueueArn' => String,
|
39
|
+
'VisibilityTimeout' => Integer
|
40
|
+
}
|
41
|
+
})
|
42
|
+
|
43
|
+
tests("#get_queue_attributes('#{@queue_url}', 'All')").formats(get_queue_attributes_format) do
|
44
|
+
pending if Fog.mocking?
|
45
|
+
AWS[:sqs].get_queue_attributes(@queue_url, 'All').body
|
46
|
+
end
|
47
|
+
|
48
|
+
tests("#delete_queue('#{@queue_url}')").formats(AWS::SQS::Formats::BASIC) do
|
49
|
+
pending if Fog.mocking?
|
50
|
+
AWS[:sqs].delete_queue(@queue_url).body
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|