fog-maestrodev 1.7.0.20121114190951 → 1.8.0.20130109172219
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -2
- data/README.md +48 -37
- data/RELEASE.md +39 -0
- data/Rakefile +48 -312
- data/bin/fog +4 -0
- data/changelog.txt +153 -0
- data/docs/storage/aws.markdown +21 -0
- data/fog.gemspec +3 -3
- data/lib/fog.rb +0 -5
- data/lib/fog/atmos/models/storage/directories.rb +2 -2
- data/lib/fog/atmos/models/storage/directory.rb +11 -11
- data/lib/fog/atmos/models/storage/file.rb +8 -8
- data/lib/fog/atmos/models/storage/files.rb +3 -3
- data/lib/fog/aws.rb +1 -0
- data/lib/fog/aws/auto_scaling.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +1 -1
- data/lib/fog/aws/compute.rb +4 -2
- data/lib/fog/aws/dynamodb.rb +30 -64
- data/lib/fog/aws/elb.rb +1 -1
- data/lib/fog/aws/glacier.rb +1 -1
- data/lib/fog/aws/iam.rb +1 -0
- data/lib/fog/aws/models/auto_scaling/activities.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/activity.rb +1 -1
- data/lib/fog/aws/models/auto_scaling/configuration.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/configurations.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/group.rb +13 -13
- data/lib/fog/aws/models/auto_scaling/groups.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/instance.rb +5 -5
- data/lib/fog/aws/models/auto_scaling/instances.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/policies.rb +2 -2
- data/lib/fog/aws/models/auto_scaling/policy.rb +2 -2
- data/lib/fog/aws/models/beanstalk/application.rb +7 -7
- data/lib/fog/aws/models/beanstalk/applications.rb +2 -2
- data/lib/fog/aws/models/beanstalk/environment.rb +10 -10
- data/lib/fog/aws/models/beanstalk/environments.rb +2 -2
- data/lib/fog/aws/models/beanstalk/events.rb +1 -1
- data/lib/fog/aws/models/beanstalk/template.rb +5 -5
- data/lib/fog/aws/models/beanstalk/templates.rb +3 -3
- data/lib/fog/aws/models/beanstalk/version.rb +6 -6
- data/lib/fog/aws/models/beanstalk/versions.rb +2 -2
- data/lib/fog/aws/models/cdn/distribution.rb +4 -4
- data/lib/fog/aws/models/cdn/distributions.rb +2 -2
- data/lib/fog/aws/models/cdn/invalidation.rb +2 -2
- data/lib/fog/aws/models/cdn/invalidations.rb +2 -2
- data/lib/fog/aws/models/cdn/streaming_distribution.rb +3 -3
- data/lib/fog/aws/models/cdn/streaming_distributions.rb +2 -2
- data/lib/fog/aws/models/cloud_watch/alarm.rb +2 -2
- data/lib/fog/aws/models/cloud_watch/alarm_data.rb +9 -9
- data/lib/fog/aws/models/cloud_watch/alarm_datum.rb +3 -3
- data/lib/fog/aws/models/cloud_watch/alarm_histories.rb +1 -1
- data/lib/fog/aws/models/cloud_watch/alarms.rb +7 -7
- data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +2 -2
- data/lib/fog/aws/models/cloud_watch/metric_statistics.rb +3 -3
- data/lib/fog/aws/models/cloud_watch/metrics.rb +27 -7
- data/lib/fog/aws/models/compute/address.rb +9 -9
- data/lib/fog/aws/models/compute/addresses.rb +2 -2
- data/lib/fog/aws/models/compute/dhcp_option.rb +3 -3
- data/lib/fog/aws/models/compute/dhcp_options.rb +2 -2
- data/lib/fog/aws/models/compute/flavors.rb +1 -1
- data/lib/fog/aws/models/compute/image.rb +2 -2
- data/lib/fog/aws/models/compute/images.rb +5 -5
- data/lib/fog/aws/models/compute/internet_gateway.rb +4 -4
- data/lib/fog/aws/models/compute/internet_gateways.rb +2 -2
- data/lib/fog/aws/models/compute/key_pair.rb +4 -4
- data/lib/fog/aws/models/compute/key_pairs.rb +2 -2
- data/lib/fog/aws/models/compute/network_interface.rb +3 -3
- data/lib/fog/aws/models/compute/network_interfaces.rb +2 -2
- data/lib/fog/aws/models/compute/security_group.rb +7 -7
- data/lib/fog/aws/models/compute/security_groups.rb +3 -3
- data/lib/fog/aws/models/compute/server.rb +22 -16
- data/lib/fog/aws/models/compute/servers.rb +6 -6
- data/lib/fog/aws/models/compute/snapshot.rb +4 -4
- data/lib/fog/aws/models/compute/snapshots.rb +3 -3
- data/lib/fog/aws/models/compute/spot_request.rb +18 -8
- data/lib/fog/aws/models/compute/spot_requests.rb +11 -11
- data/lib/fog/aws/models/compute/subnet.rb +3 -3
- data/lib/fog/aws/models/compute/subnets.rb +2 -2
- data/lib/fog/aws/models/compute/tag.rb +2 -2
- data/lib/fog/aws/models/compute/tags.rb +3 -3
- data/lib/fog/aws/models/compute/volume.rb +12 -13
- data/lib/fog/aws/models/compute/volumes.rb +2 -2
- data/lib/fog/aws/models/compute/vpc.rb +2 -2
- data/lib/fog/aws/models/compute/vpcs.rb +2 -2
- data/lib/fog/aws/models/dns/record.rb +4 -4
- data/lib/fog/aws/models/dns/records.rb +3 -3
- data/lib/fog/aws/models/dns/zone.rb +3 -3
- data/lib/fog/aws/models/dns/zones.rb +2 -2
- data/lib/fog/aws/models/elasticache/cluster.rb +2 -2
- data/lib/fog/aws/models/elasticache/clusters.rb +2 -2
- data/lib/fog/aws/models/elasticache/parameter_group.rb +2 -2
- data/lib/fog/aws/models/elasticache/parameter_groups.rb +2 -2
- data/lib/fog/aws/models/elasticache/security_group.rb +4 -4
- data/lib/fog/aws/models/elasticache/security_groups.rb +2 -2
- data/lib/fog/aws/models/elb/listener.rb +2 -2
- data/lib/fog/aws/models/elb/load_balancer.rb +19 -19
- data/lib/fog/aws/models/elb/load_balancers.rb +2 -2
- data/lib/fog/aws/models/elb/policy.rb +3 -3
- data/lib/fog/aws/models/glacier/archive.rb +7 -7
- data/lib/fog/aws/models/glacier/job.rb +2 -2
- data/lib/fog/aws/models/glacier/jobs.rb +3 -3
- data/lib/fog/aws/models/glacier/vault.rb +7 -7
- data/lib/fog/aws/models/glacier/vaults.rb +2 -2
- data/lib/fog/aws/models/iam/access_key.rb +8 -8
- data/lib/fog/aws/models/iam/access_keys.rb +7 -7
- data/lib/fog/aws/models/iam/policies.rb +10 -10
- data/lib/fog/aws/models/iam/policy.rb +8 -8
- data/lib/fog/aws/models/iam/user.rb +10 -10
- data/lib/fog/aws/models/iam/users.rb +2 -2
- data/lib/fog/aws/models/rds/parameter.rb +2 -2
- data/lib/fog/aws/models/rds/parameter_group.rb +10 -10
- data/lib/fog/aws/models/rds/parameter_groups.rb +3 -3
- data/lib/fog/aws/models/rds/parameters.rb +2 -2
- data/lib/fog/aws/models/rds/security_group.rb +4 -4
- data/lib/fog/aws/models/rds/security_groups.rb +2 -2
- data/lib/fog/aws/models/rds/server.rb +10 -10
- data/lib/fog/aws/models/rds/servers.rb +3 -3
- data/lib/fog/aws/models/rds/snapshot.rb +3 -3
- data/lib/fog/aws/models/rds/snapshots.rb +3 -3
- data/lib/fog/aws/models/rds/subnet_groups.rb +2 -2
- data/lib/fog/aws/models/storage/directories.rb +2 -2
- data/lib/fog/aws/models/storage/directory.rb +13 -13
- data/lib/fog/aws/models/storage/file.rb +106 -14
- data/lib/fog/aws/models/storage/files.rb +5 -5
- data/lib/fog/aws/models/storage/version.rb +2 -2
- data/lib/fog/aws/models/storage/versions.rb +3 -3
- data/lib/fog/aws/parsers/compute/copy_snapshot.rb +22 -0
- data/lib/fog/aws/parsers/compute/describe_instances.rb +3 -1
- data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
- data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +5 -3
- data/lib/fog/aws/parsers/storage/cors_configuration.rb +41 -0
- data/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +50 -0
- data/lib/fog/aws/rds.rb +2 -2
- data/lib/fog/aws/requests/auto_scaling/resume_processes.rb +10 -1
- data/lib/fog/aws/requests/auto_scaling/suspend_processes.rb +7 -2
- data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +27 -0
- data/lib/fog/aws/requests/compute/copy_snapshot.rb +58 -0
- data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
- data/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +11 -8
- data/lib/fog/aws/requests/compute/modify_volume_attribute.rb +51 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +1 -0
- data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +5 -7
- data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +12 -16
- data/lib/fog/aws/requests/storage/copy_object.rb +19 -20
- data/lib/fog/aws/requests/storage/cors_utils.rb +41 -0
- data/lib/fog/aws/requests/storage/delete_bucket.rb +4 -7
- data/lib/fog/aws/requests/storage/delete_bucket_cors.rb +29 -0
- data/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +4 -7
- data/lib/fog/aws/requests/storage/delete_bucket_policy.rb +5 -8
- data/lib/fog/aws/requests/storage/delete_bucket_website.rb +4 -7
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +167 -0
- data/lib/fog/aws/requests/storage/delete_object.rb +5 -8
- data/lib/fog/aws/requests/storage/get_bucket.rb +25 -28
- data/lib/fog/aws/requests/storage/get_bucket_acl.rb +15 -18
- data/lib/fog/aws/requests/storage/get_bucket_cors.rb +65 -0
- data/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +9 -12
- data/lib/fog/aws/requests/storage/get_bucket_location.rb +5 -8
- data/lib/fog/aws/requests/storage/get_bucket_logging.rb +15 -18
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +37 -43
- data/lib/fog/aws/requests/storage/get_bucket_policy.rb +4 -7
- data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +6 -9
- data/lib/fog/aws/requests/storage/get_bucket_website.rb +9 -11
- data/lib/fog/aws/requests/storage/get_object.rb +17 -20
- data/lib/fog/aws/requests/storage/get_object_acl.rb +18 -21
- data/lib/fog/aws/requests/storage/get_object_http_url.rb +6 -9
- data/lib/fog/aws/requests/storage/get_object_https_url.rb +6 -9
- data/lib/fog/aws/requests/storage/get_object_torrent.rb +15 -18
- data/lib/fog/aws/requests/storage/get_object_url.rb +7 -10
- data/lib/fog/aws/requests/storage/get_request_payment.rb +5 -8
- data/lib/fog/aws/requests/storage/get_service.rb +9 -11
- data/lib/fog/aws/requests/storage/head_object.rb +21 -21
- data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +18 -19
- data/lib/fog/aws/requests/storage/put_bucket_cors.rb +51 -0
- data/lib/fog/aws/signaturev4.rb +1 -1
- data/lib/fog/aws/sqs.rb +1 -1
- data/lib/fog/aws/storage.rb +10 -1
- data/lib/fog/bluebox/models/compute/flavors.rb +2 -2
- data/lib/fog/bluebox/models/compute/image.rb +8 -8
- data/lib/fog/bluebox/models/compute/images.rb +2 -2
- data/lib/fog/bluebox/models/compute/locations.rb +2 -2
- data/lib/fog/bluebox/models/compute/server.rb +10 -10
- data/lib/fog/bluebox/models/compute/servers.rb +2 -2
- data/lib/fog/bluebox/models/dns/record.rb +3 -3
- data/lib/fog/bluebox/models/dns/records.rb +2 -2
- data/lib/fog/bluebox/models/dns/zone.rb +3 -3
- data/lib/fog/bluebox/models/dns/zones.rb +2 -2
- data/lib/fog/bluebox/requests/compute/create_block.rb +3 -5
- data/lib/fog/brightbox/compute.rb +284 -82
- data/lib/fog/brightbox/models/compute/account.rb +9 -3
- data/lib/fog/brightbox/models/compute/accounts.rb +3 -3
- data/lib/fog/brightbox/models/compute/api_client.rb +4 -4
- data/lib/fog/brightbox/models/compute/api_clients.rb +2 -2
- data/lib/fog/brightbox/models/compute/application.rb +2 -2
- data/lib/fog/brightbox/models/compute/applications.rb +3 -3
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +4 -3
- data/lib/fog/brightbox/models/compute/cloud_ips.rb +4 -4
- data/lib/fog/brightbox/models/compute/firewall_policies.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +5 -5
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_rules.rb +2 -2
- data/lib/fog/brightbox/models/compute/flavors.rb +3 -3
- data/lib/fog/brightbox/models/compute/image.rb +3 -3
- data/lib/fog/brightbox/models/compute/images.rb +2 -2
- data/lib/fog/brightbox/models/compute/load_balancer.rb +3 -3
- data/lib/fog/brightbox/models/compute/load_balancers.rb +2 -2
- data/lib/fog/brightbox/models/compute/server.rb +25 -18
- data/lib/fog/brightbox/models/compute/server_group.rb +6 -6
- data/lib/fog/brightbox/models/compute/server_groups.rb +3 -3
- data/lib/fog/brightbox/models/compute/servers.rb +35 -3
- data/lib/fog/brightbox/models/compute/user.rb +1 -1
- data/lib/fog/brightbox/models/compute/users.rb +3 -3
- data/lib/fog/brightbox/models/compute/zones.rb +3 -3
- data/lib/fog/brightbox/oauth2.rb +164 -0
- data/lib/fog/brightbox/requests/compute/activate_console_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +10 -12
- data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +12 -3
- data/lib/fog/brightbox/requests/compute/create_api_client.rb +12 -3
- data/lib/fog/brightbox/requests/compute/create_application.rb +12 -3
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +12 -2
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +14 -3
- data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +18 -3
- data/lib/fog/brightbox/requests/compute/create_image.rb +19 -3
- data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +15 -3
- data/lib/fog/brightbox/requests/compute/create_server.rb +18 -3
- data/lib/fog/brightbox/requests/compute/create_server_group.rb +12 -3
- data/lib/fog/brightbox/requests/compute/destroy_api_client.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_application.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_firewall_policy.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_firewall_rule.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_image.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_load_balancer.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/destroy_server_group.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_account.rb +8 -16
- data/lib/fog/brightbox/requests/compute/get_api_client.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_application.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -4
- data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_image.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_interface.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -6
- data/lib/fog/brightbox/requests/compute/get_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_server_group.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_server_type.rb +10 -3
- data/lib/fog/brightbox/requests/compute/get_user.rb +8 -16
- data/lib/fog/brightbox/requests/compute/get_zone.rb +10 -3
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +7 -3
- data/lib/fog/brightbox/requests/compute/list_api_clients.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_applications.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_images.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_server_groups.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_server_types.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_servers.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_users.rb +9 -3
- data/lib/fog/brightbox/requests/compute/list_zones.rb +9 -3
- data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +12 -3
- data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +11 -13
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +12 -3
- data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +12 -3
- data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +10 -11
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +22 -3
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +18 -0
- data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +14 -2
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +10 -3
- data/lib/fog/brightbox/requests/compute/shutdown_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/start_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/stop_server.rb +10 -3
- data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +10 -3
- data/lib/fog/brightbox/requests/compute/update_account.rb +33 -35
- data/lib/fog/brightbox/requests/compute/update_api_client.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_application.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +14 -3
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +17 -2
- data/lib/fog/brightbox/requests/compute/update_image.rb +18 -3
- data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +16 -3
- data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +13 -20
- data/lib/fog/brightbox/requests/compute/update_server.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_server_group.rb +13 -3
- data/lib/fog/brightbox/requests/compute/update_user.rb +16 -3
- data/lib/fog/clodo/models/compute/images.rb +2 -2
- data/lib/fog/clodo/models/compute/server.rb +7 -7
- data/lib/fog/clodo/models/compute/servers.rb +2 -2
- data/lib/fog/cloudstack/models/compute/flavors.rb +2 -2
- data/lib/fog/cloudstack/models/compute/image.rb +2 -2
- data/lib/fog/cloudstack/models/compute/images.rb +2 -2
- data/lib/fog/cloudstack/models/compute/job.rb +2 -2
- data/lib/fog/cloudstack/models/compute/jobs.rb +2 -2
- data/lib/fog/cloudstack/models/compute/security_group.rb +3 -3
- data/lib/fog/cloudstack/models/compute/security_group_rule.rb +5 -5
- data/lib/fog/cloudstack/models/compute/security_group_rules.rb +1 -1
- data/lib/fog/cloudstack/models/compute/security_groups.rb +2 -2
- data/lib/fog/cloudstack/models/compute/server.rb +14 -12
- data/lib/fog/cloudstack/models/compute/servers.rb +2 -2
- data/lib/fog/cloudstack/models/compute/volume.rb +8 -8
- data/lib/fog/cloudstack/models/compute/volumes.rb +2 -2
- data/lib/fog/cloudstack/models/compute/zone.rb +1 -1
- data/lib/fog/cloudstack/models/compute/zones.rb +2 -2
- data/lib/fog/compute.rb +2 -1
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/attributes.rb +19 -2
- data/lib/fog/core/collection.rb +17 -6
- data/lib/fog/core/connection.rb +1 -0
- data/lib/fog/core/deprecated_connection_accessors.rb +41 -0
- data/lib/fog/core/errors.rb +2 -0
- data/lib/fog/core/json.rb +4 -16
- data/lib/fog/core/model.rb +11 -1
- data/lib/fog/core/service.rb +1 -1
- data/lib/fog/core/wait_for.rb +1 -1
- data/lib/fog/dnsimple/models/dns/record.rb +4 -4
- data/lib/fog/dnsimple/models/dns/records.rb +2 -2
- data/lib/fog/dnsimple/models/dns/zone.rb +3 -3
- data/lib/fog/dnsimple/models/dns/zones.rb +2 -2
- data/lib/fog/dnsmadeeasy/models/dns/record.rb +5 -5
- data/lib/fog/dnsmadeeasy/models/dns/records.rb +2 -2
- data/lib/fog/dnsmadeeasy/models/dns/zone.rb +3 -3
- data/lib/fog/dnsmadeeasy/models/dns/zones.rb +2 -2
- data/lib/fog/dynect/models/dns/record.rb +3 -3
- data/lib/fog/dynect/models/dns/records.rb +2 -2
- data/lib/fog/dynect/models/dns/zone.rb +4 -4
- data/lib/fog/dynect/models/dns/zones.rb +2 -2
- data/lib/fog/ecloud.rb +19 -5
- data/lib/fog/ecloud/compute.rb +663 -351
- data/lib/fog/ecloud/generate_collection.rb +3 -3
- data/lib/fog/ecloud/models/compute/admin_organization.rb +14 -10
- data/lib/fog/ecloud/models/compute/admin_organizations.rb +1 -6
- data/lib/fog/ecloud/models/compute/api_keys.rb +2 -2
- data/lib/fog/ecloud/models/compute/association.rb +3 -3
- data/lib/fog/ecloud/models/compute/associations.rb +2 -2
- data/lib/fog/ecloud/models/compute/authentication_levels.rb +2 -2
- data/lib/fog/ecloud/models/compute/backup_internet_service.rb +7 -7
- data/lib/fog/ecloud/models/compute/backup_internet_services.rb +3 -3
- data/lib/fog/ecloud/models/compute/catalog.rb +2 -2
- data/lib/fog/ecloud/models/compute/catalog_configurations.rb +2 -2
- data/lib/fog/ecloud/models/compute/catalog_item.rb +1 -1
- data/lib/fog/ecloud/models/compute/compute_pool.rb +27 -15
- data/lib/fog/ecloud/models/compute/compute_pools.rb +2 -2
- data/lib/fog/ecloud/models/compute/cpu_usage_detail_summary.rb +2 -2
- data/lib/fog/ecloud/models/compute/detached_disk.rb +27 -0
- data/lib/fog/ecloud/models/compute/detached_disks.rb +31 -0
- data/lib/fog/ecloud/models/compute/environment.rb +27 -20
- data/lib/fog/ecloud/models/compute/environments.rb +2 -2
- data/lib/fog/ecloud/models/compute/firewall_acl.rb +1 -1
- data/lib/fog/ecloud/models/compute/firewall_acls.rb +2 -2
- data/lib/fog/ecloud/models/compute/group.rb +8 -6
- data/lib/fog/ecloud/models/compute/groups.rb +17 -6
- data/lib/fog/ecloud/models/compute/guest_processes.rb +2 -2
- data/lib/fog/ecloud/models/compute/hardware_configuration.rb +4 -4
- data/lib/fog/ecloud/models/compute/hardware_configurations.rb +2 -2
- data/lib/fog/ecloud/models/compute/internet_service.rb +35 -29
- data/lib/fog/ecloud/models/compute/internet_services.rb +11 -8
- data/lib/fog/ecloud/models/compute/ip_address.rb +17 -3
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +7 -2
- data/lib/fog/ecloud/models/compute/layout.rb +1 -1
- data/lib/fog/ecloud/models/compute/layouts.rb +2 -2
- data/lib/fog/ecloud/models/compute/location.rb +1 -1
- data/lib/fog/ecloud/models/compute/locations.rb +2 -2
- data/lib/fog/ecloud/models/compute/login_banners.rb +2 -2
- data/lib/fog/ecloud/models/compute/memory_usage_detail_summary.rb +2 -2
- data/lib/fog/ecloud/models/compute/monitor.rb +4 -4
- data/lib/fog/ecloud/models/compute/monitors.rb +2 -2
- data/lib/fog/ecloud/models/compute/network.rb +22 -12
- data/lib/fog/ecloud/models/compute/networks.rb +9 -5
- data/lib/fog/ecloud/models/compute/node.rb +12 -6
- data/lib/fog/ecloud/models/compute/nodes.rb +7 -4
- data/lib/fog/ecloud/models/compute/operating_system_families.rb +2 -2
- data/lib/fog/ecloud/models/compute/operating_system_family.rb +1 -1
- data/lib/fog/ecloud/models/compute/operating_systems.rb +1 -1
- data/lib/fog/ecloud/models/compute/organization.rb +17 -17
- data/lib/fog/ecloud/models/compute/organizations.rb +3 -3
- data/lib/fog/ecloud/models/compute/password_complexity_rules.rb +2 -2
- data/lib/fog/ecloud/models/compute/physical_devices.rb +2 -2
- data/lib/fog/ecloud/models/compute/public_ip.rb +2 -2
- data/lib/fog/ecloud/models/compute/public_ips.rb +8 -5
- data/lib/fog/ecloud/models/compute/rnat.rb +2 -2
- data/lib/fog/ecloud/models/compute/rnats.rb +2 -2
- data/lib/fog/ecloud/models/compute/roles.rb +2 -2
- data/lib/fog/ecloud/models/compute/row.rb +10 -7
- data/lib/fog/ecloud/models/compute/rows.rb +9 -6
- data/lib/fog/ecloud/models/compute/server.rb +139 -93
- data/lib/fog/ecloud/models/compute/server_configuration_options.rb +2 -2
- data/lib/fog/ecloud/models/compute/servers.rb +18 -15
- data/lib/fog/ecloud/models/compute/ssh_key.rb +1 -1
- data/lib/fog/ecloud/models/compute/ssh_keys.rb +2 -2
- data/lib/fog/ecloud/models/compute/storage_usage_detail_summary.rb +2 -2
- data/lib/fog/ecloud/models/compute/support_tickets.rb +2 -2
- data/lib/fog/ecloud/models/compute/tags.rb +2 -2
- data/lib/fog/ecloud/models/compute/task.rb +3 -0
- data/lib/fog/ecloud/models/compute/tasks.rb +3 -3
- data/lib/fog/ecloud/models/compute/template.rb +8 -9
- data/lib/fog/ecloud/models/compute/templates.rb +2 -2
- data/lib/fog/ecloud/models/compute/trusted_network_group.rb +5 -5
- data/lib/fog/ecloud/models/compute/trusted_network_groups.rb +2 -2
- data/lib/fog/ecloud/models/compute/user.rb +2 -2
- data/lib/fog/ecloud/models/compute/users.rb +2 -2
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +32 -0
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ips.rb +27 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_authentication_levels.rb +1 -2
- data/lib/fog/ecloud/requests/compute/get_admin_organization.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pool.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pools.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_detached_disks.rb +33 -0
- data/lib/fog/ecloud/requests/compute/get_environment.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_group.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_groups.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_hardware_configuration.rb +19 -0
- data/lib/fog/ecloud/requests/compute/get_hardware_configurations.rb +4 -0
- data/lib/fog/ecloud/requests/compute/get_internet_service.rb +12 -0
- data/lib/fog/ecloud/requests/compute/get_internet_services.rb +8 -0
- data/lib/fog/ecloud/requests/compute/get_ip_address.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_layout.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_layouts.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_network.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_networks.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_node.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_nodes.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system_families.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_organization.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_organizations.rb +14 -2
- data/lib/fog/ecloud/requests/compute/get_public_ip.rb +11 -1
- data/lib/fog/ecloud/requests/compute/get_public_ips.rb +22 -0
- data/lib/fog/ecloud/requests/compute/get_row.rb +8 -1
- data/lib/fog/ecloud/requests/compute/get_rows.rb +2 -1
- data/lib/fog/ecloud/requests/compute/get_server.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_servers.rb +32 -1
- data/lib/fog/ecloud/requests/compute/get_ssh_key.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_ssh_keys.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_task.rb +4 -2
- data/lib/fog/ecloud/requests/compute/get_template.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_templates.rb +38 -0
- data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +44 -0
- data/lib/fog/ecloud/requests/compute/groups_delete.rb +16 -1
- data/lib/fog/ecloud/requests/compute/internet_service_create.rb +36 -1
- data/lib/fog/ecloud/requests/compute/internet_service_delete.rb +23 -0
- data/lib/fog/ecloud/requests/compute/node_service_create.rb +49 -1
- data/lib/fog/ecloud/requests/compute/node_service_delete.rb +24 -0
- data/lib/fog/ecloud/requests/compute/rows_delete.rb +11 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_attach_disk.rb +62 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +136 -16
- data/lib/fog/ecloud/requests/compute/virtual_machine_delete.rb +36 -1
- data/lib/fog/ecloud/requests/compute/virtual_machine_detach_disk.rb +71 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_assigned_ips.rb +82 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_hardware_configuration.rb +27 -3
- data/lib/fog/ecloud/requests/compute/virtual_machine_import.rb +120 -6
- data/lib/fog/glesys/models/compute/ip.rb +7 -7
- data/lib/fog/glesys/models/compute/ips.rb +7 -7
- data/lib/fog/glesys/models/compute/server.rb +6 -6
- data/lib/fog/glesys/models/compute/servers.rb +4 -4
- data/lib/fog/glesys/models/compute/template.rb +1 -1
- data/lib/fog/glesys/models/compute/templates.rb +2 -2
- data/lib/fog/go_grid/models/compute/image.rb +3 -3
- data/lib/fog/go_grid/models/compute/images.rb +2 -2
- data/lib/fog/go_grid/models/compute/password.rb +5 -5
- data/lib/fog/go_grid/models/compute/passwords.rb +3 -3
- data/lib/fog/go_grid/models/compute/server.rb +4 -4
- data/lib/fog/go_grid/models/compute/servers.rb +2 -2
- data/lib/fog/google/models/storage/directories.rb +2 -2
- data/lib/fog/google/models/storage/directory.rb +4 -4
- data/lib/fog/google/models/storage/file.rb +5 -5
- data/lib/fog/google/models/storage/files.rb +4 -4
- data/lib/fog/google/storage.rb +13 -2
- data/lib/fog/hp.rb +6 -3
- data/lib/fog/hp/models/compute/address.rb +8 -8
- data/lib/fog/hp/models/compute/addresses.rb +2 -2
- data/lib/fog/hp/models/compute/flavors.rb +2 -2
- data/lib/fog/hp/models/compute/image.rb +2 -2
- data/lib/fog/hp/models/compute/images.rb +2 -2
- data/lib/fog/hp/models/compute/key_pair.rb +3 -3
- data/lib/fog/hp/models/compute/key_pairs.rb +2 -2
- data/lib/fog/hp/models/compute/security_group.rb +4 -4
- data/lib/fog/hp/models/compute/security_groups.rb +3 -3
- data/lib/fog/hp/models/compute/server.rb +15 -15
- data/lib/fog/hp/models/compute/servers.rb +2 -2
- data/lib/fog/hp/models/storage/directories.rb +3 -3
- data/lib/fog/hp/models/storage/directory.rb +18 -18
- data/lib/fog/hp/models/storage/file.rb +4 -4
- data/lib/fog/hp/models/storage/files.rb +2 -2
- data/lib/fog/ibm/models/compute/address.rb +2 -2
- data/lib/fog/ibm/models/compute/addresses.rb +2 -2
- data/lib/fog/ibm/models/compute/image.rb +3 -3
- data/lib/fog/ibm/models/compute/images.rb +2 -2
- data/lib/fog/ibm/models/compute/key.rb +2 -2
- data/lib/fog/ibm/models/compute/keys.rb +3 -3
- data/lib/fog/ibm/models/compute/locations.rb +2 -2
- data/lib/fog/ibm/models/compute/server.rb +12 -12
- data/lib/fog/ibm/models/compute/servers.rb +2 -2
- data/lib/fog/ibm/models/compute/vlans.rb +2 -2
- data/lib/fog/ibm/models/storage/offerings.rb +1 -1
- data/lib/fog/ibm/models/storage/volume.rb +5 -5
- data/lib/fog/ibm/models/storage/volumes.rb +2 -2
- data/lib/fog/joyent/models/compute/flavors.rb +2 -2
- data/lib/fog/joyent/models/compute/images.rb +2 -2
- data/lib/fog/joyent/models/compute/key.rb +1 -1
- data/lib/fog/joyent/models/compute/keys.rb +3 -3
- data/lib/fog/joyent/models/compute/server.rb +13 -13
- data/lib/fog/joyent/models/compute/servers.rb +3 -3
- data/lib/fog/joyent/models/compute/snapshot.rb +4 -4
- data/lib/fog/joyent/models/compute/snapshots.rb +3 -3
- data/lib/fog/libvirt/compute.rb +6 -1
- data/lib/fog/libvirt/models/compute/interface.rb +1 -1
- data/lib/fog/libvirt/models/compute/interfaces.rb +1 -1
- data/lib/fog/libvirt/models/compute/network.rb +1 -1
- data/lib/fog/libvirt/models/compute/networks.rb +1 -1
- data/lib/fog/libvirt/models/compute/nic.rb +2 -2
- data/lib/fog/libvirt/models/compute/nodes.rb +1 -1
- data/lib/fog/libvirt/models/compute/pool.rb +7 -7
- data/lib/fog/libvirt/models/compute/pools.rb +1 -1
- data/lib/fog/libvirt/models/compute/server.rb +29 -28
- data/lib/fog/libvirt/models/compute/servers.rb +2 -2
- data/lib/fog/libvirt/models/compute/volume.rb +5 -5
- data/lib/fog/libvirt/models/compute/volumes.rb +1 -1
- data/lib/fog/libvirt/requests/compute/list_domains.rb +2 -2
- data/lib/fog/linode/models/compute/data_centers.rb +2 -2
- data/lib/fog/linode/models/compute/disk.rb +7 -7
- data/lib/fog/linode/models/compute/disks.rb +2 -2
- data/lib/fog/linode/models/compute/flavors.rb +2 -2
- data/lib/fog/linode/models/compute/images.rb +2 -2
- data/lib/fog/linode/models/compute/ip.rb +3 -3
- data/lib/fog/linode/models/compute/ips.rb +2 -2
- data/lib/fog/linode/models/compute/kernels.rb +2 -2
- data/lib/fog/linode/models/compute/server.rb +13 -13
- data/lib/fog/linode/models/compute/servers.rb +2 -2
- data/lib/fog/linode/models/compute/stack_scripts.rb +3 -3
- data/lib/fog/linode/models/dns/record.rb +6 -6
- data/lib/fog/linode/models/dns/records.rb +2 -2
- data/lib/fog/linode/models/dns/zone.rb +6 -6
- data/lib/fog/linode/models/dns/zones.rb +2 -2
- data/lib/fog/local/models/storage/directories.rb +3 -3
- data/lib/fog/local/models/storage/directory.rb +2 -2
- data/lib/fog/local/models/storage/file.rb +6 -6
- data/lib/fog/local/models/storage/files.rb +2 -2
- data/lib/fog/ninefold/models/compute/address.rb +5 -5
- data/lib/fog/ninefold/models/compute/addresses.rb +2 -2
- data/lib/fog/ninefold/models/compute/flavors.rb +2 -2
- data/lib/fog/ninefold/models/compute/images.rb +2 -2
- data/lib/fog/ninefold/models/compute/ip_forwarding_rule.rb +3 -3
- data/lib/fog/ninefold/models/compute/ip_forwarding_rules.rb +2 -2
- data/lib/fog/ninefold/models/compute/server.rb +9 -9
- data/lib/fog/ninefold/models/compute/servers.rb +2 -2
- data/lib/fog/openstack.rb +89 -65
- data/lib/fog/openstack/README.identity.md +69 -0
- data/lib/fog/openstack/compute.rb +71 -41
- data/lib/fog/openstack/identity.rb +43 -22
- data/lib/fog/openstack/image.rb +11 -5
- data/lib/fog/openstack/models/compute/address.rb +8 -8
- data/lib/fog/openstack/models/compute/addresses.rb +3 -3
- data/lib/fog/openstack/models/compute/flavor.rb +9 -4
- data/lib/fog/openstack/models/compute/flavors.rb +2 -2
- data/lib/fog/openstack/models/compute/host.rb +3 -2
- data/lib/fog/openstack/models/compute/hosts.rb +2 -2
- data/lib/fog/openstack/models/compute/image.rb +4 -3
- data/lib/fog/openstack/models/compute/images.rb +2 -2
- data/lib/fog/openstack/models/compute/key_pair.rb +3 -3
- data/lib/fog/openstack/models/compute/key_pairs.rb +1 -1
- data/lib/fog/openstack/models/compute/metadata.rb +4 -4
- data/lib/fog/openstack/models/compute/metadatum.rb +2 -2
- data/lib/fog/openstack/models/compute/security_group.rb +5 -5
- data/lib/fog/openstack/models/compute/security_groups.rb +2 -2
- data/lib/fog/openstack/models/compute/server.rb +41 -27
- data/lib/fog/openstack/models/compute/servers.rb +2 -2
- data/lib/fog/openstack/models/compute/snapshot.rb +4 -3
- data/lib/fog/openstack/models/compute/snapshots.rb +2 -2
- data/lib/fog/openstack/models/compute/tenant.rb +1 -1
- data/lib/fog/openstack/models/compute/tenants.rb +7 -3
- data/lib/fog/openstack/models/compute/volume.rb +6 -5
- data/lib/fog/openstack/models/compute/volumes.rb +2 -2
- data/lib/fog/openstack/models/identity/ec2_credential.rb +44 -0
- data/lib/fog/openstack/models/identity/ec2_credentials.rb +53 -0
- data/lib/fog/openstack/models/identity/role.rb +4 -4
- data/lib/fog/openstack/models/identity/roles.rb +2 -2
- data/lib/fog/openstack/models/identity/tenant.rb +7 -7
- data/lib/fog/openstack/models/identity/tenants.rb +3 -3
- data/lib/fog/openstack/models/identity/user.rb +12 -6
- data/lib/fog/openstack/models/identity/users.rb +4 -5
- data/lib/fog/openstack/models/image/image.rb +10 -9
- data/lib/fog/openstack/models/image/images.rb +6 -6
- data/lib/fog/openstack/models/network/network.rb +6 -5
- data/lib/fog/openstack/models/network/networks.rb +3 -3
- data/lib/fog/openstack/models/network/port.rb +6 -5
- data/lib/fog/openstack/models/network/ports.rb +3 -3
- data/lib/fog/openstack/models/network/subnet.rb +6 -5
- data/lib/fog/openstack/models/network/subnets.rb +3 -3
- data/lib/fog/openstack/models/volume/volume.rb +4 -3
- data/lib/fog/openstack/models/volume/volumes.rb +2 -2
- data/lib/fog/openstack/network.rb +5 -3
- data/lib/fog/openstack/requests/compute/create_flavor.rb +4 -1
- data/lib/fog/openstack/requests/compute/create_security_group.rb +3 -2
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -0
- data/lib/fog/openstack/requests/compute/create_server.rb +54 -7
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +2 -0
- data/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +17 -41
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
- data/lib/fog/openstack/requests/compute/release_address.rb +13 -1
- data/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
- data/lib/fog/openstack/requests/identity/add_user_to_tenant.rb +7 -2
- data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +58 -0
- data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_tenant.rb +1 -3
- data/lib/fog/openstack/requests/identity/delete_ec2_credential.rb +44 -0
- data/lib/fog/openstack/requests/identity/get_ec2_credential.rb +49 -0
- data/lib/fog/openstack/requests/identity/get_user_by_name.rb +8 -0
- data/lib/fog/openstack/requests/identity/list_ec2_credentials.rb +44 -0
- data/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +7 -1
- data/lib/fog/openstack/requests/identity/list_users.rb +10 -1
- data/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/identity/update_tenant.rb +1 -3
- data/lib/fog/openstack/requests/image/create_image.rb +3 -1
- data/lib/fog/openstack/volume.rb +6 -3
- data/lib/fog/ovirt/models/compute/cluster.rb +1 -1
- data/lib/fog/ovirt/models/compute/clusters.rb +2 -2
- data/lib/fog/ovirt/models/compute/interfaces.rb +3 -3
- data/lib/fog/ovirt/models/compute/server.rb +15 -15
- data/lib/fog/ovirt/models/compute/servers.rb +2 -2
- data/lib/fog/ovirt/models/compute/template.rb +5 -5
- data/lib/fog/ovirt/models/compute/templates.rb +2 -2
- data/lib/fog/ovirt/models/compute/volumes.rb +3 -3
- data/lib/fog/rackspace.rb +20 -11
- data/lib/fog/rackspace/block_storage.rb +1 -0
- data/lib/fog/rackspace/compute_v2.rb +10 -0
- data/lib/fog/rackspace/load_balancers.rb +2 -0
- data/lib/fog/rackspace/models/block_storage/snapshot.rb +3 -2
- data/lib/fog/rackspace/models/block_storage/snapshots.rb +2 -2
- data/lib/fog/rackspace/models/block_storage/volume.rb +9 -3
- data/lib/fog/rackspace/models/block_storage/volume_types.rb +3 -3
- data/lib/fog/rackspace/models/block_storage/volumes.rb +2 -2
- data/lib/fog/rackspace/models/compute/flavors.rb +2 -2
- data/lib/fog/rackspace/models/compute/image.rb +3 -3
- data/lib/fog/rackspace/models/compute/images.rb +2 -2
- data/lib/fog/rackspace/models/compute/server.rb +7 -7
- data/lib/fog/rackspace/models/compute/servers.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/attachment.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/attachments.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/image.rb +9 -0
- data/lib/fog/rackspace/models/compute_v2/images.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/server.rb +47 -14
- data/lib/fog/rackspace/models/compute_v2/servers.rb +10 -2
- data/lib/fog/rackspace/models/databases/database.rb +2 -2
- data/lib/fog/rackspace/models/databases/databases.rb +1 -1
- data/lib/fog/rackspace/models/databases/flavors.rb +2 -2
- data/lib/fog/rackspace/models/databases/instance.rb +10 -10
- data/lib/fog/rackspace/models/databases/instances.rb +2 -2
- data/lib/fog/rackspace/models/databases/user.rb +2 -2
- data/lib/fog/rackspace/models/databases/users.rb +1 -1
- data/lib/fog/rackspace/models/dns/callback.rb +1 -1
- data/lib/fog/rackspace/models/dns/record.rb +23 -5
- data/lib/fog/rackspace/models/dns/records.rb +2 -2
- data/lib/fog/rackspace/models/dns/zone.rb +5 -5
- data/lib/fog/rackspace/models/dns/zones.rb +2 -2
- data/lib/fog/rackspace/models/identity/credentials.rb +1 -1
- data/lib/fog/rackspace/models/identity/roles.rb +1 -1
- data/lib/fog/rackspace/models/identity/tenants.rb +1 -1
- data/lib/fog/rackspace/models/identity/user.rb +6 -6
- data/lib/fog/rackspace/models/identity/users.rb +3 -3
- data/lib/fog/rackspace/models/load_balancers/access_rule.rb +4 -4
- data/lib/fog/rackspace/models/load_balancers/access_rules.rb +1 -1
- data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +45 -27
- data/lib/fog/rackspace/models/load_balancers/load_balancers.rb +2 -2
- data/lib/fog/rackspace/models/load_balancers/node.rb +4 -4
- data/lib/fog/rackspace/models/load_balancers/nodes.rb +2 -2
- data/lib/fog/rackspace/models/load_balancers/virtual_ip.rb +3 -3
- data/lib/fog/rackspace/models/load_balancers/virtual_ips.rb +1 -1
- data/lib/fog/rackspace/models/storage/directories.rb +2 -2
- data/lib/fog/rackspace/models/storage/directory.rb +12 -12
- data/lib/fog/rackspace/models/storage/file.rb +71 -5
- data/lib/fog/rackspace/models/storage/files.rb +2 -2
- data/lib/fog/rackspace/requests/compute_v2/create_image.rb +41 -0
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +3 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +31 -0
- data/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +34 -0
- data/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +36 -0
- data/lib/fog/rackspace/requests/dns/add_records.rb +5 -1
- data/lib/fog/rackspace/requests/load_balancers/get_content_caching.rb +15 -0
- data/lib/fog/rackspace/requests/load_balancers/set_content_caching.rb +21 -0
- data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +1 -1
- data/lib/fog/serverlove/models/compute/image.rb +11 -11
- data/lib/fog/serverlove/models/compute/images.rb +2 -2
- data/lib/fog/serverlove/models/compute/server.rb +10 -10
- data/lib/fog/serverlove/models/compute/servers.rb +2 -2
- data/lib/fog/storm_on_demand/models/compute/balancer.rb +7 -7
- data/lib/fog/storm_on_demand/models/compute/balancers.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/configs.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/images.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/private_ips.rb +2 -2
- data/lib/fog/storm_on_demand/models/compute/server.rb +5 -5
- data/lib/fog/storm_on_demand/models/compute/servers.rb +2 -2
- data/lib/fog/storm_on_demand/models/compute/stats.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/templates.rb +1 -1
- data/lib/fog/terremark/models/shared/address.rb +1 -1
- data/lib/fog/terremark/models/shared/addresses.rb +5 -5
- data/lib/fog/terremark/models/shared/images.rb +5 -5
- data/lib/fog/terremark/models/shared/internetservice.rb +6 -6
- data/lib/fog/terremark/models/shared/internetservices.rb +5 -5
- data/lib/fog/terremark/models/shared/network.rb +1 -1
- data/lib/fog/terremark/models/shared/networks.rb +6 -6
- data/lib/fog/terremark/models/shared/nodeservice.rb +3 -3
- data/lib/fog/terremark/models/shared/nodeservices.rb +4 -4
- data/lib/fog/terremark/models/shared/server.rb +17 -17
- data/lib/fog/terremark/models/shared/servers.rb +6 -6
- data/lib/fog/terremark/models/shared/task.rb +4 -4
- data/lib/fog/terremark/models/shared/tasks.rb +5 -5
- data/lib/fog/terremark/models/shared/vdc.rb +4 -4
- data/lib/fog/terremark/models/shared/vdcs.rb +5 -5
- data/lib/fog/terremark/parser.rb +1 -1
- data/lib/fog/terremark/shared.rb +1 -1
- data/lib/fog/vcloud/compute.rb +4 -4
- data/lib/fog/vcloud/models/compute/catalog.rb +1 -1
- data/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
- data/lib/fog/vcloud/models/compute/catalog_items.rb +4 -4
- data/lib/fog/vcloud/models/compute/catalogs.rb +3 -3
- data/lib/fog/vcloud/models/compute/ip.rb +1 -1
- data/lib/fog/vcloud/models/compute/ips.rb +3 -3
- data/lib/fog/vcloud/models/compute/network.rb +1 -1
- data/lib/fog/vcloud/models/compute/networks.rb +6 -6
- data/lib/fog/vcloud/models/compute/organization.rb +4 -4
- data/lib/fog/vcloud/models/compute/organizations.rb +4 -4
- data/lib/fog/vcloud/models/compute/server.rb +13 -13
- data/lib/fog/vcloud/models/compute/servers.rb +4 -4
- data/lib/fog/vcloud/models/compute/tasks.rb +3 -3
- data/lib/fog/vcloud/models/compute/vapp.rb +2 -2
- data/lib/fog/vcloud/models/compute/vapps.rb +2 -2
- data/lib/fog/vcloud/models/compute/vdc.rb +2 -2
- data/lib/fog/vcloud/models/compute/vdcs.rb +3 -3
- data/lib/fog/version.rb +3 -0
- data/lib/fog/virtual_box/compute.rb +11 -5
- data/lib/fog/virtual_box/models/compute/medium.rb +2 -2
- data/lib/fog/virtual_box/models/compute/mediums.rb +4 -4
- data/lib/fog/virtual_box/models/compute/nat_engine.rb +2 -2
- data/lib/fog/virtual_box/models/compute/network_adapter.rb +1 -1
- data/lib/fog/virtual_box/models/compute/network_adapters.rb +1 -1
- data/lib/fog/virtual_box/models/compute/server.rb +5 -5
- data/lib/fog/virtual_box/models/compute/servers.rb +2 -2
- data/lib/fog/vmfusion/compute.rb +6 -1
- data/lib/fog/vmfusion/models/compute/server.rb +1 -1
- data/lib/fog/voxel/models/compute/images.rb +2 -2
- data/lib/fog/voxel/models/compute/server.rb +6 -6
- data/lib/fog/voxel/models/compute/servers.rb +2 -2
- data/lib/fog/vsphere/compute.rb +78 -9
- data/lib/fog/vsphere/models/compute/cluster.rb +31 -0
- data/lib/fog/vsphere/models/compute/clusters.rb +26 -0
- data/lib/fog/vsphere/models/compute/datacenter.rb +39 -0
- data/lib/fog/vsphere/models/compute/datacenters.rb +23 -0
- data/lib/fog/vsphere/models/compute/datastore.rb +24 -0
- data/lib/fog/vsphere/models/compute/datastores.rb +25 -0
- data/lib/fog/vsphere/models/compute/folder.rb +28 -0
- data/lib/fog/vsphere/models/compute/folders.rb +27 -0
- data/lib/fog/vsphere/models/compute/interface.rb +39 -0
- data/lib/fog/vsphere/models/compute/interfaces.rb +33 -0
- data/lib/fog/vsphere/models/compute/network.rb +21 -0
- data/lib/fog/vsphere/models/compute/networks.rb +25 -0
- data/lib/fog/vsphere/models/compute/resource_pool.rb +23 -0
- data/lib/fog/vsphere/models/compute/resource_pools.rb +26 -0
- data/lib/fog/vsphere/models/compute/server.rb +106 -29
- data/lib/fog/vsphere/models/compute/servers.rb +16 -20
- data/lib/fog/vsphere/models/compute/template.rb +13 -0
- data/lib/fog/vsphere/models/compute/templates.rb +23 -0
- data/lib/fog/vsphere/models/compute/volume.rb +45 -0
- data/lib/fog/vsphere/models/compute/volumes.rb +33 -0
- data/lib/fog/vsphere/requests/compute/create_folder.rb +22 -0
- data/lib/fog/vsphere/requests/compute/create_vm.rb +114 -0
- data/lib/fog/vsphere/requests/compute/get_cluster.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_datacenter.rb +29 -0
- data/lib/fog/vsphere/requests/compute/get_datastore.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_folder.rb +73 -0
- data/lib/fog/vsphere/requests/compute/get_network.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +26 -0
- data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +62 -0
- data/lib/fog/vsphere/requests/compute/list_clusters.rb +37 -0
- data/lib/fog/vsphere/requests/compute/list_datacenters.rb +34 -0
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +40 -0
- data/lib/fog/vsphere/requests/compute/list_folders.rb +45 -0
- data/lib/fog/vsphere/requests/compute/list_networks.rb +38 -0
- data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +39 -0
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -166
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +52 -0
- data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +51 -0
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +134 -67
- data/lib/fog/vsphere/requests/compute/vm_destroy.rb +1 -8
- data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -2
- data/lib/fog/xenserver.rb +26 -2
- data/lib/fog/xenserver/compute.rb +8 -0
- data/lib/fog/xenserver/examples/README.md +11 -0
- data/lib/fog/xenserver/examples/chage_default_storage_repository.md +99 -0
- data/lib/fog/xenserver/examples/creating_servers.md +168 -0
- data/lib/fog/xenserver/examples/getting_started.md +163 -0
- data/lib/fog/xenserver/examples/storage_repositories.md +94 -0
- data/lib/fog/xenserver/models/compute/host.rb +75 -8
- data/lib/fog/xenserver/models/compute/host_metrics.rb +29 -0
- data/lib/fog/xenserver/models/compute/hosts.rb +8 -8
- data/lib/fog/xenserver/models/compute/network.rb +11 -11
- data/lib/fog/xenserver/models/compute/networks.rb +3 -3
- data/lib/fog/xenserver/models/compute/pbd.rb +11 -6
- data/lib/fog/xenserver/models/compute/pbds.rb +3 -3
- data/lib/fog/xenserver/models/compute/pif.rb +9 -9
- data/lib/fog/xenserver/models/compute/pifs.rb +3 -3
- data/lib/fog/xenserver/models/compute/pool.rb +30 -8
- data/lib/fog/xenserver/models/compute/pools.rb +3 -3
- data/lib/fog/xenserver/models/compute/server.rb +29 -29
- data/lib/fog/xenserver/models/compute/servers.rb +8 -8
- data/lib/fog/xenserver/models/compute/storage_repositories.rb +2 -2
- data/lib/fog/xenserver/models/compute/storage_repository.rb +52 -9
- data/lib/fog/xenserver/models/compute/vbd.rb +16 -16
- data/lib/fog/xenserver/models/compute/vbds.rb +3 -3
- data/lib/fog/xenserver/models/compute/vdi.rb +17 -17
- data/lib/fog/xenserver/models/compute/vdis.rb +3 -3
- data/lib/fog/xenserver/models/compute/vif.rb +10 -10
- data/lib/fog/xenserver/models/compute/vifs.rb +3 -3
- data/lib/fog/xenserver/requests/compute/create_sr.rb +72 -0
- data/lib/fog/xenserver/requests/compute/destroy_sr.rb +30 -0
- data/lib/fog/xenserver/requests/compute/disable_host.rb +29 -0
- data/lib/fog/xenserver/requests/compute/enable_host.rb +28 -0
- data/lib/fog/xenserver/requests/compute/reboot_host.rb +23 -0
- data/lib/fog/xenserver/requests/compute/shutdown_host.rb +23 -0
- data/lib/fog/xenserver/requests/compute/unplug_pbd.rb +25 -0
- data/lib/fog/zerigo/models/dns/record.rb +4 -4
- data/lib/fog/zerigo/models/dns/records.rb +2 -2
- data/lib/fog/zerigo/models/dns/zone.rb +6 -6
- data/lib/fog/zerigo/models/dns/zones.rb +2 -2
- data/lib/tasks/changelog_task.rb +98 -0
- data/lib/tasks/test_task.rb +46 -0
- data/tests/aws/models/cloud_watch/metrics_tests.rb +16 -1
- data/tests/aws/models/iam/users_tests.rb +16 -2
- data/tests/aws/requests/auto_scaling/model_tests.rb +1 -3
- data/tests/aws/requests/auto_scaling/notification_configuration_tests.rb +1 -0
- data/tests/aws/requests/auto_scaling/tag_tests.rb +1 -0
- data/tests/aws/requests/compute/instance_tests.rb +2 -0
- data/tests/aws/requests/compute/snapshot_tests.rb +19 -0
- data/tests/aws/requests/compute/spot_instance_tests.rb +4 -2
- data/tests/aws/requests/compute/volume_tests.rb +8 -0
- data/tests/aws/requests/storage/bucket_tests.rb +14 -0
- data/tests/aws/requests/storage/cors_utils_tests.rb +108 -0
- data/tests/aws/requests/storage/object_tests.rb +18 -1
- data/tests/aws/requests/storage/versioning_tests.rb +70 -0
- data/tests/brightbox/compute_tests.rb +96 -4
- data/tests/brightbox/models/compute/account_tests.rb +17 -0
- data/tests/brightbox/models/compute/server_tests.rb +21 -0
- data/tests/brightbox/oauth2_tests.rb +103 -0
- data/tests/brightbox/requests/compute/account_tests.rb +9 -2
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +33 -0
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +43 -0
- data/tests/brightbox/requests/compute/helper.rb +33 -30
- data/tests/brightbox/requests/compute/interface_tests.rb +18 -4
- data/tests/compute/helper.rb +28 -6
- data/tests/compute/models/flavors_tests.rb +4 -2
- data/tests/compute/models/server_tests.rb +5 -1
- data/tests/compute/models/servers_tests.rb +5 -2
- data/tests/core/wait_for_tests.rb +13 -0
- data/tests/dns/models/record_tests.rb +17 -3
- data/tests/ecloud/compute/models/admin_organization_tests.rb +16 -0
- data/tests/ecloud/compute/models/compute_pool_tests.rb +17 -0
- data/tests/ecloud/compute/models/detached_disk_tests.rb +26 -0
- data/tests/ecloud/compute/models/environment_tests.rb +23 -0
- data/tests/ecloud/compute/models/internet_service_tests.rb +28 -0
- data/tests/ecloud/compute/models/ip_address_tests.rb +19 -0
- data/tests/ecloud/compute/models/network_tests.rb +17 -0
- data/tests/ecloud/compute/models/operating_system_families_tests.rb +13 -0
- data/tests/ecloud/compute/models/operating_system_tests.rb +22 -0
- data/tests/ecloud/compute/models/organization_tests.rb +21 -0
- data/tests/ecloud/compute/models/public_ip_tests.rb +19 -0
- data/tests/ecloud/compute/models/server_tests.rb +143 -0
- data/tests/ecloud/compute/models/ssh_key_tests.rb +19 -0
- data/tests/ecloud/compute/models/template_tests.rb +20 -0
- data/tests/openstack/authenticate_tests.rb +142 -0
- data/tests/openstack/models/compute/server_tests.rb +45 -0
- data/tests/openstack/models/identity/ec2_credential_tests.rb +41 -0
- data/tests/openstack/models/identity/ec2_credentials_tests.rb +58 -0
- data/tests/openstack/models/identity/tenant_tests.rb +6 -0
- data/tests/openstack/requests/compute/address_tests.rb +20 -19
- data/tests/openstack/requests/compute/flavor_tests.rb +4 -2
- data/tests/openstack/requests/compute/helper.rb +20 -0
- data/tests/openstack/requests/compute/limit_tests.rb +60 -0
- data/tests/openstack/requests/compute/quota_tests.rb +18 -3
- data/tests/openstack/requests/compute/security_group_tests.rb +11 -3
- data/tests/openstack/requests/compute/server_tests.rb +29 -14
- data/tests/openstack/requests/identity/ec2_credentials_tests.rb +41 -0
- data/tests/openstack/requests/identity/role_tests.rb +0 -1
- data/tests/openstack/requests/identity/user_tests.rb +8 -0
- data/tests/rackspace/models/block_storage/snapshot_tests.rb +18 -11
- data/tests/rackspace/models/block_storage/volume_tests.rb +13 -7
- data/tests/rackspace/models/compute_v2/image_tests.rb +28 -0
- data/tests/rackspace/models/compute_v2/server_tests.rb +15 -0
- data/tests/rackspace/models/compute_v2/servers_tests.rb +6 -0
- data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +17 -0
- data/tests/rackspace/models/storage/file_tests.rb +178 -0
- data/tests/rackspace/requests/compute/address_tests.rb +11 -9
- data/tests/rackspace/requests/compute/flavor_tests.rb +6 -5
- data/tests/rackspace/requests/compute/image_tests.rb +12 -10
- data/tests/rackspace/requests/compute/resize_tests.rb +8 -6
- data/tests/rackspace/requests/compute/server_tests.rb +19 -17
- data/tests/rackspace/requests/compute_v2/address_tests.rb +43 -0
- data/tests/rackspace/requests/compute_v2/image_tests.rb +38 -10
- data/tests/rackspace/requests/dns/helper.rb +12 -26
- data/tests/rackspace/requests/dns/records_tests.rb +2 -2
- data/tests/rackspace/requests/load_balancers/content_caching_tests.rb +25 -0
- data/tests/rackspace/requests/load_balancers/helper.rb +5 -1
- data/tests/vsphere/compute_tests.rb +3 -3
- data/tests/vsphere/models/compute/server_tests.rb +1 -2
- data/tests/vsphere/requests/compute/list_virtual_machines_tests.rb +5 -13
- data/tests/vsphere/requests/compute/vm_clone_tests.rb +6 -4
- data/tests/xenserver/models/compute/host_metrics_tests.rb +48 -0
- data/tests/xenserver/models/compute/host_tests.rb +20 -1
- data/tests/xenserver/models/compute/pbd_tests.rb +33 -1
- data/tests/xenserver/models/compute/pool_tests.rb +7 -1
- data/tests/xenserver/models/compute/storage_repository_tests.rb +52 -1
- data/tests/xenserver/requests/compute/create_sr_tests.rb +54 -0
- data/tests/xenserver/requests/compute/destroy_sr_tests.rb +46 -0
- data/tests/xenserver/requests/compute/disable_host_tests.rb +16 -0
- data/tests/xenserver/requests/compute/enable_host_tests.rb +16 -0
- data/tests/xenserver/requests/compute/unplug_pbd_tests.rb +48 -0
- metadata +312 -89
- data/docs/_config.yml +0 -39
- data/docs/_layouts/default.html +0 -111
- data/docs/about/contributing.markdown +0 -228
- data/docs/about/getting_started.markdown +0 -108
- data/docs/about/press.markdown +0 -52
- data/docs/about/structure.markdown +0 -78
- data/docs/about/users.markdown +0 -34
- data/docs/cdn/index.markdown +0 -148
- data/docs/compute/index.markdown +0 -122
- data/docs/dns/index.markdown +0 -79
- data/docs/index.markdown +0 -88
- data/docs/public/crossdomain.xml +0 -25
- data/docs/public/css/fog.css +0 -142
- data/docs/public/css/handheld.css +0 -8
- data/docs/public/css/style.css +0 -129
- data/docs/public/images/.gitignore +0 -3
- data/docs/public/images/engineyard.png +0 -0
- data/docs/public/images/fog.png +0 -0
- data/docs/public/js/libs/dd_belatedpng.js +0 -289
- data/docs/public/js/libs/dd_belatedpng.min.js +0 -13
- data/docs/public/js/libs/jquery-1.4.2.js +0 -6240
- data/docs/public/js/libs/jquery-1.4.2.min.js +0 -154
- data/docs/public/js/libs/modernizr-1.6.js +0 -892
- data/docs/public/js/libs/modernizr-1.6.min.js +0 -30
- data/docs/public/js/mylibs/.gitignore +0 -3
- data/docs/public/js/plugins.js +0 -34
- data/docs/public/js/profiling/config.js +0 -59
- data/docs/public/js/profiling/yahoo-profiling.css +0 -7
- data/docs/public/js/profiling/yahoo-profiling.js +0 -1028
- data/docs/public/js/profiling/yahoo-profiling.min.js +0 -39
- data/docs/public/js/script.js +0 -26
- data/docs/public/robots.txt +0 -5
- data/docs/storage/index.markdown +0 -204
- data/lib/fog/ecloud/requests/compute/get_admin_organizations.rb +0 -11
- data/lib/fog/ecloud/requests/compute/get_ip_addresses.rb +0 -11
- data/lib/fog/ecloud/requests/compute/get_operating_system_family.rb +0 -11
- data/lib/fog/ecloud/requests/compute/virtual_machine_add_ip.rb +0 -40
- data/lib/fog/vsphere/requests/compute/datacenters.rb +0 -34
- data/lib/fog/vsphere/requests/compute/find_vm_by_ref.rb +0 -41
- data/lib/fog/vsphere/requests/compute/vm_create.rb +0 -97
- data/tests/vsphere/requests/compute/find_vm_by_ref_tests.rb +0 -26
- data/tests/vsphere/requests/compute/vm_create_tests.rb +0 -20
@@ -8,7 +8,7 @@ module Fog
|
|
8
8
|
extend Fog::Deprecation
|
9
9
|
deprecate :ip, :value
|
10
10
|
deprecate :ip=, :value=
|
11
|
-
|
11
|
+
|
12
12
|
identity :id
|
13
13
|
|
14
14
|
attribute :name
|
@@ -23,14 +23,14 @@ module Fog
|
|
23
23
|
attribute :hard_link, :aliases => "hardLink"
|
24
24
|
|
25
25
|
attribute :value, :aliases => "data"
|
26
|
-
|
26
|
+
|
27
27
|
def initialize(attributes={})
|
28
28
|
self.ttl ||= 1800
|
29
29
|
super
|
30
30
|
end
|
31
31
|
|
32
32
|
def destroy
|
33
|
-
|
33
|
+
service.delete_record(zone.domain, identity)
|
34
34
|
true
|
35
35
|
end
|
36
36
|
|
@@ -57,11 +57,11 @@ module Fog
|
|
57
57
|
end
|
58
58
|
|
59
59
|
if id.nil?
|
60
|
-
data =
|
60
|
+
data = service.create_record(zone.domain, name, type, value, options).body
|
61
61
|
merge_attributes(data)
|
62
62
|
else
|
63
63
|
options.merge!(:name => name, :type => type, :data => value)
|
64
|
-
|
64
|
+
service.update_record(zone.domain, id, options).body
|
65
65
|
end
|
66
66
|
|
67
67
|
true
|
@@ -13,12 +13,12 @@ module Fog
|
|
13
13
|
|
14
14
|
def all
|
15
15
|
requires :zone
|
16
|
-
data =
|
16
|
+
data = service.list_records(zone.identity).body
|
17
17
|
load(data)
|
18
18
|
end
|
19
19
|
|
20
20
|
def get(record_id)
|
21
|
-
data =
|
21
|
+
data = service.get_record(zone.identity, record_id).body
|
22
22
|
new(data)
|
23
23
|
rescue Fog::Service::NotFound
|
24
24
|
nil
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
|
15
15
|
def destroy
|
16
16
|
requires :identity
|
17
|
-
|
17
|
+
service.delete_domain(identity)
|
18
18
|
true
|
19
19
|
end
|
20
20
|
|
@@ -22,14 +22,14 @@ module Fog
|
|
22
22
|
@records ||= begin
|
23
23
|
Fog::DNS::DNSMadeEasy::Records.new(
|
24
24
|
:zone => self,
|
25
|
-
:
|
25
|
+
:service => service
|
26
26
|
)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
def save
|
31
31
|
requires :domain
|
32
|
-
data =
|
32
|
+
data = service.create_domain(domain).body
|
33
33
|
self.identity = data['name']
|
34
34
|
merge_attributes(data)
|
35
35
|
true
|
@@ -11,12 +11,12 @@ module Fog
|
|
11
11
|
|
12
12
|
def all
|
13
13
|
clear
|
14
|
-
data =
|
14
|
+
data = service.list_domains.body['list'].collect{|domain| {:id => domain}}
|
15
15
|
load(data)
|
16
16
|
end
|
17
17
|
|
18
18
|
def get(zone_id)
|
19
|
-
data =
|
19
|
+
data = service.get_domain(zone_id).body
|
20
20
|
data.merge!(:id => data['name'])
|
21
21
|
new(data)
|
22
22
|
rescue Fog::Service::NotFound
|
@@ -16,7 +16,7 @@ module Fog
|
|
16
16
|
|
17
17
|
def destroy
|
18
18
|
requires :identity, :name, :type, :zone
|
19
|
-
|
19
|
+
service.delete_record(type, zone.identity, name, identity)
|
20
20
|
true
|
21
21
|
end
|
22
22
|
|
@@ -28,13 +28,13 @@ module Fog
|
|
28
28
|
}
|
29
29
|
options.delete_if {|key, value| value.nil?}
|
30
30
|
|
31
|
-
data =
|
31
|
+
data = service.post_record(type, zone.identity, name, rdata, options).body['data']
|
32
32
|
# avoid overwriting zone object with zone string
|
33
33
|
data = data.reject {|key, value| key == 'zone'}
|
34
34
|
merge_attributes(data)
|
35
35
|
|
36
36
|
zone.publish
|
37
|
-
records =
|
37
|
+
records = service.get_record(type, zone.identity, name).body['data']
|
38
38
|
# data in format ['/REST/xRecord/domain/fqdn/identity]
|
39
39
|
records.map! do |record|
|
40
40
|
tokens = record.split('/')
|
@@ -14,8 +14,8 @@ module Fog
|
|
14
14
|
def all(options = {})
|
15
15
|
requires :zone
|
16
16
|
data = []
|
17
|
-
|
18
|
-
records =
|
17
|
+
service.get_node_list(zone.domain, options).body['data'].each do |fqdn|
|
18
|
+
records = service.get_record('ANY', zone.domain, fqdn).body['data']
|
19
19
|
|
20
20
|
# data in format ['/REST/xRecord/domain/fqdn/identity]
|
21
21
|
records.map! do |record|
|
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
|
24
24
|
def destroy
|
25
25
|
requires :domain
|
26
|
-
|
26
|
+
service.delete_zone(domain)
|
27
27
|
true
|
28
28
|
end
|
29
29
|
|
@@ -34,12 +34,12 @@ module Fog
|
|
34
34
|
|
35
35
|
def publish
|
36
36
|
requires :identity
|
37
|
-
data =
|
37
|
+
data = service.put_zone(identity, 'publish' => true)
|
38
38
|
true
|
39
39
|
end
|
40
40
|
|
41
41
|
def records
|
42
|
-
@records ||= Fog::DNS::Dynect::Records.new(:zone => self, :
|
42
|
+
@records ||= Fog::DNS::Dynect::Records.new(:zone => self, :service => service)
|
43
43
|
end
|
44
44
|
|
45
45
|
def nameservers
|
@@ -48,7 +48,7 @@ module Fog
|
|
48
48
|
|
49
49
|
def save
|
50
50
|
requires :domain, :email, :ttl
|
51
|
-
data =
|
51
|
+
data = service.post_zone(email, ttl, domain).body['data']
|
52
52
|
merge_attributes(data)
|
53
53
|
true
|
54
54
|
end
|
@@ -10,14 +10,14 @@ module Fog
|
|
10
10
|
model Fog::DNS::Dynect::Zone
|
11
11
|
|
12
12
|
def all
|
13
|
-
data =
|
13
|
+
data = service.get_zone.body['data'].map do |zone|
|
14
14
|
{ :domain => zone }
|
15
15
|
end
|
16
16
|
load(data)
|
17
17
|
end
|
18
18
|
|
19
19
|
def get(zone_id)
|
20
|
-
new(
|
20
|
+
new(service.get_zone('zone' => zone_id).body['data'])
|
21
21
|
rescue Excon::Errors::NotFound
|
22
22
|
nil
|
23
23
|
end
|
data/lib/fog/ecloud.rb
CHANGED
@@ -2,16 +2,30 @@ require(File.expand_path(File.join(File.dirname(__FILE__), 'core')))
|
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Ecloud
|
5
|
+
ECLOUD_OPTIONS = [:ecloud_authentication_method]
|
5
6
|
|
6
7
|
extend Fog::Provider
|
7
8
|
|
8
9
|
service(:compute, 'ecloud/compute', 'Compute')
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
def self.keep(hash, *keys)
|
12
|
+
{}.tap do |kept|
|
13
|
+
keys.each{|k| kept[k]= hash[k] if hash.key?(k)}
|
14
|
+
end
|
15
|
+
end
|
12
16
|
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
def self.slice(hash, *keys)
|
18
|
+
hash.dup.tap do |sliced|
|
19
|
+
keys.each{|k| sliced.delete(k)}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.ip_address
|
24
|
+
4.times.map{ Fog::Mock.random_numbers(3) }.join(".")
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.mac_address
|
28
|
+
6.times.map{ Fog::Mock.random_numbers(2) }.join(":")
|
29
|
+
end
|
16
30
|
end
|
17
31
|
end
|
data/lib/fog/ecloud/compute.rb
CHANGED
@@ -1,33 +1,12 @@
|
|
1
1
|
require 'fog/ecloud/collection'
|
2
|
-
|
3
|
-
|
4
|
-
class Model < Fog::Model
|
5
|
-
|
6
|
-
attr_accessor :loaded
|
7
|
-
alias_method :loaded?, :loaded
|
8
|
-
|
9
|
-
def reload
|
10
|
-
instance = super
|
11
|
-
@loaded = true
|
12
|
-
instance
|
13
|
-
end
|
14
|
-
|
15
|
-
def load_unless_loaded!
|
16
|
-
unless @loaded
|
17
|
-
reload
|
18
|
-
end
|
19
|
-
end
|
2
|
+
require 'fog/ecloud/model'
|
3
|
+
require 'builder'
|
20
4
|
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
5
|
module Fog
|
25
6
|
module Compute
|
26
|
-
|
27
|
-
|
28
7
|
class Ecloud < Fog::Service
|
29
|
-
|
30
8
|
API_URL = "https://services.enterprisecloud.terremark.com"
|
9
|
+
|
31
10
|
attr_reader :authentication_method, :version
|
32
11
|
|
33
12
|
#### Credentials
|
@@ -38,346 +17,271 @@ module Fog
|
|
38
17
|
model_path 'fog/ecloud/models/compute'
|
39
18
|
model :organization
|
40
19
|
collection :organizations
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
20
|
+
model :location
|
21
|
+
collection :locations
|
22
|
+
model :catalog_item
|
23
|
+
collection :catalog
|
24
|
+
model :catalog_configuration
|
25
|
+
collection :catalog_configurations
|
26
|
+
model :environment
|
27
|
+
collection :environments
|
28
|
+
model :task
|
29
|
+
collection :tasks
|
30
|
+
model :compute_pool
|
31
|
+
collection :compute_pools
|
32
|
+
model :server
|
33
|
+
collection :servers
|
34
|
+
model :virtual_machine_assigned_ip
|
35
|
+
collection :virtual_machine_assigned_ips
|
36
|
+
model :hardware_configuration
|
37
|
+
collection :hardware_configurations
|
38
|
+
model :server_configuration_option
|
39
|
+
collection :server_configuration_options
|
40
|
+
model :guest_process
|
41
|
+
collection :guest_processes
|
42
|
+
model :layout
|
43
|
+
collection :layouts
|
44
|
+
model :row
|
45
|
+
collection :rows
|
46
|
+
model :group
|
47
|
+
collection :groups
|
48
|
+
model :internet_service
|
49
|
+
collection :internet_services
|
50
|
+
model :node
|
51
|
+
collection :nodes
|
52
|
+
model :monitor
|
53
|
+
collection :monitors
|
54
|
+
model :cpu_usage_detail
|
55
|
+
collection :cpu_usage_detail_summary
|
56
|
+
model :memory_usage_detail
|
57
|
+
collection :memory_usage_detail_summary
|
58
|
+
model :storage_usage_detail
|
59
|
+
collection :storage_usage_detail_summary
|
60
|
+
model :operating_system_family
|
61
|
+
collection :operating_system_families
|
62
|
+
model :operating_system
|
63
|
+
collection :operating_systems
|
64
|
+
model :template
|
65
|
+
collection :templates
|
66
|
+
model :firewall_acl
|
67
|
+
collection :firewall_acls
|
68
|
+
model :network
|
69
|
+
collection :networks
|
70
|
+
model :ip_address
|
71
|
+
collection :ip_addresses
|
72
|
+
model :physical_device
|
73
|
+
collection :physical_devices
|
74
|
+
model :public_ip
|
75
|
+
collection :public_ips
|
76
|
+
model :trusted_network_group
|
77
|
+
collection :trusted_network_groups
|
78
|
+
model :backup_internet_service
|
79
|
+
collection :backup_internet_services
|
80
|
+
model :rnat
|
81
|
+
collection :rnats
|
82
|
+
model :association
|
83
|
+
collection :associations
|
84
|
+
model :tag
|
85
|
+
collection :tags
|
86
|
+
model :admin_organization
|
87
|
+
collection :admin_organizations
|
88
|
+
model :ssh_key
|
89
|
+
collection :ssh_keys
|
90
|
+
model :password_complexity_rule
|
91
|
+
collection :password_complexity_rules
|
92
|
+
model :authentication_level
|
93
|
+
collection :authentication_levels
|
94
|
+
model :login_banner
|
95
|
+
collection :login_banners
|
96
|
+
model :user
|
97
|
+
collection :users
|
98
|
+
model :role
|
99
|
+
collection :roles
|
100
|
+
model :ssh_key
|
101
|
+
collection :ssh_keys
|
102
|
+
model :support_ticket
|
103
|
+
collection :support_tickets
|
104
|
+
model :detached_disk
|
105
|
+
collection :detached_disks
|
123
106
|
|
124
107
|
#### Requests
|
125
108
|
request_path 'fog/ecloud/requests/compute'
|
126
|
-
request :
|
127
|
-
request :
|
128
|
-
request :
|
129
|
-
request :
|
130
|
-
request :
|
131
|
-
request :
|
132
|
-
request :
|
109
|
+
request :backup_internet_service_create
|
110
|
+
request :backup_internet_service_delete
|
111
|
+
request :backup_internet_service_edit
|
112
|
+
request :compute_pool_edit
|
113
|
+
request :firewall_acls_create
|
114
|
+
request :firewall_acls_delete
|
115
|
+
request :get_admin_organization
|
116
|
+
request :get_api_key
|
117
|
+
request :get_api_keys
|
118
|
+
request :get_association
|
119
|
+
request :get_associations
|
120
|
+
request :get_authentication_level
|
121
|
+
request :get_authentication_levels
|
122
|
+
request :get_backup_internet_service
|
123
|
+
request :get_backup_internet_services
|
124
|
+
request :get_catalog
|
125
|
+
request :get_catalog_configuration
|
126
|
+
request :get_catalog_configurations
|
127
|
+
request :get_catalog_item
|
133
128
|
request :get_compute_pool
|
134
129
|
request :get_compute_pools
|
135
|
-
request :
|
136
|
-
request :
|
137
|
-
request :
|
138
|
-
request :get_networks
|
139
|
-
request :get_physical_device
|
140
|
-
request :get_physical_devices
|
141
|
-
request :get_layout
|
142
|
-
request :get_layouts
|
143
|
-
request :get_row
|
144
|
-
request :get_rows
|
145
|
-
request :get_group
|
146
|
-
request :get_groups
|
147
|
-
request :get_public_ip
|
148
|
-
request :get_public_ips
|
149
|
-
request :get_network_summary
|
150
|
-
request :get_internet_service
|
151
|
-
request :get_internet_services
|
152
|
-
request :get_node
|
153
|
-
request :get_nodes
|
130
|
+
request :get_cpu_usage_detail
|
131
|
+
request :get_cpu_usage_detail_summary
|
132
|
+
request :get_environment
|
154
133
|
request :get_firewall_acl
|
155
134
|
request :get_firewall_acls
|
156
|
-
request :
|
157
|
-
request :
|
158
|
-
request :get_catalog
|
159
|
-
request :get_catalog_item
|
160
|
-
request :get_tag
|
161
|
-
request :get_tags
|
162
|
-
request :get_hardware_configuration
|
163
|
-
request :get_hardware_configurations
|
164
|
-
request :get_server_configuration_option
|
165
|
-
request :get_server_configuration_options
|
135
|
+
request :get_group
|
136
|
+
request :get_groups
|
166
137
|
request :get_guest_process
|
167
138
|
request :get_guest_processes
|
168
|
-
request :
|
169
|
-
request :
|
139
|
+
request :get_hardware_configuration
|
140
|
+
request :get_internet_service
|
141
|
+
request :get_internet_services
|
142
|
+
request :get_ip_address
|
143
|
+
request :get_layout
|
144
|
+
request :get_layouts
|
145
|
+
request :get_location
|
146
|
+
request :get_locations
|
147
|
+
request :get_login_banner
|
148
|
+
request :get_login_banners
|
170
149
|
request :get_memory_usage_detail
|
171
150
|
request :get_memory_usage_detail_summary
|
172
|
-
request :get_storage_usage_detail
|
173
|
-
request :get_storage_usage_detail_summary
|
174
|
-
request :get_operating_system_family
|
175
|
-
request :get_operating_system_families
|
176
|
-
request :get_operating_system
|
177
|
-
request :get_template
|
178
|
-
request :get_templates
|
179
151
|
request :get_monitor
|
180
152
|
request :get_monitors
|
181
|
-
request :
|
182
|
-
request :
|
183
|
-
request :
|
184
|
-
request :
|
185
|
-
request :
|
186
|
-
request :
|
187
|
-
request :
|
188
|
-
request :
|
189
|
-
request :
|
190
|
-
request :get_ssh_keys
|
153
|
+
request :get_network
|
154
|
+
request :get_network_summary
|
155
|
+
request :get_networks
|
156
|
+
request :get_node
|
157
|
+
request :get_nodes
|
158
|
+
request :get_operating_system
|
159
|
+
request :get_operating_system_families
|
160
|
+
request :get_organization
|
161
|
+
request :get_organizations
|
191
162
|
request :get_password_complexity_rule
|
192
163
|
request :get_password_complexity_rules
|
193
|
-
request :
|
194
|
-
request :
|
195
|
-
request :
|
196
|
-
request :
|
197
|
-
request :
|
198
|
-
request :
|
164
|
+
request :get_physical_device
|
165
|
+
request :get_physical_devices
|
166
|
+
request :get_public_ip
|
167
|
+
request :get_public_ips
|
168
|
+
request :get_rnat
|
169
|
+
request :get_rnats
|
199
170
|
request :get_role
|
200
171
|
request :get_roles
|
201
|
-
request :
|
202
|
-
request :
|
172
|
+
request :get_row
|
173
|
+
request :get_rows
|
174
|
+
request :get_server
|
175
|
+
request :get_server_configuration_option
|
176
|
+
request :get_server_configuration_options
|
177
|
+
request :get_servers
|
178
|
+
request :get_ssh_key
|
179
|
+
request :get_ssh_keys
|
180
|
+
request :get_storage_usage_detail
|
181
|
+
request :get_storage_usage_detail_summary
|
203
182
|
request :get_support_ticket
|
204
183
|
request :get_support_tickets
|
205
|
-
request :
|
206
|
-
request :
|
207
|
-
request :
|
208
|
-
request :
|
209
|
-
request :
|
210
|
-
request :
|
211
|
-
request :
|
212
|
-
request :
|
213
|
-
request :
|
214
|
-
request :
|
215
|
-
request :
|
216
|
-
request :
|
217
|
-
request :
|
218
|
-
request :
|
184
|
+
request :get_tag
|
185
|
+
request :get_tags
|
186
|
+
request :get_task
|
187
|
+
request :get_tasks
|
188
|
+
request :get_template
|
189
|
+
request :get_templates
|
190
|
+
request :get_trusted_network_group
|
191
|
+
request :get_trusted_network_groups
|
192
|
+
request :get_user
|
193
|
+
request :get_users
|
194
|
+
request :get_virtual_machine_assigned_ips
|
195
|
+
request :get_detached_disks
|
196
|
+
request :get_detached_disk
|
197
|
+
request :groups_create
|
198
|
+
request :groups_delete
|
199
|
+
request :groups_edit
|
200
|
+
request :groups_movedown
|
201
|
+
request :groups_moveup
|
219
202
|
request :internet_service_create
|
220
|
-
request :internet_service_edit
|
221
203
|
request :internet_service_delete
|
222
|
-
request :
|
223
|
-
request :backup_internet_service_edit
|
224
|
-
request :backup_internet_service_delete
|
225
|
-
request :node_service_create
|
226
|
-
request :node_service_delete
|
227
|
-
request :node_service_edit
|
204
|
+
request :internet_service_edit
|
228
205
|
request :monitors_create_default
|
229
|
-
request :monitors_create_ping
|
230
|
-
request :monitors_create_http
|
231
206
|
request :monitors_create_ecv
|
207
|
+
request :monitors_create_http
|
232
208
|
request :monitors_create_loopback
|
233
|
-
request :
|
234
|
-
request :
|
209
|
+
request :monitors_create_ping
|
210
|
+
request :monitors_disable
|
235
211
|
request :monitors_edit_ecv
|
212
|
+
request :monitors_edit_http
|
213
|
+
request :monitors_edit_ping
|
236
214
|
request :monitors_enable
|
237
|
-
request :
|
238
|
-
request :
|
215
|
+
request :node_service_create
|
216
|
+
request :node_service_delete
|
217
|
+
request :node_service_edit
|
218
|
+
request :power_off
|
219
|
+
request :power_on
|
220
|
+
request :power_reset
|
221
|
+
request :power_shutdown
|
222
|
+
request :public_ip_activate
|
239
223
|
request :rnat_associations_create_device
|
240
224
|
request :rnat_associations_delete
|
225
|
+
request :rnat_associations_edit_network
|
241
226
|
request :rows_create
|
227
|
+
request :rows_delete
|
242
228
|
request :rows_edit
|
243
|
-
request :rows_moveup
|
244
229
|
request :rows_movedown
|
245
|
-
request :
|
246
|
-
request :groups_create
|
247
|
-
request :groups_edit
|
248
|
-
request :groups_moveup
|
249
|
-
request :groups_movedown
|
250
|
-
request :groups_delete
|
230
|
+
request :rows_moveup
|
251
231
|
request :trusted_network_groups_create
|
252
|
-
request :trusted_network_groups_edit
|
253
232
|
request :trusted_network_groups_delete
|
254
|
-
request :
|
255
|
-
request :
|
256
|
-
request :
|
257
|
-
request :
|
258
|
-
request :
|
259
|
-
request :
|
260
|
-
request :
|
233
|
+
request :trusted_network_groups_edit
|
234
|
+
request :virtual_machine_edit_assigned_ips
|
235
|
+
request :virtual_machine_copy
|
236
|
+
request :virtual_machine_copy_identical
|
237
|
+
request :virtual_machine_create_from_template
|
238
|
+
request :virtual_machine_delete
|
239
|
+
request :virtual_machine_edit
|
240
|
+
request :virtual_machine_edit_hardware_configuration
|
241
|
+
request :virtual_machine_import
|
242
|
+
request :virtual_machine_upload_file
|
243
|
+
request :virtual_machine_detach_disk
|
244
|
+
request :virtual_machine_attach_disk
|
261
245
|
|
262
246
|
module Shared
|
263
247
|
|
264
248
|
attr_reader :versions_uri
|
265
249
|
|
266
|
-
def default_organization_uri
|
267
|
-
@default_organization_uri ||= begin
|
268
|
-
unless @login_results
|
269
|
-
do_login
|
270
|
-
end
|
271
|
-
case @login_results.body[:Org]
|
272
|
-
when Array
|
273
|
-
@login_results.body[:Org].first[:href]
|
274
|
-
when Hash
|
275
|
-
@login_results.body[:Org][:href]
|
276
|
-
else
|
277
|
-
nil
|
278
|
-
end
|
279
|
-
end
|
280
|
-
end
|
281
|
-
|
282
|
-
# login handles the auth, but we just need the Set-Cookie
|
283
|
-
# header from that call.
|
284
|
-
def do_login
|
285
|
-
@login_results = get_organizations
|
286
|
-
end
|
287
|
-
|
288
|
-
def ecloud_xmlns
|
289
|
-
{
|
290
|
-
"xmlns" => "urn:tmrk:eCloudExtensions-2.8",
|
291
|
-
"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance"
|
292
|
-
}
|
293
|
-
end
|
294
|
-
|
295
|
-
def ensure_unparsed(uri)
|
296
|
-
if uri.is_a?(String)
|
297
|
-
uri
|
298
|
-
else
|
299
|
-
uri.to_s
|
300
|
-
end
|
301
|
-
end
|
302
|
-
|
303
|
-
def supported_versions
|
304
|
-
@supported_versions ||= get_versions(@versions_uri).body[:VersionInfo]
|
305
|
-
end
|
306
|
-
|
307
|
-
def xmlns
|
308
|
-
{ "xmlns" => "http://www.vmware.com/vcloud/v0.8",
|
309
|
-
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
310
|
-
"xmlns:xsd" => "http://www.w3.org/2001/XMLSchema" }
|
311
|
-
end
|
312
|
-
|
313
250
|
def validate_data(required_opts = [], options = {})
|
314
251
|
unless required_opts.all? { |opt| options.has_key?(opt) }
|
315
252
|
raise ArgumentError.new("Required data missing: #{(required_opts - options.keys).map(&:inspect).join(", ")}")
|
316
253
|
end
|
317
254
|
end
|
318
255
|
|
319
|
-
|
320
|
-
|
321
|
-
class Mock
|
322
|
-
def self.data
|
323
|
-
@data ||= Hash.new do |hash, key|
|
324
|
-
hash[key] = {}
|
325
|
-
end
|
326
|
-
end
|
327
|
-
|
328
|
-
def self.reset
|
329
|
-
@data = nil
|
330
|
-
end
|
331
|
-
|
332
|
-
def initialize(options={})
|
333
|
-
@ecloud_api_key = options[:ecloud]
|
334
|
-
end
|
335
|
-
|
336
|
-
def data
|
337
|
-
self.class.data[@ecloud_api_key]
|
256
|
+
def id_from_uri(uri)
|
257
|
+
uri.match(/(\d+)$/)[1].to_i
|
338
258
|
end
|
339
259
|
|
340
|
-
def
|
341
|
-
|
260
|
+
def default_organization_uri
|
261
|
+
"/cloudapi/ecloud/organizations/"
|
342
262
|
end
|
343
263
|
end
|
344
264
|
|
345
|
-
|
346
265
|
class Real
|
347
266
|
include Shared
|
348
267
|
|
349
268
|
class << self
|
350
|
-
def basic_request(
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
:
|
355
|
-
:
|
356
|
-
:
|
357
|
-
:
|
358
|
-
:
|
359
|
-
|
360
|
-
|
361
|
-
EOS
|
362
|
-
end
|
363
|
-
|
364
|
-
def unauthenticated_basic_request(*args)
|
365
|
-
self.class_eval <<-EOS, __FILE__,__LINE__
|
366
|
-
def #{args[0]}(uri)
|
367
|
-
unauthenticated_request({
|
368
|
-
:expects => #{args[1] || 200},
|
369
|
-
:method => '#{args[2] || 'GET'}',
|
370
|
-
:headers => #{args[3] ? args[3].inspect : '{}'},
|
371
|
-
:parse => true,
|
372
|
-
:uri => uri })
|
373
|
-
end
|
374
|
-
EOS
|
269
|
+
def basic_request(name, expects=[200], method=:get, headers={}, body='')
|
270
|
+
define_method(name) do |uri|
|
271
|
+
request({
|
272
|
+
:expects => expects,
|
273
|
+
:method => method,
|
274
|
+
:headers => headers,
|
275
|
+
:body => body,
|
276
|
+
:parse => true,
|
277
|
+
:uri => uri
|
278
|
+
})
|
279
|
+
end
|
375
280
|
end
|
376
281
|
end
|
377
282
|
|
378
283
|
|
379
284
|
def initialize(options = {})
|
380
|
-
require 'builder'
|
381
285
|
require 'fog/core/parser'
|
382
286
|
@connections = {}
|
383
287
|
@connection_options = options[:connection_options] || {}
|
@@ -392,26 +296,14 @@ module Fog
|
|
392
296
|
@username = options[:ecloud_username]
|
393
297
|
@password = options[:ecloud_password]
|
394
298
|
if @username.nil? || @password.nil?
|
395
|
-
raise
|
299
|
+
raise ArgumentError, "No credentials (cloud auth, or basic auth) passed!"
|
396
300
|
end
|
397
301
|
else
|
398
|
-
@hmac
|
302
|
+
@hmac = Fog::HMAC.new("sha256", @private_key)
|
399
303
|
end
|
400
304
|
end
|
401
305
|
|
402
|
-
def default_organization_uri
|
403
|
-
"/cloudapi/ecloud/organizations/"
|
404
|
-
end
|
405
|
-
|
406
306
|
def request(params)
|
407
|
-
begin
|
408
|
-
do_request(params)
|
409
|
-
rescue Excon::Errors::Unauthorized => e
|
410
|
-
raise RuntimeError, "Invalid authentication data: #{e}"
|
411
|
-
end
|
412
|
-
end
|
413
|
-
|
414
|
-
def do_request(params)
|
415
307
|
# Convert the uri to a URI if it's a string.
|
416
308
|
if params[:uri].is_a?(String)
|
417
309
|
params[:uri] = URI.parse(@host + params[:uri])
|
@@ -426,13 +318,16 @@ module Fog
|
|
426
318
|
headers = set_extra_headers_for(params) || set_extra_headers_for({})
|
427
319
|
|
428
320
|
# Make the request
|
429
|
-
options = {
|
430
|
-
|
321
|
+
options = {
|
322
|
+
:expects => (params[:expects] || 200),
|
323
|
+
:method => params[:method] || 'GET',
|
324
|
+
:path => params[:uri].path + "#{"?#{params[:uri].query}" if params[:uri].query}",
|
325
|
+
:headers => headers
|
326
|
+
}
|
327
|
+
unless params[:body].nil? || params[:body].empty?
|
431
328
|
options.merge!({:body => params[:body]})
|
432
329
|
end
|
433
|
-
#puts options[:body].inspect
|
434
330
|
response = @connections[host_url].request(options)
|
435
|
-
|
436
331
|
# Parse the response body into a hash
|
437
332
|
unless response.body.empty?
|
438
333
|
if params[:parse]
|
@@ -444,6 +339,7 @@ module Fog
|
|
444
339
|
response.body = document.body
|
445
340
|
end
|
446
341
|
end
|
342
|
+
|
447
343
|
response
|
448
344
|
end
|
449
345
|
|
@@ -451,27 +347,27 @@ module Fog
|
|
451
347
|
|
452
348
|
# if Authorization and x-tmrk-authorization are used, the x-tmrk-authorization takes precendence.
|
453
349
|
def set_extra_headers_for(params)
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
unless params[:body].empty?
|
350
|
+
params[:headers] = {
|
351
|
+
'x-tmrk-version' => @version,
|
352
|
+
'Date' => Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S GMT"),
|
353
|
+
}.merge(params[:headers] || {})
|
354
|
+
if params[:method]=="POST" || params[:method]=="PUT"
|
355
|
+
params[:headers].merge!({"Content-Type" => 'application/xml'}) unless params[:headers]['Content-Type']
|
356
|
+
params[:headers].merge!({"Accept" => 'application/xml'})
|
357
|
+
end
|
358
|
+
unless params[:body].nil? || params[:body].empty?
|
464
359
|
params[:headers].merge!({"x-tmrk-contenthash" => "Sha256 #{Base64.encode64(Digest::SHA2.digest(params[:body].to_s)).chomp}"})
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
360
|
+
end
|
361
|
+
if @authentication_method == :basic_auth
|
362
|
+
params[:headers].merge!({'Authorization' => "Basic #{Base64.encode64(@username+":"+@password).delete("\r\n")}"})
|
363
|
+
elsif @authentication_method == :cloud_api_auth
|
364
|
+
signature = cloud_api_signature(params)
|
365
|
+
params[:headers].merge!({
|
366
|
+
"x-tmrk-authorization" => %{CloudApi AccessKey="#{@access_key}" SignatureType="HmacSha256" Signature="#{signature}"},
|
367
|
+
"Authorization" => %{CloudApi AccessKey="#{@access_key}" SignatureType="HmacSha256" Signature="#{signature}"}
|
368
|
+
})
|
369
|
+
end
|
370
|
+
params[:headers]
|
475
371
|
end
|
476
372
|
|
477
373
|
def cloud_api_signature(params)
|
@@ -480,13 +376,14 @@ module Fog
|
|
480
376
|
path = params[:uri].path
|
481
377
|
canonicalized_headers = canonicalize_headers(headers)
|
482
378
|
canonicalized_resource = canonicalize_resource(path)
|
483
|
-
string = [
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
379
|
+
string = [
|
380
|
+
verb,
|
381
|
+
headers['Content-Length'].to_s,
|
382
|
+
headers['Content-Type'].to_s,
|
383
|
+
headers['Date'].to_s,
|
384
|
+
canonicalized_headers,
|
385
|
+
canonicalized_resource + "\n"
|
386
|
+
].join("\n")
|
490
387
|
Base64.encode64(@hmac.sign(string)).chomp
|
491
388
|
end
|
492
389
|
|
@@ -510,6 +407,421 @@ module Fog
|
|
510
407
|
end
|
511
408
|
|
512
409
|
|
410
|
+
class Mock
|
411
|
+
include Shared
|
412
|
+
|
413
|
+
def self.data
|
414
|
+
@data ||= Hash.new do |hash, key|
|
415
|
+
hash[key] = begin
|
416
|
+
compute_pool_id = Fog.credentials[:ecloud_compute_pool_id] || Fog::Mock.random_numbers(3).to_i
|
417
|
+
environment_id = Fog.credentials[:ecloud_environment_id] || Fog::Mock.random_numbers(3).to_i
|
418
|
+
public_ip_id = Fog.credentials[:ecloud_public_ip_id] || Fog::Mock.random_numbers(6).to_i
|
419
|
+
internet_service_id = Fog::Mock.random_numbers(6).to_i
|
420
|
+
node_service_id = Fog::Mock.random_numbers(6).to_i
|
421
|
+
environment_name = Fog.credentials[:ecloud_environment_name] || Fog::Mock.random_letters(12)
|
422
|
+
location_id = Fog::Mock.random_numbers(4).to_i
|
423
|
+
network_id = Fog.credentials[:ecloud_network_id] || Fog::Mock.random_numbers(6).to_i
|
424
|
+
network_ip = Fog::Ecloud.ip_address
|
425
|
+
public_ip = Fog.credentials[:ecloud_public_ip_name] || Fog::Ecloud.ip_address
|
426
|
+
ip_address_id = Fog::Ecloud.ip_address
|
427
|
+
ip_address2_id = Fog::Ecloud.ip_address
|
428
|
+
operating_system_id = Fog::Mock.random_numbers(7).to_i
|
429
|
+
operating_system_family_id = Fog::Mock.random_numbers(7).to_i
|
430
|
+
organization_id = Fog::Mock.random_numbers(7).to_i
|
431
|
+
organization_name = Fog::Mock.random_letters(7)
|
432
|
+
template_id = Fog.credentials[:ecloud_template_id] || Fog::Mock.random_numbers(7).to_i
|
433
|
+
ssh_key_id = Fog.credentials[:ecloud_ssh_key_id] || Fog::Mock.random_numbers(4).to_i
|
434
|
+
ssh_key_name = Fog.credentials[:ecloud_ssh_key_name] || "root"
|
435
|
+
|
436
|
+
environment = {
|
437
|
+
:id => environment_id,
|
438
|
+
:href => "/cloudapi/ecloud/environments/#{environment_id}",
|
439
|
+
:name => environment_name,
|
440
|
+
:type => "application/vnd.tmrk.cloud.environment"
|
441
|
+
}
|
442
|
+
|
443
|
+
organization = {
|
444
|
+
:href => "/cloudapi/ecloud/organizations/#{organization_id}",
|
445
|
+
:type => "application/vnd.tmrk.cloud.organization",
|
446
|
+
:name => organization_name,
|
447
|
+
:Links => {
|
448
|
+
:Link => [
|
449
|
+
Fog::Ecloud.keep(environment, :href, :name, :type),
|
450
|
+
{
|
451
|
+
:href => "/cloudapi/ecloud/admin/organizations/#{organization_id}",
|
452
|
+
:name => organization_name,
|
453
|
+
:type => "application/vnd.tmrk.cloud.admin.organization",
|
454
|
+
:rel => "alternate",
|
455
|
+
},
|
456
|
+
{
|
457
|
+
:href => "/cloudapi/ecloud/devicetags/organizations/#{organization_id}",
|
458
|
+
:type => "application/vnd.tmrk.cloud.deviceTag; type=collection",
|
459
|
+
:rel => "down",
|
460
|
+
},
|
461
|
+
{
|
462
|
+
:href => "/cloudapi/ecloud/alerts/organizations/#{organization_id}",
|
463
|
+
:type => "application/vnd.tmrk.cloud.alertLog",
|
464
|
+
:rel => "down",
|
465
|
+
},
|
466
|
+
],
|
467
|
+
},
|
468
|
+
:Locations => {
|
469
|
+
:Location => [
|
470
|
+
{
|
471
|
+
:href => "/cloudapi/ecloud/locations/#{location_id}",
|
472
|
+
:name => organization_name,
|
473
|
+
:Catalog => {
|
474
|
+
:href => "/cloudapi/ecloud/admin/catalog/organizations/#{organization_id}/locations/#{location_id}",
|
475
|
+
:type => "application/vnd.tmrk.cloud.admin.catalogEntry; type=collection"
|
476
|
+
},
|
477
|
+
:Environments => { :Environment => [environment] }
|
478
|
+
}
|
479
|
+
]
|
480
|
+
}
|
481
|
+
}
|
482
|
+
environment.merge!(
|
483
|
+
:Links => {
|
484
|
+
:Link => [ Fog::Ecloud.keep(organization, :href, :name, :type), ]
|
485
|
+
}
|
486
|
+
)
|
487
|
+
|
488
|
+
admin_organization = {
|
489
|
+
:id => organization_id,
|
490
|
+
:href => "/cloudapi/ecloud/admin/organizations/#{organization_id}",
|
491
|
+
:type => "application/vnd.tmrk.cloud.admin.organization",
|
492
|
+
:name => organization_name,
|
493
|
+
:Links => {
|
494
|
+
:Link => [
|
495
|
+
Fog::Ecloud.keep(organization, :href, :type, :name)
|
496
|
+
],
|
497
|
+
},
|
498
|
+
:organization_id => organization_id,
|
499
|
+
}
|
500
|
+
|
501
|
+
compute_pool = {
|
502
|
+
:id => compute_pool_id,
|
503
|
+
:href => "/cloudapi/ecloud/computepools/#{compute_pool_id}",
|
504
|
+
:name => Fog::Mock.random_letters(12),
|
505
|
+
:type => "application/vnd.tmrk.cloud.computePool",
|
506
|
+
:environment_id => environment_id,
|
507
|
+
:Links => {
|
508
|
+
:Link => [
|
509
|
+
Fog::Ecloud.keep(organization, :href, :name, :type),
|
510
|
+
Fog::Ecloud.keep(environment, :href, :name, :type),
|
511
|
+
]
|
512
|
+
}
|
513
|
+
}
|
514
|
+
|
515
|
+
|
516
|
+
public_ip = {
|
517
|
+
:id => public_ip_id,
|
518
|
+
:href => "/cloudapi/ecloud/publicips/#{public_ip_id}",
|
519
|
+
:name => public_ip,
|
520
|
+
:type => "application/vnd.tmrk.cloud.publicIp",
|
521
|
+
:IpType => "none",
|
522
|
+
:environment_id => environment_id,
|
523
|
+
:Links => {
|
524
|
+
:Link => [
|
525
|
+
Fog::Ecloud.keep(environment, :href, :name, :type),
|
526
|
+
],
|
527
|
+
},
|
528
|
+
:InternetServices => {
|
529
|
+
:InternetService => [
|
530
|
+
],
|
531
|
+
},
|
532
|
+
}
|
533
|
+
|
534
|
+
internet_service = {
|
535
|
+
:id => internet_service_id,
|
536
|
+
:href => "/cloudapi/ecloud/internetservices/#{internet_service_id}",
|
537
|
+
:name => Fog::Mock.random_letters(6),
|
538
|
+
:type => "application/vnd.tmrk.cloud.internetService",
|
539
|
+
:public_ip_id => public_ip_id,
|
540
|
+
:Links => {
|
541
|
+
:Link => [
|
542
|
+
Fog::Ecloud.keep(public_ip, :href, :name, :type),
|
543
|
+
],
|
544
|
+
},
|
545
|
+
:NodeServices => {
|
546
|
+
:NodeService => [
|
547
|
+
]
|
548
|
+
},
|
549
|
+
}
|
550
|
+
|
551
|
+
node_service = {
|
552
|
+
:id => node_service_id,
|
553
|
+
:href => "/cloudapi/ecloud/nodeservices/#{node_service_id}",
|
554
|
+
:name => Fog::Mock.random_letters(6),
|
555
|
+
:type => "application/vnd.tmrk.cloud.nodeService",
|
556
|
+
:internet_service_id => internet_service_id,
|
557
|
+
:Links => {
|
558
|
+
:Link => [
|
559
|
+
Fog::Ecloud.keep(internet_service, :href, :name, :type)
|
560
|
+
],
|
561
|
+
},
|
562
|
+
}
|
563
|
+
|
564
|
+
internet_service[:NodeServices][:NodeService].push(node_service)
|
565
|
+
public_ip[:InternetServices][:InternetService].push(internet_service)
|
566
|
+
|
567
|
+
network = {
|
568
|
+
:id => network_id,
|
569
|
+
:href => "/cloudapi/ecloud/networks/#{network_id}",
|
570
|
+
:name => "#{network_ip}/#{Fog::Mock.random_numbers(2)}",
|
571
|
+
:type => "application/vnd.tmrk.cloud.network",
|
572
|
+
:Address => network_ip,
|
573
|
+
:NetworkType => "Dmz",
|
574
|
+
:BroadcastAddress => network_ip,
|
575
|
+
:GatewayAddress => network_ip,
|
576
|
+
:environment_id => environment_id,
|
577
|
+
:Links => {
|
578
|
+
:Link => [
|
579
|
+
Fog::Ecloud.keep(environment, :href, :name, :type),
|
580
|
+
]
|
581
|
+
},
|
582
|
+
:IpAddresses => {
|
583
|
+
:IpAddress => [],
|
584
|
+
},
|
585
|
+
}
|
586
|
+
|
587
|
+
ip_address = {
|
588
|
+
:id => ip_address_id,
|
589
|
+
:href => "/cloudapi/ecloud/ipaddresses/networks/#{network_id}/#{ip_address_id}",
|
590
|
+
:name => ip_address_id,
|
591
|
+
:type => "application/vnd.tmrk.cloud.ipAddress",
|
592
|
+
:network_id => network_id,
|
593
|
+
:Links => {
|
594
|
+
:Link => [ Fog::Ecloud.keep(network, :href, :name, :type), ],
|
595
|
+
},
|
596
|
+
:Reserved => "false",
|
597
|
+
:Host => nil,
|
598
|
+
:DetectedOn => nil,
|
599
|
+
}
|
600
|
+
|
601
|
+
ip_address2 = ip_address.dup.merge(:id => ip_address2_id, :href => "/cloudapi/ecloud/ipaddresses/networks/#{network_id}/#{ip_address2_id}", :name => ip_address2_id)
|
602
|
+
|
603
|
+
network[:IpAddresses][:IpAddress].push(ip_address).push(ip_address2)
|
604
|
+
|
605
|
+
|
606
|
+
short_name = "solaris10_64guest"
|
607
|
+
operating_system = {
|
608
|
+
:short_name => short_name,
|
609
|
+
:compute_pool_id => compute_pool_id,
|
610
|
+
:href => "/cloudapi/ecloud/operatingsystems/#{short_name}/computepools/#{compute_pool_id}",
|
611
|
+
:name => "Sun Solaris 10 (64-bit)",
|
612
|
+
:type => "application/vnd.tmrk.cloud.operatingSystem",
|
613
|
+
:FamilyName => "Solaris",
|
614
|
+
:Links => {
|
615
|
+
:Link => Fog::Ecloud.keep(compute_pool, :href, :name, :type),
|
616
|
+
},
|
617
|
+
:ConfigurationOptions => {
|
618
|
+
:Processor => {
|
619
|
+
:Minimum => "1",
|
620
|
+
:Maximum => "8",
|
621
|
+
:StepFactor => "1"
|
622
|
+
},
|
623
|
+
:Memory => {
|
624
|
+
:MinimumSize => {
|
625
|
+
:Unit => "MB",
|
626
|
+
:Value => "800"
|
627
|
+
},
|
628
|
+
:MaximumSize => {
|
629
|
+
:Unit => "MB",
|
630
|
+
:Value => "16384"
|
631
|
+
},
|
632
|
+
:StepFactor => {
|
633
|
+
:Unit => "MB",
|
634
|
+
:Value => "4"
|
635
|
+
}
|
636
|
+
},
|
637
|
+
:Disk => {
|
638
|
+
:Minimum => "1",
|
639
|
+
:Maximum => "15",
|
640
|
+
:SystemDisk => {
|
641
|
+
:ResourceCapacityRange => {
|
642
|
+
:MinimumSize => {
|
643
|
+
:Unit => "GB",
|
644
|
+
:Value => "1"
|
645
|
+
},
|
646
|
+
:MaximumSize => {
|
647
|
+
:Unit => "GB",
|
648
|
+
:Value => "512"
|
649
|
+
},
|
650
|
+
:StepFactor => {
|
651
|
+
:Unit => "GB",
|
652
|
+
:Value => "1"}
|
653
|
+
},
|
654
|
+
:MonthlyCost => "0"
|
655
|
+
},
|
656
|
+
:DataDisk => {
|
657
|
+
:ResourceCapacityRange => {
|
658
|
+
:MinimumSize => {
|
659
|
+
:Unit => "GB",
|
660
|
+
:Value => "1"
|
661
|
+
},
|
662
|
+
:MaximumSize => {
|
663
|
+
:Unit => "GB",
|
664
|
+
:Value => "512"
|
665
|
+
},
|
666
|
+
:StepFactor => {
|
667
|
+
:Unit => "GB",
|
668
|
+
:Value => "1"
|
669
|
+
}
|
670
|
+
},
|
671
|
+
:MonthlyCost => "0"
|
672
|
+
}
|
673
|
+
},
|
674
|
+
:NetworkAdapter=> {
|
675
|
+
:Minimum => "1",
|
676
|
+
:Maximum => "4",
|
677
|
+
:StepFactor => "1"
|
678
|
+
}
|
679
|
+
}
|
680
|
+
}
|
681
|
+
|
682
|
+
|
683
|
+
template = {
|
684
|
+
:id => template_id,
|
685
|
+
:href => "/cloudapi/ecloud/templates/#{template_id}/computepools/#{compute_pool_id}",
|
686
|
+
:type => "application/vnd.tmrk.cloud.template",
|
687
|
+
:name => "Sun Solaris 10 (x64)",
|
688
|
+
:compute_pool_id => compute_pool_id,
|
689
|
+
:OperatingSystem => Fog::Ecloud.keep(operating_system, :href, :name, :type),
|
690
|
+
:Memory => {
|
691
|
+
:MinimumSize => {
|
692
|
+
:Unit => "MB",
|
693
|
+
:Value => "800"
|
694
|
+
},
|
695
|
+
:MaximumSize => {
|
696
|
+
:Unit => "MB",
|
697
|
+
:Value => "16384"
|
698
|
+
},
|
699
|
+
:StepFactor => {
|
700
|
+
:Unit => "MB",
|
701
|
+
:Value => "4"
|
702
|
+
}
|
703
|
+
},
|
704
|
+
:Storage => {
|
705
|
+
:Size => {
|
706
|
+
:Unit => "GB",
|
707
|
+
:Value => "7"
|
708
|
+
}
|
709
|
+
},
|
710
|
+
:NetworkAdapters => "1",
|
711
|
+
:Links => {
|
712
|
+
:Link => [
|
713
|
+
Fog::Ecloud.keep(compute_pool, :href, :name, :type),
|
714
|
+
]
|
715
|
+
}
|
716
|
+
}
|
717
|
+
|
718
|
+
operating_system_family = {
|
719
|
+
:id => operating_system_family_id,
|
720
|
+
:compute_pool_id => compute_pool_id,
|
721
|
+
:OperatingSystemFamily => {
|
722
|
+
:Name => "Linux",
|
723
|
+
:OperatingSystems => {
|
724
|
+
:OperatingSystem => [Fog::Ecloud.keep(operating_system, :href, :name, :type)],
|
725
|
+
}
|
726
|
+
},
|
727
|
+
:Links => {
|
728
|
+
:Link => [
|
729
|
+
Fog::Ecloud.keep(compute_pool, :href, :name, :type),
|
730
|
+
]
|
731
|
+
}
|
732
|
+
}
|
733
|
+
|
734
|
+
ssh_key = {
|
735
|
+
:id => ssh_key_id,
|
736
|
+
:href => "/cloudapi/ecloud/admin/sshKeys/#{ssh_key_id}",
|
737
|
+
:name => ssh_key_name,
|
738
|
+
:admin_organization_id => organization_id,
|
739
|
+
:Links => {
|
740
|
+
:Link => [
|
741
|
+
Fog::Ecloud.keep(admin_organization, :href, :name, :type),
|
742
|
+
Fog::Ecloud.keep(organization, :href, :name, :type),
|
743
|
+
]
|
744
|
+
},
|
745
|
+
:Default => "true",
|
746
|
+
:FingerPrint => Fog::Ecloud.mac_address
|
747
|
+
}
|
748
|
+
|
749
|
+
layout = {
|
750
|
+
:id => environment_id,
|
751
|
+
:href => "/cloudapi/ecloud/layout/environments/#{environment_id}",
|
752
|
+
:type => "application/vnd.tmrk.cloud.deviceLayout",
|
753
|
+
:Links => {
|
754
|
+
:Link => [
|
755
|
+
Fog::Ecloud.keep(environment, :name, :href, :type),
|
756
|
+
],
|
757
|
+
},
|
758
|
+
:Rows => {
|
759
|
+
:Row => [
|
760
|
+
],
|
761
|
+
},
|
762
|
+
:environment_id => environment_id
|
763
|
+
}
|
764
|
+
|
765
|
+
|
766
|
+
{
|
767
|
+
:compute_pools => {compute_pool_id => compute_pool},
|
768
|
+
:environments => {environment_id => environment},
|
769
|
+
:public_ips => {public_ip_id => public_ip},
|
770
|
+
:internet_services => {internet_service_id => internet_service},
|
771
|
+
:node_services => {node_service_id => node_service},
|
772
|
+
:networks => {network_id => network},
|
773
|
+
:organizations => {organization_id => organization},
|
774
|
+
:admin_organizations => {organization_id => admin_organization},
|
775
|
+
:operating_systems => {operating_system_id => operating_system},
|
776
|
+
:operating_system_families => {operating_system_family_id => operating_system_family},
|
777
|
+
:servers => {},
|
778
|
+
:tasks => {},
|
779
|
+
:templates => {template_id => template},
|
780
|
+
:ssh_keys => {ssh_key_id => ssh_key},
|
781
|
+
:detached_disks => {},
|
782
|
+
:template_href => (Fog.credentials[:ecloud_template_href] || "/cloudapi/ecloud/templates/#{template_id}/computepools/#{compute_pool_id}"),
|
783
|
+
:rows => {},
|
784
|
+
:groups => {},
|
785
|
+
:layouts => {environment_id => layout},
|
786
|
+
}
|
787
|
+
end
|
788
|
+
end
|
789
|
+
end
|
790
|
+
|
791
|
+
def self.reset
|
792
|
+
@data = nil
|
793
|
+
end
|
794
|
+
|
795
|
+
def initialize(options={})
|
796
|
+
@ecloud_api_key = options[:ecloud]
|
797
|
+
end
|
798
|
+
|
799
|
+
def data
|
800
|
+
self.class.data[@ecloud_api_key]
|
801
|
+
end
|
802
|
+
|
803
|
+
def reset_data
|
804
|
+
self.class.data.delete(@ecloud_api_key)
|
805
|
+
end
|
806
|
+
|
807
|
+
def response(params={})
|
808
|
+
body = params[:body]
|
809
|
+
headers = {
|
810
|
+
"Content-Type" => "application/xml"
|
811
|
+
}.merge(params[:headers] || {})
|
812
|
+
status = params[:status] || 200
|
813
|
+
|
814
|
+
response = Excon::Response.new(:body => body, :headers => headers, :status => status)
|
815
|
+
if params.has_key?(:expects) && ![*params[:expects]].include?(response.status)
|
816
|
+
raise(Excon::Errors.status_error(params, response))
|
817
|
+
else response
|
818
|
+
end
|
819
|
+
end
|
820
|
+
|
821
|
+
def deep_copy(o)
|
822
|
+
Marshal.load(Marshal.dump(o))
|
823
|
+
end
|
824
|
+
end
|
513
825
|
end
|
514
826
|
end
|
515
827
|
end
|