fog 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile.lock +3 -3
- data/bin/fog +0 -5
- data/changelog.txt +88 -0
- data/fog.gemspec +3 -3
- data/lib/fog.rb +1 -2
- data/lib/fog/aws/elb.rb +2 -0
- data/lib/fog/aws/iam.rb +7 -0
- data/lib/fog/aws/parsers/iam/get_group.rb +55 -0
- data/lib/fog/aws/parsers/iam/get_user_policy.rb +27 -0
- data/lib/fog/aws/parsers/iam/update_group.rb +26 -0
- data/lib/fog/aws/parsers/iam/update_user.rb +27 -0
- data/lib/fog/aws/requests/iam/create_access_key.rb +1 -1
- data/lib/fog/aws/requests/iam/get_group.rb +44 -0
- data/lib/fog/aws/requests/iam/get_user_policy.rb +36 -0
- data/lib/fog/aws/requests/iam/update_group.rb +39 -0
- data/lib/fog/aws/requests/iam/update_signing_certificate.rb +32 -0
- data/lib/fog/aws/requests/iam/update_user.rb +39 -0
- data/lib/fog/aws/ses.rb +2 -0
- data/lib/fog/aws/simpledb.rb +2 -0
- data/lib/fog/bin.rb +3 -8
- data/lib/fog/bin/aws.rb +2 -14
- data/lib/fog/bin/bluebox.rb +6 -8
- data/lib/fog/bin/dnsimple.rb +30 -0
- data/lib/fog/bin/ecloud.rb +30 -0
- data/lib/fog/bin/go_grid.rb +1 -7
- data/lib/fog/bin/linode.rb +0 -6
- data/lib/fog/bin/local.rb +1 -7
- data/lib/fog/bin/new_servers.rb +1 -7
- data/lib/fog/bin/rackspace.rb +2 -14
- data/lib/fog/bin/slicehost.rb +2 -8
- data/lib/fog/bin/terremark.rb +0 -5
- data/lib/fog/bin/voxel.rb +30 -0
- data/lib/fog/cdn/aws.rb +2 -0
- data/lib/fog/compute.rb +6 -3
- data/lib/fog/compute/aws.rb +4 -18
- data/lib/fog/compute/ecloud.rb +1306 -0
- data/lib/fog/compute/models/aws/key_pair.rb +0 -2
- data/lib/fog/compute/models/aws/security_group.rb +4 -4
- data/lib/fog/compute/models/aws/server.rb +13 -3
- data/lib/fog/compute/models/aws/snapshot.rb +0 -2
- data/lib/fog/compute/models/aws/volume.rb +0 -2
- data/lib/fog/compute/models/bluebox/server.rb +23 -11
- data/lib/fog/compute/models/brightbox/server.rb +8 -0
- data/lib/fog/compute/models/ecloud/backup_internet_service.rb +56 -0
- data/lib/fog/compute/models/ecloud/backup_internet_services.rb +33 -0
- data/lib/fog/compute/models/ecloud/catalog.rb +28 -0
- data/lib/fog/compute/models/ecloud/catalog_item.rb +29 -0
- data/lib/fog/compute/models/ecloud/firewall_acl.rb +24 -0
- data/lib/fog/compute/models/ecloud/firewall_acls.rb +31 -0
- data/lib/fog/compute/models/ecloud/internet_service.rb +117 -0
- data/lib/fog/compute/models/ecloud/internet_services.rb +33 -0
- data/lib/fog/compute/models/ecloud/ip.rb +49 -0
- data/lib/fog/compute/models/ecloud/ips.rb +32 -0
- data/lib/fog/compute/models/ecloud/network.rb +72 -0
- data/lib/fog/compute/models/ecloud/networks.rb +33 -0
- data/lib/fog/compute/models/ecloud/node.rb +43 -0
- data/lib/fog/compute/models/ecloud/nodes.rb +31 -0
- data/lib/fog/compute/models/ecloud/public_ip.rb +22 -0
- data/lib/fog/compute/models/ecloud/public_ips.rb +36 -0
- data/lib/fog/compute/models/ecloud/server.rb +209 -0
- data/lib/fog/compute/models/ecloud/servers.rb +55 -0
- data/lib/fog/compute/models/ecloud/task.rb +21 -0
- data/lib/fog/compute/models/ecloud/tasks.rb +31 -0
- data/lib/fog/compute/models/ecloud/vdc.rb +81 -0
- data/lib/fog/compute/models/ecloud/vdcs.rb +40 -0
- data/lib/fog/compute/models/go_grid/server.rb +15 -1
- data/lib/fog/compute/models/rackspace/server.rb +16 -0
- data/lib/fog/compute/models/slicehost/server.rb +16 -0
- data/lib/fog/compute/models/voxel/image.rb +12 -0
- data/lib/fog/compute/models/voxel/images.rb +30 -0
- data/lib/fog/compute/models/voxel/server.rb +77 -0
- data/lib/fog/compute/models/voxel/servers.rb +31 -0
- data/lib/fog/compute/new_servers.rb +2 -2
- data/lib/fog/compute/parsers/voxel/basic.rb +31 -0
- data/lib/fog/compute/parsers/voxel/devices_list.rb +111 -0
- data/lib/fog/compute/parsers/voxel/images_list.rb +59 -0
- data/lib/fog/compute/parsers/voxel/voxcloud_create.rb +40 -0
- data/lib/fog/compute/parsers/voxel/voxcloud_delete.rb +31 -0
- data/lib/fog/compute/parsers/voxel/voxcloud_status.rb +42 -0
- data/lib/fog/compute/rackspace.rb +0 -16
- data/lib/fog/compute/requests/aws/associate_address.rb +2 -0
- data/lib/fog/compute/requests/aws/authorize_security_group_ingress.rb +28 -8
- data/lib/fog/compute/requests/aws/create_security_group.rb +2 -0
- data/lib/fog/compute/requests/aws/create_tags.rb +2 -0
- data/lib/fog/compute/requests/aws/delete_key_pair.rb +2 -0
- data/lib/fog/compute/requests/aws/delete_security_group.rb +2 -0
- data/lib/fog/compute/requests/aws/delete_snapshot.rb +2 -0
- data/lib/fog/compute/requests/aws/delete_tags.rb +2 -0
- data/lib/fog/compute/requests/aws/delete_volume.rb +2 -0
- data/lib/fog/compute/requests/aws/disassociate_address.rb +2 -0
- data/lib/fog/compute/requests/aws/modify_image_attributes.rb +2 -0
- data/lib/fog/compute/requests/aws/modify_snapshot_attribute.rb +2 -0
- data/lib/fog/compute/requests/aws/reboot_instances.rb +2 -0
- data/lib/fog/compute/requests/aws/release_address.rb +2 -0
- data/lib/fog/compute/requests/aws/revoke_security_group_ingress.rb +2 -0
- data/lib/fog/compute/requests/ecloud/add_backup_internet_service.rb +109 -0
- data/lib/fog/compute/requests/ecloud/add_internet_service.rb +149 -0
- data/lib/fog/compute/requests/ecloud/add_node.rb +62 -0
- data/lib/fog/compute/requests/ecloud/clone_vapp.rb +40 -0
- data/lib/fog/compute/requests/ecloud/configure_internet_service.rb +112 -0
- data/lib/fog/compute/requests/ecloud/configure_network.rb +44 -0
- data/lib/fog/compute/requests/ecloud/configure_network_ip.rb +66 -0
- data/lib/fog/compute/requests/ecloud/configure_node.rb +56 -0
- data/lib/fog/compute/requests/ecloud/configure_vapp.rb +144 -0
- data/lib/fog/compute/requests/ecloud/delete_internet_service.rb +22 -0
- data/lib/fog/compute/requests/ecloud/delete_node.rb +22 -0
- data/lib/fog/compute/requests/ecloud/delete_vapp.rb +29 -0
- data/lib/fog/compute/requests/ecloud/get_catalog.rb +44 -0
- data/lib/fog/compute/requests/ecloud/get_catalog_item.rb +47 -0
- data/lib/fog/compute/requests/ecloud/get_customization_options.rb +22 -0
- data/lib/fog/compute/requests/ecloud/get_firewall_acl.rb +11 -0
- data/lib/fog/compute/requests/ecloud/get_firewall_acls.rb +11 -0
- data/lib/fog/compute/requests/ecloud/get_internet_services.rb +82 -0
- data/lib/fog/compute/requests/ecloud/get_network.rb +44 -0
- data/lib/fog/compute/requests/ecloud/get_network_extensions.rb +33 -0
- data/lib/fog/compute/requests/ecloud/get_network_ip.rb +43 -0
- data/lib/fog/compute/requests/ecloud/get_network_ips.rb +35 -0
- data/lib/fog/compute/requests/ecloud/get_node.rb +40 -0
- data/lib/fog/compute/requests/ecloud/get_nodes.rb +41 -0
- data/lib/fog/compute/requests/ecloud/get_organization.rb +49 -0
- data/lib/fog/compute/requests/ecloud/get_public_ip.rb +34 -0
- data/lib/fog/compute/requests/ecloud/get_public_ips.rb +38 -0
- data/lib/fog/compute/requests/ecloud/get_task.rb +11 -0
- data/lib/fog/compute/requests/ecloud/get_task_list.rb +11 -0
- data/lib/fog/compute/requests/ecloud/get_vapp.rb +99 -0
- data/lib/fog/compute/requests/ecloud/get_vapp_template.rb +11 -0
- data/lib/fog/compute/requests/ecloud/get_vdc.rb +84 -0
- data/lib/fog/compute/requests/ecloud/get_versions.rb +37 -0
- data/lib/fog/compute/requests/ecloud/instantiate_vapp_template.rb +142 -0
- data/lib/fog/compute/requests/ecloud/login.rb +48 -0
- data/lib/fog/compute/requests/ecloud/power_off.rb +23 -0
- data/lib/fog/compute/requests/ecloud/power_on.rb +23 -0
- data/lib/fog/compute/requests/ecloud/power_reset.rb +11 -0
- data/lib/fog/compute/requests/ecloud/power_shutdown.rb +11 -0
- data/lib/fog/compute/requests/voxel/devices_list.rb +24 -0
- data/lib/fog/compute/requests/voxel/devices_power.rb +22 -0
- data/lib/fog/compute/requests/voxel/images_list.rb +31 -0
- data/lib/fog/compute/requests/voxel/voxcloud_create.rb +22 -0
- data/lib/fog/compute/requests/voxel/voxcloud_delete.rb +20 -0
- data/lib/fog/compute/requests/voxel/voxcloud_status.rb +29 -0
- data/lib/fog/compute/slicehost.rb +2 -0
- data/lib/fog/compute/voxel.rb +112 -0
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/credentials.rb +6 -2
- data/lib/fog/core/parser.rb +2 -0
- data/lib/fog/core/scp.rb +67 -0
- data/lib/fog/dns.rb +6 -0
- data/lib/fog/dns/aws.rb +2 -0
- data/lib/fog/dns/bluebox.rb +110 -0
- data/lib/fog/dns/dnsimple.rb +95 -0
- data/lib/fog/dns/models/bluebox/record.rb +52 -0
- data/lib/fog/dns/models/bluebox/records.rb +36 -0
- data/lib/fog/dns/models/bluebox/zone.rb +63 -0
- data/lib/fog/dns/models/bluebox/zones.rb +28 -0
- data/lib/fog/dns/models/dnsimple/record.rb +54 -0
- data/lib/fog/dns/models/dnsimple/records.rb +38 -0
- data/lib/fog/dns/models/dnsimple/zone.rb +50 -0
- data/lib/fog/dns/models/dnsimple/zones.rb +28 -0
- data/lib/fog/dns/parsers/bluebox/create_record.rb +26 -0
- data/lib/fog/dns/parsers/bluebox/create_zone.rb +26 -0
- data/lib/fog/dns/parsers/bluebox/get_record.rb +21 -0
- data/lib/fog/dns/parsers/bluebox/get_records.rb +27 -0
- data/lib/fog/{compute/parsers/terremark_ecloud/get_ip_address.rb → dns/parsers/bluebox/get_zone.rb} +6 -6
- data/lib/fog/dns/parsers/bluebox/get_zones.rb +30 -0
- data/lib/fog/dns/requests/bluebox/create_record.rb +48 -0
- data/lib/fog/dns/requests/bluebox/create_zone.rb +52 -0
- data/lib/fog/dns/requests/bluebox/delete_record.rb +31 -0
- data/lib/fog/dns/requests/bluebox/delete_zone.rb +31 -0
- data/lib/fog/dns/requests/bluebox/get_record.rb +40 -0
- data/lib/fog/dns/requests/bluebox/get_records.rb +41 -0
- data/lib/fog/dns/requests/bluebox/get_zone.rb +44 -0
- data/lib/fog/dns/requests/bluebox/get_zones.rb +43 -0
- data/lib/fog/dns/requests/bluebox/update_record.rb +34 -0
- data/lib/fog/dns/requests/bluebox/update_zone.rb +30 -0
- data/lib/fog/dns/requests/dnsimple/create_domain.rb +27 -0
- data/lib/fog/dns/requests/dnsimple/create_record.rb +48 -0
- data/lib/fog/dns/requests/dnsimple/delete_domain.rb +26 -0
- data/lib/fog/dns/requests/dnsimple/delete_record.rb +21 -0
- data/lib/fog/dns/requests/dnsimple/get_domain.rb +37 -0
- data/lib/fog/dns/requests/dnsimple/list_domains.rb +35 -0
- data/lib/fog/dns/requests/dnsimple/list_records.rb +32 -0
- data/lib/fog/dns/requests/dnsimple/update_record.rb +42 -0
- data/lib/fog/dns/slicehost.rb +2 -0
- data/lib/fog/dns/zerigo.rb +2 -0
- data/lib/fog/providers.rb +3 -1
- data/lib/fog/providers/aws.rb +0 -4
- data/lib/fog/providers/bluebox.rb +1 -8
- data/lib/fog/providers/dnsimple.rb +11 -0
- data/lib/fog/providers/ecloud.rb +11 -0
- data/lib/fog/providers/go_grid.rb +0 -8
- data/lib/fog/providers/google.rb +0 -3
- data/lib/fog/providers/linode.rb +0 -8
- data/lib/fog/providers/local.rb +0 -8
- data/lib/fog/providers/new_servers.rb +0 -11
- data/lib/fog/providers/rackspace.rb +0 -2
- data/lib/fog/providers/slicehost.rb +0 -11
- data/lib/fog/providers/voxel.rb +16 -0
- data/lib/fog/providers/zerigo.rb +0 -3
- data/lib/fog/storage/aws.rb +7 -19
- data/lib/fog/storage/google.rb +2 -2
- data/lib/fog/storage/models/aws/directory.rb +0 -3
- data/lib/fog/storage/models/aws/file.rb +0 -3
- data/lib/fog/storage/models/google/directory.rb +0 -3
- data/lib/fog/storage/models/google/file.rb +0 -3
- data/lib/fog/storage/models/local/directory.rb +0 -3
- data/lib/fog/storage/models/local/file.rb +29 -1
- data/lib/fog/storage/models/local/files.rb +8 -5
- data/lib/fog/storage/models/rackspace/directory.rb +1 -3
- data/lib/fog/storage/parsers/aws/get_bucket_website.rb +26 -0
- data/lib/fog/storage/rackspace.rb +0 -16
- data/lib/fog/storage/requests/aws/delete_bucket_website.rb +32 -0
- data/lib/fog/storage/requests/aws/get_bucket_website.rb +42 -0
- data/lib/fog/storage/requests/aws/put_bucket_website.rb +49 -0
- data/lib/fog/terremark.rb +0 -5
- data/spec/ecloud/bin_spec.rb +22 -0
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/backup_internet_service_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/backup_internet_services_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/internet_service_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/internet_services_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/ip_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/ips_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/network_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/networks_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/node_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/nodes_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/public_ip_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/public_ips_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/server_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/vdc_spec.rb +5 -5
- data/spec/{vcloud/terremark/ecloud → ecloud}/models/vdcs_spec.rb +4 -4
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/add_backup_internet_service_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/add_internet_service_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/add_node_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/configure_internet_service_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/configure_network_ip_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/configure_node_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/configure_vapp_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/delete_internet_service_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/delete_node_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/delete_vapp_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_catalog_item_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_catalog_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_customization_options_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_internet_services_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_network_ip_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_network_ips_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_network_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_node_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_nodes_spec.rb +2 -2
- data/spec/{vcloud → ecloud}/requests/get_organization_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_public_ip_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_public_ips_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_vapp_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/get_vdc_spec.rb +2 -2
- data/spec/ecloud/requests/get_versions_spec.rb +57 -0
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/instantiate_vapp_template_spec.rb +3 -3
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/login_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/power_off_spec.rb +2 -2
- data/spec/{vcloud/terremark/ecloud → ecloud}/requests/power_on_spec.rb +2 -2
- data/spec/{vcloud → ecloud}/spec_helper.rb +14 -29
- data/spec/{vcloud → ecloud}/vcloud_spec.rb +4 -4
- data/spec/spec_helper.rb +0 -1
- data/tests/compute/helper.rb +12 -1
- data/tests/compute/models/flavors_tests.rb +2 -0
- data/tests/compute/models/server_tests.rb +28 -1
- data/tests/compute/requests/voxel/image_tests.rb +46 -0
- data/tests/compute/requests/voxel/server_tests.rb +123 -0
- data/tests/dns/helper.rb +10 -1
- data/tests/dns/models/record_tests.rb +0 -1
- data/tests/dns/requests/bluebox/dns_tests.rb +271 -0
- data/tests/dns/requests/dnsimple/dns_tests.rb +130 -0
- data/tests/helper.rb +1 -1
- data/tests/helpers/mock_helper.rb +2 -0
- data/tests/storage/models/directory_test.rb +2 -1
- metadata +244 -224
- data/lib/fog/bin/terremark_ecloud.rb +0 -28
- data/lib/fog/bin/vcloud.rb +0 -59
- data/lib/fog/compute/parsers/terremark_ecloud/get_catalog.rb +0 -36
- data/lib/fog/compute/parsers/terremark_ecloud/get_catalog_item.rb +0 -43
- data/lib/fog/compute/parsers/terremark_ecloud/get_ip_addresses.rb +0 -27
- data/lib/fog/compute/parsers/terremark_ecloud/get_network.rb +0 -59
- data/lib/fog/compute/parsers/terremark_ecloud/get_organization.rb +0 -35
- data/lib/fog/compute/parsers/terremark_ecloud/get_task.rb +0 -42
- data/lib/fog/compute/parsers/terremark_ecloud/get_task_list.rb +0 -51
- data/lib/fog/compute/parsers/terremark_ecloud/get_vdc.rb +0 -110
- data/lib/fog/compute/parsers/terremark_ecloud/get_versions.rb +0 -28
- data/lib/fog/compute/parsers/terremark_ecloud/login.rb +0 -27
- data/lib/fog/compute/requests/terremark_ecloud/get_catalog.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_catalog_item.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_ip_address.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_ip_addresses.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_network.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_organization.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_task.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_task_list.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_vdc.rb +0 -19
- data/lib/fog/compute/requests/terremark_ecloud/get_versions.rb +0 -26
- data/lib/fog/compute/requests/terremark_ecloud/login.rb +0 -29
- data/lib/fog/compute/terremark_ecloud.rb +0 -93
- data/lib/fog/providers/terremark_ecloud.rb +0 -17
- data/lib/fog/terremark/ecloud.rb +0 -73
- data/lib/fog/vcloud.rb +0 -337
- data/lib/fog/vcloud/collection.rb +0 -30
- data/lib/fog/vcloud/generators.rb +0 -33
- data/lib/fog/vcloud/mock_data_classes.rb +0 -767
- data/lib/fog/vcloud/model.rb +0 -22
- data/lib/fog/vcloud/models/vdc.rb +0 -26
- data/lib/fog/vcloud/models/vdcs.rb +0 -35
- data/lib/fog/vcloud/requests/get_network.rb +0 -47
- data/lib/fog/vcloud/requests/get_organization.rb +0 -47
- data/lib/fog/vcloud/requests/get_vdc.rb +0 -82
- data/lib/fog/vcloud/requests/get_versions.rb +0 -34
- data/lib/fog/vcloud/requests/login.rb +0 -46
- data/lib/fog/vcloud/terremark/ecloud.rb +0 -187
- data/lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb +0 -60
- data/lib/fog/vcloud/terremark/ecloud/models/backup_internet_services.rb +0 -36
- data/lib/fog/vcloud/terremark/ecloud/models/catalog.rb +0 -31
- data/lib/fog/vcloud/terremark/ecloud/models/catalog_item.rb +0 -31
- data/lib/fog/vcloud/terremark/ecloud/models/firewall_acl.rb +0 -28
- data/lib/fog/vcloud/terremark/ecloud/models/firewall_acls.rb +0 -34
- data/lib/fog/vcloud/terremark/ecloud/models/internet_service.rb +0 -121
- data/lib/fog/vcloud/terremark/ecloud/models/internet_services.rb +0 -36
- data/lib/fog/vcloud/terremark/ecloud/models/ip.rb +0 -51
- data/lib/fog/vcloud/terremark/ecloud/models/ips.rb +0 -35
- data/lib/fog/vcloud/terremark/ecloud/models/network.rb +0 -77
- data/lib/fog/vcloud/terremark/ecloud/models/networks.rb +0 -36
- data/lib/fog/vcloud/terremark/ecloud/models/node.rb +0 -47
- data/lib/fog/vcloud/terremark/ecloud/models/nodes.rb +0 -33
- data/lib/fog/vcloud/terremark/ecloud/models/public_ip.rb +0 -25
- data/lib/fog/vcloud/terremark/ecloud/models/public_ips.rb +0 -39
- data/lib/fog/vcloud/terremark/ecloud/models/server.rb +0 -211
- data/lib/fog/vcloud/terremark/ecloud/models/servers.rb +0 -57
- data/lib/fog/vcloud/terremark/ecloud/models/task.rb +0 -23
- data/lib/fog/vcloud/terremark/ecloud/models/tasks.rb +0 -33
- data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +0 -83
- data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +0 -42
- data/lib/fog/vcloud/terremark/ecloud/requests/add_backup_internet_service.rb +0 -111
- data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +0 -152
- data/lib/fog/vcloud/terremark/ecloud/requests/add_node.rb +0 -64
- data/lib/fog/vcloud/terremark/ecloud/requests/clone_vapp.rb +0 -42
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +0 -115
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_network.rb +0 -46
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_network_ip.rb +0 -68
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_node.rb +0 -58
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_vapp.rb +0 -147
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_internet_service.rb +0 -25
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_node.rb +0 -24
- data/lib/fog/vcloud/terremark/ecloud/requests/delete_vapp.rb +0 -32
- data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog.rb +0 -46
- data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog_item.rb +0 -49
- data/lib/fog/vcloud/terremark/ecloud/requests/get_customization_options.rb +0 -24
- data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acl.rb +0 -13
- data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acls.rb +0 -13
- data/lib/fog/vcloud/terremark/ecloud/requests/get_internet_services.rb +0 -84
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network.rb +0 -47
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_extensions.rb +0 -35
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ip.rb +0 -45
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ips.rb +0 -37
- data/lib/fog/vcloud/terremark/ecloud/requests/get_node.rb +0 -42
- data/lib/fog/vcloud/terremark/ecloud/requests/get_nodes.rb +0 -43
- data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ip.rb +0 -36
- data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ips.rb +0 -41
- data/lib/fog/vcloud/terremark/ecloud/requests/get_task.rb +0 -13
- data/lib/fog/vcloud/terremark/ecloud/requests/get_task_list.rb +0 -14
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp.rb +0 -101
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp_template.rb +0 -13
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vdc.rb +0 -87
- data/lib/fog/vcloud/terremark/ecloud/requests/instantiate_vapp_template.rb +0 -144
- data/lib/fog/vcloud/terremark/ecloud/requests/power_off.rb +0 -25
- data/lib/fog/vcloud/terremark/ecloud/requests/power_on.rb +0 -25
- data/lib/fog/vcloud/terremark/ecloud/requests/power_reset.rb +0 -13
- data/lib/fog/vcloud/terremark/ecloud/requests/power_shutdown.rb +0 -13
- data/lib/fog/vcloud/terremark/vcloud.rb +0 -39
- data/lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb +0 -57
- data/spec/vcloud/bin_spec.rb +0 -28
- data/spec/vcloud/models/vdc_spec.rb +0 -51
- data/spec/vcloud/models/vdcs_spec.rb +0 -1
- data/spec/vcloud/requests/get_network_spec.rb +0 -44
- data/spec/vcloud/requests/get_vdc_spec.rb +0 -62
- data/spec/vcloud/requests/get_versions_spec.rb +0 -54
- data/spec/vcloud/requests/login_spec.rb +0 -24
- data/tests/compute/requests/terremark_ecloud/catalog_tests.rb +0 -47
- data/tests/compute/requests/terremark_ecloud/helper.rb +0 -45
- data/tests/compute/requests/terremark_ecloud/network_tests.rb +0 -30
- data/tests/compute/requests/terremark_ecloud/organization_tests.rb +0 -28
- data/tests/compute/requests/terremark_ecloud/task_tests.rb +0 -39
- data/tests/compute/requests/terremark_ecloud/vdc_tests.rb +0 -60
data/lib/fog/storage/google.rb
CHANGED
@@ -167,8 +167,6 @@ module Fog
|
|
167
167
|
|
168
168
|
class Real
|
169
169
|
include Utils
|
170
|
-
extend Fog::Deprecation
|
171
|
-
deprecate(:reset, :reload)
|
172
170
|
|
173
171
|
# Initialize connection to Google Storage
|
174
172
|
#
|
@@ -195,7 +193,9 @@ module Fog
|
|
195
193
|
Formatador.display_line(warning)
|
196
194
|
end
|
197
195
|
|
196
|
+
require 'fog/core/parser'
|
198
197
|
require 'mime/types'
|
198
|
+
|
199
199
|
@google_storage_access_key_id = options[:google_storage_access_key_id]
|
200
200
|
@google_storage_secret_access_key = options[:google_storage_secret_access_key]
|
201
201
|
@hmac = Fog::HMAC.new('sha1', @google_storage_secret_access_key)
|
@@ -39,6 +39,23 @@ module Fog
|
|
39
39
|
def destroy
|
40
40
|
requires :directory, :key
|
41
41
|
::File.delete(path)
|
42
|
+
dirs = path.split(::File::SEPARATOR)[0...-1]
|
43
|
+
dirs.length.times do |index|
|
44
|
+
dir_path = dirs[0..-index].join(::File::SEPARATOR)
|
45
|
+
if dir_path.empty? # path starts with ::File::SEPARATOR
|
46
|
+
next
|
47
|
+
end
|
48
|
+
# don't delete the containing directory or higher
|
49
|
+
if dir_path == connection.path_to(directory.key)
|
50
|
+
break
|
51
|
+
end
|
52
|
+
pwd = Dir.pwd
|
53
|
+
Dir.chdir(dir_path)
|
54
|
+
if Dir.glob('*').empty?
|
55
|
+
Dir.rmdir(dir_path)
|
56
|
+
end
|
57
|
+
Dir.chdir(pwd)
|
58
|
+
end
|
42
59
|
true
|
43
60
|
end
|
44
61
|
|
@@ -52,6 +69,17 @@ module Fog
|
|
52
69
|
|
53
70
|
def save(options = {})
|
54
71
|
requires :body, :directory, :key
|
72
|
+
dirs = path.split(::File::SEPARATOR)[0...-1]
|
73
|
+
dirs.length.times do |index|
|
74
|
+
dir_path = dirs[0..index].join(::File::SEPARATOR)
|
75
|
+
if dir_path.empty? # path starts with ::File::SEPARATOR
|
76
|
+
next
|
77
|
+
end
|
78
|
+
# create directory if it doesn't already exist
|
79
|
+
unless ::File.directory?(dir_path)
|
80
|
+
Dir.mkdir(dir_path)
|
81
|
+
end
|
82
|
+
end
|
55
83
|
file = ::File.new(path, 'w')
|
56
84
|
if body.is_a?(String)
|
57
85
|
file.write(body)
|
@@ -73,7 +101,7 @@ module Fog
|
|
73
101
|
end
|
74
102
|
|
75
103
|
def path
|
76
|
-
connection.path_to(::File.join(directory.key,
|
104
|
+
connection.path_to(::File.join(directory.key, key))
|
77
105
|
end
|
78
106
|
|
79
107
|
end
|
@@ -14,16 +14,19 @@ module Fog
|
|
14
14
|
def all
|
15
15
|
requires :directory
|
16
16
|
if directory.collection.get(directory.key)
|
17
|
-
|
18
|
-
|
17
|
+
pwd = Dir.pwd
|
18
|
+
Dir.chdir(connection.path_to(directory.key))
|
19
|
+
data = Dir.glob('**/*').reject do |file|
|
20
|
+
::File.directory?(file)
|
19
21
|
end.map do |key|
|
20
22
|
path = file_path(key)
|
21
23
|
{
|
22
24
|
:content_length => ::File.size(path),
|
23
|
-
:key =>
|
25
|
+
:key => key,
|
24
26
|
:last_modified => ::File.mtime(path)
|
25
27
|
}
|
26
28
|
end
|
29
|
+
Dir.chdir(pwd)
|
27
30
|
load(data)
|
28
31
|
else
|
29
32
|
nil
|
@@ -32,7 +35,7 @@ module Fog
|
|
32
35
|
|
33
36
|
def get(key, &block)
|
34
37
|
requires :directory
|
35
|
-
path = file_path(
|
38
|
+
path = file_path(key)
|
36
39
|
if ::File.exists?(path)
|
37
40
|
data = {
|
38
41
|
:content_length => ::File.size(path),
|
@@ -55,7 +58,7 @@ module Fog
|
|
55
58
|
|
56
59
|
def head(key)
|
57
60
|
requires :directory
|
58
|
-
path = file_path(
|
61
|
+
path = file_path(key)
|
59
62
|
if ::File.exists?(path)
|
60
63
|
new({
|
61
64
|
:content_length => ::File.size(path),
|
@@ -6,9 +6,6 @@ module Fog
|
|
6
6
|
class Storage
|
7
7
|
|
8
8
|
class Directory < Fog::Model
|
9
|
-
extend Fog::Deprecation
|
10
|
-
deprecate(:name, :key)
|
11
|
-
deprecate(:name=, :key=)
|
12
9
|
|
13
10
|
identity :key, :aliases => 'name'
|
14
11
|
|
@@ -18,6 +15,7 @@ module Fog
|
|
18
15
|
def destroy
|
19
16
|
requires :key
|
20
17
|
connection.delete_container(key)
|
18
|
+
connection.cdn.put_container(key, 'X-CDN-Enabled' => 'False')
|
21
19
|
true
|
22
20
|
rescue Excon::Errors::NotFound
|
23
21
|
false
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Storage
|
5
|
+
|
6
|
+
class GetBucketWebsite < Fog::Parsers::Base
|
7
|
+
|
8
|
+
def reset
|
9
|
+
@response = { 'ErrorDocument' => {}, 'IndexDocument' => {} }
|
10
|
+
end
|
11
|
+
|
12
|
+
def end_element(name)
|
13
|
+
case name
|
14
|
+
when 'Key'
|
15
|
+
@response['ErrorDocument'][name] = @value
|
16
|
+
when 'Suffix'
|
17
|
+
@response['IndexDocument'][name] = @value
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,19 +1,3 @@
|
|
1
|
-
module Fog
|
2
|
-
module Rackspace
|
3
|
-
class Files
|
4
|
-
|
5
|
-
def self.new(attributes = {})
|
6
|
-
location = caller.first
|
7
|
-
warning = "[yellow][WARN] Fog::Rackspace::Files#new is deprecated, use Fog::Rackspace::Storage#new instead[/]"
|
8
|
-
warning << " [light_black](" << location << ")[/] "
|
9
|
-
Formatador.display_line(warning)
|
10
|
-
Fog::Rackspace::Storage.new(attributes)
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
1
|
module Fog
|
18
2
|
module Rackspace
|
19
3
|
class Storage < Fog::Service
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Storage
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Delete website configuration for a bucket
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * bucket_name<~String> - name of bucket to delete website configuration from
|
10
|
+
#
|
11
|
+
# ==== Returns
|
12
|
+
# * response<~Excon::Response>:
|
13
|
+
# * status<~Integer> - 204
|
14
|
+
#
|
15
|
+
# ==== See Also
|
16
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html
|
17
|
+
|
18
|
+
def delete_bucket_website(bucket_name)
|
19
|
+
request({
|
20
|
+
:expects => 204,
|
21
|
+
:headers => {},
|
22
|
+
:host => "#{bucket_name}.#{@host}",
|
23
|
+
:method => 'DELETE',
|
24
|
+
:query => {'website' => nil}
|
25
|
+
})
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Storage
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/storage/parsers/aws/get_bucket_website'
|
7
|
+
|
8
|
+
# Get website configuration for an S3 bucket
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * bucket_name<~String> - name of bucket to get website configuration for
|
12
|
+
#
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
# * IndexDocument<~Hash>
|
17
|
+
# * Suffix<~String> - Suffix appended when directory is requested
|
18
|
+
# * ErrorDocument<~Hash>
|
19
|
+
# * Key<~String> - Object key to return for 4XX class errors
|
20
|
+
#
|
21
|
+
# ==== See Also
|
22
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETwebsite.html
|
23
|
+
|
24
|
+
def get_bucket_website(bucket_name)
|
25
|
+
unless bucket_name
|
26
|
+
raise ArgumentError.new('bucket_name is required')
|
27
|
+
end
|
28
|
+
request({
|
29
|
+
:expects => 200,
|
30
|
+
:headers => {},
|
31
|
+
:host => "#{bucket_name}.#{@host}",
|
32
|
+
:idempotent => true,
|
33
|
+
:method => 'GET',
|
34
|
+
:parser => Fog::Parsers::AWS::Storage::GetBucketWebsite.new,
|
35
|
+
:query => {'website' => nil}
|
36
|
+
})
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Storage
|
4
|
+
class Real
|
5
|
+
|
6
|
+
# Change website configuration for an S3 bucket
|
7
|
+
#
|
8
|
+
# ==== Parameters
|
9
|
+
# * bucket_name<~String> - name of bucket to modify
|
10
|
+
# * suffix<~String> - suffix to append to requests for the bucket
|
11
|
+
# * options<~Hash>
|
12
|
+
# * key<~String> - key to use for 4XX class errors
|
13
|
+
#
|
14
|
+
# ==== See Also
|
15
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTwebsite.html
|
16
|
+
|
17
|
+
def put_bucket_website(bucket_name, suffix, options = {})
|
18
|
+
data =
|
19
|
+
<<-DATA
|
20
|
+
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
21
|
+
<IndexDocument>
|
22
|
+
<Suffix>#{suffix}</Suffix>
|
23
|
+
</IndexDocument>
|
24
|
+
DATA
|
25
|
+
|
26
|
+
if options[:key]
|
27
|
+
data <<
|
28
|
+
<<-DATA
|
29
|
+
<ErrorDocument>
|
30
|
+
<Key>#{options[:key]}</Key>
|
31
|
+
</ErrorDocument>
|
32
|
+
DATA
|
33
|
+
end
|
34
|
+
|
35
|
+
data << '</WebsiteConfiguration>'
|
36
|
+
request({
|
37
|
+
:body => data,
|
38
|
+
:expects => 200,
|
39
|
+
:headers => {},
|
40
|
+
:host => "#{bucket_name}.#{@host}",
|
41
|
+
:method => 'PUT',
|
42
|
+
:query => {'website' => nil}
|
43
|
+
})
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/lib/fog/terremark.rb
CHANGED
@@ -1,16 +1,11 @@
|
|
1
|
-
require 'nokogiri'
|
2
|
-
|
3
1
|
require 'fog/core'
|
4
|
-
require 'fog/core/parser'
|
5
2
|
|
6
3
|
require 'fog/terremark/shared'
|
7
4
|
require 'fog/terremark/parser'
|
8
|
-
require 'fog/terremark/ecloud'
|
9
5
|
require 'fog/terremark/vcloud'
|
10
6
|
|
11
7
|
module Fog
|
12
8
|
module Terremark
|
13
|
-
ECLOUD_OPTIONS = [:terremark_ecloud_username, :terremark_ecloud_password]
|
14
9
|
VCLOUD_OPTIONS = [:terremark_vcloud_username, :terremark_vcloud_password]
|
15
10
|
end
|
16
11
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'ecloud/spec_helper'
|
2
|
+
|
3
|
+
describe 'Ecloud' do
|
4
|
+
it { Ecloud.should be_available }
|
5
|
+
|
6
|
+
it { Ecloud.should have_at_least(1).services }
|
7
|
+
|
8
|
+
describe "when indexing it like an array" do
|
9
|
+
describe "with a service that exists" do
|
10
|
+
it "should return something when indexed with a configured service" do
|
11
|
+
Ecloud[:compute].should_not be_nil
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "with a service that does not exist" do
|
16
|
+
it "should raise an ArgumentError" do
|
17
|
+
lambda {Ecloud[:foozle]}.should raise_error(ArgumentError)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require '
|
1
|
+
require 'ecloud/spec_helper'
|
2
2
|
|
3
3
|
if Fog.mocking?
|
4
|
-
describe "Fog::
|
4
|
+
describe "Fog::Ecloud::Compute::BackupInternetService", :type => :mock_tmrk_ecloud_model do
|
5
5
|
subject { @vcloud.vdcs[0].backup_internet_services[0] }
|
6
6
|
|
7
7
|
describe :class do
|
8
|
-
subject { Fog::
|
8
|
+
subject { Fog::Ecloud::Compute::BackupInternetService }
|
9
9
|
|
10
10
|
it { should have_identity(:href) }
|
11
11
|
it { should have_only_these_attributes([:href, :name, :id, :protocol, :enabled, :description, :timeout, :redirect_url, :monitor]) }
|
@@ -13,7 +13,7 @@ if Fog.mocking?
|
|
13
13
|
|
14
14
|
context "with no uri" do
|
15
15
|
|
16
|
-
subject { Fog::
|
16
|
+
subject { Fog::Ecloud::Compute::BackupInternetService.new() }
|
17
17
|
it { should have_all_attributes_be_nil }
|
18
18
|
|
19
19
|
end
|
@@ -23,7 +23,7 @@ if Fog.mocking?
|
|
23
23
|
|
24
24
|
let(:composed_service_data) { @vcloud.vdcs[0].backup_internet_services[0].send(:_compose_service_data) }
|
25
25
|
|
26
|
-
it { should be_an_instance_of(Fog::
|
26
|
+
it { should be_an_instance_of(Fog::Ecloud::Compute::BackupInternetService) }
|
27
27
|
|
28
28
|
its(:href) { should == @mock_backup_service.href }
|
29
29
|
its(:identity) { should == @mock_backup_service.href }
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require '
|
1
|
+
require 'ecloud/spec_helper'
|
2
2
|
|
3
3
|
if Fog.mocking?
|
4
|
-
describe "Fog::
|
4
|
+
describe "Fog::Ecloud::Compute::InternetServices", :type => :mock_tmrk_ecloud_model do
|
5
5
|
context "as an attribute of a VDC" do
|
6
6
|
subject { @vcloud.vdcs[0] }
|
7
7
|
|
@@ -9,7 +9,7 @@ if Fog.mocking?
|
|
9
9
|
|
10
10
|
describe :class do
|
11
11
|
subject { @vcloud.vdcs[0].backup_internet_services.class }
|
12
|
-
its(:model) { should == Fog::
|
12
|
+
its(:model) { should == Fog::Ecloud::Compute::BackupInternetService }
|
13
13
|
end
|
14
14
|
|
15
15
|
describe :backup_internet_services do
|
@@ -17,7 +17,7 @@ if Fog.mocking?
|
|
17
17
|
|
18
18
|
it { should respond_to(:create) }
|
19
19
|
|
20
|
-
it { should be_an_instance_of(Fog::
|
20
|
+
it { should be_an_instance_of(Fog::Ecloud::Compute::BackupInternetServices) }
|
21
21
|
|
22
22
|
its(:length) { should == 1 }
|
23
23
|
|