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
data/lib/fog/core/credentials.rb
CHANGED
@@ -36,7 +36,7 @@ module Fog
|
|
36
36
|
@credentials ||= begin
|
37
37
|
if credentials_path && File.exists?(credentials_path)
|
38
38
|
credentials = self.symbolize_credentials(YAML.load_file(credentials_path))
|
39
|
-
(credentials && credentials[credential])
|
39
|
+
(credentials && credentials[credential]) || Fog::Errors.missing_credentials
|
40
40
|
else
|
41
41
|
{}
|
42
42
|
end
|
@@ -53,55 +53,4 @@ module Fog
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
private
|
57
|
-
|
58
|
-
# @return [String] The error message that will be raised, if credentials cannot be found
|
59
|
-
def self.missing_credentials
|
60
|
-
<<-YML
|
61
|
-
Missing Credentials
|
62
|
-
|
63
|
-
To run as '#{credential}', add the following to your resource config file: #{credentials_path}
|
64
|
-
An alternate file may be used by placing its path in the FOG_RC environment variable
|
65
|
-
|
66
|
-
#######################################################
|
67
|
-
# Fog Credentials File
|
68
|
-
#
|
69
|
-
# Key-value pairs should look like:
|
70
|
-
# :aws_access_key_id: 022QF06E7MXBSAMPLE
|
71
|
-
:#{credential}:
|
72
|
-
:aws_access_key_id:
|
73
|
-
:aws_secret_access_key:
|
74
|
-
:bluebox_api_key:
|
75
|
-
:bluebox_customer_id:
|
76
|
-
:brightbox_client_id:
|
77
|
-
:brightbox_secret:
|
78
|
-
:go_grid_api_key:
|
79
|
-
:go_grid_shared_secret:
|
80
|
-
:google_storage_access_key_id:
|
81
|
-
:google_storage_secret_access_key:
|
82
|
-
:linode_api_key:
|
83
|
-
:local_root:
|
84
|
-
:new_servers_password:
|
85
|
-
:new_servers_username:
|
86
|
-
:public_key_path:
|
87
|
-
:private_key_path:
|
88
|
-
:rackspace_api_key:
|
89
|
-
:rackspace_username:
|
90
|
-
:rackspace_servicenet:
|
91
|
-
:rackspace_cdn_ssl:
|
92
|
-
:slicehost_password:
|
93
|
-
:terremark_username:
|
94
|
-
:terremark_password:
|
95
|
-
:voxel_api_key:
|
96
|
-
:voxel_api_secret:
|
97
|
-
:zerigo_email:
|
98
|
-
:zerigo_token:
|
99
|
-
:dnsimple_email:
|
100
|
-
:dnsimple_password:
|
101
|
-
#
|
102
|
-
# End of Fog Credentials File
|
103
|
-
#######################################################
|
104
|
-
|
105
|
-
YML
|
106
|
-
end
|
107
56
|
end
|
data/lib/fog/core/errors.rb
CHANGED
@@ -16,5 +16,58 @@ module Fog
|
|
16
16
|
|
17
17
|
class NotFound < Fog::Errors::Error; end
|
18
18
|
|
19
|
+
# @return [String] The error message that will be raised, if credentials cannot be found
|
20
|
+
def self.missing_credentials
|
21
|
+
missing_credentials_message = <<-YML
|
22
|
+
Missing Credentials
|
23
|
+
|
24
|
+
To run as '#{Fog.credential}', add the following to your resource config file: #{Fog.credentials_path}
|
25
|
+
An alternate file may be used by placing its path in the FOG_RC environment variable
|
26
|
+
|
27
|
+
#######################################################
|
28
|
+
# Fog Credentials File
|
29
|
+
#
|
30
|
+
# Key-value pairs should look like:
|
31
|
+
# :aws_access_key_id: 022QF06E7MXBSAMPLE
|
32
|
+
:#{Fog.credential}:
|
33
|
+
:aws_access_key_id:
|
34
|
+
:aws_secret_access_key:
|
35
|
+
:bluebox_api_key:
|
36
|
+
:bluebox_customer_id:
|
37
|
+
:brightbox_client_id:
|
38
|
+
:brightbox_secret:
|
39
|
+
:go_grid_api_key:
|
40
|
+
:go_grid_shared_secret:
|
41
|
+
:google_storage_access_key_id:
|
42
|
+
:google_storage_secret_access_key:
|
43
|
+
:linode_api_key:
|
44
|
+
:local_root:
|
45
|
+
:new_servers_password:
|
46
|
+
:new_servers_username:
|
47
|
+
:public_key_path:
|
48
|
+
:private_key_path:
|
49
|
+
:rackspace_api_key:
|
50
|
+
:rackspace_username:
|
51
|
+
:rackspace_servicenet:
|
52
|
+
:rackspace_cdn_ssl:
|
53
|
+
:slicehost_password:
|
54
|
+
:stormondemand_username:
|
55
|
+
:stormondemand_password:
|
56
|
+
:terremark_username:
|
57
|
+
:terremark_password:
|
58
|
+
:voxel_api_key:
|
59
|
+
:voxel_api_secret:
|
60
|
+
:zerigo_email:
|
61
|
+
:zerigo_token:
|
62
|
+
:dnsimple_email:
|
63
|
+
:dnsimple_password:
|
64
|
+
#
|
65
|
+
# End of Fog Credentials File
|
66
|
+
#######################################################
|
67
|
+
|
68
|
+
YML
|
69
|
+
raise(LoadError.new(missing_credentials_message))
|
70
|
+
end
|
71
|
+
|
19
72
|
end
|
20
73
|
end
|
data/lib/fog/core/model.rb
CHANGED
@@ -25,11 +25,16 @@ module Fog
|
|
25
25
|
|
26
26
|
def reload
|
27
27
|
requires :identity
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
|
29
|
+
return unless data = begin
|
30
|
+
collection.get(identity)
|
31
|
+
rescue Excon::Errors::SocketError
|
32
|
+
nil
|
32
33
|
end
|
34
|
+
|
35
|
+
new_attributes = data.attributes
|
36
|
+
merge_attributes(new_attributes)
|
37
|
+
self
|
33
38
|
end
|
34
39
|
|
35
40
|
def to_json
|
@@ -39,8 +44,8 @@ module Fog
|
|
39
44
|
|
40
45
|
def wait_for(timeout=600, interval=1, &block)
|
41
46
|
reload
|
47
|
+
retries = 3
|
42
48
|
Fog.wait_for(timeout, interval) do
|
43
|
-
retries = 3
|
44
49
|
if reload
|
45
50
|
retries = 3
|
46
51
|
elsif retries > 0
|
data/lib/fog/core/parser.rb
CHANGED
@@ -10,20 +10,25 @@ module Fog
|
|
10
10
|
reset
|
11
11
|
end
|
12
12
|
|
13
|
+
def attr_value(name, attrs)
|
14
|
+
(entry = attrs.detect {|a, v| a == name }) && entry.last
|
15
|
+
end
|
16
|
+
|
13
17
|
def reset
|
14
18
|
@response = {}
|
15
19
|
end
|
16
20
|
|
17
21
|
def characters(string)
|
18
|
-
@value
|
22
|
+
@value ||= ''
|
23
|
+
@value << string
|
19
24
|
end
|
20
25
|
|
21
26
|
def start_element(name, attrs = [])
|
22
27
|
@value = nil
|
23
28
|
end
|
24
29
|
|
25
|
-
def
|
26
|
-
|
30
|
+
def value
|
31
|
+
@value && @value.dup
|
27
32
|
end
|
28
33
|
|
29
34
|
end
|
@@ -12,9 +12,9 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'Id'
|
15
|
-
@response[name] =
|
15
|
+
@response[name] = value.sub('/change/', '')
|
16
16
|
when 'Status', 'SubmittedAt'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -17,9 +17,9 @@ module Fog
|
|
17
17
|
if @section == :hosted_zone
|
18
18
|
case name
|
19
19
|
when 'Id'
|
20
|
-
@hosted_zone[name] =
|
20
|
+
@hosted_zone[name] = value.sub('/hostedzone/', '')
|
21
21
|
when 'Name', 'CallerReference', 'Comment'
|
22
|
-
@hosted_zone[name]=
|
22
|
+
@hosted_zone[name]= value
|
23
23
|
when 'HostedZone'
|
24
24
|
@response['HostedZone'] = @hosted_zone
|
25
25
|
@hosted_zone = {}
|
@@ -28,9 +28,9 @@ module Fog
|
|
28
28
|
elsif @section == :change_info
|
29
29
|
case name
|
30
30
|
when 'Id'
|
31
|
-
@change_info[name]=
|
31
|
+
@change_info[name]= value.sub('/change/', '')
|
32
32
|
when 'Status', 'SubmittedAt'
|
33
|
-
@change_info[name] =
|
33
|
+
@change_info[name] = value
|
34
34
|
when 'ChangeInfo'
|
35
35
|
@response['ChangeInfo'] = @change_info
|
36
36
|
@change_info = {}
|
@@ -39,7 +39,7 @@ module Fog
|
|
39
39
|
elsif @section == :name_servers
|
40
40
|
case name
|
41
41
|
when 'NameServer'
|
42
|
-
@name_servers <<
|
42
|
+
@name_servers << value
|
43
43
|
when 'NameServers'
|
44
44
|
@response['NameServers'] = @name_servers
|
45
45
|
@name_servers = {}
|
@@ -12,9 +12,9 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'Id'
|
15
|
-
@response[name] =
|
15
|
+
@response[name] = value.sub('/change/', '')
|
16
16
|
when 'Status', 'SubmittedAt'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -16,9 +16,9 @@ module Fog
|
|
16
16
|
if @section == :hosted_zone
|
17
17
|
case name
|
18
18
|
when 'Id'
|
19
|
-
@hosted_zone[name]=
|
19
|
+
@hosted_zone[name]= value.sub('/hostedzone/', '')
|
20
20
|
when 'Name', 'CallerReference', 'Comment'
|
21
|
-
@hosted_zone[name]=
|
21
|
+
@hosted_zone[name]= value
|
22
22
|
when 'HostedZone'
|
23
23
|
@response['HostedZone'] = @hosted_zone
|
24
24
|
@hosted_zone = {}
|
@@ -27,7 +27,7 @@ module Fog
|
|
27
27
|
elsif @section == :name_servers
|
28
28
|
case name
|
29
29
|
when 'NameServer'
|
30
|
-
@name_servers <<
|
30
|
+
@name_servers << value
|
31
31
|
when 'NameServers'
|
32
32
|
@response['NameServers'] = @name_servers
|
33
33
|
@name_servers = {}
|
@@ -14,18 +14,18 @@ module Fog
|
|
14
14
|
def end_element(name)
|
15
15
|
case name
|
16
16
|
when 'Id'
|
17
|
-
@zone[name] =
|
17
|
+
@zone[name] = value.sub('/hostedzone/', '')
|
18
18
|
when 'Name', 'CallerReference', 'Comment'
|
19
|
-
@zone[name] =
|
19
|
+
@zone[name] = value
|
20
20
|
when 'HostedZone'
|
21
21
|
@hosted_zones << @zone
|
22
22
|
@zone = {}
|
23
23
|
when 'HostedZones'
|
24
24
|
@response['HostedZones'] = @hosted_zones
|
25
25
|
when 'MaxItems'
|
26
|
-
@response[name] =
|
26
|
+
@response[name] = value.to_i
|
27
27
|
when 'IsTruncated', 'Marker', 'NextMarker'
|
28
|
-
@response[name] =
|
28
|
+
@response[name] = value
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -18,9 +18,9 @@ module Fog
|
|
18
18
|
if @section == :resource_record_set
|
19
19
|
case name
|
20
20
|
when 'Name', 'Type', 'TTL'
|
21
|
-
@resource_record_set[name] =
|
21
|
+
@resource_record_set[name] = value
|
22
22
|
when 'Value'
|
23
|
-
@resource_record_set['ResourceRecords'] <<
|
23
|
+
@resource_record_set['ResourceRecords'] << value
|
24
24
|
when 'ResourceRecordSet'
|
25
25
|
@response['ResourceRecordSets'] << @resource_record_set
|
26
26
|
@resource_record_set = {}
|
@@ -31,9 +31,9 @@ module Fog
|
|
31
31
|
elsif @section == :main
|
32
32
|
case name
|
33
33
|
when 'MaxItems'
|
34
|
-
@response[name]=
|
34
|
+
@response[name]= value.to_i
|
35
35
|
when 'IsTruncated', 'NextRecordName', 'NextRecordType'
|
36
|
-
@response[name]=
|
36
|
+
@response[name]= value
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -12,9 +12,9 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'serial', 'ttl', 'retry', 'refresh', 'minimum', 'record-count', 'expires'
|
15
|
-
@response[name] =
|
15
|
+
@response[name] = value.to_i
|
16
16
|
when 'name', 'id'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -12,9 +12,9 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'serial', 'ttl', 'retry', 'refresh', 'minimum', 'record-count', 'expires'
|
15
|
-
@response[name] =
|
15
|
+
@response[name] = value.to_i
|
16
16
|
when 'name', 'id'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -11,9 +11,9 @@ module Fog
|
|
11
11
|
def end_element(name)
|
12
12
|
case name
|
13
13
|
when 'serial', 'ttl', 'retry', 'expires', 'record-count', 'refresh', 'minimum'
|
14
|
-
@response[name] =
|
14
|
+
@response[name] = value.to_i
|
15
15
|
when 'name', 'id'
|
16
|
-
@response[name] =
|
16
|
+
@response[name] = value
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -13,9 +13,9 @@ module Fog
|
|
13
13
|
def end_element(name)
|
14
14
|
case name
|
15
15
|
when 'serial', 'ttl', 'retry', 'expires', 'record-count', 'refresh', 'minimum'
|
16
|
-
@zone[name] =
|
16
|
+
@zone[name] = value.to_i
|
17
17
|
when 'name', 'id'
|
18
|
-
@zone[name] =
|
18
|
+
@zone[name] = value
|
19
19
|
when 'record'
|
20
20
|
@response['zones'] << @zone
|
21
21
|
@zone = {}
|
@@ -12,9 +12,9 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'zone-id', 'ttl', 'id'
|
15
|
-
@response[name] =
|
15
|
+
@response[name] = value.to_i
|
16
16
|
when 'record-type', 'name', 'data', 'active', 'aux'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -12,9 +12,9 @@ module Fog
|
|
12
12
|
def end_element(name)
|
13
13
|
case name
|
14
14
|
when 'zone-id', 'ttl'
|
15
|
-
@response[name] =
|
15
|
+
@response[name] = value.to_i
|
16
16
|
when 'record-type', 'name', 'data', 'active', 'aux'
|
17
|
-
@response[name] =
|
17
|
+
@response[name] = value
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|