fog 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -12
- data/Rakefile +3 -2
- data/benchs/parse_vs_push.rb +17 -8
- data/bin/fog +2 -2
- data/changelog.txt +123 -0
- data/docs/_layouts/default.html +21 -8
- data/docs/{_posts/2011-01-01-contributing.markdown → about/contributing.markdown} +0 -0
- data/docs/about/getting_started.markdown +83 -0
- data/docs/{_posts/2011-01-01-press.markdown → about/press.markdown} +6 -1
- data/docs/{_posts/2011-01-01-structure.markdown → about/structure.markdown} +0 -0
- data/docs/{_posts/2011-01-01-users.markdown → about/users.markdown} +0 -0
- data/docs/{_posts/2011-01-01-cdn.markdown → cdn/index.markdown} +12 -12
- data/docs/{_posts/2011-01-01-dns.markdown → dns/index.markdown} +18 -18
- data/docs/index.markdown +5 -4
- data/docs/{_posts/2011-01-01-storage.markdown → storage/index.markdown} +59 -21
- data/fog.gemspec +3 -9
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/elb.rb +46 -12
- data/lib/fog/aws/iam.rb +1 -0
- data/lib/fog/aws/models/elb/listener.rb +51 -0
- data/lib/fog/aws/models/elb/listeners.rb +32 -0
- data/lib/fog/aws/models/elb/load_balancer.rb +129 -0
- data/lib/fog/aws/models/elb/load_balancers.rb +28 -0
- data/lib/fog/aws/models/elb/policies.rb +40 -0
- data/lib/fog/aws/models/elb/policy.rb +52 -0
- data/lib/fog/aws/{rds/models → models/rds}/parameter.rb +0 -0
- data/lib/fog/aws/{rds/models → models/rds}/parameter_group.rb +0 -0
- data/lib/fog/aws/{rds/models → models/rds}/parameter_groups.rb +1 -1
- data/lib/fog/aws/{rds/models → models/rds}/parameters.rb +1 -1
- data/lib/fog/aws/{rds/models → models/rds}/security_group.rb +0 -0
- data/lib/fog/aws/{rds/models → models/rds}/security_groups.rb +1 -1
- data/lib/fog/aws/{rds/models → models/rds}/server.rb +0 -0
- data/lib/fog/aws/{rds/models → models/rds}/servers.rb +1 -1
- data/lib/fog/aws/{rds/models → models/rds}/snapshot.rb +0 -0
- data/lib/fog/aws/{rds/models → models/rds}/snapshots.rb +1 -1
- data/lib/fog/aws/parsers/cloud_formation/create_stack.rb +1 -1
- data/lib/fog/aws/parsers/cloud_formation/describe_stack_events.rb +3 -3
- data/lib/fog/aws/parsers/cloud_formation/describe_stack_resources.rb +3 -3
- data/lib/fog/aws/parsers/cloud_formation/describe_stacks.rb +6 -6
- data/lib/fog/aws/parsers/cloud_formation/get_template.rb +1 -1
- data/lib/fog/aws/parsers/cloud_formation/validate_template.rb +5 -5
- data/lib/fog/aws/parsers/elb/configure_health_check.rb +37 -0
- data/lib/fog/aws/parsers/elb/create_load_balancer.rb +2 -2
- data/lib/fog/aws/parsers/elb/delete_load_balancer.rb +1 -1
- data/lib/fog/aws/parsers/elb/deregister_instances_from_load_balancer.rb +2 -2
- data/lib/fog/aws/parsers/elb/describe_instance_health.rb +2 -2
- data/lib/fog/aws/parsers/elb/describe_load_balancers.rb +36 -16
- data/lib/fog/aws/parsers/elb/disable_availability_zones_for_load_balancer.rb +2 -2
- data/lib/fog/aws/parsers/elb/empty.rb +28 -0
- data/lib/fog/aws/parsers/elb/enable_availability_zones_for_load_balancer.rb +2 -2
- data/lib/fog/aws/parsers/elb/register_instances_with_load_balancer.rb +2 -2
- data/lib/fog/aws/parsers/iam/basic.rb +1 -1
- data/lib/fog/aws/parsers/iam/create_access_key.rb +2 -2
- data/lib/fog/aws/parsers/iam/create_group.rb +2 -2
- data/lib/fog/aws/parsers/iam/create_user.rb +2 -2
- data/lib/fog/aws/parsers/iam/get_group.rb +6 -6
- data/lib/fog/aws/parsers/iam/get_user.rb +2 -2
- data/lib/fog/aws/parsers/iam/get_user_policy.rb +2 -2
- data/lib/fog/aws/parsers/iam/list_access_keys.rb +3 -3
- data/lib/fog/aws/parsers/iam/list_groups.rb +3 -3
- data/lib/fog/aws/parsers/iam/list_groups_for_user.rb +3 -3
- data/lib/fog/aws/parsers/iam/list_policies.rb +3 -3
- data/lib/fog/aws/parsers/iam/list_server_certificates.rb +38 -0
- data/lib/fog/aws/parsers/iam/list_signing_certificates.rb +3 -3
- data/lib/fog/aws/parsers/iam/list_users.rb +3 -3
- data/lib/fog/aws/parsers/iam/login_profile.rb +3 -3
- data/lib/fog/aws/parsers/iam/update_group.rb +2 -2
- data/lib/fog/aws/parsers/iam/update_user.rb +2 -2
- data/lib/fog/aws/parsers/iam/upload_server_certificate.rb +5 -3
- data/lib/fog/aws/parsers/iam/upload_signing_certificate.rb +2 -2
- data/lib/fog/aws/parsers/rds/authorize_db_security_group_ingress.rb +1 -1
- data/lib/fog/aws/parsers/rds/create_db_instance.rb +1 -1
- data/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb +1 -1
- data/lib/fog/aws/parsers/rds/create_db_parameter_group.rb +4 -4
- data/lib/fog/aws/parsers/rds/create_db_security_group.rb +1 -1
- data/lib/fog/aws/parsers/rds/create_db_snapshot.rb +1 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +16 -16
- data/lib/fog/aws/parsers/rds/delete_db_instance.rb +1 -1
- data/lib/fog/aws/parsers/rds/delete_db_parameter_group.rb +1 -1
- data/lib/fog/aws/parsers/rds/delete_db_security_group.rb +1 -1
- data/lib/fog/aws/parsers/rds/delete_db_snapshot.rb +1 -1
- data/lib/fog/aws/parsers/rds/describe_db_instances.rb +2 -2
- data/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb +5 -5
- data/lib/fog/aws/parsers/rds/describe_db_parameters.rb +10 -10
- data/lib/fog/aws/parsers/rds/describe_db_security_groups.rb +2 -2
- data/lib/fog/aws/parsers/rds/describe_db_snapshots.rb +2 -2
- data/lib/fog/aws/parsers/rds/modify_db_instance.rb +1 -1
- data/lib/fog/aws/parsers/rds/modify_db_parameter_group.rb +2 -2
- data/lib/fog/aws/parsers/rds/reboot_db_instance.rb +1 -1
- data/lib/fog/aws/parsers/rds/restore_db_instance_from_db_snapshot.rb +1 -1
- data/lib/fog/aws/parsers/rds/restore_db_instance_to_point_in_time.rb +1 -1
- data/lib/fog/aws/parsers/rds/revoke_db_security_group_ingress.rb +1 -1
- data/lib/fog/aws/parsers/rds/security_group_parser.rb +4 -4
- data/lib/fog/aws/parsers/rds/snapshot_parser.rb +11 -11
- data/lib/fog/aws/parsers/ses/delete_verified_email_address.rb +1 -1
- data/lib/fog/aws/parsers/ses/get_send_quota.rb +2 -2
- data/lib/fog/aws/parsers/ses/get_send_statistics.rb +2 -2
- data/lib/fog/aws/parsers/ses/list_verified_email_addresses.rb +2 -2
- data/lib/fog/aws/parsers/ses/send_email.rb +2 -2
- data/lib/fog/aws/parsers/ses/send_raw_email.rb +2 -2
- data/lib/fog/aws/parsers/ses/verify_email_address.rb +1 -1
- data/lib/fog/aws/parsers/simpledb/basic.rb +2 -2
- data/lib/fog/aws/parsers/simpledb/domain_metadata.rb +4 -4
- data/lib/fog/aws/parsers/simpledb/get_attributes.rb +4 -4
- data/lib/fog/aws/parsers/simpledb/list_domains.rb +3 -3
- data/lib/fog/aws/parsers/simpledb/select.rb +5 -5
- data/lib/fog/aws/rds.rb +2 -3
- data/lib/fog/aws/requests/elb/configure_health_check.rb +41 -0
- data/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +33 -0
- data/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +35 -0
- data/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +51 -0
- data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +31 -0
- data/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +31 -0
- data/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +43 -0
- data/lib/fog/aws/requests/iam/list_server_certificates.rb +42 -0
- data/lib/fog/aws/requests/ses/send_raw_email.rb +4 -4
- data/lib/fog/aws/simpledb.rb +2 -2
- data/lib/fog/bin.rb +1 -0
- data/lib/fog/bin/stormondemand.rb +30 -0
- data/lib/fog/cdn/parsers/aws/distribution.rb +11 -11
- data/lib/fog/cdn/parsers/aws/get_distribution_list.rb +9 -9
- data/lib/fog/cdn/parsers/aws/post_invalidation.rb +3 -3
- data/lib/fog/compute.rb +3 -0
- data/lib/fog/compute/aws.rb +4 -2
- data/lib/fog/compute/models/aws/server.rb +16 -2
- data/lib/fog/compute/models/bluebox/server.rb +11 -2
- data/lib/fog/compute/models/brightbox/server.rb +6 -0
- data/lib/fog/compute/models/ecloud/servers.rb +3 -1
- data/lib/fog/compute/models/go_grid/server.rb +1 -0
- data/lib/fog/compute/models/rackspace/server.rb +2 -1
- data/lib/fog/compute/models/slicehost/server.rb +2 -1
- data/lib/fog/compute/models/storm_on_demand/balancer.rb +38 -0
- data/lib/fog/compute/models/storm_on_demand/balancers.rb +21 -0
- data/lib/fog/compute/models/storm_on_demand/config.rb +25 -0
- data/lib/fog/compute/models/storm_on_demand/configs.rb +22 -0
- data/lib/fog/compute/models/storm_on_demand/image.rb +20 -0
- data/lib/fog/compute/models/storm_on_demand/images.rb +21 -0
- data/lib/fog/compute/models/storm_on_demand/private_ip.rb +19 -0
- data/lib/fog/compute/models/storm_on_demand/private_ips.rb +31 -0
- data/lib/fog/compute/models/storm_on_demand/server.rb +74 -0
- data/lib/fog/compute/models/storm_on_demand/servers.rb +26 -0
- data/lib/fog/compute/models/storm_on_demand/stat.rb +23 -0
- data/lib/fog/compute/models/storm_on_demand/stats.rb +22 -0
- data/lib/fog/compute/models/storm_on_demand/template.rb +22 -0
- data/lib/fog/compute/models/storm_on_demand/templates.rb +21 -0
- data/lib/fog/compute/models/voxel/image.rb +4 -1
- data/lib/fog/compute/models/voxel/server.rb +1 -0
- data/lib/fog/compute/parsers/aws/allocate_address.rb +1 -1
- data/lib/fog/compute/parsers/aws/attach_volume.rb +2 -2
- data/lib/fog/compute/parsers/aws/basic.rb +2 -2
- data/lib/fog/compute/parsers/aws/create_image.rb +1 -1
- data/lib/fog/compute/parsers/aws/create_key_pair.rb +1 -1
- data/lib/fog/compute/parsers/aws/create_snapshot.rb +4 -4
- data/lib/fog/compute/parsers/aws/create_volume.rb +3 -3
- data/lib/fog/compute/parsers/aws/deregister_image.rb +1 -1
- data/lib/fog/compute/parsers/aws/describe_addresses.rb +2 -2
- data/lib/fog/compute/parsers/aws/describe_availability_zones.rb +3 -3
- data/lib/fog/compute/parsers/aws/describe_images.rb +7 -7
- data/lib/fog/compute/parsers/aws/describe_instances.rb +17 -17
- data/lib/fog/compute/parsers/aws/describe_key_pairs.rb +2 -2
- data/lib/fog/compute/parsers/aws/describe_regions.rb +2 -2
- data/lib/fog/compute/parsers/aws/describe_reserved_instances.rb +5 -5
- data/lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb +4 -4
- data/lib/fog/compute/parsers/aws/describe_security_groups.rb +8 -8
- data/lib/fog/compute/parsers/aws/describe_snapshots.rb +5 -5
- data/lib/fog/compute/parsers/aws/describe_tags.rb +2 -2
- data/lib/fog/compute/parsers/aws/describe_volumes.rb +8 -8
- data/lib/fog/compute/parsers/aws/detach_volume.rb +2 -2
- data/lib/fog/compute/parsers/aws/get_console_output.rb +3 -7
- data/lib/fog/compute/parsers/aws/import_key_pair.rb +1 -1
- data/lib/fog/compute/parsers/aws/monitor_unmonitor_instances.rb +3 -3
- data/lib/fog/compute/parsers/aws/register_image.rb +1 -1
- data/lib/fog/compute/parsers/aws/run_instances.rb +14 -22
- data/lib/fog/compute/parsers/aws/start_stop_instances.rb +3 -3
- data/lib/fog/compute/parsers/aws/terminate_instances.rb +6 -6
- data/lib/fog/compute/parsers/slicehost/create_slice.rb +4 -4
- data/lib/fog/compute/parsers/slicehost/get_backups.rb +3 -3
- data/lib/fog/compute/parsers/slicehost/get_flavor.rb +2 -2
- data/lib/fog/compute/parsers/slicehost/get_flavors.rb +2 -2
- data/lib/fog/compute/parsers/slicehost/get_image.rb +2 -2
- data/lib/fog/compute/parsers/slicehost/get_images.rb +2 -2
- data/lib/fog/compute/parsers/slicehost/get_slice.rb +4 -4
- data/lib/fog/compute/parsers/slicehost/get_slices.rb +4 -4
- data/lib/fog/compute/parsers/voxel/devices_list.rb +12 -12
- data/lib/fog/compute/parsers/voxel/images_list.rb +5 -5
- data/lib/fog/compute/parsers/voxel/voxcloud_create.rb +2 -2
- data/lib/fog/compute/parsers/voxel/voxcloud_status.rb +2 -2
- data/lib/fog/compute/requests/aws/describe_availability_zones.rb +17 -1
- data/lib/fog/compute/requests/aws/describe_instances.rb +6 -1
- data/lib/fog/compute/requests/storm_on_demand/add_balancer_node.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/clone_server.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/create_server.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/delete_server.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/get_server.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/get_stats.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/list_balancers.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/list_configs.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/list_images.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/list_private_ips.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/list_servers.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/list_templates.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/reboot_server.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/remove_balancer_node.rb +16 -0
- data/lib/fog/compute/requests/storm_on_demand/resize_server.rb +16 -0
- data/lib/fog/compute/requests/voxel/images_list.rb +3 -3
- data/lib/fog/compute/storm_on_demand.rb +122 -0
- data/lib/fog/core/attributes.rb +12 -0
- data/lib/fog/core/credentials.rb +1 -52
- data/lib/fog/core/errors.rb +53 -0
- data/lib/fog/core/model.rb +10 -5
- data/lib/fog/core/parser.rb +8 -3
- data/lib/fog/dns/models/aws/records.rb +1 -1
- data/lib/fog/dns/models/aws/zones.rb +1 -1
- data/lib/fog/dns/parsers/aws/change_resource_record_sets.rb +2 -2
- data/lib/fog/dns/parsers/aws/create_hosted_zone.rb +5 -5
- data/lib/fog/dns/parsers/aws/delete_hosted_zone.rb +1 -1
- data/lib/fog/dns/parsers/aws/get_change.rb +2 -2
- data/lib/fog/dns/parsers/aws/get_hosted_zone.rb +3 -3
- data/lib/fog/dns/parsers/aws/list_hosted_zones.rb +4 -4
- data/lib/fog/dns/parsers/aws/list_resource_record_sets.rb +4 -4
- data/lib/fog/dns/parsers/bluebox/create_record.rb +2 -2
- data/lib/fog/dns/parsers/bluebox/create_zone.rb +2 -2
- data/lib/fog/dns/parsers/bluebox/get_record.rb +1 -1
- data/lib/fog/dns/parsers/bluebox/get_records.rb +1 -1
- data/lib/fog/dns/parsers/bluebox/get_zone.rb +2 -2
- data/lib/fog/dns/parsers/bluebox/get_zones.rb +2 -2
- data/lib/fog/dns/parsers/slicehost/create_record.rb +2 -2
- data/lib/fog/dns/parsers/slicehost/create_zone.rb +2 -2
- data/lib/fog/dns/parsers/slicehost/get_record.rb +2 -2
- data/lib/fog/dns/parsers/slicehost/get_records.rb +2 -2
- data/lib/fog/dns/parsers/slicehost/get_zone.rb +2 -2
- data/lib/fog/dns/parsers/slicehost/get_zones.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/count_hosts.rb +1 -1
- data/lib/fog/dns/parsers/zerigo/count_zones.rb +1 -1
- data/lib/fog/dns/parsers/zerigo/create_host.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/create_zone.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/find_hosts.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/get_host.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/get_zone.rb +4 -4
- data/lib/fog/dns/parsers/zerigo/get_zone_stats.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/list_hosts.rb +2 -2
- data/lib/fog/dns/parsers/zerigo/list_zones.rb +2 -2
- data/lib/fog/providers.rb +1 -0
- data/lib/fog/providers/aws.rb +5 -1
- data/lib/fog/providers/storm_on_demand.rb +12 -0
- data/lib/fog/storage/models/aws/files.rb +17 -0
- data/lib/fog/storage/models/google/files.rb +17 -0
- data/lib/fog/storage/models/rackspace/files.rb +17 -0
- data/lib/fog/storage/parsers/aws/access_control_list.rb +4 -4
- data/lib/fog/storage/parsers/aws/complete_multipart_upload.rb +1 -1
- data/lib/fog/storage/parsers/aws/copy_object.rb +2 -2
- data/lib/fog/storage/parsers/aws/get_bucket.rb +10 -10
- data/lib/fog/storage/parsers/aws/get_bucket_location.rb +1 -1
- data/lib/fog/storage/parsers/aws/get_bucket_logging.rb +5 -5
- data/lib/fog/storage/parsers/aws/get_bucket_object_versions.rb +8 -8
- data/lib/fog/storage/parsers/aws/get_bucket_versioning.rb +1 -1
- data/lib/fog/storage/parsers/aws/get_bucket_website.rb +2 -2
- data/lib/fog/storage/parsers/aws/get_request_payment.rb +1 -1
- data/lib/fog/storage/parsers/aws/get_service.rb +3 -3
- data/lib/fog/storage/parsers/aws/initiate_multipart_upload.rb +1 -1
- data/lib/fog/storage/parsers/aws/list_multipart_uploads.rb +7 -7
- data/lib/fog/storage/parsers/aws/list_parts.rb +7 -7
- data/lib/fog/storage/parsers/google/access_control_list.rb +3 -3
- data/lib/fog/storage/parsers/google/copy_object.rb +2 -2
- data/lib/fog/storage/parsers/google/get_bucket.rb +10 -10
- data/lib/fog/storage/parsers/google/get_bucket_logging.rb +5 -5
- data/lib/fog/storage/parsers/google/get_bucket_object_versions.rb +9 -9
- data/lib/fog/storage/parsers/google/get_bucket_versioning.rb +1 -1
- data/lib/fog/storage/parsers/google/get_request_payment.rb +1 -1
- data/lib/fog/storage/parsers/google/get_service.rb +3 -3
- data/lib/fog/storage/requests/aws/get_object.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_catalog.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_catalog_item.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_internet_services.rb +7 -7
- data/lib/fog/terremark/parsers/shared/get_network_ips.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_node_services.rb +3 -3
- data/lib/fog/terremark/parsers/shared/get_organization.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_public_ips.rb +2 -2
- data/lib/fog/terremark/parsers/shared/get_vapp_template.rb +1 -1
- data/lib/fog/terremark/parsers/shared/get_vdc.rb +6 -6
- data/lib/fog/terremark/parsers/shared/internet_service.rb +7 -7
- data/lib/fog/terremark/parsers/shared/network.rb +1 -1
- data/lib/fog/terremark/parsers/shared/node_service.rb +3 -3
- data/lib/fog/terremark/parsers/shared/public_ip.rb +2 -2
- data/lib/fog/terremark/parsers/shared/vapp.rb +7 -7
- data/spec/ecloud/spec_helper.rb +1 -1
- data/tests/aws/requests/cloud_formation/stack_tests.rb +2 -0
- data/tests/aws/requests/elb/helper.rb +44 -0
- data/tests/aws/requests/elb/load_balancer_tests.rb +82 -0
- data/tests/aws/requests/elb/model_tests.rb +187 -0
- data/tests/aws/requests/iam/helper.rb +41 -0
- data/tests/aws/requests/iam/login_profile_tests.rb +1 -1
- data/tests/aws/requests/iam/server_certificate_tests.rb +36 -0
- data/tests/aws/requests/rds/instance_tests.rb +63 -66
- data/tests/aws/requests/simpledb/attributes_tests.rb +4 -4
- data/tests/aws/signed_params_tests.rb +3 -0
- data/tests/compute/helper.rb +2 -2
- data/tests/compute/models/aws/address_tests.rb +2 -2
- data/tests/compute/models/aws/security_group_tests.rb +12 -0
- data/tests/compute/models/aws/server_tests.rb +8 -1
- data/tests/compute/models/aws/snapshot_tests.rb +2 -2
- data/tests/compute/models/aws/volume_tests.rb +3 -3
- data/tests/compute/requests/aws/address_tests.rb +1 -1
- data/tests/compute/requests/aws/instance_tests.rb +1 -1
- data/tests/compute/requests/aws/key_pair_tests.rb +5 -1
- data/tests/compute/requests/aws/snapshot_tests.rb +1 -1
- data/tests/compute/requests/aws/tag_tests.rb +1 -1
- data/tests/compute/requests/aws/volume_tests.rb +3 -3
- data/tests/compute/requests/bluebox/block_tests.rb +14 -13
- data/tests/compute/requests/brightbox/helper.rb +1 -2
- data/tests/compute/requests/storm_on_demand/server_tests.rb +64 -0
- data/tests/compute/requests/voxel/image_tests.rb +30 -24
- data/tests/compute/requests/voxel/server_tests.rb +1 -1
- data/tests/dns/requests/aws/dns_tests.rb +1 -1
- data/tests/helper.rb +1 -1
- data/tests/storage/requests/aws/multipart_upload_tests.rb +1 -1
- data/tests/storage/requests/google/bucket_tests.rb +0 -1
- data/tests/storage/requests/rackspace/object_tests.rb +1 -0
- metadata +125 -66
- data/docs/_posts/2011-01-01-start.markdown +0 -21
@@ -0,0 +1,31 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class ELB
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/elb/empty'
|
7
|
+
|
8
|
+
# Delete a Load Balancer Stickiness Policy
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * lb_name<~String> - Name of the ELB
|
12
|
+
# * policy_name<~String> - The name of the policy to delete
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
# * 'ResponseMetadata'<~Hash>:
|
17
|
+
# * 'RequestId'<~String> - Id of request
|
18
|
+
def delete_load_balancer_policy(lb_name, policy_name)
|
19
|
+
params = {'PolicyName' => policy_name}
|
20
|
+
|
21
|
+
request({
|
22
|
+
'Action' => 'DeleteLoadBalancerPolicy',
|
23
|
+
'LoadBalancerName' => lb_name,
|
24
|
+
:parser => Fog::Parsers::AWS::ELB::Empty.new
|
25
|
+
}.merge!(params))
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class ELB
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/elb/empty'
|
7
|
+
|
8
|
+
# Associates, updates, or disables a policy with a listener on the
|
9
|
+
# load balancer. Currently only zero (0) or one (1) policy can be
|
10
|
+
# associated with a listener.
|
11
|
+
#
|
12
|
+
# ==== Parameters
|
13
|
+
# * lb_name<~String> - Name of the ELB
|
14
|
+
# * load_balancer_port<~Integer> - The external port of the LoadBalancer
|
15
|
+
# with which this policy has to be associated.
|
16
|
+
|
17
|
+
# * policy_names<~Array> - List of policies to be associated with the
|
18
|
+
# listener. Currently this list can have at most one policy. If the
|
19
|
+
# list is empty, the current policy is removed from the listener.
|
20
|
+
# ==== Returns
|
21
|
+
# * response<~Excon::Response>:
|
22
|
+
# * body<~Hash>:
|
23
|
+
# * 'ResponseMetadata'<~Hash>:
|
24
|
+
# * 'RequestId'<~String> - Id of request
|
25
|
+
def set_load_balancer_policies_of_listener(lb_name, load_balancer_port, policy_names)
|
26
|
+
params = {'LoadBalancerPort' => load_balancer_port}
|
27
|
+
if policy_names.any?
|
28
|
+
params.merge!(AWS.indexed_param('PolicyNames.member', policy_names))
|
29
|
+
else
|
30
|
+
params['PolicyNames'] = ''
|
31
|
+
end
|
32
|
+
|
33
|
+
request({
|
34
|
+
'Action' => 'SetLoadBalancerPoliciesOfListener',
|
35
|
+
'LoadBalancerName' => lb_name,
|
36
|
+
:parser => Fog::Parsers::AWS::ELB::Empty.new
|
37
|
+
}.merge!(params))
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class IAM
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/iam/list_server_certificates'
|
7
|
+
|
8
|
+
# List server certificates
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * options<~Hash>:
|
12
|
+
# * 'Marker'<~String> - The marker from the previous result (for pagination)
|
13
|
+
# * 'MaxItems'<~String> - The maximum number of server certificates you want in the response
|
14
|
+
# * 'PathPrefix'<~String> - The path prefix for filtering the results
|
15
|
+
#
|
16
|
+
# ==== Returns
|
17
|
+
# * response<~Excon::Response>:
|
18
|
+
# * body<~Hash>:
|
19
|
+
# * 'Certificates'<~Array> - Matching server certificates
|
20
|
+
# * server_certificate<~Hash>:
|
21
|
+
# * Arn<~String> -
|
22
|
+
# * Path<~String> -
|
23
|
+
# * ServerCertificateId<~String> -
|
24
|
+
# * ServerCertificateName<~String> -
|
25
|
+
# * UploadDate<~Time> -
|
26
|
+
# * 'IsTruncated'<~Boolean> - Whether or not the results were truncated
|
27
|
+
# * 'Marker'<~String> - appears when IsTruncated is true as the next marker to use
|
28
|
+
#
|
29
|
+
# ==== See Also
|
30
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/index.html?API_ListServerCertificates.html
|
31
|
+
#
|
32
|
+
def list_server_certificates(options = {})
|
33
|
+
request({
|
34
|
+
'Action' => 'ListServerCertificates',
|
35
|
+
:parser => Fog::Parsers::AWS::IAM::ListServerCertificates.new
|
36
|
+
}.merge!(options))
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -5,13 +5,13 @@ module Fog
|
|
5
5
|
|
6
6
|
require 'fog/aws/parsers/ses/send_raw_email'
|
7
7
|
|
8
|
-
#
|
8
|
+
# Send a raw email
|
9
9
|
#
|
10
10
|
# ==== Parameters
|
11
11
|
# * RawMessage <~String> - The message to be sent.
|
12
12
|
# * Options <~Hash>
|
13
|
-
# * Source <~String> - The sender's email address
|
14
|
-
# * Destinations <~Array> -
|
13
|
+
# * Source <~String> - The sender's email address. Takes precenence over Return-Path if specified in RawMessage
|
14
|
+
# * Destinations <~Array> - All destinations for this email.
|
15
15
|
#
|
16
16
|
# ==== Returns
|
17
17
|
# * response<~Excon::Response>:
|
@@ -22,7 +22,7 @@ module Fog
|
|
22
22
|
def send_raw_email(raw_message, options = {})
|
23
23
|
params = {}
|
24
24
|
if options.has_key?('Destinations')
|
25
|
-
params
|
25
|
+
params.merge!(AWS.indexed_param('Destinations.member', [*options['Destinations']]))
|
26
26
|
end
|
27
27
|
if options.has_key?('Source')
|
28
28
|
params['Source'] = options['Source']
|
data/lib/fog/aws/simpledb.rb
CHANGED
@@ -124,8 +124,8 @@ module Fog
|
|
124
124
|
item_index = 0
|
125
125
|
for item_key in items.keys
|
126
126
|
encoded_attributes["Item.#{item_index}.ItemName"] = item_key.to_s
|
127
|
+
attribute_index = 0
|
127
128
|
for attribute_key in items[item_key].keys
|
128
|
-
attribute_index = 0
|
129
129
|
for value in Array(items[item_key][attribute_key])
|
130
130
|
encoded_attributes["Item.#{item_index}.Attribute.#{attribute_index}.Name"] = attribute_key.to_s
|
131
131
|
if replace_attributes[item_key].include?(attribute_key)
|
@@ -134,8 +134,8 @@ module Fog
|
|
134
134
|
encoded_attributes["Item.#{item_index}.Attribute.#{attribute_index}.Value"] = sdb_encode(value)
|
135
135
|
attribute_index += 1
|
136
136
|
end
|
137
|
-
item_index += 1
|
138
137
|
end
|
138
|
+
item_index += 1
|
139
139
|
end
|
140
140
|
end
|
141
141
|
encoded_attributes
|
data/lib/fog/bin.rb
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
class StormOnDemand < Fog::Bin
|
2
|
+
class << self
|
3
|
+
|
4
|
+
def class_for(key)
|
5
|
+
case key
|
6
|
+
when :compute
|
7
|
+
Fog::StormOnDemand::Compute
|
8
|
+
else
|
9
|
+
raise ArgumentError, "Unsupported #{self} service: #{key}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def [](service)
|
14
|
+
@@connections ||= Hash.new do |hash, key|
|
15
|
+
hash[key] = case key
|
16
|
+
when :compute
|
17
|
+
Fog::Compute.new(:provider => 'StormOnDemand')
|
18
|
+
else
|
19
|
+
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
@@connections[service]
|
23
|
+
end
|
24
|
+
|
25
|
+
def services
|
26
|
+
Fog::StormOnDemand.services
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -21,31 +21,31 @@ module Fog
|
|
21
21
|
def end_element(name)
|
22
22
|
case name
|
23
23
|
when 'AwsAccountNumber'
|
24
|
-
@response['DistributionConfig']['TrustedSigners'] <<
|
24
|
+
@response['DistributionConfig']['TrustedSigners'] << value
|
25
25
|
when 'Bucket', 'Prefix'
|
26
|
-
@response['DistributionConfig']['Logging'][name] =
|
26
|
+
@response['DistributionConfig']['Logging'][name] = value
|
27
27
|
when 'CNAME'
|
28
|
-
@response['DistributionConfig']['CNAME'] <<
|
28
|
+
@response['DistributionConfig']['CNAME'] << value
|
29
29
|
when 'DNSName', 'OriginAccessIdentity', 'OriginProtocolPolicy'
|
30
|
-
@response['DistributionConfig'][@origin][name] =
|
30
|
+
@response['DistributionConfig'][@origin][name] = value
|
31
31
|
when 'DomainName', 'Id', 'Status'
|
32
|
-
@response[name] =
|
32
|
+
@response[name] = value
|
33
33
|
when 'CallerReference', 'Comment', 'DefaultRootObject', 'Origin', 'OriginAccessIdentity'
|
34
|
-
@response['DistributionConfig'][name] =
|
34
|
+
@response['DistributionConfig'][name] = value
|
35
35
|
when 'Enabled'
|
36
|
-
if
|
36
|
+
if value == 'true'
|
37
37
|
@response['DistributionConfig'][name] = true
|
38
38
|
else
|
39
39
|
@response['DistributionConfig'][name] = false
|
40
40
|
end
|
41
41
|
when 'HTTPPort', 'HTTPSPort'
|
42
|
-
@response['DistributionConfig'][@origin][name] =
|
42
|
+
@response['DistributionConfig'][@origin][name] = value.to_i
|
43
43
|
when 'InProgressInvalidationBatches'
|
44
|
-
@response[name] =
|
44
|
+
@response[name] = value.to_i
|
45
45
|
when 'LastModifiedTime'
|
46
|
-
@response[name] = Time.parse(
|
46
|
+
@response[name] = Time.parse(value)
|
47
47
|
when 'Protocol'
|
48
|
-
@response['DistributionConfig']['RequireProtocols'] =
|
48
|
+
@response['DistributionConfig']['RequireProtocols'] = value
|
49
49
|
when 'Self'
|
50
50
|
@response['DistributionConfig']['TrustedSigners'] << 'Self'
|
51
51
|
end
|
@@ -25,31 +25,31 @@ module Fog
|
|
25
25
|
@response['DistributionSummary'] << @distribution_summary
|
26
26
|
@distribution_summary = { 'CNAME' => [], 'TrustedSigners' => [] }
|
27
27
|
when 'Comment', 'DomainName', 'Id', 'Origin', 'Status'
|
28
|
-
@distribution_summary[name] =
|
28
|
+
@distribution_summary[name] = value
|
29
29
|
when 'CNAME'
|
30
|
-
@distribution_summary[name] <<
|
30
|
+
@distribution_summary[name] << value
|
31
31
|
when 'DNSName', 'OriginAccessIdentity', 'OriginProtocolPolicy'
|
32
|
-
@distribution_summary[@origin][name] =
|
32
|
+
@distribution_summary[@origin][name] = value
|
33
33
|
when 'Enabled'
|
34
|
-
if
|
34
|
+
if value == 'true'
|
35
35
|
@distribution_summary[name] = true
|
36
36
|
else
|
37
37
|
@distribution_summary[name] = false
|
38
38
|
end
|
39
39
|
when 'HTTPPort', 'HTTPSPort'
|
40
|
-
@distribution_summary[@origin][name] =
|
40
|
+
@distribution_summary[@origin][name] = value.to_i
|
41
41
|
when 'LastModifiedTime'
|
42
|
-
@distribution_summary[name] = Time.parse(
|
42
|
+
@distribution_summary[name] = Time.parse(value)
|
43
43
|
when 'IsTruncated'
|
44
|
-
if
|
44
|
+
if value == 'true'
|
45
45
|
@response[name] = true
|
46
46
|
else
|
47
47
|
@response[name] = false
|
48
48
|
end
|
49
49
|
when 'Marker', 'NextMarker'
|
50
|
-
@response[name] =
|
50
|
+
@response[name] = value
|
51
51
|
when 'MaxItems'
|
52
|
-
@response[name] =
|
52
|
+
@response[name] = value.to_i
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -12,11 +12,11 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'CallerReference'
|
15
|
-
@response['InvalidationBatch'][name] =
|
15
|
+
@response['InvalidationBatch'][name] = value
|
16
16
|
when 'CreateTime', 'Id', 'Status'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
when 'Path'
|
19
|
-
@response['InvalidationBatch'][name] <<
|
19
|
+
@response['InvalidationBatch'][name] << value
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/lib/fog/compute.rb
CHANGED
@@ -31,6 +31,9 @@ module Fog
|
|
31
31
|
when 'Slicehost'
|
32
32
|
require 'fog/compute/slicehost'
|
33
33
|
Fog::Slicehost::Compute.new(attributes)
|
34
|
+
when 'StormOnDemand'
|
35
|
+
require 'fog/compute/storm_on_demand'
|
36
|
+
Fog::StormOnDemand::Compute.new(attributes)
|
34
37
|
when 'VirtualBox'
|
35
38
|
require 'fog/compute/virtual_box'
|
36
39
|
Fog::VirtualBox::Compute.new(attributes)
|
data/lib/fog/compute/aws.rb
CHANGED
@@ -188,7 +188,8 @@ module Fog
|
|
188
188
|
#
|
189
189
|
# ==== Parameters
|
190
190
|
# * options<~Hash> - config arguments for connection. Defaults to {}.
|
191
|
-
# * region<~String> - optional region to use, in
|
191
|
+
# * region<~String> - optional region to use, in
|
192
|
+
# ['eu-west-1', 'us-east-1', 'us-west-1', 'ap-northeast-1', 'ap-southeast-1']
|
192
193
|
#
|
193
194
|
# ==== Returns
|
194
195
|
# * EC2 object with connection to aws.
|
@@ -205,6 +206,8 @@ module Fog
|
|
205
206
|
@aws_access_key_id = options[:aws_access_key_id]
|
206
207
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
207
208
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
209
|
+
@region = options[:region] ||= 'us-east-1'
|
210
|
+
|
208
211
|
if @endpoint = options[:endpoint]
|
209
212
|
endpoint = URI.parse(@endpoint)
|
210
213
|
@host = endpoint.host
|
@@ -212,7 +215,6 @@ module Fog
|
|
212
215
|
@port = endpoint.port
|
213
216
|
@scheme = endpoint.scheme
|
214
217
|
else
|
215
|
-
options[:region] ||= 'us-east-1'
|
216
218
|
@host = options[:host] || case options[:region]
|
217
219
|
when 'ap-northeast-1'
|
218
220
|
'ec2.ap-northeast-1.amazonaws.com'
|
@@ -42,8 +42,22 @@ module Fog
|
|
42
42
|
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
43
43
|
|
44
44
|
def initialize(attributes={})
|
45
|
-
self.groups
|
46
|
-
self.flavor_id
|
45
|
+
self.groups ||= ["default"] unless attributes[:subnet_id]
|
46
|
+
self.flavor_id ||= 't1.micro'
|
47
|
+
self.image_id ||= begin
|
48
|
+
case attributes[:connection].instance_variable_get(:@region) # Ubuntu 10.04 LTS 64bit (EBS)
|
49
|
+
when 'ap-northeast-1'
|
50
|
+
'ami-5e0fa45f'
|
51
|
+
when 'ap-southeast-1'
|
52
|
+
'ami-f092eca2'
|
53
|
+
when 'eu-west-1'
|
54
|
+
'ami-3d1f2b49'
|
55
|
+
when 'us-east-1'
|
56
|
+
'ami-3202f25b'
|
57
|
+
when 'us-west-1'
|
58
|
+
'ami-f5bfefb0'
|
59
|
+
end
|
60
|
+
end
|
47
61
|
super
|
48
62
|
end
|
49
63
|
|
@@ -21,11 +21,12 @@ module Fog
|
|
21
21
|
attribute :storage
|
22
22
|
attribute :template
|
23
23
|
|
24
|
-
attr_accessor :password
|
24
|
+
attr_accessor :password, :lb_applications, :lb_services, :lb_backends
|
25
25
|
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
26
26
|
|
27
27
|
def initialize(attributes={})
|
28
|
-
self.flavor_id
|
28
|
+
self.flavor_id ||= '94fd37a7-2606-47f7-84d5-9000deda52ae' # Block 1GB Virtual Server
|
29
|
+
self.image_id ||= '03807e08-a13d-44e4-b011-ebec7ef2c928' # Ubuntu LTS 10.04 64bit
|
29
30
|
super
|
30
31
|
end
|
31
32
|
|
@@ -92,6 +93,14 @@ module Fog
|
|
92
93
|
options['password'] = password if @password
|
93
94
|
end
|
94
95
|
|
96
|
+
if @lb_backends
|
97
|
+
options['lb_backends'] = lb_backends
|
98
|
+
elsif @lb_services
|
99
|
+
options['lb_services'] = lb_services
|
100
|
+
elsif @lb_applications
|
101
|
+
options['lb_applications'] = lb_applications
|
102
|
+
end
|
103
|
+
|
95
104
|
options['username'] = username
|
96
105
|
data = connection.create_block(flavor_id, image_id, options)
|
97
106
|
merge_attributes(data.body)
|
@@ -28,6 +28,12 @@ module Fog
|
|
28
28
|
attribute :cloud_ips
|
29
29
|
attribute :interfaces
|
30
30
|
|
31
|
+
def initialize(attributes={})
|
32
|
+
self.flavor_id ||= 'typ-4nssg' # Nano
|
33
|
+
self.image_id ||= 'img-2ab98' # Ubuntu Lucid 10.04 server (i686)
|
34
|
+
super
|
35
|
+
end
|
36
|
+
|
31
37
|
def snapshot
|
32
38
|
requires :identity
|
33
39
|
connection.snapshot_server(identity)
|
@@ -37,7 +37,9 @@ module Fog
|
|
37
37
|
private
|
38
38
|
|
39
39
|
def _resource_entities
|
40
|
-
connection.get_vdc(href).body[:ResourceEntities]
|
40
|
+
if Hash === resource_entities = connection.get_vdc(href).body[:ResourceEntities]
|
41
|
+
resource_entities[:ResourceEntity]
|
42
|
+
end
|
41
43
|
end
|
42
44
|
|
43
45
|
def _vapps
|
@@ -22,7 +22,8 @@ module Fog
|
|
22
22
|
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
23
23
|
|
24
24
|
def initialize(attributes={})
|
25
|
-
self.flavor_id
|
25
|
+
self.flavor_id ||= 1 # 256 server
|
26
|
+
self.image_id ||= 49 # Ubuntu 10.04 LTS 64bit
|
26
27
|
super
|
27
28
|
end
|
28
29
|
|