phpfog-fog 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +3 -0
- data/.gitignore +11 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +45 -0
- data/README.rdoc +176 -0
- data/Rakefile +132 -0
- data/benchs/fog_vs.rb +106 -0
- data/benchs/params.rb +43 -0
- data/benchs/parse_vs_push.rb +60 -0
- data/bin/fog +46 -0
- data/examples/dns_tests.rb +76 -0
- data/examples/storage_tests.rb +103 -0
- data/fog.gemspec +62 -0
- data/lib/fog/aws/elb.rb +106 -0
- data/lib/fog/aws/iam.rb +105 -0
- data/lib/fog/aws/parsers/elb/create_load_balancer.rb +26 -0
- data/lib/fog/aws/parsers/elb/delete_load_balancer.rb +24 -0
- data/lib/fog/aws/parsers/elb/deregister_instances_from_load_balancer.rb +26 -0
- data/lib/fog/aws/parsers/elb/describe_instance_health.rb +30 -0
- data/lib/fog/aws/parsers/elb/describe_load_balancers.rb +101 -0
- data/lib/fog/aws/parsers/elb/disable_availability_zones_for_load_balancer.rb +26 -0
- data/lib/fog/aws/parsers/elb/enable_availability_zones_for_load_balancer.rb +26 -0
- data/lib/fog/aws/parsers/elb/register_instances_with_load_balancer.rb +26 -0
- data/lib/fog/aws/parsers/iam/basic.rb +19 -0
- data/lib/fog/aws/parsers/iam/create_access_key.rb +26 -0
- data/lib/fog/aws/parsers/iam/create_group.rb +26 -0
- data/lib/fog/aws/parsers/iam/create_user.rb +26 -0
- data/lib/fog/aws/parsers/iam/get_user.rb +27 -0
- data/lib/fog/aws/parsers/iam/list_access_keys.rb +32 -0
- data/lib/fog/aws/parsers/iam/list_groups.rb +32 -0
- data/lib/fog/aws/parsers/iam/list_policies.rb +28 -0
- data/lib/fog/aws/parsers/iam/list_users.rb +32 -0
- data/lib/fog/aws/parsers/ses/delete_verified_email_address.rb +24 -0
- data/lib/fog/aws/parsers/ses/get_send_quota.rb +26 -0
- data/lib/fog/aws/parsers/ses/get_send_statistics.rb +29 -0
- data/lib/fog/aws/parsers/ses/list_verified_email_addresses.rb +25 -0
- data/lib/fog/aws/parsers/ses/send_email.rb +26 -0
- data/lib/fog/aws/parsers/ses/send_raw_email.rb +26 -0
- data/lib/fog/aws/parsers/ses/verify_email_address.rb +24 -0
- data/lib/fog/aws/parsers/simpledb/basic.rb +31 -0
- data/lib/fog/aws/parsers/simpledb/domain_metadata.rb +32 -0
- data/lib/fog/aws/parsers/simpledb/get_attributes.rb +36 -0
- data/lib/fog/aws/parsers/simpledb/list_domains.rb +30 -0
- data/lib/fog/aws/parsers/simpledb/select.rb +41 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +59 -0
- data/lib/fog/aws/requests/elb/delete_load_balancer.rb +42 -0
- data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +47 -0
- data/lib/fog/aws/requests/elb/describe_instance_health.rb +46 -0
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +59 -0
- data/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +46 -0
- data/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +46 -0
- data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +47 -0
- data/lib/fog/aws/requests/iam/add_user_to_group.rb +42 -0
- data/lib/fog/aws/requests/iam/create_access_key.rb +45 -0
- data/lib/fog/aws/requests/iam/create_group.rb +47 -0
- data/lib/fog/aws/requests/iam/create_user.rb +47 -0
- data/lib/fog/aws/requests/iam/delete_access_key.rb +42 -0
- data/lib/fog/aws/requests/iam/delete_group.rb +40 -0
- data/lib/fog/aws/requests/iam/delete_group_policy.rb +42 -0
- data/lib/fog/aws/requests/iam/delete_user.rb +40 -0
- data/lib/fog/aws/requests/iam/delete_user_policy.rb +42 -0
- data/lib/fog/aws/requests/iam/get_user.rb +44 -0
- data/lib/fog/aws/requests/iam/list_access_keys.rb +48 -0
- data/lib/fog/aws/requests/iam/list_group_policies.rb +47 -0
- data/lib/fog/aws/requests/iam/list_groups.rb +50 -0
- data/lib/fog/aws/requests/iam/list_user_policies.rb +47 -0
- data/lib/fog/aws/requests/iam/list_users.rb +50 -0
- data/lib/fog/aws/requests/iam/put_group_policy.rb +44 -0
- data/lib/fog/aws/requests/iam/put_user_policy.rb +44 -0
- data/lib/fog/aws/requests/iam/remove_user_from_group.rb +42 -0
- data/lib/fog/aws/requests/iam/update_access_key.rb +44 -0
- data/lib/fog/aws/requests/ses/delete_verified_email_address.rb +38 -0
- data/lib/fog/aws/requests/ses/get_send_quota.rb +40 -0
- data/lib/fog/aws/requests/ses/get_send_statistics.rb +43 -0
- data/lib/fog/aws/requests/ses/list_verified_email_addresses.rb +38 -0
- data/lib/fog/aws/requests/ses/send_email.rb +58 -0
- data/lib/fog/aws/requests/ses/send_raw_email.rb +44 -0
- data/lib/fog/aws/requests/ses/verify_email_address.rb +38 -0
- data/lib/fog/aws/requests/simpledb/batch_put_attributes.rb +64 -0
- data/lib/fog/aws/requests/simpledb/create_domain.rb +44 -0
- data/lib/fog/aws/requests/simpledb/delete_attributes.rb +63 -0
- data/lib/fog/aws/requests/simpledb/delete_domain.rb +45 -0
- data/lib/fog/aws/requests/simpledb/domain_metadata.rb +76 -0
- data/lib/fog/aws/requests/simpledb/get_attributes.rb +72 -0
- data/lib/fog/aws/requests/simpledb/list_domains.rb +59 -0
- data/lib/fog/aws/requests/simpledb/put_attributes.rb +78 -0
- data/lib/fog/aws/requests/simpledb/select.rb +43 -0
- data/lib/fog/aws/ses.rb +99 -0
- data/lib/fog/aws/simpledb.rb +172 -0
- data/lib/fog/bin/aws.rb +71 -0
- data/lib/fog/bin/bluebox.rb +36 -0
- data/lib/fog/bin/brightbox.rb +34 -0
- data/lib/fog/bin/go_grid.rb +36 -0
- data/lib/fog/bin/google.rb +30 -0
- data/lib/fog/bin/linode.rb +40 -0
- data/lib/fog/bin/local.rb +36 -0
- data/lib/fog/bin/new_servers.rb +36 -0
- data/lib/fog/bin/rackspace.rb +52 -0
- data/lib/fog/bin/slicehost.rb +40 -0
- data/lib/fog/bin/terremark.rb +36 -0
- data/lib/fog/bin/terremark_ecloud.rb +28 -0
- data/lib/fog/bin/vcloud.rb +59 -0
- data/lib/fog/bin/zerigo.rb +30 -0
- data/lib/fog/bin.rb +89 -0
- data/lib/fog/cdn/aws.rb +115 -0
- data/lib/fog/cdn/parsers/aws/distribution.rb +59 -0
- data/lib/fog/cdn/parsers/aws/get_distribution_list.rb +61 -0
- data/lib/fog/cdn/parsers/aws/post_invalidation.rb +28 -0
- data/lib/fog/cdn/rackspace.rb +97 -0
- data/lib/fog/cdn/requests/aws/delete_distribution.rb +36 -0
- data/lib/fog/cdn/requests/aws/get_distribution.rb +65 -0
- data/lib/fog/cdn/requests/aws/get_distribution_list.rb +67 -0
- data/lib/fog/cdn/requests/aws/post_distribution.rb +99 -0
- data/lib/fog/cdn/requests/aws/post_invalidation.rb +59 -0
- data/lib/fog/cdn/requests/aws/put_distribution_config.rb +102 -0
- data/lib/fog/cdn/requests/rackspace/get_containers.rb +39 -0
- data/lib/fog/cdn/requests/rackspace/head_container.rb +41 -0
- data/lib/fog/cdn/requests/rackspace/put_container.rb +38 -0
- data/lib/fog/cdn.rb +19 -0
- data/lib/fog/compute/aws.rb +273 -0
- data/lib/fog/compute/bluebox.rb +104 -0
- data/lib/fog/compute/brightbox.rb +159 -0
- data/lib/fog/compute/go_grid.rb +118 -0
- data/lib/fog/compute/linode.rb +100 -0
- data/lib/fog/compute/models/aws/address.rb +69 -0
- data/lib/fog/compute/models/aws/addresses.rb +100 -0
- data/lib/fog/compute/models/aws/flavor.rb +21 -0
- data/lib/fog/compute/models/aws/flavors.rb +166 -0
- data/lib/fog/compute/models/aws/image.rb +43 -0
- data/lib/fog/compute/models/aws/images.rb +62 -0
- data/lib/fog/compute/models/aws/key_pair.rb +44 -0
- data/lib/fog/compute/models/aws/key_pairs.rb +88 -0
- data/lib/fog/compute/models/aws/security_group.rb +205 -0
- data/lib/fog/compute/models/aws/security_groups.rb +95 -0
- data/lib/fog/compute/models/aws/server.rb +212 -0
- data/lib/fog/compute/models/aws/servers.rb +158 -0
- data/lib/fog/compute/models/aws/snapshot.rb +58 -0
- data/lib/fog/compute/models/aws/snapshots.rb +52 -0
- data/lib/fog/compute/models/aws/tag.rb +36 -0
- data/lib/fog/compute/models/aws/tags.rb +34 -0
- data/lib/fog/compute/models/aws/volume.rb +109 -0
- data/lib/fog/compute/models/aws/volumes.rb +121 -0
- data/lib/fog/compute/models/bluebox/flavor.rb +45 -0
- data/lib/fog/compute/models/bluebox/flavors.rb +28 -0
- data/lib/fog/compute/models/bluebox/image.rb +19 -0
- data/lib/fog/compute/models/bluebox/images.rb +28 -0
- data/lib/fog/compute/models/bluebox/server.rb +126 -0
- data/lib/fog/compute/models/bluebox/servers.rb +36 -0
- data/lib/fog/compute/models/brightbox/account.rb +51 -0
- data/lib/fog/compute/models/brightbox/cloud_ip.rb +47 -0
- data/lib/fog/compute/models/brightbox/cloud_ips.rb +34 -0
- data/lib/fog/compute/models/brightbox/flavor.rb +33 -0
- data/lib/fog/compute/models/brightbox/flavors.rb +28 -0
- data/lib/fog/compute/models/brightbox/image.rb +56 -0
- data/lib/fog/compute/models/brightbox/images.rb +28 -0
- data/lib/fog/compute/models/brightbox/load_balancer.rb +50 -0
- data/lib/fog/compute/models/brightbox/load_balancers.rb +28 -0
- data/lib/fog/compute/models/brightbox/server.rb +94 -0
- data/lib/fog/compute/models/brightbox/servers.rb +29 -0
- data/lib/fog/compute/models/brightbox/user.rb +39 -0
- data/lib/fog/compute/models/brightbox/users.rb +29 -0
- data/lib/fog/compute/models/brightbox/zone.rb +21 -0
- data/lib/fog/compute/models/brightbox/zones.rb +29 -0
- data/lib/fog/compute/models/go_grid/image.rb +60 -0
- data/lib/fog/compute/models/go_grid/images.rb +33 -0
- data/lib/fog/compute/models/go_grid/server.rb +56 -0
- data/lib/fog/compute/models/go_grid/servers.rb +35 -0
- data/lib/fog/compute/models/rackspace/flavor.rb +43 -0
- data/lib/fog/compute/models/rackspace/flavors.rb +28 -0
- data/lib/fog/compute/models/rackspace/image.rb +48 -0
- data/lib/fog/compute/models/rackspace/images.rb +33 -0
- data/lib/fog/compute/models/rackspace/server.rb +129 -0
- data/lib/fog/compute/models/rackspace/servers.rb +36 -0
- data/lib/fog/compute/models/slicehost/flavor.rb +45 -0
- data/lib/fog/compute/models/slicehost/flavors.rb +28 -0
- data/lib/fog/compute/models/slicehost/image.rb +17 -0
- data/lib/fog/compute/models/slicehost/images.rb +27 -0
- data/lib/fog/compute/models/slicehost/server.rb +112 -0
- data/lib/fog/compute/models/slicehost/servers.rb +38 -0
- data/lib/fog/compute/new_servers.rb +103 -0
- data/lib/fog/compute/parsers/aws/allocate_address.rb +19 -0
- data/lib/fog/compute/parsers/aws/attach_volume.rb +22 -0
- data/lib/fog/compute/parsers/aws/basic.rb +25 -0
- data/lib/fog/compute/parsers/aws/create_image.rb +20 -0
- data/lib/fog/compute/parsers/aws/create_key_pair.rb +20 -0
- data/lib/fog/compute/parsers/aws/create_snapshot.rb +26 -0
- data/lib/fog/compute/parsers/aws/create_volume.rb +24 -0
- data/lib/fog/compute/parsers/aws/deregister_image.rb +20 -0
- data/lib/fog/compute/parsers/aws/describe_addresses.rb +30 -0
- data/lib/fog/compute/parsers/aws/describe_availability_zones.rb +32 -0
- data/lib/fog/compute/parsers/aws/describe_images.rb +72 -0
- data/lib/fog/compute/parsers/aws/describe_instances.rb +119 -0
- data/lib/fog/compute/parsers/aws/describe_key_pairs.rb +30 -0
- data/lib/fog/compute/parsers/aws/describe_regions.rb +30 -0
- data/lib/fog/compute/parsers/aws/describe_reserved_instances.rb +36 -0
- data/lib/fog/compute/parsers/aws/describe_security_groups.rb +76 -0
- data/lib/fog/compute/parsers/aws/describe_snapshots.rb +54 -0
- data/lib/fog/compute/parsers/aws/describe_tags.rb +30 -0
- data/lib/fog/compute/parsers/aws/describe_volumes.rb +73 -0
- data/lib/fog/compute/parsers/aws/detach_volume.rb +22 -0
- data/lib/fog/compute/parsers/aws/get_console_output.rb +32 -0
- data/lib/fog/compute/parsers/aws/import_key_pair.rb +20 -0
- data/lib/fog/compute/parsers/aws/register_image.rb +20 -0
- data/lib/fog/compute/parsers/aws/run_instances.rb +89 -0
- data/lib/fog/compute/parsers/aws/start_stop_instances.rb +41 -0
- data/lib/fog/compute/parsers/aws/terminate_instances.rb +55 -0
- data/lib/fog/compute/parsers/slicehost/create_slice.rb +31 -0
- data/lib/fog/compute/parsers/slicehost/get_backups.rb +32 -0
- data/lib/fog/compute/parsers/slicehost/get_flavor.rb +26 -0
- data/lib/fog/compute/parsers/slicehost/get_flavors.rb +30 -0
- data/lib/fog/compute/parsers/slicehost/get_image.rb +26 -0
- data/lib/fog/compute/parsers/slicehost/get_images.rb +30 -0
- data/lib/fog/compute/parsers/slicehost/get_slice.rb +31 -0
- data/lib/fog/compute/parsers/slicehost/get_slices.rb +35 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_catalog.rb +36 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_catalog_item.rb +43 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_ip_addresses.rb +27 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_network.rb +59 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_organization.rb +35 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_vdc.rb +110 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_versions.rb +28 -0
- data/lib/fog/compute/parsers/terremark_ecloud/login.rb +27 -0
- data/lib/fog/compute/rackspace.rb +144 -0
- data/lib/fog/compute/requests/aws/allocate_address.rb +51 -0
- data/lib/fog/compute/requests/aws/associate_address.rb +57 -0
- data/lib/fog/compute/requests/aws/attach_volume.rb +81 -0
- data/lib/fog/compute/requests/aws/authorize_security_group_ingress.rb +86 -0
- data/lib/fog/compute/requests/aws/create_image.rb +64 -0
- data/lib/fog/compute/requests/aws/create_key_pair.rb +54 -0
- data/lib/fog/compute/requests/aws/create_security_group.rb +53 -0
- data/lib/fog/compute/requests/aws/create_snapshot.rb +71 -0
- data/lib/fog/compute/requests/aws/create_tags.rb +78 -0
- data/lib/fog/compute/requests/aws/create_volume.rb +74 -0
- data/lib/fog/compute/requests/aws/delete_key_pair.rb +43 -0
- data/lib/fog/compute/requests/aws/delete_security_group.rb +45 -0
- data/lib/fog/compute/requests/aws/delete_snapshot.rb +46 -0
- data/lib/fog/compute/requests/aws/delete_tags.rb +45 -0
- data/lib/fog/compute/requests/aws/delete_volume.rb +52 -0
- data/lib/fog/compute/requests/aws/deregister_image.rb +51 -0
- data/lib/fog/compute/requests/aws/describe_addresses.rb +64 -0
- data/lib/fog/compute/requests/aws/describe_availability_zones.rb +70 -0
- data/lib/fog/compute/requests/aws/describe_images.rb +112 -0
- data/lib/fog/compute/requests/aws/describe_instances.rb +201 -0
- data/lib/fog/compute/requests/aws/describe_key_pairs.rb +66 -0
- data/lib/fog/compute/requests/aws/describe_regions.rb +66 -0
- data/lib/fog/compute/requests/aws/describe_reserved_instances.rb +52 -0
- data/lib/fog/compute/requests/aws/describe_security_groups.rb +95 -0
- data/lib/fog/compute/requests/aws/describe_snapshots.rb +120 -0
- data/lib/fog/compute/requests/aws/describe_tags.rb +42 -0
- data/lib/fog/compute/requests/aws/describe_volumes.rb +118 -0
- data/lib/fog/compute/requests/aws/detach_volume.rb +58 -0
- data/lib/fog/compute/requests/aws/disassociate_address.rb +52 -0
- data/lib/fog/compute/requests/aws/get_console_output.rb +52 -0
- data/lib/fog/compute/requests/aws/import_key_pair.rb +54 -0
- data/lib/fog/compute/requests/aws/modify_image_attributes.rb +39 -0
- data/lib/fog/compute/requests/aws/modify_snapshot_attribute.rb +38 -0
- data/lib/fog/compute/requests/aws/reboot_instances.rb +50 -0
- data/lib/fog/compute/requests/aws/register_image.rb +89 -0
- data/lib/fog/compute/requests/aws/release_address.rb +43 -0
- data/lib/fog/compute/requests/aws/revoke_security_group_ingress.rb +74 -0
- data/lib/fog/compute/requests/aws/run_instances.rb +167 -0
- data/lib/fog/compute/requests/aws/start_instances.rb +38 -0
- data/lib/fog/compute/requests/aws/stop_instances.rb +38 -0
- data/lib/fog/compute/requests/aws/terminate_instances.rb +94 -0
- data/lib/fog/compute/requests/bluebox/create_block.rb +41 -0
- data/lib/fog/compute/requests/bluebox/destroy_block.rb +34 -0
- data/lib/fog/compute/requests/bluebox/get_block.rb +34 -0
- data/lib/fog/compute/requests/bluebox/get_blocks.rb +36 -0
- data/lib/fog/compute/requests/bluebox/get_product.rb +34 -0
- data/lib/fog/compute/requests/bluebox/get_products.rb +33 -0
- data/lib/fog/compute/requests/bluebox/get_template.rb +34 -0
- data/lib/fog/compute/requests/bluebox/get_templates.rb +34 -0
- data/lib/fog/compute/requests/bluebox/reboot_block.rb +35 -0
- data/lib/fog/compute/requests/brightbox/add_nodes_load_balancer.rb +28 -0
- data/lib/fog/compute/requests/brightbox/create_api_client.rb +27 -0
- data/lib/fog/compute/requests/brightbox/create_cloud_ip.rb +27 -0
- data/lib/fog/compute/requests/brightbox/create_image.rb +27 -0
- data/lib/fog/compute/requests/brightbox/create_load_balancer.rb +27 -0
- data/lib/fog/compute/requests/brightbox/create_server.rb +27 -0
- data/lib/fog/compute/requests/brightbox/destroy_api_client.rb +28 -0
- data/lib/fog/compute/requests/brightbox/destroy_cloud_ip.rb +28 -0
- data/lib/fog/compute/requests/brightbox/destroy_image.rb +28 -0
- data/lib/fog/compute/requests/brightbox/destroy_load_balancer.rb +28 -0
- data/lib/fog/compute/requests/brightbox/destroy_server.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_account.rb +27 -0
- data/lib/fog/compute/requests/brightbox/get_api_client.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_cloud_ip.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_image.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_interface.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_load_balancer.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_server.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_server_type.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_user.rb +28 -0
- data/lib/fog/compute/requests/brightbox/get_zone.rb +28 -0
- data/lib/fog/compute/requests/brightbox/list_api_clients.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_cloud_ips.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_images.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_load_balancers.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_server_types.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_servers.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_users.rb +27 -0
- data/lib/fog/compute/requests/brightbox/list_zones.rb +27 -0
- data/lib/fog/compute/requests/brightbox/map_cloud_ip.rb +28 -0
- data/lib/fog/compute/requests/brightbox/remove_nodes_load_balancer.rb +28 -0
- data/lib/fog/compute/requests/brightbox/reset_ftp_password_account.rb +27 -0
- data/lib/fog/compute/requests/brightbox/resize_server.rb +27 -0
- data/lib/fog/compute/requests/brightbox/shutdown_server.rb +28 -0
- data/lib/fog/compute/requests/brightbox/snapshot_server.rb +28 -0
- data/lib/fog/compute/requests/brightbox/start_server.rb +28 -0
- data/lib/fog/compute/requests/brightbox/stop_server.rb +28 -0
- data/lib/fog/compute/requests/brightbox/unmap_cloud_ip.rb +28 -0
- data/lib/fog/compute/requests/brightbox/update_account.rb +28 -0
- data/lib/fog/compute/requests/brightbox/update_api_client.rb +29 -0
- data/lib/fog/compute/requests/brightbox/update_image.rb +29 -0
- data/lib/fog/compute/requests/brightbox/update_load_balancer.rb +29 -0
- data/lib/fog/compute/requests/brightbox/update_server.rb +29 -0
- data/lib/fog/compute/requests/brightbox/update_user.rb +29 -0
- data/lib/fog/compute/requests/go_grid/common_lookup_list.rb +36 -0
- data/lib/fog/compute/requests/go_grid/grid_image_get.rb +41 -0
- data/lib/fog/compute/requests/go_grid/grid_image_list.rb +44 -0
- data/lib/fog/compute/requests/go_grid/grid_ip_list.rb +38 -0
- data/lib/fog/compute/requests/go_grid/grid_loadbalancer_list.rb +36 -0
- data/lib/fog/compute/requests/go_grid/grid_server_add.rb +44 -0
- data/lib/fog/compute/requests/go_grid/grid_server_delete.rb +33 -0
- data/lib/fog/compute/requests/go_grid/grid_server_get.rb +33 -0
- data/lib/fog/compute/requests/go_grid/grid_server_list.rb +38 -0
- data/lib/fog/compute/requests/go_grid/grid_server_power.rb +34 -0
- data/lib/fog/compute/requests/linode/avail_datacenters.rb +31 -0
- data/lib/fog/compute/requests/linode/avail_distributions.rb +38 -0
- data/lib/fog/compute/requests/linode/avail_kernels.rb +36 -0
- data/lib/fog/compute/requests/linode/avail_linodeplans.rb +35 -0
- data/lib/fog/compute/requests/linode/avail_stackscripts.rb +37 -0
- data/lib/fog/compute/requests/linode/linode_create.rb +41 -0
- data/lib/fog/compute/requests/linode/linode_delete.rb +36 -0
- data/lib/fog/compute/requests/linode/linode_list.rb +38 -0
- data/lib/fog/compute/requests/linode/linode_reboot.rb +36 -0
- data/lib/fog/compute/requests/new_servers/add_server.rb +41 -0
- data/lib/fog/compute/requests/new_servers/cancel_server.rb +38 -0
- data/lib/fog/compute/requests/new_servers/get_server.rb +44 -0
- data/lib/fog/compute/requests/new_servers/list_images.rb +35 -0
- data/lib/fog/compute/requests/new_servers/list_plans.rb +38 -0
- data/lib/fog/compute/requests/new_servers/list_servers.rb +44 -0
- data/lib/fog/compute/requests/new_servers/reboot_server.rb +32 -0
- data/lib/fog/compute/requests/rackspace/confirm_resized_server.rb +34 -0
- data/lib/fog/compute/requests/rackspace/create_image.rb +62 -0
- data/lib/fog/compute/requests/rackspace/create_server.rb +94 -0
- data/lib/fog/compute/requests/rackspace/delete_image.rb +45 -0
- data/lib/fog/compute/requests/rackspace/delete_server.rb +43 -0
- data/lib/fog/compute/requests/rackspace/get_flavor_details.rb +52 -0
- data/lib/fog/compute/requests/rackspace/get_image_details.rb +35 -0
- data/lib/fog/compute/requests/rackspace/get_server_details.rb +52 -0
- data/lib/fog/compute/requests/rackspace/list_addresses.rb +43 -0
- data/lib/fog/compute/requests/rackspace/list_flavors.rb +45 -0
- data/lib/fog/compute/requests/rackspace/list_flavors_detail.rb +47 -0
- data/lib/fog/compute/requests/rackspace/list_images.rb +40 -0
- data/lib/fog/compute/requests/rackspace/list_images_detail.rb +49 -0
- data/lib/fog/compute/requests/rackspace/list_private_addresses.rb +41 -0
- data/lib/fog/compute/requests/rackspace/list_public_addresses.rb +41 -0
- data/lib/fog/compute/requests/rackspace/list_servers.rb +41 -0
- data/lib/fog/compute/requests/rackspace/list_servers_detail.rb +56 -0
- data/lib/fog/compute/requests/rackspace/reboot_server.rb +30 -0
- data/lib/fog/compute/requests/rackspace/resize_server.rb +39 -0
- data/lib/fog/compute/requests/rackspace/revert_resized_server.rb +35 -0
- data/lib/fog/compute/requests/rackspace/server_action.rb +33 -0
- data/lib/fog/compute/requests/rackspace/update_server.rb +45 -0
- data/lib/fog/compute/requests/slicehost/create_slice.rb +49 -0
- data/lib/fog/compute/requests/slicehost/delete_slice.rb +31 -0
- data/lib/fog/compute/requests/slicehost/get_backups.rb +37 -0
- data/lib/fog/compute/requests/slicehost/get_flavor.rb +40 -0
- data/lib/fog/compute/requests/slicehost/get_flavors.rb +37 -0
- data/lib/fog/compute/requests/slicehost/get_image.rb +38 -0
- data/lib/fog/compute/requests/slicehost/get_images.rb +35 -0
- data/lib/fog/compute/requests/slicehost/get_slice.rb +46 -0
- data/lib/fog/compute/requests/slicehost/get_slices.rb +43 -0
- data/lib/fog/compute/requests/slicehost/reboot_slice.rb +44 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_catalog.rb +27 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_catalog_item.rb +27 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_ip_addresses.rb +27 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_network.rb +27 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_organization.rb +27 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_vdc.rb +27 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_versions.rb +32 -0
- data/lib/fog/compute/slicehost.rb +107 -0
- data/lib/fog/compute/terremark_ecloud.rb +109 -0
- data/lib/fog/compute.rb +40 -0
- data/lib/fog/core/attributes.rb +178 -0
- data/lib/fog/core/collection.rb +126 -0
- data/lib/fog/core/connection.rb +35 -0
- data/lib/fog/core/credentials.rb +88 -0
- data/lib/fog/core/deprecation.rb +23 -0
- data/lib/fog/core/errors.rb +20 -0
- data/lib/fog/core/hmac.rb +48 -0
- data/lib/fog/core/mock.rb +68 -0
- data/lib/fog/core/model.rb +56 -0
- data/lib/fog/core/parser.rb +97 -0
- data/lib/fog/core/provider.rb +14 -0
- data/lib/fog/core/service.rb +158 -0
- data/lib/fog/core/ssh.rb +120 -0
- data/lib/fog/core/time.rb +21 -0
- data/lib/fog/core/wait_for.rb +17 -0
- data/lib/fog/core.rb +31 -0
- data/lib/fog/dns/aws.rb +120 -0
- data/lib/fog/dns/linode.rb +99 -0
- data/lib/fog/dns/models/aws/record.rb +64 -0
- data/lib/fog/dns/models/aws/records.rb +49 -0
- data/lib/fog/dns/models/aws/zone.rb +53 -0
- data/lib/fog/dns/models/aws/zones.rb +33 -0
- data/lib/fog/dns/models/linode/record.rb +69 -0
- data/lib/fog/dns/models/linode/records.rb +37 -0
- data/lib/fog/dns/models/linode/zone.rb +84 -0
- data/lib/fog/dns/models/linode/zones.rb +29 -0
- data/lib/fog/dns/models/slicehost/record.rb +66 -0
- data/lib/fog/dns/models/slicehost/records.rb +36 -0
- data/lib/fog/dns/models/slicehost/zone.rb +69 -0
- data/lib/fog/dns/models/slicehost/zones.rb +28 -0
- data/lib/fog/dns/models/zerigo/record.rb +65 -0
- data/lib/fog/dns/models/zerigo/records.rb +41 -0
- data/lib/fog/dns/models/zerigo/zone.rb +88 -0
- data/lib/fog/dns/models/zerigo/zones.rb +30 -0
- data/lib/fog/dns/parsers/aws/change_resource_record_sets.rb +26 -0
- data/lib/fog/dns/parsers/aws/create_hosted_zone.rb +55 -0
- data/lib/fog/dns/parsers/aws/delete_hosted_zone.rb +25 -0
- data/lib/fog/dns/parsers/aws/get_change.rb +26 -0
- data/lib/fog/dns/parsers/aws/get_hosted_zone.rb +43 -0
- data/lib/fog/dns/parsers/aws/list_hosted_zones.rb +37 -0
- data/lib/fog/dns/parsers/aws/list_resource_record_sets.rb +46 -0
- data/lib/fog/dns/parsers/slicehost/create_record.rb +26 -0
- data/lib/fog/dns/parsers/slicehost/create_zone.rb +26 -0
- data/lib/fog/dns/parsers/slicehost/get_record.rb +26 -0
- data/lib/fog/dns/parsers/slicehost/get_records.rb +30 -0
- data/lib/fog/dns/parsers/slicehost/get_zone.rb +26 -0
- data/lib/fog/dns/parsers/slicehost/get_zones.rb +30 -0
- data/lib/fog/dns/parsers/zerigo/count_hosts.rb +24 -0
- data/lib/fog/dns/parsers/zerigo/count_zones.rb +24 -0
- data/lib/fog/dns/parsers/zerigo/create_host.rb +26 -0
- data/lib/fog/dns/parsers/zerigo/create_zone.rb +26 -0
- data/lib/fog/dns/parsers/zerigo/find_hosts.rb +30 -0
- data/lib/fog/dns/parsers/zerigo/get_host.rb +26 -0
- data/lib/fog/dns/parsers/zerigo/get_zone.rb +56 -0
- data/lib/fog/dns/parsers/zerigo/get_zone_stats.rb +26 -0
- data/lib/fog/dns/parsers/zerigo/list_hosts.rb +30 -0
- data/lib/fog/dns/parsers/zerigo/list_zones.rb +30 -0
- data/lib/fog/dns/requests/aws/change_resource_record_sets.rb +90 -0
- data/lib/fog/dns/requests/aws/create_hosted_zone.rb +68 -0
- data/lib/fog/dns/requests/aws/delete_hosted_zone.rb +48 -0
- data/lib/fog/dns/requests/aws/get_change.rb +47 -0
- data/lib/fog/dns/requests/aws/get_hosted_zone.rb +51 -0
- data/lib/fog/dns/requests/aws/list_hosted_zones.rb +63 -0
- data/lib/fog/dns/requests/aws/list_resource_record_sets.rb +68 -0
- data/lib/fog/dns/requests/linode/domain_create.rb +51 -0
- data/lib/fog/dns/requests/linode/domain_delete.rb +35 -0
- data/lib/fog/dns/requests/linode/domain_list.rb +50 -0
- data/lib/fog/dns/requests/linode/domain_resource_create.rb +52 -0
- data/lib/fog/dns/requests/linode/domain_resource_delete.rb +36 -0
- data/lib/fog/dns/requests/linode/domain_resource_list.rb +51 -0
- data/lib/fog/dns/requests/linode/domain_resource_update.rb +54 -0
- data/lib/fog/dns/requests/linode/domain_update.rb +48 -0
- data/lib/fog/dns/requests/slicehost/create_record.rb +60 -0
- data/lib/fog/dns/requests/slicehost/create_zone.rb +54 -0
- data/lib/fog/dns/requests/slicehost/delete_record.rb +31 -0
- data/lib/fog/dns/requests/slicehost/delete_zone.rb +31 -0
- data/lib/fog/dns/requests/slicehost/get_record.rb +40 -0
- data/lib/fog/dns/requests/slicehost/get_records.rb +41 -0
- data/lib/fog/dns/requests/slicehost/get_zone.rb +40 -0
- data/lib/fog/dns/requests/slicehost/get_zones.rb +38 -0
- data/lib/fog/dns/requests/zerigo/count_hosts.rb +36 -0
- data/lib/fog/dns/requests/zerigo/count_zones.rb +36 -0
- data/lib/fog/dns/requests/zerigo/create_host.rb +70 -0
- data/lib/fog/dns/requests/zerigo/create_zone.rb +97 -0
- data/lib/fog/dns/requests/zerigo/delete_host.rb +32 -0
- data/lib/fog/dns/requests/zerigo/delete_zone.rb +33 -0
- data/lib/fog/dns/requests/zerigo/find_hosts.rb +63 -0
- data/lib/fog/dns/requests/zerigo/get_host.rb +47 -0
- data/lib/fog/dns/requests/zerigo/get_zone.rb +57 -0
- data/lib/fog/dns/requests/zerigo/get_zone_stats.rb +44 -0
- data/lib/fog/dns/requests/zerigo/list_hosts.rb +48 -0
- data/lib/fog/dns/requests/zerigo/list_zones.rb +53 -0
- data/lib/fog/dns/requests/zerigo/update_host.rb +60 -0
- data/lib/fog/dns/requests/zerigo/update_zone.rb +78 -0
- data/lib/fog/dns/slicehost.rb +103 -0
- data/lib/fog/dns/zerigo.rb +113 -0
- data/lib/fog/dns.rb +25 -0
- data/lib/fog/providers/aws.rb +181 -0
- data/lib/fog/providers/bluebox.rb +19 -0
- data/lib/fog/providers/brightbox.rb +9 -0
- data/lib/fog/providers/go_grid.rb +19 -0
- data/lib/fog/providers/google.rb +26 -0
- data/lib/fog/providers/linode.rb +21 -0
- data/lib/fog/providers/local.rb +19 -0
- data/lib/fog/providers/new_servers.rb +22 -0
- data/lib/fog/providers/rackspace.rb +35 -0
- data/lib/fog/providers/slicehost.rb +23 -0
- data/lib/fog/providers/terremark_ecloud.rb +17 -0
- data/lib/fog/providers/zerigo.rb +14 -0
- data/lib/fog/providers.rb +12 -0
- data/lib/fog/storage/aws.rb +362 -0
- data/lib/fog/storage/google.rb +277 -0
- data/lib/fog/storage/local.rb +75 -0
- data/lib/fog/storage/models/aws/directories.rb +43 -0
- data/lib/fog/storage/models/aws/directory.rb +103 -0
- data/lib/fog/storage/models/aws/file.rb +147 -0
- data/lib/fog/storage/models/aws/files.rb +79 -0
- data/lib/fog/storage/models/google/directories.rb +43 -0
- data/lib/fog/storage/models/google/directory.rb +81 -0
- data/lib/fog/storage/models/google/file.rb +148 -0
- data/lib/fog/storage/models/google/files.rb +79 -0
- data/lib/fog/storage/models/local/directories.rb +33 -0
- data/lib/fog/storage/models/local/directory.rb +60 -0
- data/lib/fog/storage/models/local/file.rb +75 -0
- data/lib/fog/storage/models/local/files.rb +84 -0
- data/lib/fog/storage/models/rackspace/directories.rb +39 -0
- data/lib/fog/storage/models/rackspace/directory.rb +66 -0
- data/lib/fog/storage/models/rackspace/file.rb +80 -0
- data/lib/fog/storage/models/rackspace/files.rb +75 -0
- data/lib/fog/storage/parsers/aws/access_control_list.rb +46 -0
- data/lib/fog/storage/parsers/aws/complete_multipart_upload.rb +24 -0
- data/lib/fog/storage/parsers/aws/copy_object.rb +22 -0
- data/lib/fog/storage/parsers/aws/get_bucket.rb +62 -0
- data/lib/fog/storage/parsers/aws/get_bucket_location.rb +20 -0
- data/lib/fog/storage/parsers/aws/get_bucket_logging.rb +40 -0
- data/lib/fog/storage/parsers/aws/get_bucket_object_versions.rb +88 -0
- data/lib/fog/storage/parsers/aws/get_bucket_versioning.rb +24 -0
- data/lib/fog/storage/parsers/aws/get_request_payment.rb +20 -0
- data/lib/fog/storage/parsers/aws/get_service.rb +32 -0
- data/lib/fog/storage/parsers/aws/initiate_multipart_upload.rb +24 -0
- data/lib/fog/storage/parsers/aws/list_multipart_uploads.rb +56 -0
- data/lib/fog/storage/parsers/aws/list_parts.rb +40 -0
- data/lib/fog/storage/parsers/google/access_control_list.rb +48 -0
- data/lib/fog/storage/parsers/google/copy_object.rb +22 -0
- data/lib/fog/storage/parsers/google/get_bucket.rb +62 -0
- data/lib/fog/storage/parsers/google/get_bucket_logging.rb +40 -0
- data/lib/fog/storage/parsers/google/get_bucket_object_versions.rb +88 -0
- data/lib/fog/storage/parsers/google/get_bucket_versioning.rb +24 -0
- data/lib/fog/storage/parsers/google/get_request_payment.rb +20 -0
- data/lib/fog/storage/parsers/google/get_service.rb +32 -0
- data/lib/fog/storage/rackspace.rb +164 -0
- data/lib/fog/storage/requests/aws/abort_multipart_upload.rb +38 -0
- data/lib/fog/storage/requests/aws/complete_multipart_upload.rb +60 -0
- data/lib/fog/storage/requests/aws/copy_object.rb +75 -0
- data/lib/fog/storage/requests/aws/delete_bucket.rb +50 -0
- data/lib/fog/storage/requests/aws/delete_object.rb +49 -0
- data/lib/fog/storage/requests/aws/get_bucket.rb +111 -0
- data/lib/fog/storage/requests/aws/get_bucket_acl.rb +66 -0
- data/lib/fog/storage/requests/aws/get_bucket_location.rb +52 -0
- data/lib/fog/storage/requests/aws/get_bucket_logging.rb +58 -0
- data/lib/fog/storage/requests/aws/get_bucket_object_versions.rb +83 -0
- data/lib/fog/storage/requests/aws/get_bucket_versioning.rb +48 -0
- data/lib/fog/storage/requests/aws/get_object.rb +107 -0
- data/lib/fog/storage/requests/aws/get_object_acl.rb +77 -0
- data/lib/fog/storage/requests/aws/get_object_torrent.rb +58 -0
- data/lib/fog/storage/requests/aws/get_object_url.rb +57 -0
- data/lib/fog/storage/requests/aws/get_request_payment.rb +52 -0
- data/lib/fog/storage/requests/aws/get_service.rb +57 -0
- data/lib/fog/storage/requests/aws/head_object.rb +68 -0
- data/lib/fog/storage/requests/aws/initiate_multipart_upload.rb +55 -0
- data/lib/fog/storage/requests/aws/list_multipart_uploads.rb +68 -0
- data/lib/fog/storage/requests/aws/list_parts.rb +67 -0
- data/lib/fog/storage/requests/aws/post_object_hidden_fields.rb +50 -0
- data/lib/fog/storage/requests/aws/put_bucket.rb +77 -0
- data/lib/fog/storage/requests/aws/put_bucket_acl.rb +84 -0
- data/lib/fog/storage/requests/aws/put_bucket_logging.rb +91 -0
- data/lib/fog/storage/requests/aws/put_bucket_versioning.rb +44 -0
- data/lib/fog/storage/requests/aws/put_object.rb +91 -0
- data/lib/fog/storage/requests/aws/put_object_acl.rb +93 -0
- data/lib/fog/storage/requests/aws/put_object_url.rb +57 -0
- data/lib/fog/storage/requests/aws/put_request_payment.rb +51 -0
- data/lib/fog/storage/requests/aws/sync_clock.rb +28 -0
- data/lib/fog/storage/requests/aws/upload_part.rb +51 -0
- data/lib/fog/storage/requests/google/copy_object.rb +72 -0
- data/lib/fog/storage/requests/google/delete_bucket.rb +46 -0
- data/lib/fog/storage/requests/google/delete_object.rb +50 -0
- data/lib/fog/storage/requests/google/get_bucket.rb +111 -0
- data/lib/fog/storage/requests/google/get_bucket_acl.rb +63 -0
- data/lib/fog/storage/requests/google/get_object.rb +104 -0
- data/lib/fog/storage/requests/google/get_object_acl.rb +74 -0
- data/lib/fog/storage/requests/google/get_object_torrent.rb +55 -0
- data/lib/fog/storage/requests/google/get_object_url.rb +54 -0
- data/lib/fog/storage/requests/google/get_service.rb +53 -0
- data/lib/fog/storage/requests/google/head_object.rb +64 -0
- data/lib/fog/storage/requests/google/put_bucket.rb +75 -0
- data/lib/fog/storage/requests/google/put_bucket_acl.rb +81 -0
- data/lib/fog/storage/requests/google/put_object.rb +86 -0
- data/lib/fog/storage/requests/google/put_object_url.rb +54 -0
- data/lib/fog/storage/requests/rackspace/delete_container.rb +31 -0
- data/lib/fog/storage/requests/rackspace/delete_object.rb +32 -0
- data/lib/fog/storage/requests/rackspace/get_container.rb +52 -0
- data/lib/fog/storage/requests/rackspace/get_containers.rb +41 -0
- data/lib/fog/storage/requests/rackspace/get_object.rb +33 -0
- data/lib/fog/storage/requests/rackspace/head_container.rb +37 -0
- data/lib/fog/storage/requests/rackspace/head_containers.rb +34 -0
- data/lib/fog/storage/requests/rackspace/head_object.rb +32 -0
- data/lib/fog/storage/requests/rackspace/put_container.rb +31 -0
- data/lib/fog/storage/requests/rackspace/put_object.rb +35 -0
- data/lib/fog/storage.rb +25 -0
- data/lib/fog/terremark/ecloud.rb +73 -0
- data/lib/fog/terremark/models/shared/address.rb +29 -0
- data/lib/fog/terremark/models/shared/addresses.rb +49 -0
- data/lib/fog/terremark/models/shared/network.rb +35 -0
- data/lib/fog/terremark/models/shared/networks.rb +52 -0
- data/lib/fog/terremark/models/shared/server.rb +110 -0
- data/lib/fog/terremark/models/shared/servers.rb +55 -0
- data/lib/fog/terremark/models/shared/task.rb +50 -0
- data/lib/fog/terremark/models/shared/tasks.rb +58 -0
- data/lib/fog/terremark/models/shared/vdc.rb +39 -0
- data/lib/fog/terremark/models/shared/vdcs.rb +52 -0
- data/lib/fog/terremark/parser.rb +19 -0
- data/lib/fog/terremark/parsers/shared/get_catalog.rb +46 -0
- data/lib/fog/terremark/parsers/shared/get_catalog_item.rb +46 -0
- data/lib/fog/terremark/parsers/shared/get_internet_services.rb +60 -0
- data/lib/fog/terremark/parsers/shared/get_network_ips.rb +29 -0
- data/lib/fog/terremark/parsers/shared/get_node_services.rb +36 -0
- data/lib/fog/terremark/parsers/shared/get_organization.rb +52 -0
- data/lib/fog/terremark/parsers/shared/get_organizations.rb +32 -0
- data/lib/fog/terremark/parsers/shared/get_public_ips.rb +30 -0
- data/lib/fog/terremark/parsers/shared/get_tasks_list.rb +52 -0
- data/lib/fog/terremark/parsers/shared/get_vapp_template.rb +46 -0
- data/lib/fog/terremark/parsers/shared/get_vdc.rb +123 -0
- data/lib/fog/terremark/parsers/shared/instantiate_vapp_template.rb +41 -0
- data/lib/fog/terremark/parsers/shared/internet_service.rb +65 -0
- data/lib/fog/terremark/parsers/shared/network.rb +51 -0
- data/lib/fog/terremark/parsers/shared/node_service.rb +32 -0
- data/lib/fog/terremark/parsers/shared/public_ip.rb +26 -0
- data/lib/fog/terremark/parsers/shared/task.rb +40 -0
- data/lib/fog/terremark/parsers/shared/vapp.rb +77 -0
- data/lib/fog/terremark/requests/shared/add_internet_service.rb +63 -0
- data/lib/fog/terremark/requests/shared/add_node_service.rb +63 -0
- data/lib/fog/terremark/requests/shared/create_internet_service.rb +63 -0
- data/lib/fog/terremark/requests/shared/delete_internet_service.rb +30 -0
- data/lib/fog/terremark/requests/shared/delete_node_service.rb +30 -0
- data/lib/fog/terremark/requests/shared/delete_public_ip.rb +30 -0
- data/lib/fog/terremark/requests/shared/delete_vapp.rb +30 -0
- data/lib/fog/terremark/requests/shared/deploy_vapp.rb +43 -0
- data/lib/fog/terremark/requests/shared/get_catalog.rb +40 -0
- data/lib/fog/terremark/requests/shared/get_catalog_item.rb +43 -0
- data/lib/fog/terremark/requests/shared/get_internet_services.rb +43 -0
- data/lib/fog/terremark/requests/shared/get_network.rb +73 -0
- data/lib/fog/terremark/requests/shared/get_network_ips.rb +40 -0
- data/lib/fog/terremark/requests/shared/get_node_services.rb +38 -0
- data/lib/fog/terremark/requests/shared/get_organization.rb +86 -0
- data/lib/fog/terremark/requests/shared/get_organizations.rb +49 -0
- data/lib/fog/terremark/requests/shared/get_public_ip.rb +41 -0
- data/lib/fog/terremark/requests/shared/get_public_ips.rb +72 -0
- data/lib/fog/terremark/requests/shared/get_task.rb +47 -0
- data/lib/fog/terremark/requests/shared/get_tasks_list.rb +40 -0
- data/lib/fog/terremark/requests/shared/get_vapp.rb +50 -0
- data/lib/fog/terremark/requests/shared/get_vapp_template.rb +43 -0
- data/lib/fog/terremark/requests/shared/get_vdc.rb +125 -0
- data/lib/fog/terremark/requests/shared/instantiate_vapp_template.rb +79 -0
- data/lib/fog/terremark/requests/shared/power_off.rb +43 -0
- data/lib/fog/terremark/requests/shared/power_on.rb +43 -0
- data/lib/fog/terremark/requests/shared/power_reset.rb +43 -0
- data/lib/fog/terremark/requests/shared/power_shutdown.rb +32 -0
- data/lib/fog/terremark/shared.rb +289 -0
- data/lib/fog/terremark/vcloud.rb +117 -0
- data/lib/fog/terremark.rb +16 -0
- data/lib/fog/vcloud/collection.rb +30 -0
- data/lib/fog/vcloud/generators.rb +33 -0
- data/lib/fog/vcloud/mock_data_classes.rb +767 -0
- data/lib/fog/vcloud/model.rb +22 -0
- data/lib/fog/vcloud/models/vdc.rb +26 -0
- data/lib/fog/vcloud/models/vdcs.rb +35 -0
- data/lib/fog/vcloud/requests/get_network.rb +47 -0
- data/lib/fog/vcloud/requests/get_organization.rb +47 -0
- data/lib/fog/vcloud/requests/get_vdc.rb +82 -0
- data/lib/fog/vcloud/requests/get_versions.rb +34 -0
- data/lib/fog/vcloud/requests/login.rb +46 -0
- data/lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb +60 -0
- data/lib/fog/vcloud/terremark/ecloud/models/backup_internet_services.rb +36 -0
- data/lib/fog/vcloud/terremark/ecloud/models/catalog.rb +31 -0
- data/lib/fog/vcloud/terremark/ecloud/models/catalog_item.rb +31 -0
- data/lib/fog/vcloud/terremark/ecloud/models/firewall_acl.rb +28 -0
- data/lib/fog/vcloud/terremark/ecloud/models/firewall_acls.rb +34 -0
- data/lib/fog/vcloud/terremark/ecloud/models/internet_service.rb +99 -0
- data/lib/fog/vcloud/terremark/ecloud/models/internet_services.rb +36 -0
- data/lib/fog/vcloud/terremark/ecloud/models/ip.rb +51 -0
- data/lib/fog/vcloud/terremark/ecloud/models/ips.rb +35 -0
- data/lib/fog/vcloud/terremark/ecloud/models/network.rb +77 -0
- data/lib/fog/vcloud/terremark/ecloud/models/networks.rb +36 -0
- data/lib/fog/vcloud/terremark/ecloud/models/node.rb +47 -0
- data/lib/fog/vcloud/terremark/ecloud/models/nodes.rb +33 -0
- data/lib/fog/vcloud/terremark/ecloud/models/public_ip.rb +25 -0
- data/lib/fog/vcloud/terremark/ecloud/models/public_ips.rb +39 -0
- data/lib/fog/vcloud/terremark/ecloud/models/server.rb +211 -0
- data/lib/fog/vcloud/terremark/ecloud/models/servers.rb +57 -0
- data/lib/fog/vcloud/terremark/ecloud/models/task.rb +23 -0
- data/lib/fog/vcloud/terremark/ecloud/models/tasks.rb +33 -0
- data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +83 -0
- data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +42 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/add_backup_internet_service.rb +111 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +140 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/add_node.rb +64 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/clone_vapp.rb +50 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +110 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_network.rb +53 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_network_ip.rb +68 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_node.rb +58 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_vapp.rb +147 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_internet_service.rb +25 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_node.rb +24 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_vapp.rb +32 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog.rb +46 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog_item.rb +49 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_customization_options.rb +24 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acl.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acls.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_internet_services.rb +84 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network.rb +47 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_extensions.rb +35 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ip.rb +45 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ips.rb +37 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_node.rb +42 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_nodes.rb +43 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ip.rb +36 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ips.rb +41 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_task.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_task_list.rb +19 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp.rb +101 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp_template.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vdc.rb +87 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/instantiate_vapp_template.rb +144 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/power_off.rb +25 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/power_on.rb +25 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/power_reset.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/power_shutdown.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud.rb +187 -0
- data/lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb +57 -0
- data/lib/fog/vcloud/terremark/vcloud.rb +39 -0
- data/lib/fog/vcloud.rb +337 -0
- data/lib/fog.rb +19 -0
- data/spec/aws/models/compute/address_spec.rb +103 -0
- data/spec/aws/models/compute/addresses_spec.rb +70 -0
- data/spec/aws/models/compute/key_pair_spec.rb +86 -0
- data/spec/aws/models/compute/key_pairs_spec.rb +71 -0
- data/spec/aws/models/compute/security_group_spec.rb +88 -0
- data/spec/aws/models/compute/security_groups_spec.rb +71 -0
- data/spec/aws/models/compute/server_spec.rb +105 -0
- data/spec/aws/models/compute/snapshot_spec.rb +79 -0
- data/spec/aws/models/compute/snapshots_spec.rb +85 -0
- data/spec/aws/models/compute/volume_spec.rb +174 -0
- data/spec/aws/models/compute/volumes_spec.rb +71 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/vcloud/bin_spec.rb +28 -0
- data/spec/vcloud/models/vdc_spec.rb +52 -0
- data/spec/vcloud/models/vdcs_spec.rb +1 -0
- data/spec/vcloud/requests/get_network_spec.rb +44 -0
- data/spec/vcloud/requests/get_organization_spec.rb +53 -0
- data/spec/vcloud/requests/get_vdc_spec.rb +63 -0
- data/spec/vcloud/requests/get_versions_spec.rb +54 -0
- data/spec/vcloud/requests/login_spec.rb +24 -0
- data/spec/vcloud/spec_helper.rb +398 -0
- data/spec/vcloud/terremark/ecloud/models/backup_internet_service_spec.rb +49 -0
- data/spec/vcloud/terremark/ecloud/models/backup_internet_services_spec.rb +29 -0
- data/spec/vcloud/terremark/ecloud/models/internet_service_spec.rb +81 -0
- data/spec/vcloud/terremark/ecloud/models/internet_services_spec.rb +29 -0
- data/spec/vcloud/terremark/ecloud/models/ip_spec.rb +33 -0
- data/spec/vcloud/terremark/ecloud/models/ips_spec.rb +28 -0
- data/spec/vcloud/terremark/ecloud/models/network_spec.rb +71 -0
- data/spec/vcloud/terremark/ecloud/models/networks_spec.rb +27 -0
- data/spec/vcloud/terremark/ecloud/models/node_spec.rb +38 -0
- data/spec/vcloud/terremark/ecloud/models/nodes_spec.rb +29 -0
- data/spec/vcloud/terremark/ecloud/models/public_ip_spec.rb +36 -0
- data/spec/vcloud/terremark/ecloud/models/public_ips_spec.rb +27 -0
- data/spec/vcloud/terremark/ecloud/models/server_spec.rb +62 -0
- data/spec/vcloud/terremark/ecloud/models/vdc_spec.rb +63 -0
- data/spec/vcloud/terremark/ecloud/models/vdcs_spec.rb +28 -0
- data/spec/vcloud/terremark/ecloud/requests/add_backup_internet_service_spec.rb +60 -0
- data/spec/vcloud/terremark/ecloud/requests/add_internet_service_spec.rb +65 -0
- data/spec/vcloud/terremark/ecloud/requests/add_node_spec.rb +56 -0
- data/spec/vcloud/terremark/ecloud/requests/configure_internet_service_spec.rb +61 -0
- data/spec/vcloud/terremark/ecloud/requests/configure_network_ip_spec.rb +55 -0
- data/spec/vcloud/terremark/ecloud/requests/configure_node_spec.rb +52 -0
- data/spec/vcloud/terremark/ecloud/requests/configure_vapp_spec.rb +71 -0
- data/spec/vcloud/terremark/ecloud/requests/delete_internet_service_spec.rb +34 -0
- data/spec/vcloud/terremark/ecloud/requests/delete_node_spec.rb +30 -0
- data/spec/vcloud/terremark/ecloud/requests/delete_vapp_spec.rb +92 -0
- data/spec/vcloud/terremark/ecloud/requests/get_catalog_item_spec.rb +63 -0
- data/spec/vcloud/terremark/ecloud/requests/get_catalog_spec.rb +44 -0
- data/spec/vcloud/terremark/ecloud/requests/get_customization_options_spec.rb +39 -0
- data/spec/vcloud/terremark/ecloud/requests/get_internet_services_spec.rb +150 -0
- data/spec/vcloud/terremark/ecloud/requests/get_network_ip_spec.rb +40 -0
- data/spec/vcloud/terremark/ecloud/requests/get_network_ips_spec.rb +59 -0
- data/spec/vcloud/terremark/ecloud/requests/get_network_spec.rb +49 -0
- data/spec/vcloud/terremark/ecloud/requests/get_node_spec.rb +41 -0
- data/spec/vcloud/terremark/ecloud/requests/get_nodes_spec.rb +58 -0
- data/spec/vcloud/terremark/ecloud/requests/get_public_ip_spec.rb +38 -0
- data/spec/vcloud/terremark/ecloud/requests/get_public_ips_spec.rb +52 -0
- data/spec/vcloud/terremark/ecloud/requests/get_vapp_spec.rb +126 -0
- data/spec/vcloud/terremark/ecloud/requests/get_vdc_spec.rb +113 -0
- data/spec/vcloud/terremark/ecloud/requests/instantiate_vapp_template_spec.rb +96 -0
- data/spec/vcloud/terremark/ecloud/requests/login_spec.rb +10 -0
- data/spec/vcloud/terremark/ecloud/requests/power_off_spec.rb +34 -0
- data/spec/vcloud/terremark/ecloud/requests/power_on_spec.rb +34 -0
- data/spec/vcloud/vcloud_spec.rb +18 -0
- data/tests/aws/requests/iam/access_key_tests.rb +60 -0
- data/tests/aws/requests/iam/group_policy_tests.rb +42 -0
- data/tests/aws/requests/iam/group_tests.rb +47 -0
- data/tests/aws/requests/iam/helper.rb +15 -0
- data/tests/aws/requests/iam/user_policy_tests.rb +42 -0
- data/tests/aws/requests/iam/user_tests.rb +65 -0
- data/tests/aws/requests/simpledb/attributes_tests.rb +75 -0
- data/tests/aws/requests/simpledb/domain_tests.rb +51 -0
- data/tests/aws/requests/simpledb/helper.rb +16 -0
- data/tests/compute/helper.rb +36 -0
- data/tests/compute/models/flavors_tests.rb +9 -0
- data/tests/compute/models/server_tests.rb +9 -0
- data/tests/compute/models/servers_tests.rb +9 -0
- data/tests/compute/requests/aws/address_tests.rb +76 -0
- data/tests/compute/requests/aws/availability_zone_tests.rb +25 -0
- data/tests/compute/requests/aws/helper.rb +20 -0
- data/tests/compute/requests/aws/image_tests.rb +37 -0
- data/tests/compute/requests/aws/instance_tests.rb +121 -0
- data/tests/compute/requests/aws/key_pair_tests.rb +63 -0
- data/tests/compute/requests/aws/region_tests.rb +23 -0
- data/tests/compute/requests/aws/security_group_tests.rb +124 -0
- data/tests/compute/requests/aws/snapshot_tests.rb +57 -0
- data/tests/compute/requests/aws/tag_tests.rb +49 -0
- data/tests/compute/requests/aws/volume_tests.rb +102 -0
- data/tests/compute/requests/bluebox/block_tests.rb +80 -0
- data/tests/compute/requests/bluebox/helper.rb +17 -0
- data/tests/compute/requests/bluebox/product_tests.rb +28 -0
- data/tests/compute/requests/bluebox/template_tests.rb +35 -0
- data/tests/compute/requests/brightbox/account_tests.rb +40 -0
- data/tests/compute/requests/brightbox/api_client_tests.rb +49 -0
- data/tests/compute/requests/brightbox/cloud_ip_tests.rb +71 -0
- data/tests/compute/requests/brightbox/helper.rb +418 -0
- data/tests/compute/requests/brightbox/image_tests.rb +57 -0
- data/tests/compute/requests/brightbox/interface_tests.rb +30 -0
- data/tests/compute/requests/brightbox/load_balancer_tests.rb +74 -0
- data/tests/compute/requests/brightbox/server_tests.rb +70 -0
- data/tests/compute/requests/brightbox/server_type_tests.rb +33 -0
- data/tests/compute/requests/brightbox/user_tests.rb +41 -0
- data/tests/compute/requests/brightbox/zone_tests.rb +33 -0
- data/tests/compute/requests/go_grid/image_tests.rb +0 -0
- data/tests/compute/requests/linode/datacenter_tests.rb +19 -0
- data/tests/compute/requests/linode/distribution_tests.rb +32 -0
- data/tests/compute/requests/linode/helper.rb +16 -0
- data/tests/compute/requests/linode/linode_tests.rb +85 -0
- data/tests/compute/requests/linode/linodeplans_tests.rb +39 -0
- data/tests/compute/requests/rackspace/address_tests.rb +40 -0
- data/tests/compute/requests/rackspace/flavor_tests.rb +38 -0
- data/tests/compute/requests/rackspace/helper.rb +16 -0
- data/tests/compute/requests/rackspace/image_tests.rb +68 -0
- data/tests/compute/requests/rackspace/resize_tests.rb +33 -0
- data/tests/compute/requests/rackspace/server_tests.rb +92 -0
- data/tests/compute/requests/slicehost/backup_tests.rb +18 -0
- data/tests/compute/requests/slicehost/flavor_tests.rb +33 -0
- data/tests/compute/requests/slicehost/image_tests.rb +31 -0
- data/tests/compute/requests/slicehost/slice_tests.rb +75 -0
- data/tests/compute/requests/terremark_ecloud/catalog_tests.rb +47 -0
- data/tests/compute/requests/terremark_ecloud/helper.rb +45 -0
- data/tests/compute/requests/terremark_ecloud/network_tests.rb +30 -0
- data/tests/compute/requests/terremark_ecloud/organization_tests.rb +23 -0
- data/tests/compute/requests/terremark_ecloud/vdc_tests.rb +60 -0
- data/tests/core/attribute_tests.rb +45 -0
- data/tests/dns/helper.rb +19 -0
- data/tests/dns/models/record_tests.rb +25 -0
- data/tests/dns/models/records_tests.rb +25 -0
- data/tests/dns/models/zone_tests.rb +13 -0
- data/tests/dns/models/zones_tests.rb +13 -0
- data/tests/dns/requests/aws/dns_tests.rb +276 -0
- data/tests/dns/requests/linode/dns_tests.rb +262 -0
- data/tests/dns/requests/slicehost/dns_tests.rb +279 -0
- data/tests/dns/requests/zerigo/dns_tests.rb +374 -0
- data/tests/helper.rb +17 -0
- data/tests/helpers/collection_helper.rb +51 -0
- data/tests/helpers/compute/flavors_helper.rb +34 -0
- data/tests/helpers/compute/server_helper.rb +19 -0
- data/tests/helpers/compute/servers_helper.rb +11 -0
- data/tests/helpers/formats_helper.rb +70 -0
- data/tests/helpers/formats_helper_tests.rb +43 -0
- data/tests/helpers/mock_helper.rb +33 -0
- data/tests/helpers/model_helper.rb +28 -0
- data/tests/helpers/responds_to_helper.rb +13 -0
- data/tests/helpers/succeeds_helper.rb +12 -0
- data/tests/lorem.txt +1 -0
- data/tests/storage/helper.rb +16 -0
- data/tests/storage/models/directories_tests.rb +13 -0
- data/tests/storage/models/directory_test.rb +24 -0
- data/tests/storage/models/file_tests.rb +41 -0
- data/tests/storage/models/files_tests.rb +26 -0
- data/tests/storage/requests/aws/bucket_tests.rb +104 -0
- data/tests/storage/requests/aws/multipart_upload_tests.rb +135 -0
- data/tests/storage/requests/aws/object_tests.rb +81 -0
- data/tests/storage/requests/google/bucket_tests.rb +79 -0
- data/tests/storage/requests/google/object_tests.rb +81 -0
- data/tests/storage/requests/rackspace/container_tests.rb +64 -0
- data/tests/storage/requests/rackspace/object_tests.rb +69 -0
- metadata +1275 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_network_ips }
|
8
|
+
|
9
|
+
describe "#get_network_ips" do
|
10
|
+
context "with a valid VDC network ips_uri" do
|
11
|
+
before { @ips = @vcloud.get_network_ips(@mock_network_ip_collection.href) }
|
12
|
+
subject { @ips }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.tmrk.ecloud.ipAddressesList+xml" }
|
16
|
+
|
17
|
+
describe "#body" do
|
18
|
+
subject { @ips.body }
|
19
|
+
|
20
|
+
it { should have(1).item }
|
21
|
+
|
22
|
+
context "[:IpAddress]" do
|
23
|
+
subject { @ips.body[:IpAddress] }
|
24
|
+
|
25
|
+
# Note the real TMRK API returns only "assigned" ips currently
|
26
|
+
# This is a bug they've slated to fix in the next release.
|
27
|
+
it { should have(252).addresses }
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
context "one we know is assigned" do
|
32
|
+
let(:address) { @ips.body[:IpAddress][0] }
|
33
|
+
specify { address.should have(6).keys }
|
34
|
+
specify { address[:Status].should == "Assigned" }
|
35
|
+
specify { address[:Server].should == "Broom 1" }
|
36
|
+
specify { address[:Name].should == "1.2.3.3" }
|
37
|
+
specify { address[:RnatAddress].should == "99.1.2.3" }
|
38
|
+
end
|
39
|
+
|
40
|
+
context "one we know is not assigned" do
|
41
|
+
let(:address) { @ips.body[:IpAddress][100] }
|
42
|
+
specify { address.should have(5).keys }
|
43
|
+
specify { address[:Status].should == "Available" }
|
44
|
+
specify { address.has_key?(:Server).should be_false }
|
45
|
+
specify { address[:Name].should == "1.2.3.103" }
|
46
|
+
specify { address[:RnatAddress].should == "99.1.2.3" }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
context "with a network ips uri that doesn't exist" do
|
52
|
+
subject { lambda { @vcloud.get_network_ips(URI.parse('https://www.fakey.c/piv8vc99')) } }
|
53
|
+
|
54
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
else
|
59
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_network }
|
8
|
+
|
9
|
+
describe "#get_network" do
|
10
|
+
context "with a valid network uri" do
|
11
|
+
before { @network = @vcloud.get_network(@mock_network.href) }
|
12
|
+
subject { @network }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.vmware.vcloud.network+xml" }
|
16
|
+
|
17
|
+
describe "#body" do
|
18
|
+
subject { @network.body }
|
19
|
+
|
20
|
+
it { should have(9).keys }
|
21
|
+
|
22
|
+
it_should_behave_like "it has the standard vcloud v0.8 xmlns attributes" # 3 keys
|
23
|
+
|
24
|
+
its(:type) { should == "application/vnd.vmware.vcloud.network+xml" }
|
25
|
+
its(:Features) { should == @mock_network.features.map {|f| { f[:type] => f[:value] } }.first }
|
26
|
+
its(:href) { should == @mock_network.href }
|
27
|
+
its(:name) { should == @mock_network.name }
|
28
|
+
its(:Configuration) { should == { :Gateway => @mock_network.gateway, :Netmask => @mock_network.netmask } }
|
29
|
+
its(:Link) { should ==
|
30
|
+
[{:type => "application/xml",
|
31
|
+
:rel => "down",
|
32
|
+
:href => @mock_network_ip_collection.href,
|
33
|
+
:name => "IP Addresses"},
|
34
|
+
{:type => "application/xml",
|
35
|
+
:rel => "down",
|
36
|
+
:href => @mock_network_extensions.href,
|
37
|
+
:name => @mock_network_extensions.name}]}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "with a network uri that doesn't exist" do
|
42
|
+
subject { lambda { @vcloud.get_network(URI.parse('https://www.fakey.com/api/v0.8/network/999')) } }
|
43
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
else
|
48
|
+
end
|
49
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_node }
|
8
|
+
|
9
|
+
describe "#get_node" do
|
10
|
+
context "with a valid nodes_uri" do
|
11
|
+
before { @node = @vcloud.get_node(@mock_node.href) }
|
12
|
+
subject { @node }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.tmrk.ecloud.nodeService+xml" }
|
16
|
+
|
17
|
+
describe "#body" do
|
18
|
+
subject { @node.body }
|
19
|
+
|
20
|
+
it { should have(9).keys }
|
21
|
+
|
22
|
+
its(:Href) { should == @mock_node.href }
|
23
|
+
its(:Id) { should == @mock_node.object_id.to_s }
|
24
|
+
its(:Name) { should == @mock_node.name }
|
25
|
+
its(:Enabled) { should == @mock_node.enabled.to_s }
|
26
|
+
its(:Port) { should == @mock_node.port.to_s }
|
27
|
+
its(:Description) { should == @mock_node.description }
|
28
|
+
its(:IpAddress) { should == @mock_node.ip_address }
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "with a public_ips_uri that doesn't exist" do
|
34
|
+
subject { lambda { @vcloud.get_node(URI.parse('https://www.fakey.c/piv8vc99')) } }
|
35
|
+
|
36
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
else
|
41
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_nodes }
|
8
|
+
|
9
|
+
describe "#get_nodes" do
|
10
|
+
context "with a valid nodes_uri" do
|
11
|
+
before { @nodes = @vcloud.get_nodes(@mock_node_collection.href) }
|
12
|
+
subject { @nodes }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.tmrk.ecloud.nodeService+xml" }
|
16
|
+
|
17
|
+
describe "#body" do
|
18
|
+
subject { @nodes.body }
|
19
|
+
|
20
|
+
it { should have(3).items }
|
21
|
+
|
22
|
+
describe "[:NodeService]" do
|
23
|
+
subject { @nodes.body[:NodeService] }
|
24
|
+
|
25
|
+
it { should have(@mock_node_collection.items.length).nodes }
|
26
|
+
|
27
|
+
[0,1].each do |idx|
|
28
|
+
|
29
|
+
context "[#{idx}]" do
|
30
|
+
subject { @nodes.body[:NodeService][idx] }
|
31
|
+
let(:mock_node) { @mock_node_collection.items[idx] }
|
32
|
+
let(:keys) { subject.keys.sort_by(&:to_s) }
|
33
|
+
specify { keys.should == [:Description, :Enabled, :Href, :Id, :IpAddress, :Name, :Port] }
|
34
|
+
its(:Href) { should == mock_node.href }
|
35
|
+
its(:Id) { should == mock_node.object_id.to_s }
|
36
|
+
its(:Name) { should == mock_node.name }
|
37
|
+
its(:Enabled) { should == mock_node.enabled.to_s }
|
38
|
+
its(:Port) { should == mock_node.port.to_s }
|
39
|
+
its(:IpAddress) { should == mock_node.ip_address }
|
40
|
+
its(:Description) { should == mock_node.description }
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "with a public_ips_uri that doesn't exist" do
|
51
|
+
subject { lambda { @vcloud.get_nodes(URI.parse('https://www.fakey.c/piv8vc99')) } }
|
52
|
+
|
53
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
else
|
58
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_public_ip }
|
8
|
+
|
9
|
+
describe "#get_public_ip" do
|
10
|
+
context "with a valid public_ip_uri" do
|
11
|
+
before do
|
12
|
+
@public_ip = @vcloud.get_public_ip(@mock_public_ip.href)
|
13
|
+
end
|
14
|
+
|
15
|
+
subject { @public_ip }
|
16
|
+
|
17
|
+
it_should_behave_like "all responses"
|
18
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.tmrk.ecloud.publicIp+xml" }
|
19
|
+
|
20
|
+
describe "#body" do
|
21
|
+
subject { @public_ip.body }
|
22
|
+
|
23
|
+
its(:Name) { should == @mock_public_ip.name }
|
24
|
+
its(:Href) { should == @mock_public_ip.href }
|
25
|
+
its(:Id) { should == @mock_public_ip.object_id.to_s }
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with a public_ips_uri that doesn't exist" do
|
31
|
+
subject { lambda { @vcloud.get_public_ip(URI.parse('https://www.fakey.c/piv89')) } }
|
32
|
+
|
33
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
else
|
38
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_public_ips }
|
8
|
+
|
9
|
+
describe "#get_public_ips" do
|
10
|
+
context "with a valid public_ips_uri" do
|
11
|
+
before { @public_ips = @vcloud.get_public_ips(@mock_public_ip_collection.href) }
|
12
|
+
subject { @public_ips }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.tmrk.ecloud.publicIpsList+xml" }
|
16
|
+
|
17
|
+
describe "#body" do
|
18
|
+
subject { @public_ips.body }
|
19
|
+
|
20
|
+
it { should have(1).item }
|
21
|
+
|
22
|
+
describe "[:PublicIPAddress]" do
|
23
|
+
subject { @public_ips.body[:PublicIPAddress] }
|
24
|
+
|
25
|
+
it { should have(@mock_public_ip_collection.items.length).addresses }
|
26
|
+
|
27
|
+
[0,1,2].each do |idx|
|
28
|
+
|
29
|
+
context "[#{idx}]" do
|
30
|
+
subject { @public_ips.body[:PublicIPAddress][idx] }
|
31
|
+
let(:public_ip) { @mock_public_ip_collection.items[idx] }
|
32
|
+
its(:Href) { should == public_ip.href }
|
33
|
+
its(:Id) { should == public_ip.object_id.to_s }
|
34
|
+
its(:Name) { should == public_ip.name }
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context "with a public_ips_uri that doesn't exist" do
|
45
|
+
subject { lambda { @vcloud.get_public_ips(URI.parse('https://www.fakey.c/piv8vc99')) } }
|
46
|
+
|
47
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
else
|
52
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_vapp }
|
8
|
+
|
9
|
+
describe "#get_vapp" do
|
10
|
+
context "with a valid vapp_uri" do
|
11
|
+
before { @vapp = @vcloud.get_vapp(@mock_vm.href) }
|
12
|
+
subject { @vapp }
|
13
|
+
let(:vapp_id) { @vapp.body[:href].split("/").last }
|
14
|
+
|
15
|
+
it_should_behave_like "all responses"
|
16
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.vmware.vcloud.vApp+xml" }
|
17
|
+
|
18
|
+
describe "#body" do
|
19
|
+
subject { @vapp.body }
|
20
|
+
|
21
|
+
specify { subject.keys.sort_by(&:to_s).should == [:Link, :NetworkConnectionSection,
|
22
|
+
:OperatingSystemSection, :VirtualHardwareSection,
|
23
|
+
:href, :name,
|
24
|
+
:size, :status,
|
25
|
+
:type, :xmlns,
|
26
|
+
:xmlns_xsd, :xmlns_xsi] }
|
27
|
+
|
28
|
+
it_should_behave_like "it has the standard vcloud v0.8 xmlns attributes" # 3 keys
|
29
|
+
|
30
|
+
its(:href) { should == @mock_vm.href }
|
31
|
+
its(:name) { should == @mock_vm.name }
|
32
|
+
its(:status) { should == @mock_vm.status.to_s }
|
33
|
+
its(:size) { should == (@mock_vm.disks.inject(0) {|s, d| s += d[:size].to_i } * 1024).to_s }
|
34
|
+
|
35
|
+
describe "Link" do
|
36
|
+
subject { @vapp.body[:Link] }
|
37
|
+
|
38
|
+
its(:rel) { should == "up" }
|
39
|
+
its(:type) { should == "application/vnd.vmware.vcloud.vdc+xml" }
|
40
|
+
its(:href) { should == @mock_vdc.href }
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "NetworkConnectionSection" do
|
44
|
+
subject { @vapp.body[:NetworkConnectionSection] }
|
45
|
+
|
46
|
+
it { should include :NetworkConnection }
|
47
|
+
|
48
|
+
describe "NetworkConnection" do
|
49
|
+
subject { @vapp.body[:NetworkConnectionSection][:NetworkConnection] }
|
50
|
+
|
51
|
+
its(:IpAddress) { should == @mock_vm.ip }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "OperatingSystemSection" do
|
56
|
+
subject { @vapp.body[:OperatingSystemSection] }
|
57
|
+
|
58
|
+
its(:Info) { should == "The kind of installed guest operating system" }
|
59
|
+
its(:Description) { should == "Red Hat Enterprise Linux 5 (64-bit)" }
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "VirtualHardwareSection" do
|
63
|
+
subject { @vapp.body[:VirtualHardwareSection] }
|
64
|
+
|
65
|
+
specify { subject.keys.sort_by(&:to_s).should == [:Info, :Item, :System, :xmlns] }
|
66
|
+
|
67
|
+
describe "Item" do
|
68
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item] }
|
69
|
+
|
70
|
+
it { should have(5).items }
|
71
|
+
|
72
|
+
specify { subject.map {|i| i[:ResourceType] }.uniq.sort.should == %w(3 4 6 17).sort }
|
73
|
+
|
74
|
+
describe "CPU" do
|
75
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item].detect {|i| i[:ResourceType] == "3" } }
|
76
|
+
|
77
|
+
its(:VirtualQuantity) { should == @mock_vm.cpus.to_s }
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "memory" do
|
81
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item].detect {|i| i[:ResourceType] == "4" } }
|
82
|
+
|
83
|
+
its(:VirtualQuantity) { should == @mock_vm.memory.to_s }
|
84
|
+
end
|
85
|
+
|
86
|
+
describe "SCSI controller" do
|
87
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item].detect {|i| i[:ResourceType] == "6" } }
|
88
|
+
|
89
|
+
its(:Address) { should == "0" }
|
90
|
+
end
|
91
|
+
|
92
|
+
describe "Hard Disks" do
|
93
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item].find_all {|i| i[:ResourceType] == "17" } }
|
94
|
+
|
95
|
+
it { should have(2).disks }
|
96
|
+
|
97
|
+
describe "#1" do
|
98
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item].find_all {|i| i[:ResourceType] == "17" }[0] }
|
99
|
+
|
100
|
+
its(:AddressOnParent) { should == "0" }
|
101
|
+
its(:VirtualQuantity) { should == (1024 * @mock_vm.disks[0][:size].to_i).to_s }
|
102
|
+
its(:HostResource) { should == (1024 * @mock_vm.disks[0][:size].to_i).to_s }
|
103
|
+
end
|
104
|
+
|
105
|
+
describe "#2" do
|
106
|
+
subject { @vapp.body[:VirtualHardwareSection][:Item].find_all {|i| i[:ResourceType] == "17" }[1] }
|
107
|
+
|
108
|
+
its(:AddressOnParent) { should == "1" }
|
109
|
+
its(:VirtualQuantity) { should == (1024 * @mock_vm.disks[1][:size].to_i).to_s }
|
110
|
+
its(:HostResource) { should == (1024 * @mock_vm.disks[1][:size].to_i).to_s }
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
context "with a vapp uri that doesn't exist" do
|
119
|
+
subject { lambda { @vcloud.get_vapp(URI.parse('https://www.fakey.com/api/v0.8/vApp/99999')) } }
|
120
|
+
|
121
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
else
|
126
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :get_vdc }
|
8
|
+
|
9
|
+
describe "#get_vdc" do
|
10
|
+
context "with a valid vdc uri" do
|
11
|
+
before { @vdc = @vcloud.get_vdc(URI.parse(@mock_vdc.href)) }
|
12
|
+
subject { @vdc }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
it { should have_headers_denoting_a_content_type_of "application/vnd.vmware.vcloud.vdc+xml" }
|
16
|
+
|
17
|
+
describe "#body" do
|
18
|
+
subject { @vdc.body }
|
19
|
+
|
20
|
+
it { should have(11).items }
|
21
|
+
|
22
|
+
it_should_behave_like "it has the standard vcloud v0.8 xmlns attributes" # 3 keys
|
23
|
+
|
24
|
+
its(:href) { should == @mock_vdc.href }
|
25
|
+
its(:name) { should == @mock_vdc.name }
|
26
|
+
|
27
|
+
its(:Description) { should == "" }
|
28
|
+
its(:StorageCapacity) { should == {:Units => "bytes * 10^9", :Allocated => @mock_vdc.storage_allocated.to_s, :Used => @mock_vdc.storage_used.to_s } }
|
29
|
+
its(:ComputeCapacity) { should == {:InstantiatedVmsQuota => { :Limit => "-1", :Used => "-1" },
|
30
|
+
:Memory => { :Units => "bytes * 2^20", :Allocated => @mock_vdc.memory_allocated.to_s },
|
31
|
+
:Cpu => { :Units => "hz * 10^6", :Allocated => @mock_vdc.cpu_allocated.to_s },
|
32
|
+
:DeployedVmsQuota => { :Limit => "-1", :Used => "-1" } } }
|
33
|
+
|
34
|
+
its(:Link) { should have(4).links }
|
35
|
+
|
36
|
+
describe "link 0" do
|
37
|
+
subject { @vdc.body[:Link][0] }
|
38
|
+
it { should have(4).attributes }
|
39
|
+
its(:type) { should == "application/vnd.vmware.vcloud.catalog+xml" }
|
40
|
+
its(:rel) { should == "down" }
|
41
|
+
its(:href) { should == @mock_vdc.catalog.href }
|
42
|
+
its(:name) { should == @mock_vdc.catalog.name }
|
43
|
+
end
|
44
|
+
describe "link 1" do
|
45
|
+
subject { @vdc.body[:Link][1] }
|
46
|
+
it { should have(4).attributes }
|
47
|
+
its(:type) { should == "application/vnd.tmrk.ecloud.publicIpsList+xml" }
|
48
|
+
its(:rel) { should == "down" }
|
49
|
+
its(:href) { should == @mock_vdc.public_ip_collection.href }
|
50
|
+
its(:name) { should == @mock_vdc.public_ip_collection.name }
|
51
|
+
end
|
52
|
+
describe "link 2" do
|
53
|
+
subject { @vdc.body[:Link][2] }
|
54
|
+
it { should have(4).attributes }
|
55
|
+
its(:type) { should == "application/vnd.tmrk.ecloud.internetServicesList+xml" }
|
56
|
+
its(:rel) { should == "down" }
|
57
|
+
its(:href) { should == @mock_vdc.internet_service_collection.href }
|
58
|
+
its(:name) { should == @mock_vdc.internet_service_collection.name }
|
59
|
+
end
|
60
|
+
describe "link 3" do
|
61
|
+
subject { @vdc.body[:Link][3] }
|
62
|
+
it { should have(4).attributes }
|
63
|
+
its(:type) { should == "application/vnd.tmrk.ecloud.firewallAclsList+xml" }
|
64
|
+
its(:rel) { should == "down" }
|
65
|
+
its(:href) { should == @mock_vdc.firewall_acls.href }
|
66
|
+
its(:name) { should == @mock_vdc.firewall_acls.name }
|
67
|
+
end
|
68
|
+
|
69
|
+
let(:resource_entities) { subject[:ResourceEntities][:ResourceEntity] }
|
70
|
+
specify { resource_entities.should have(@mock_vdc.virtual_machines.length).vapps }
|
71
|
+
|
72
|
+
describe "[:ResourceEntities][:ResourceEntity]" do
|
73
|
+
context "[0]" do
|
74
|
+
subject { @vdc.body[:ResourceEntities][:ResourceEntity][0] }
|
75
|
+
it { should be_a_vapp_link_to @mock_vdc.virtual_machines[0] }
|
76
|
+
end
|
77
|
+
context "[1]" do
|
78
|
+
subject { @vdc.body[:ResourceEntities][:ResourceEntity][1] }
|
79
|
+
it { should be_a_vapp_link_to @mock_vdc.virtual_machines[1] }
|
80
|
+
end
|
81
|
+
context "[2]" do
|
82
|
+
subject { @vdc.body[:ResourceEntities][:ResourceEntity][2] }
|
83
|
+
it { should be_a_vapp_link_to @mock_vdc.virtual_machines[2] }
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
its(:name) { should == @mock_vdc[:name] }
|
88
|
+
|
89
|
+
let(:available_networks) { subject[:AvailableNetworks][:Network] }
|
90
|
+
specify { available_networks.should have(2).networks }
|
91
|
+
|
92
|
+
describe "[:AvailableNetworks][:Network]" do
|
93
|
+
context "[0]" do
|
94
|
+
subject { @vdc.body[:AvailableNetworks][:Network][0] }
|
95
|
+
it { should be_a_network_link_to @mock_vdc.networks[0] }
|
96
|
+
end
|
97
|
+
context "[1]" do
|
98
|
+
subject { @vdc.body[:AvailableNetworks][:Network][1] }
|
99
|
+
it { should be_a_network_link_to @mock_vdc.networks[1] }
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
context "with a vdc uri that doesn't exist" do
|
106
|
+
subject { lambda { @vcloud.get_vdc(URI.parse('https://www.fakey.com/api/v0.8/vdc/999')) } }
|
107
|
+
|
108
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
else
|
113
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :instantiate_vapp_template }
|
8
|
+
|
9
|
+
describe "#instantiate_vapp_template" do
|
10
|
+
let(:vdc) { @vcloud.vdcs.first }
|
11
|
+
let(:mock_vdc) { @mock_vdc }
|
12
|
+
|
13
|
+
let(:catalog_item) { vdc.catalog.first }
|
14
|
+
let(:mock_catalog_item) { @vcloud.mock_data.catalog_item_from_href(catalog_item.href) }
|
15
|
+
|
16
|
+
let(:new_vapp_data) do
|
17
|
+
{
|
18
|
+
:name => "foobar",
|
19
|
+
:network_uri => @mock_network.href,
|
20
|
+
:row => "test row",
|
21
|
+
:group => "test group",
|
22
|
+
:memory => 1024,
|
23
|
+
:cpus => 2,
|
24
|
+
:vdc_uri => @mock_vdc.href
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
let(:added_mock_data) { mock_vdc.virtual_machines.last }
|
29
|
+
|
30
|
+
context "with a valid data" do
|
31
|
+
let(:template_instantiation) { @vcloud.instantiate_vapp_template(catalog_item.href, new_vapp_data) }
|
32
|
+
subject { template_instantiation }
|
33
|
+
|
34
|
+
it_should_behave_like "all responses"
|
35
|
+
it { should have_headers_denoting_a_content_type_of "application/xml" }
|
36
|
+
|
37
|
+
it "updates the mock data properly" do
|
38
|
+
expect { subject }.to change { mock_vdc.virtual_machines.size }.by(1)
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "added mock data" do
|
42
|
+
before { template_instantiation }
|
43
|
+
subject { added_mock_data }
|
44
|
+
|
45
|
+
it { should be_an_instance_of Fog::Vcloud::MockDataClasses::MockVirtualMachine }
|
46
|
+
|
47
|
+
its(:name) { should == new_vapp_data[:name] }
|
48
|
+
its(:memory) { should == new_vapp_data[:memory] }
|
49
|
+
its(:cpus) { should == new_vapp_data[:cpus] }
|
50
|
+
# WHAT
|
51
|
+
specify { subject._parent.should == mock_vdc }
|
52
|
+
specify { subject.status.should == 2 }
|
53
|
+
specify { subject.disks.should == mock_catalog_item.disks }
|
54
|
+
# its(:_parent) { should == mock_vdc }
|
55
|
+
#its(:status) { should == 2 }
|
56
|
+
#its(:disks) { should == mock_catalog_item.disks }
|
57
|
+
end
|
58
|
+
|
59
|
+
describe "server based on added mock data" do
|
60
|
+
before { template_instantiation }
|
61
|
+
subject { vdc.servers.reload.detect {|s| s.href == added_mock_data.href }.reload }
|
62
|
+
|
63
|
+
its(:name) { should == new_vapp_data[:name] }
|
64
|
+
end
|
65
|
+
|
66
|
+
describe "#body" do
|
67
|
+
subject { template_instantiation.body }
|
68
|
+
|
69
|
+
it { should have(9).items }
|
70
|
+
|
71
|
+
it_should_behave_like "it has the standard vcloud v0.8 xmlns attributes" # 3 keys
|
72
|
+
|
73
|
+
its(:href) { should == added_mock_data.href }
|
74
|
+
its(:type) { should == "application/vnd.vmware.vcloud.vApp+xml" }
|
75
|
+
its(:name) { should == new_vapp_data[:name] }
|
76
|
+
its(:status) { should == "0" }
|
77
|
+
its(:size) { should == "4" }
|
78
|
+
|
79
|
+
it { should include :Link }
|
80
|
+
|
81
|
+
describe "Link" do
|
82
|
+
subject { template_instantiation.body[:Link] }
|
83
|
+
|
84
|
+
it { should have(3).keys }
|
85
|
+
|
86
|
+
its(:rel) { should == "up" }
|
87
|
+
its(:type) { should == "application/vnd.vmware.vcloud.vdc+xml" }
|
88
|
+
# WHAT
|
89
|
+
its(:href) { blah = vdc.href; should == blah }
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
else
|
96
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'vcloud/spec_helper'
|
2
|
+
|
3
|
+
if Fog.mocking?
|
4
|
+
describe Fog::Vcloud, :type => :mock_tmrk_ecloud_request do
|
5
|
+
subject { @vcloud }
|
6
|
+
|
7
|
+
it { should respond_to :power_off }
|
8
|
+
|
9
|
+
describe :power_off, :type => :vcloud_request do
|
10
|
+
context "with a valid vapp uri" do
|
11
|
+
before { @mock_vm.power_on!; @power_off = @vcloud.power_off(@mock_vm.href(:power_off)) }
|
12
|
+
subject { @power_off }
|
13
|
+
|
14
|
+
it_should_behave_like "all responses"
|
15
|
+
#it { should have_headers_denoting_a_content_type_of "application/vnd.vmware.vcloud.network+xml" }
|
16
|
+
|
17
|
+
specify { @mock_vm.status.should == 2 }
|
18
|
+
|
19
|
+
describe :body do
|
20
|
+
subject { @power_off.body }
|
21
|
+
|
22
|
+
it_should_behave_like "it has the standard vcloud v0.8 xmlns attributes" # 3 keys
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "with a vapp uri that doesn't exist" do
|
27
|
+
subject { lambda { @vcloud.power_off(URI.parse('https://www.fakey.com/api/v0.8/vapp/9999')) } }
|
28
|
+
it_should_behave_like "a request for a resource that doesn't exist"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
else
|
33
|
+
end
|
34
|
+
|