fog 0.2.30 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +8 -8
- data/README.rdoc +15 -6
- data/Rakefile +12 -19
- data/bin/fog +12 -10
- data/fog.gemspec +298 -286
- data/lib/fog.rb +22 -12
- data/lib/fog/attributes.rb +2 -6
- data/lib/fog/aws.rb +10 -5
- data/lib/fog/aws/bin.rb +29 -65
- data/lib/fog/aws/compute.rb +220 -0
- data/lib/fog/aws/ec2.rb +9 -216
- data/lib/fog/aws/elb.rb +9 -12
- data/lib/fog/aws/models/{ec2 → compute}/address.rb +3 -3
- data/lib/fog/aws/models/{ec2 → compute}/addresses.rb +3 -11
- data/lib/fog/aws/models/{ec2 → compute}/flavor.rb +2 -2
- data/lib/fog/aws/models/compute/flavors.rb +39 -0
- data/lib/fog/aws/models/compute/image.rb +44 -0
- data/lib/fog/aws/models/{ec2 → compute}/images.rb +3 -9
- data/lib/fog/aws/models/compute/key_pair.rb +44 -0
- data/lib/fog/aws/models/{ec2 → compute}/key_pairs.rb +3 -9
- data/lib/fog/aws/models/{ec2 → compute}/security_group.rb +28 -6
- data/lib/fog/aws/models/{ec2 → compute}/security_groups.rb +3 -9
- data/lib/fog/aws/models/{ec2 → compute}/server.rb +65 -38
- data/lib/fog/aws/models/compute/servers.rb +80 -0
- data/lib/fog/aws/models/{ec2 → compute}/snapshot.rb +7 -7
- data/lib/fog/aws/models/{ec2 → compute}/snapshots.rb +5 -13
- data/lib/fog/aws/models/{ec2 → compute}/volume.rb +8 -8
- data/lib/fog/aws/models/{ec2 → compute}/volumes.rb +3 -11
- data/lib/fog/aws/models/{s3 → storage}/directories.rb +3 -9
- data/lib/fog/aws/models/{s3 → storage}/directory.rb +5 -5
- data/lib/fog/aws/models/{s3 → storage}/file.rb +9 -9
- data/lib/fog/aws/models/{s3 → storage}/files.rb +13 -8
- data/lib/fog/aws/parsers/{ec2 → compute}/allocate_address.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/attach_volume.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/basic.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/create_image.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/create_key_pair.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/create_snapshot.rb +2 -2
- data/lib/fog/aws/parsers/{ec2 → compute}/create_volume.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/deregister_image.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_addresses.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_availability_zones.rb +2 -2
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_images.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_instances.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_key_pairs.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_regions.rb +2 -2
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_reserved_instances.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_security_groups.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_snapshots.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/describe_volumes.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/detach_volume.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/get_console_output.rb +2 -2
- data/lib/fog/aws/parsers/compute/import_key_pair.rb +20 -0
- data/lib/fog/aws/parsers/{ec2 → compute}/register_image.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/run_instances.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/start_stop_instances.rb +1 -1
- data/lib/fog/aws/parsers/{ec2 → compute}/terminate_instances.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/access_control_list.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/copy_object.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_bucket.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_location.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_logging.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_object_versions.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_versioning.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_request_payment.rb +1 -1
- data/lib/fog/aws/parsers/{s3 → storage}/get_service.rb +1 -1
- data/lib/fog/aws/requests/{ec2 → compute}/allocate_address.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/associate_address.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/attach_volume.rb +6 -6
- data/lib/fog/aws/requests/{ec2 → compute}/authorize_security_group_ingress.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/create_image.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/create_key_pair.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/create_security_group.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/create_snapshot.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/create_volume.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/delete_key_pair.rb +2 -2
- data/lib/fog/aws/requests/{ec2 → compute}/delete_security_group.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/delete_snapshot.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/delete_volume.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/deregister_image.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_addresses.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_availability_zones.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_images.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/describe_instances.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_key_pairs.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_regions.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_reserved_instances.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/describe_security_groups.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_snapshots.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/describe_volumes.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/detach_volume.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/disassociate_address.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/get_console_output.rb +4 -4
- data/lib/fog/aws/requests/compute/import_key_pair.rb +54 -0
- data/lib/fog/aws/requests/{ec2 → compute}/modify_image_attributes.rb +2 -2
- data/lib/fog/aws/requests/{ec2 → compute}/modify_snapshot_attribute.rb +2 -2
- data/lib/fog/aws/requests/{ec2 → compute}/reboot_instances.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/register_image.rb +4 -4
- data/lib/fog/aws/requests/{ec2 → compute}/release_address.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/revoke_security_group_ingress.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/run_instances.rb +4 -3
- data/lib/fog/aws/requests/{ec2 → compute}/start_instances.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/stop_instances.rb +3 -3
- data/lib/fog/aws/requests/{ec2 → compute}/terminate_instances.rb +4 -4
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/elb/delete_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/elb/describe_instance_health.rb +1 -1
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +1 -1
- data/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/simpledb/batch_put_attributes.rb +1 -1
- data/lib/fog/aws/requests/simpledb/create_domain.rb +1 -1
- data/lib/fog/aws/requests/simpledb/delete_attributes.rb +1 -1
- data/lib/fog/aws/requests/simpledb/delete_domain.rb +1 -1
- data/lib/fog/aws/requests/simpledb/domain_metadata.rb +1 -1
- data/lib/fog/aws/requests/simpledb/get_attributes.rb +1 -1
- data/lib/fog/aws/requests/simpledb/list_domains.rb +1 -1
- data/lib/fog/aws/requests/simpledb/put_attributes.rb +1 -1
- data/lib/fog/aws/requests/simpledb/select.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/copy_object.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/delete_bucket.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/delete_object.rb +2 -2
- data/lib/fog/aws/requests/{s3 → storage}/get_bucket.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_bucket_acl.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_bucket_location.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_bucket_logging.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_bucket_object_versions.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_bucket_versioning.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_object.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/get_object_acl.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_object_torrent.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/get_object_url.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/get_request_payment.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/get_service.rb +3 -3
- data/lib/fog/aws/requests/{s3 → storage}/head_object.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_bucket.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_bucket_acl.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_bucket_logging.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_bucket_versioning.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_object.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_object_url.rb +1 -1
- data/lib/fog/aws/requests/{s3 → storage}/put_request_payment.rb +1 -1
- data/lib/fog/aws/s3.rb +8 -205
- data/lib/fog/aws/simpledb.rb +10 -13
- data/lib/fog/aws/storage.rb +209 -0
- data/lib/fog/bin.rb +59 -50
- data/lib/fog/bluebox.rb +9 -78
- data/lib/fog/bluebox/bin.rb +10 -28
- data/lib/fog/bluebox/compute.rb +87 -0
- data/lib/fog/bluebox/models/compute/flavor.rb +45 -0
- data/lib/fog/bluebox/models/compute/flavors.rb +28 -0
- data/lib/fog/bluebox/models/compute/image.rb +19 -0
- data/lib/fog/bluebox/models/compute/images.rb +28 -0
- data/lib/fog/bluebox/models/compute/server.rb +81 -0
- data/lib/fog/bluebox/models/compute/servers.rb +29 -0
- data/lib/fog/bluebox/requests/compute/create_block.rb +41 -0
- data/lib/fog/bluebox/requests/compute/destroy_block.rb +34 -0
- data/lib/fog/bluebox/requests/compute/get_block.rb +34 -0
- data/lib/fog/bluebox/requests/compute/get_blocks.rb +36 -0
- data/lib/fog/bluebox/requests/compute/get_product.rb +34 -0
- data/lib/fog/bluebox/requests/compute/get_products.rb +33 -0
- data/lib/fog/bluebox/requests/compute/get_template.rb +34 -0
- data/lib/fog/bluebox/requests/compute/get_templates.rb +34 -0
- data/lib/fog/bluebox/requests/compute/reboot_block.rb +35 -0
- data/lib/fog/go_grid.rb +9 -88
- data/lib/fog/go_grid/bin.rb +17 -22
- data/lib/fog/go_grid/compute.rb +96 -0
- data/lib/fog/go_grid/requests/compute/common_lookup_list.rb +36 -0
- data/lib/fog/go_grid/requests/compute/grid_image_list.rb +39 -0
- data/lib/fog/go_grid/requests/compute/grid_ip_list.rb +38 -0
- data/lib/fog/go_grid/requests/compute/grid_loadbalancer_list.rb +36 -0
- data/lib/fog/go_grid/requests/compute/grid_server_add.rb +44 -0
- data/lib/fog/go_grid/requests/compute/grid_server_delete.rb +33 -0
- data/lib/fog/go_grid/requests/compute/grid_server_get.rb +33 -0
- data/lib/fog/go_grid/requests/compute/grid_server_list.rb +38 -0
- data/lib/fog/go_grid/requests/compute/grid_server_power.rb +34 -0
- data/lib/fog/linode.rb +10 -71
- data/lib/fog/linode/bin.rb +17 -22
- data/lib/fog/linode/compute.rb +79 -0
- data/lib/fog/linode/requests/compute/avail_datacenters.rb +31 -0
- data/lib/fog/linode/requests/compute/avail_distributions.rb +38 -0
- data/lib/fog/linode/requests/compute/avail_kernels.rb +36 -0
- data/lib/fog/linode/requests/compute/avail_linodeplans.rb +35 -0
- data/lib/fog/linode/requests/compute/avail_stackscripts.rb +37 -0
- data/lib/fog/linode/requests/compute/linode_create.rb +41 -0
- data/lib/fog/linode/requests/compute/linode_delete.rb +36 -0
- data/lib/fog/linode/requests/compute/linode_list.rb +38 -0
- data/lib/fog/linode/requests/compute/linode_reboot.rb +36 -0
- data/lib/fog/local.rb +10 -51
- data/lib/fog/local/bin.rb +17 -26
- data/lib/fog/local/models/storage/directories.rb +33 -0
- data/lib/fog/local/models/storage/directory.rb +52 -0
- data/lib/fog/local/models/storage/file.rb +60 -0
- data/lib/fog/local/models/storage/files.rb +73 -0
- data/lib/fog/local/storage.rb +58 -0
- data/lib/fog/model.rb +1 -1
- data/lib/fog/new_servers.rb +9 -80
- data/lib/fog/new_servers/bin.rb +17 -22
- data/lib/fog/new_servers/compute.rb +88 -0
- data/lib/fog/new_servers/requests/compute/add_server.rb +41 -0
- data/lib/fog/new_servers/requests/compute/cancel_server.rb +38 -0
- data/lib/fog/new_servers/requests/compute/get_server.rb +44 -0
- data/lib/fog/new_servers/requests/compute/list_images.rb +35 -0
- data/lib/fog/new_servers/requests/compute/list_plans.rb +38 -0
- data/lib/fog/new_servers/requests/compute/list_servers.rb +44 -0
- data/lib/fog/new_servers/requests/compute/reboot_server.rb +32 -0
- data/lib/fog/provider.rb +18 -0
- data/lib/fog/rackspace.rb +8 -3
- data/lib/fog/rackspace/bin.rb +26 -41
- data/lib/fog/rackspace/compute.rb +107 -0
- data/lib/fog/rackspace/files.rb +9 -130
- data/lib/fog/rackspace/models/{servers → compute}/flavor.rb +1 -1
- data/lib/fog/rackspace/models/{servers → compute}/flavors.rb +4 -10
- data/lib/fog/rackspace/models/{servers → compute}/image.rb +4 -4
- data/lib/fog/rackspace/models/{servers → compute}/images.rb +4 -12
- data/lib/fog/rackspace/models/{servers → compute}/server.rb +20 -16
- data/lib/fog/rackspace/models/{servers → compute}/servers.rb +5 -11
- data/lib/fog/rackspace/models/{files → storage}/directories.rb +4 -10
- data/lib/fog/rackspace/models/{files → storage}/directory.rb +4 -4
- data/lib/fog/rackspace/models/{files → storage}/file.rb +6 -6
- data/lib/fog/rackspace/models/{files → storage}/files.rb +11 -15
- data/lib/fog/rackspace/requests/{servers → compute}/create_image.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/create_server.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/delete_image.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/delete_server.rb +2 -2
- data/lib/fog/rackspace/requests/{servers → compute}/get_flavor_details.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/get_image_details.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/get_server_details.rb +2 -2
- data/lib/fog/rackspace/requests/{servers → compute}/list_addresses.rb +2 -2
- data/lib/fog/rackspace/requests/{servers → compute}/list_flavors.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/list_flavors_detail.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/list_images.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/list_images_detail.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/list_private_addresses.rb +2 -2
- data/lib/fog/rackspace/requests/{servers → compute}/list_public_addresses.rb +2 -2
- data/lib/fog/rackspace/requests/{servers → compute}/list_servers.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/list_servers_detail.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/reboot_server.rb +1 -1
- data/lib/fog/rackspace/requests/{servers → compute}/update_server.rb +2 -2
- data/lib/fog/rackspace/requests/{files → storage}/delete_container.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/delete_object.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/get_container.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/get_containers.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/get_object.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/head_container.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/head_containers.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/head_object.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/put_container.rb +1 -1
- data/lib/fog/rackspace/requests/{files → storage}/put_object.rb +1 -1
- data/lib/fog/rackspace/servers.rb +9 -104
- data/lib/fog/rackspace/storage.rb +151 -0
- data/lib/fog/service.rb +111 -59
- data/lib/fog/slicehost.rb +9 -83
- data/lib/fog/slicehost/bin.rb +17 -34
- data/lib/fog/slicehost/compute.rb +91 -0
- data/lib/fog/slicehost/models/compute/flavor.rb +45 -0
- data/lib/fog/slicehost/models/compute/flavors.rb +28 -0
- data/lib/fog/slicehost/models/compute/image.rb +17 -0
- data/lib/fog/slicehost/models/compute/images.rb +27 -0
- data/lib/fog/slicehost/models/compute/server.rb +64 -0
- data/lib/fog/slicehost/models/compute/servers.rb +31 -0
- data/lib/fog/slicehost/parsers/compute/create_slice.rb +31 -0
- data/lib/fog/slicehost/parsers/compute/get_backups.rb +32 -0
- data/lib/fog/slicehost/parsers/compute/get_flavor.rb +26 -0
- data/lib/fog/slicehost/parsers/compute/get_flavors.rb +30 -0
- data/lib/fog/slicehost/parsers/compute/get_image.rb +26 -0
- data/lib/fog/slicehost/parsers/compute/get_images.rb +30 -0
- data/lib/fog/slicehost/parsers/compute/get_slice.rb +31 -0
- data/lib/fog/slicehost/parsers/compute/get_slices.rb +35 -0
- data/lib/fog/slicehost/requests/compute/create_slice.rb +49 -0
- data/lib/fog/slicehost/requests/compute/delete_slice.rb +45 -0
- data/lib/fog/slicehost/requests/compute/get_backups.rb +37 -0
- data/lib/fog/slicehost/requests/compute/get_flavor.rb +40 -0
- data/lib/fog/slicehost/requests/compute/get_flavors.rb +37 -0
- data/lib/fog/slicehost/requests/compute/get_image.rb +38 -0
- data/lib/fog/slicehost/requests/compute/get_images.rb +35 -0
- data/lib/fog/slicehost/requests/compute/get_slice.rb +46 -0
- data/lib/fog/slicehost/requests/compute/get_slices.rb +43 -0
- data/lib/fog/slicehost/requests/compute/reboot_slice.rb +44 -0
- data/lib/fog/ssh.rb +16 -7
- data/lib/fog/terremark/bin.rb +25 -33
- data/lib/fog/terremark/models/shared/address.rb +1 -1
- data/lib/fog/terremark/models/shared/task.rb +6 -6
- data/lib/fog/vcloud.rb +60 -36
- data/lib/fog/vcloud/bin.rb +2 -2
- data/lib/fog/vcloud/collection.rb +1 -1
- data/lib/fog/vcloud/generators.rb +1 -1
- data/lib/fog/vcloud/model.rb +1 -1
- data/lib/fog/vcloud/models/vdc.rb +1 -1
- data/lib/fog/vcloud/models/vdcs.rb +3 -9
- data/lib/fog/vcloud/requests/get_network.rb +1 -1
- data/lib/fog/vcloud/requests/get_organization.rb +1 -1
- data/lib/fog/vcloud/requests/get_vdc.rb +1 -1
- data/lib/fog/vcloud/requests/get_versions.rb +1 -1
- data/lib/fog/vcloud/requests/login.rb +1 -1
- data/lib/fog/vcloud/terremark/ecloud.rb +19 -14
- data/lib/fog/vcloud/terremark/ecloud/models/catalog.rb +2 -2
- data/lib/fog/vcloud/terremark/ecloud/models/catalog_item.rb +3 -3
- data/lib/fog/vcloud/terremark/ecloud/models/firewall_acl.rb +3 -3
- data/lib/fog/vcloud/terremark/ecloud/models/firewall_acls.rb +4 -2
- data/lib/fog/vcloud/terremark/ecloud/models/internet_service.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/models/internet_services.rb +4 -8
- data/lib/fog/vcloud/terremark/ecloud/models/ip.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/models/ips.rb +4 -2
- data/lib/fog/vcloud/terremark/ecloud/models/network.rb +2 -2
- data/lib/fog/vcloud/terremark/ecloud/models/networks.rb +4 -8
- data/lib/fog/vcloud/terremark/ecloud/models/node.rb +3 -3
- data/lib/fog/vcloud/terremark/ecloud/models/nodes.rb +4 -2
- data/lib/fog/vcloud/terremark/ecloud/models/public_ip.rb +3 -3
- data/lib/fog/vcloud/terremark/ecloud/models/public_ips.rb +4 -14
- data/lib/fog/vcloud/terremark/ecloud/models/server.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/models/servers.rb +4 -2
- data/lib/fog/vcloud/terremark/ecloud/models/task.rb +3 -3
- data/lib/fog/vcloud/terremark/ecloud/models/tasks.rb +4 -2
- data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +2 -2
- data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +25 -15
- data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/add_node.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/clone_vapp.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_network.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_network_ip.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_node.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_vapp.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_internet_service.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_node.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_vapp.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog_item.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_customization_options.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acl.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acls.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_internet_services.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_extensions.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ip.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ips.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_node.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_nodes.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ip.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ips.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_task.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_task_list.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp_template.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vdc.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/instantiate_vapp_template.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/power_off.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/power_on.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/power_reset.rb +4 -4
- data/lib/fog/vcloud/terremark/ecloud/requests/power_shutdown.rb +4 -4
- data/lib/fog/vcloud/terremark/vcloud.rb +9 -5
- data/lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb +4 -4
- data/spec/aws/models/{ec2 → compute}/address_spec.rb +12 -12
- data/spec/aws/models/compute/addresses_spec.rb +70 -0
- data/spec/aws/models/{ec2 → compute}/flavors_spec.rb +2 -2
- data/spec/aws/models/{ec2 → compute}/key_pair_spec.rb +12 -12
- data/spec/aws/models/compute/key_pairs_spec.rb +71 -0
- data/spec/aws/models/{ec2 → compute}/security_group_spec.rb +12 -12
- data/spec/aws/models/compute/security_groups_spec.rb +71 -0
- data/spec/aws/models/{ec2 → compute}/server_spec.rb +9 -9
- data/spec/aws/models/{ec2 → compute}/servers_spec.rb +2 -2
- data/spec/aws/models/{ec2 → compute}/snapshot_spec.rb +7 -7
- data/spec/aws/models/{ec2 → compute}/snapshots_spec.rb +12 -12
- data/spec/aws/models/{ec2 → compute}/volume_spec.rb +16 -16
- data/spec/aws/models/compute/volumes_spec.rb +71 -0
- data/spec/aws/models/storage/directories_spec.rb +49 -0
- data/spec/aws/models/{s3 → storage}/directory_spec.rb +13 -13
- data/spec/aws/models/{s3 → storage}/file_spec.rb +6 -6
- data/spec/aws/models/{s3 → storage}/files_spec.rb +6 -6
- data/spec/aws/requests/{ec2 → compute}/describe_images_spec.rb +4 -4
- data/spec/aws/requests/s3/copy_object_spec.rb +12 -12
- data/spec/aws/requests/s3/delete_bucket_spec.rb +9 -9
- data/spec/aws/requests/s3/delete_object_spec.rb +9 -9
- data/spec/aws/requests/s3/get_bucket_location_spec.rb +5 -5
- data/spec/aws/requests/s3/get_bucket_spec.rb +13 -13
- data/spec/aws/requests/s3/get_object_spec.rb +10 -10
- data/spec/aws/requests/s3/get_request_payment_spec.rb +5 -5
- data/spec/aws/requests/s3/get_service_spec.rb +6 -6
- data/spec/aws/requests/s3/head_object_spec.rb +6 -6
- data/spec/aws/requests/s3/put_bucket_spec.rb +4 -4
- data/spec/aws/requests/s3/put_object_spec.rb +12 -12
- data/spec/aws/requests/s3/put_request_payment_spec.rb +5 -5
- data/spec/{rackspace/models/servers → bluebox/models/compute}/flavors_spec.rb +3 -3
- data/spec/bluebox/models/{server_spec.rb → compute/server_spec.rb} +4 -4
- data/spec/bluebox/models/{servers_spec.rb → compute/servers_spec.rb} +4 -4
- data/spec/rackspace/models/compute/flavors_spec.rb +14 -0
- data/spec/rackspace/models/{servers → compute}/server_spec.rb +4 -4
- data/spec/rackspace/models/compute/servers_spec.rb +22 -0
- data/spec/rackspace/requests/{files → storage}/delete_container_spec.rb +5 -5
- data/spec/rackspace/requests/storage/delete_object_spec.rb +37 -0
- data/spec/rackspace/requests/{files → storage}/get_container_spec.rb +9 -9
- data/spec/rackspace/requests/{files → storage}/get_containers_spec.rb +4 -4
- data/spec/rackspace/requests/storage/get_object_spec.rb +21 -0
- data/spec/rackspace/requests/storage/head_container_spec.rb +30 -0
- data/spec/rackspace/requests/storage/head_containers_spec.rb +19 -0
- data/spec/rackspace/requests/storage/head_object_spec.rb +21 -0
- data/spec/rackspace/requests/{files → storage}/put_container_spec.rb +3 -3
- data/spec/rackspace/requests/storage/put_object_spec.rb +20 -0
- data/spec/slicehost/models/compute/flavors_spec.rb +14 -0
- data/spec/slicehost/models/{server_spec.rb → compute/server_spec.rb} +8 -8
- data/spec/{rackspace/models/servers → slicehost/models/compute}/servers_spec.rb +4 -4
- data/spec/spec_helper.rb +14 -14
- data/spec/vcloud/models/vdc_spec.rb +1 -1
- data/spec/vcloud/spec_helper.rb +7 -7
- data/spec/vcloud/terremark/ecloud/models/internet_service_spec.rb +1 -1
- data/tests/aws/helper.rb +8 -8
- data/tests/aws/models/storage/directory_tests.rb +8 -0
- data/tests/aws/requests/compute/address_tests.rb +80 -0
- data/tests/aws/requests/{ec2 → compute}/availability_zone_tests.rb +5 -5
- data/tests/aws/requests/{ec2 → compute}/instance_tests.rb +17 -17
- data/tests/aws/requests/{ec2 → compute}/key_pair_tests.rb +12 -12
- data/tests/aws/requests/{ec2 → compute}/region_tests.rb +5 -5
- data/tests/aws/requests/{ec2 → compute}/security_group_tests.rb +31 -31
- data/tests/aws/requests/{ec2 → compute}/snapshot_tests.rb +12 -12
- data/tests/aws/requests/{ec2 → compute}/volume_tests.rb +23 -23
- data/tests/bluebox/helper.rb +13 -9
- data/tests/bluebox/requests/{block_tests.rb → compute/block_tests.rb} +16 -17
- data/tests/bluebox/requests/compute/product_tests.rb +25 -0
- data/tests/bluebox/requests/{template_tests.rb → compute/template_tests.rb} +5 -5
- data/tests/linode/helper.rb +12 -8
- data/tests/linode/requests/{datacenter_tests.rb → compute/datacenter_tests.rb} +3 -3
- data/tests/linode/requests/{distribution_tests.rb → compute/distribution_tests.rb} +4 -4
- data/tests/linode/requests/{linode_tests.rb → compute/linode_tests.rb} +13 -13
- data/tests/linode/requests/{linodeplans_tests.rb → compute/linodeplans_tests.rb} +4 -4
- data/tests/rackspace/helper.rb +5 -13
- data/tests/rackspace/requests/compute/address_tests.rb +40 -0
- data/tests/rackspace/requests/compute/flavor_tests.rb +34 -0
- data/tests/rackspace/requests/compute/image_tests.rb +62 -0
- data/tests/rackspace/requests/{servers → compute}/server_tests.rb +20 -20
- data/tests/slicehost/helper.rb +3 -3
- data/tests/slicehost/requests/{backup_tests.rb → compute/backup_tests.rb} +2 -2
- data/tests/slicehost/requests/{flavor_tests.rb → compute/flavor_tests.rb} +4 -4
- data/tests/slicehost/requests/{image_tests.rb → compute/image_tests.rb} +4 -4
- data/tests/slicehost/requests/{slice_tests.rb → compute/slice_tests.rb} +12 -12
- metadata +304 -290
- data/lib/fog/aws/models/ec2/flavors.rb +0 -43
- data/lib/fog/aws/models/ec2/image.rb +0 -44
- data/lib/fog/aws/models/ec2/key_pair.rb +0 -34
- data/lib/fog/aws/models/ec2/servers.rb +0 -49
- data/lib/fog/bluebox/models/flavor.rb +0 -43
- data/lib/fog/bluebox/models/flavors.rb +0 -32
- data/lib/fog/bluebox/models/image.rb +0 -17
- data/lib/fog/bluebox/models/images.rb +0 -34
- data/lib/fog/bluebox/models/server.rb +0 -79
- data/lib/fog/bluebox/models/servers.rb +0 -33
- data/lib/fog/bluebox/requests/create_block.rb +0 -39
- data/lib/fog/bluebox/requests/destroy_block.rb +0 -32
- data/lib/fog/bluebox/requests/get_block.rb +0 -32
- data/lib/fog/bluebox/requests/get_blocks.rb +0 -34
- data/lib/fog/bluebox/requests/get_product.rb +0 -32
- data/lib/fog/bluebox/requests/get_products.rb +0 -31
- data/lib/fog/bluebox/requests/get_template.rb +0 -32
- data/lib/fog/bluebox/requests/get_templates.rb +0 -32
- data/lib/fog/bluebox/requests/reboot_block.rb +0 -33
- data/lib/fog/go_grid/requests/common_lookup_list.rb +0 -34
- data/lib/fog/go_grid/requests/grid_image_list.rb +0 -37
- data/lib/fog/go_grid/requests/grid_ip_list.rb +0 -36
- data/lib/fog/go_grid/requests/grid_loadbalancer_list.rb +0 -34
- data/lib/fog/go_grid/requests/grid_server_add.rb +0 -42
- data/lib/fog/go_grid/requests/grid_server_delete.rb +0 -31
- data/lib/fog/go_grid/requests/grid_server_get.rb +0 -31
- data/lib/fog/go_grid/requests/grid_server_list.rb +0 -36
- data/lib/fog/go_grid/requests/grid_server_power.rb +0 -32
- data/lib/fog/linode/requests/avail_datacenters.rb +0 -29
- data/lib/fog/linode/requests/avail_distributions.rb +0 -36
- data/lib/fog/linode/requests/avail_kernels.rb +0 -34
- data/lib/fog/linode/requests/avail_linodeplans.rb +0 -33
- data/lib/fog/linode/requests/avail_stackscripts.rb +0 -35
- data/lib/fog/linode/requests/linode_create.rb +0 -39
- data/lib/fog/linode/requests/linode_delete.rb +0 -34
- data/lib/fog/linode/requests/linode_list.rb +0 -36
- data/lib/fog/linode/requests/linode_reboot.rb +0 -34
- data/lib/fog/local/models/directories.rb +0 -37
- data/lib/fog/local/models/directory.rb +0 -50
- data/lib/fog/local/models/file.rb +0 -58
- data/lib/fog/local/models/files.rb +0 -74
- data/lib/fog/new_servers/requests/add_server.rb +0 -39
- data/lib/fog/new_servers/requests/cancel_server.rb +0 -36
- data/lib/fog/new_servers/requests/get_server.rb +0 -42
- data/lib/fog/new_servers/requests/list_images.rb +0 -33
- data/lib/fog/new_servers/requests/list_plans.rb +0 -36
- data/lib/fog/new_servers/requests/list_servers.rb +0 -43
- data/lib/fog/new_servers/requests/reboot_server.rb +0 -30
- data/lib/fog/slicehost/models/flavor.rb +0 -43
- data/lib/fog/slicehost/models/flavors.rb +0 -31
- data/lib/fog/slicehost/models/image.rb +0 -15
- data/lib/fog/slicehost/models/images.rb +0 -33
- data/lib/fog/slicehost/models/server.rb +0 -62
- data/lib/fog/slicehost/models/servers.rb +0 -35
- data/lib/fog/slicehost/parsers/create_slice.rb +0 -29
- data/lib/fog/slicehost/parsers/get_backups.rb +0 -30
- data/lib/fog/slicehost/parsers/get_flavor.rb +0 -24
- data/lib/fog/slicehost/parsers/get_flavors.rb +0 -28
- data/lib/fog/slicehost/parsers/get_image.rb +0 -24
- data/lib/fog/slicehost/parsers/get_images.rb +0 -28
- data/lib/fog/slicehost/parsers/get_slice.rb +0 -29
- data/lib/fog/slicehost/parsers/get_slices.rb +0 -33
- data/lib/fog/slicehost/requests/create_slice.rb +0 -47
- data/lib/fog/slicehost/requests/delete_slice.rb +0 -43
- data/lib/fog/slicehost/requests/get_backups.rb +0 -35
- data/lib/fog/slicehost/requests/get_flavor.rb +0 -38
- data/lib/fog/slicehost/requests/get_flavors.rb +0 -35
- data/lib/fog/slicehost/requests/get_image.rb +0 -36
- data/lib/fog/slicehost/requests/get_images.rb +0 -33
- data/lib/fog/slicehost/requests/get_slice.rb +0 -44
- data/lib/fog/slicehost/requests/get_slices.rb +0 -41
- data/lib/fog/slicehost/requests/reboot_slice.rb +0 -42
- data/lib/fog/vcloud/extension.rb +0 -37
- data/spec/aws/models/ec2/addresses_spec.rb +0 -70
- data/spec/aws/models/ec2/key_pairs_spec.rb +0 -71
- data/spec/aws/models/ec2/security_groups_spec.rb +0 -71
- data/spec/aws/models/ec2/volumes_spec.rb +0 -71
- data/spec/aws/models/s3/directories_spec.rb +0 -49
- data/spec/bluebox/models/flavors_spec.rb +0 -14
- data/spec/rackspace/requests/files/delete_object_spec.rb +0 -37
- data/spec/rackspace/requests/files/get_object_spec.rb +0 -21
- data/spec/rackspace/requests/files/head_container_spec.rb +0 -30
- data/spec/rackspace/requests/files/head_containers_spec.rb +0 -19
- data/spec/rackspace/requests/files/head_object_spec.rb +0 -21
- data/spec/rackspace/requests/files/put_object_spec.rb +0 -20
- data/spec/slicehost/models/flavors_spec.rb +0 -14
- data/spec/slicehost/models/servers_spec.rb +0 -22
- data/tests/aws/models/s3/directory_tests.rb +0 -8
- data/tests/aws/requests/ec2/address_tests.rb +0 -80
- data/tests/bluebox/requests/product_tests.rb +0 -25
- data/tests/rackspace/requests/servers/address_tests.rb +0 -40
- data/tests/rackspace/requests/servers/flavor_tests.rb +0 -34
- data/tests/rackspace/requests/servers/image_tests.rb +0 -59
@@ -0,0 +1,38 @@
|
|
1
|
+
module Fog
|
2
|
+
module Slicehost
|
3
|
+
class Compute
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/slicehost/parsers/compute/get_image'
|
7
|
+
|
8
|
+
# Get details of an image
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * image_id<~Integer> - Id of image to lookup
|
12
|
+
#
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Array>:
|
16
|
+
# * 'id'<~Integer> - Id of the image
|
17
|
+
# * 'name'<~String> - Name of the image
|
18
|
+
def get_image(image_id)
|
19
|
+
request(
|
20
|
+
:expects => 200,
|
21
|
+
:method => 'GET',
|
22
|
+
:parser => Fog::Parsers::Slicehost::Compute::GetImage.new,
|
23
|
+
:path => "images/#{image_id}.xml"
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
class Mock
|
30
|
+
|
31
|
+
def get_image(image_id)
|
32
|
+
Fog::Mock.not_implemented
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Fog
|
2
|
+
module Slicehost
|
3
|
+
class Compute
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/slicehost/parsers/compute/get_images'
|
7
|
+
|
8
|
+
# Get list of images
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Array>:
|
13
|
+
# * 'id'<~Integer> - Id of the image
|
14
|
+
# * 'name'<~String> - Name of the image
|
15
|
+
def get_images
|
16
|
+
request(
|
17
|
+
:expects => 200,
|
18
|
+
:method => 'GET',
|
19
|
+
:parser => Fog::Parsers::Slicehost::Compute::GetImages.new,
|
20
|
+
:path => 'images.xml'
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
class Mock
|
27
|
+
|
28
|
+
def get_images
|
29
|
+
Fog::Mock.not_implemented
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Fog
|
2
|
+
module Slicehost
|
3
|
+
class Compute
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/slicehost/parsers/compute/get_slice'
|
7
|
+
|
8
|
+
# Get details of a slice
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * slice_id<~Integer> - Id of slice to lookup
|
12
|
+
#
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
# * 'addresses'<~Array> - Ip addresses for the slice
|
17
|
+
# * 'backup-id'<~Integer> - Id of backup slice was booted from
|
18
|
+
# * 'bw-in'<~Float> - Incoming bandwidth total for current billing cycle, in Gigabytes
|
19
|
+
# * 'bw-out'<~Float> - Outgoing bandwidth total for current billing cycle, in Gigabytes
|
20
|
+
# * 'flavor_id'<~Integer> - Id of flavor slice was booted from
|
21
|
+
# * 'id'<~Integer> - Id of the slice
|
22
|
+
# * 'image-id'<~Integer> - Id of image slice was booted from
|
23
|
+
# * 'name'<~String> - Name of the slice
|
24
|
+
# * 'progress'<~Integer> - Progress of current action, in percentage
|
25
|
+
# * 'status'<~String> - Current status of the slice
|
26
|
+
def get_slice(slice_id)
|
27
|
+
request(
|
28
|
+
:expects => 200,
|
29
|
+
:method => 'GET',
|
30
|
+
:parser => Fog::Parsers::Slicehost::Compute::GetSlice.new,
|
31
|
+
:path => "/slices/#{slice_id}.xml"
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
class Mock
|
38
|
+
|
39
|
+
def get_slice(id)
|
40
|
+
Fog::Mock.not_implemented
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Fog
|
2
|
+
module Slicehost
|
3
|
+
class Compute
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/slicehost/parsers/compute/get_slices'
|
7
|
+
|
8
|
+
# Get list of slices
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Array>:
|
13
|
+
# * 'addresses'<~Array> - Ip addresses for the slice
|
14
|
+
# * 'backup-id'<~Integer> - Id of backup slice was booted from
|
15
|
+
# * 'bw-in'<~Float> - Incoming bandwidth total for current billing cycle, in Gigabytes
|
16
|
+
# * 'bw-out'<~Float> - Outgoing bandwidth total for current billing cycle, in Gigabytes
|
17
|
+
# * 'flavor_id'<~Integer> - Id of flavor slice was booted from
|
18
|
+
# * 'id'<~Integer> - Id of the slice
|
19
|
+
# * 'image-id'<~Integer> - Id of image slice was booted from
|
20
|
+
# * 'name'<~String> - Name of the slice
|
21
|
+
# * 'progress'<~Integer> - Progress of current action, in percentage
|
22
|
+
# * 'status'<~String> - Current status of the slice
|
23
|
+
def get_slices
|
24
|
+
request(
|
25
|
+
:expects => 200,
|
26
|
+
:method => 'GET',
|
27
|
+
:parser => Fog::Parsers::Slicehost::Compute::GetSlices.new,
|
28
|
+
:path => 'slices.xml'
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
class Mock
|
35
|
+
|
36
|
+
def get_slices
|
37
|
+
Fog::Mock.not_implemented
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Fog
|
2
|
+
module Slicehost
|
3
|
+
class Compute
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Reboot slice
|
7
|
+
# ==== Parameters
|
8
|
+
# * slice_id<~Integer> - Id of server to reboot
|
9
|
+
# * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
|
10
|
+
#
|
11
|
+
# ==== Returns
|
12
|
+
# * response<~Excon::Response>:
|
13
|
+
# * body<~Hash>:
|
14
|
+
# * 'addresses'<~Array> - Ip addresses for the slice
|
15
|
+
# * 'backup-id'<~Integer> - Id of backup slice was booted from
|
16
|
+
# * 'bw-in'<~Float> - Incoming bandwidth total for current billing cycle, in Gigabytes
|
17
|
+
# * 'bw-out'<~Float> - Outgoing bandwidth total for current billing cycle, in Gigabytes
|
18
|
+
# * 'flavor_id'<~Integer> - Id of flavor slice was booted from
|
19
|
+
# * 'id'<~Integer> - Id of the slice
|
20
|
+
# * 'image-id'<~Integer> - Id of image slice was booted from
|
21
|
+
# * 'name'<~String> - Name of the slice
|
22
|
+
# * 'progress'<~Integer> - Progress of current action, in percentage
|
23
|
+
# * 'status'<~String> - Current status of the slice
|
24
|
+
def reboot_slice(slice_id, type = 'SOFT')
|
25
|
+
request(
|
26
|
+
:expects => 200,
|
27
|
+
:method => 'PUT',
|
28
|
+
:parser => Fog::Parsers::Slicehost::Compute::GetSlice.new,
|
29
|
+
:path => "/slices/#{slice_id}/#{'hard_' if type == 'HARD'}reboot.xml"
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
class Mock
|
36
|
+
|
37
|
+
def reboot_slice(id)
|
38
|
+
Fog::Mock.not_implemented
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/fog/ssh.rb
CHANGED
@@ -2,8 +2,8 @@ module Fog
|
|
2
2
|
module SSH
|
3
3
|
|
4
4
|
def self.new(address, username, options = {})
|
5
|
-
unless options[:keys] || options[:password]
|
6
|
-
raise ArgumentError.new(':keys or :password are required to initialize SSH')
|
5
|
+
unless options[:key_data] || options[:keys] || options[:password]
|
6
|
+
raise ArgumentError.new(':key_data, :keys or :password are required to initialize SSH')
|
7
7
|
end
|
8
8
|
if Fog.mocking?
|
9
9
|
Fog::SSH::Mock.new(address, username, options)
|
@@ -41,7 +41,8 @@ module Fog
|
|
41
41
|
def initialize(address, username, options)
|
42
42
|
@address = address
|
43
43
|
@username = username
|
44
|
-
@options = options.merge
|
44
|
+
@options = options.merge(:paranoid => false)
|
45
|
+
@options.merge(:verbose => true)
|
45
46
|
end
|
46
47
|
|
47
48
|
def run(commands)
|
@@ -50,11 +51,11 @@ module Fog
|
|
50
51
|
begin
|
51
52
|
Net::SSH.start(@address, @username, @options) do |ssh|
|
52
53
|
commands.each do |command|
|
54
|
+
sudoable_command = command.sub(/^sudo/, %{sudo -p 'fog sudo password:'})
|
55
|
+
escaped_command = sudoable_command.sub(/'/, %{'"'"'})
|
56
|
+
result = Result.new(escaped_command)
|
53
57
|
ssh.open_channel do |channel|
|
54
|
-
sudoable_command = command.sub(/^sudo/, %{sudo -p 'fog sudo password:'})
|
55
|
-
escaped_command = sudoable_command.sub(/'/, %{'"'"'})
|
56
58
|
channel.request_pty
|
57
|
-
result = Result.new(escaped_command)
|
58
59
|
channel.exec(%{bash -lc '#{escaped_command}'}) do |channel, success|
|
59
60
|
unless success
|
60
61
|
raise "Could not execute command: #{command.inspect}"
|
@@ -77,9 +78,9 @@ module Fog
|
|
77
78
|
result.status = 255
|
78
79
|
end
|
79
80
|
end
|
80
|
-
results << result
|
81
81
|
end
|
82
82
|
ssh.loop
|
83
|
+
results << result
|
83
84
|
end
|
84
85
|
end
|
85
86
|
rescue Net::SSH::HostKeyMismatch => exception
|
@@ -96,6 +97,14 @@ module Fog
|
|
96
97
|
|
97
98
|
attr_accessor :command, :stderr, :stdout, :status
|
98
99
|
|
100
|
+
def display_stdout
|
101
|
+
Formatador.display_line(stdout.split("\r\n"))
|
102
|
+
end
|
103
|
+
|
104
|
+
def display_stderr
|
105
|
+
Formatador.display_line(stderr.split("\r\n"))
|
106
|
+
end
|
107
|
+
|
99
108
|
def initialize(command)
|
100
109
|
@command = command
|
101
110
|
@stderr = ''
|
data/lib/fog/terremark/bin.rb
CHANGED
@@ -1,44 +1,36 @@
|
|
1
|
-
|
1
|
+
class Terremark < Fog::Bin
|
2
2
|
class << self
|
3
|
-
if (Fog::Terremark::ECLOUD_OPTIONS.all? { |option| Fog.credentials.has_key?(option) } ) ||
|
4
|
-
(Fog::Terremark::VCLOUD_OPTIONS.all? { |option| Fog.credentials.has_key?(option) } )
|
5
3
|
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
def available?
|
5
|
+
Fog::Terremark::ECLOUD_OPTIONS.all? {|requirement| Fog.credentials.include?(requirement)} ||
|
6
|
+
Fog::Terremark::VCLOUD_OPTIONS.all? {|requirement| Fog.credentials.include?(requirement)}
|
7
|
+
end
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
9
|
+
def terremark_service(service)
|
10
|
+
case service
|
11
|
+
when :ecloud
|
12
|
+
Fog::Terremark::Ecloud
|
13
|
+
when :vcloud
|
14
|
+
Fog::Terremark::Vcloud
|
15
|
+
else
|
16
|
+
raise "Unsupported Terremark Service"
|
19
17
|
end
|
18
|
+
end
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
20
|
+
def [](service)
|
21
|
+
@@connections ||= Hash.new do |hash, key|
|
22
|
+
credentials = Fog.credentials.reject do |k,v|
|
23
|
+
case key
|
24
|
+
when :ecloud
|
25
|
+
!Fog::Terremark::ECLOUD_OPTIONS.include?(k)
|
26
|
+
when :vcloud
|
27
|
+
!Fog::Terremark::VCLOUD_OPTIONS.include?(k)
|
30
28
|
end
|
31
|
-
hash[key] = terremark_service(key).new(credentials)
|
32
29
|
end
|
33
|
-
|
30
|
+
hash[key] = terremark_service(key).new(credentials)
|
34
31
|
end
|
35
|
-
|
36
|
-
else
|
37
|
-
|
38
|
-
def initialized?
|
39
|
-
false
|
40
|
-
end
|
41
|
-
|
32
|
+
@@connections[service]
|
42
33
|
end
|
34
|
+
|
43
35
|
end
|
44
36
|
end
|
@@ -8,13 +8,13 @@ module Fog
|
|
8
8
|
|
9
9
|
identity :id
|
10
10
|
|
11
|
-
attribute :end_time, 'endTime'
|
12
|
-
attribute :owner, 'Owner'
|
13
|
-
attribute :result, 'Result'
|
14
|
-
attribute :start_time, 'startTime'
|
11
|
+
attribute :end_time, :aliases => 'endTime'
|
12
|
+
attribute :owner, :aliases => 'Owner'
|
13
|
+
attribute :result, :aliases => 'Result'
|
14
|
+
attribute :start_time, :aliases => 'startTime'
|
15
15
|
attribute :status
|
16
|
-
attribute :link,
|
17
|
-
attribute :error,
|
16
|
+
attribute :link, :aliases => 'Link'
|
17
|
+
attribute :error, :aliases => 'Error'
|
18
18
|
|
19
19
|
def initialize(attributes = {})
|
20
20
|
new_owner = attributes.delete('Owner')
|
data/lib/fog/vcloud.rb
CHANGED
@@ -2,10 +2,7 @@ require 'builder'
|
|
2
2
|
require 'fog/vcloud/model'
|
3
3
|
require 'fog/vcloud/collection'
|
4
4
|
require 'fog/vcloud/generators'
|
5
|
-
|
6
|
-
require 'fog/vcloud/terremark/ecloud'
|
7
|
-
require 'fog/vcloud/terremark/vcloud'
|
8
|
-
|
5
|
+
# ecloud/vcloud requires at the bottom so that the following will be defined
|
9
6
|
|
10
7
|
module URI
|
11
8
|
class Generic
|
@@ -16,14 +13,13 @@ module URI
|
|
16
13
|
end
|
17
14
|
|
18
15
|
module Fog
|
19
|
-
|
20
|
-
extend Fog::Service
|
16
|
+
class Vcloud < Fog::Service
|
21
17
|
|
22
18
|
requires :username, :password, :versions_uri
|
23
19
|
|
24
20
|
model_path 'fog/vcloud/models'
|
25
|
-
model
|
26
|
-
|
21
|
+
model :vdc
|
22
|
+
collection :vdcs
|
27
23
|
|
28
24
|
request_path 'fog/vcloud/requests'
|
29
25
|
request :login
|
@@ -32,23 +28,64 @@ module Fog
|
|
32
28
|
request :get_organization
|
33
29
|
request :get_network
|
34
30
|
|
35
|
-
def self.after_new(instance, options={})
|
36
|
-
if mod = options[:module]
|
37
|
-
instance.extend eval("#{mod}")
|
38
|
-
end
|
39
|
-
instance
|
40
|
-
end
|
41
|
-
|
42
31
|
class UnsupportedVersion < Exception ; end
|
43
32
|
|
33
|
+
module Shared
|
34
|
+
|
35
|
+
def default_organization_uri
|
36
|
+
@default_organization_uri ||= begin
|
37
|
+
unless @login_results
|
38
|
+
do_login
|
39
|
+
end
|
40
|
+
case @login_results.body[:Org]
|
41
|
+
when Array
|
42
|
+
@login_results.body[:Org].first[:href]
|
43
|
+
when Hash
|
44
|
+
@login_results.body[:Org][:href]
|
45
|
+
else
|
46
|
+
nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# login handles the auth, but we just need the Set-Cookie
|
52
|
+
# header from that call.
|
53
|
+
def do_login
|
54
|
+
@login_results = login
|
55
|
+
@cookie = @login_results.headers['Set-Cookie']
|
56
|
+
end
|
57
|
+
|
58
|
+
def supported_versions
|
59
|
+
@supported_versions ||= get_versions(@versions_uri).body[:VersionInfo]
|
60
|
+
end
|
61
|
+
|
62
|
+
def xmlns
|
63
|
+
{ "xmlns" => "http://www.vmware.com/vcloud/v0.8",
|
64
|
+
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
65
|
+
"xmlns:xsd" => "http://www.w3.org/2001/XMLSchema" }
|
66
|
+
end
|
67
|
+
|
68
|
+
# private
|
69
|
+
|
70
|
+
def ensure_unparsed(uri)
|
71
|
+
if uri.is_a?(String)
|
72
|
+
uri
|
73
|
+
else
|
74
|
+
uri.to_s
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
44
80
|
class Real
|
81
|
+
include Shared
|
45
82
|
extend Fog::Vcloud::Generators
|
46
83
|
|
47
84
|
attr_accessor :login_uri
|
48
85
|
attr_reader :versions_uri
|
49
86
|
|
50
87
|
def supporting_versions
|
51
|
-
["
|
88
|
+
["0.8"]
|
52
89
|
end
|
53
90
|
|
54
91
|
def initialize(options = {})
|
@@ -77,12 +114,6 @@ module Fog
|
|
77
114
|
end
|
78
115
|
end
|
79
116
|
|
80
|
-
def xmlns
|
81
|
-
{ "xmlns" => "http://www.vmware.com/vcloud/v0.8",
|
82
|
-
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
83
|
-
"xmlns:xsd" => "http://www.w3.org/2001/XMLSchema" }
|
84
|
-
end
|
85
|
-
|
86
117
|
def reload
|
87
118
|
@connections.each_value { |k,v| v.reset if v }
|
88
119
|
end
|
@@ -102,10 +133,6 @@ module Fog
|
|
102
133
|
end
|
103
134
|
end
|
104
135
|
|
105
|
-
def supported_versions
|
106
|
-
@supported_versions ||= get_versions(@versions_uri).body[:VersionInfo]
|
107
|
-
end
|
108
|
-
|
109
136
|
private
|
110
137
|
|
111
138
|
def ensure_parsed(uri)
|
@@ -116,14 +143,6 @@ module Fog
|
|
116
143
|
end
|
117
144
|
end
|
118
145
|
|
119
|
-
def ensure_unparsed(uri)
|
120
|
-
if uri.is_a?(String)
|
121
|
-
uri
|
122
|
-
else
|
123
|
-
uri.to_s
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
146
|
def supported_version_numbers
|
128
147
|
case supported_versions
|
129
148
|
when Array
|
@@ -227,7 +246,9 @@ module Fog
|
|
227
246
|
end
|
228
247
|
end
|
229
248
|
|
230
|
-
class Mock
|
249
|
+
class Mock
|
250
|
+
include Shared
|
251
|
+
|
231
252
|
def self.base_url
|
232
253
|
"https://fakey.com/api/v0.8"
|
233
254
|
end
|
@@ -358,7 +379,7 @@ module Fog
|
|
358
379
|
end
|
359
380
|
end
|
360
381
|
|
361
|
-
def initialize(
|
382
|
+
def initialize(options = {})
|
362
383
|
@versions_uri = URI.parse('https://vcloud.fakey.com/api/versions')
|
363
384
|
end
|
364
385
|
|
@@ -392,3 +413,6 @@ module Fog
|
|
392
413
|
end
|
393
414
|
end
|
394
415
|
end
|
416
|
+
|
417
|
+
require 'fog/vcloud/terremark/ecloud'
|
418
|
+
require 'fog/vcloud/terremark/vcloud'
|