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
@@ -2,7 +2,34 @@ for provider, config in compute_providers
|
|
2
2
|
|
3
3
|
Shindo.tests("#{provider}::Compute | server", [provider.to_s.downcase]) do
|
4
4
|
|
5
|
-
server_tests(provider[:compute], (config[:server_attributes] || {}), config[:mocked])
|
5
|
+
server_tests(provider[:compute], (config[:server_attributes] || {}), config[:mocked]) do
|
6
|
+
|
7
|
+
tests('responds_to(:bootstrap)') do
|
8
|
+
pending if Fog.mocking? && !config[:mocked]
|
9
|
+
@instance.responds_to(:bootstrap)
|
10
|
+
end
|
11
|
+
|
12
|
+
tests('responds_to(:private_ip_address)') do
|
13
|
+
pending if Fog.mocking? && !config[:mocked]
|
14
|
+
@instance.responds_to(:public_ip_address)
|
15
|
+
end
|
16
|
+
|
17
|
+
tests('responds_to(:public_ip_address)') do
|
18
|
+
pending if Fog.mocking? && !config[:mocked]
|
19
|
+
@instance.responds_to(:public_ip_address)
|
20
|
+
end
|
21
|
+
|
22
|
+
tests('responds_to(:scp)') do
|
23
|
+
pending if Fog.mocking? && !config[:mocked]
|
24
|
+
@instance.responds_to(:ssh)
|
25
|
+
end
|
26
|
+
|
27
|
+
tests('responds_to(:ssh)') do
|
28
|
+
pending if Fog.mocking? && !config[:mocked]
|
29
|
+
@instance.responds_to(:ssh)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
6
33
|
|
7
34
|
end
|
8
35
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
Shindo.tests('Voxel::Compute | image requests', ['voxel']) do
|
2
|
+
|
3
|
+
@images_format = [{
|
4
|
+
'id' => Integer,
|
5
|
+
'summary' => String
|
6
|
+
}]
|
7
|
+
|
8
|
+
@image_format = {
|
9
|
+
'description' => String,
|
10
|
+
'id' => Integer,
|
11
|
+
'filesystem' => {
|
12
|
+
'size' => Integer,
|
13
|
+
'type' => String,
|
14
|
+
'units' => String,
|
15
|
+
},
|
16
|
+
'operating_system' => {
|
17
|
+
'admin_username' => String,
|
18
|
+
'architecture' => Integer,
|
19
|
+
'family' => String,
|
20
|
+
'product_family' => String,
|
21
|
+
'product_version' => String,
|
22
|
+
'version' => String
|
23
|
+
},
|
24
|
+
'summary' => String
|
25
|
+
}
|
26
|
+
|
27
|
+
tests('success') do
|
28
|
+
tests('#images_list').formats(@images_format) do
|
29
|
+
pending if Fog.mocking?
|
30
|
+
Voxel[:compute].images_list
|
31
|
+
end
|
32
|
+
|
33
|
+
tests('#images_list(1)').formats([@image_format]) do
|
34
|
+
pending if Fog.mocking?
|
35
|
+
Voxel[:compute].images_list(1)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
tests('failure') do
|
40
|
+
tests('#images_list(0)').raises(Fog::Voxel::Compute::Error) do
|
41
|
+
pending if Fog.mocking?
|
42
|
+
Voxel[:compute].images_list(0)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
Shindo.tests('Voxel::Compute | server requests', ['voxel']) do
|
2
|
+
|
3
|
+
@server_format = {
|
4
|
+
'device' => {
|
5
|
+
'id' => String,
|
6
|
+
'last_update' => Time
|
7
|
+
},
|
8
|
+
'stat' => String
|
9
|
+
}
|
10
|
+
|
11
|
+
@devices_format = {
|
12
|
+
'devices' => [{
|
13
|
+
'access_methods' => [],
|
14
|
+
'description' => String,
|
15
|
+
'drives' => {
|
16
|
+
'position' => Integer,
|
17
|
+
'size' => Integer
|
18
|
+
},
|
19
|
+
'id' => String,
|
20
|
+
'ipassignments' => [{
|
21
|
+
'description' => String,
|
22
|
+
'id' => String,
|
23
|
+
'type' => String,
|
24
|
+
'value' => String
|
25
|
+
}],
|
26
|
+
'label' => String,
|
27
|
+
'location' => {
|
28
|
+
'cage' => {
|
29
|
+
'id' => String,
|
30
|
+
'value' => String
|
31
|
+
},
|
32
|
+
'facility' => {
|
33
|
+
'code' => String,
|
34
|
+
'id' => String,
|
35
|
+
'value' => String
|
36
|
+
},
|
37
|
+
'position' => String,
|
38
|
+
'rack' => {
|
39
|
+
'id' => String,
|
40
|
+
'value' => String
|
41
|
+
},
|
42
|
+
'row' => {
|
43
|
+
'id' => String,
|
44
|
+
'value' => String
|
45
|
+
},
|
46
|
+
'zone' => {
|
47
|
+
'id' => String,
|
48
|
+
'value' => String
|
49
|
+
}
|
50
|
+
},
|
51
|
+
'memory' => { 'size' => Integer },
|
52
|
+
'model' => {
|
53
|
+
'id' => String,
|
54
|
+
'value' => String
|
55
|
+
},
|
56
|
+
'operating_system' => {
|
57
|
+
'architecture' => Integer,
|
58
|
+
'name' => String
|
59
|
+
},
|
60
|
+
'power_consumption' => String,
|
61
|
+
'processor' => {
|
62
|
+
'cores' => Integer
|
63
|
+
},
|
64
|
+
'status' => String,
|
65
|
+
'type' => {
|
66
|
+
'id' => String,
|
67
|
+
'value' => String
|
68
|
+
},
|
69
|
+
'stat' => String,
|
70
|
+
}]
|
71
|
+
}
|
72
|
+
|
73
|
+
tests('success') do
|
74
|
+
|
75
|
+
@server_id = nil
|
76
|
+
@name = "fog.#{Time.now.to_i}"
|
77
|
+
|
78
|
+
tests("#voxcloud_create( :hostname => '#{@name}', :disk_size => 10, :processing_cores => 1, :image_id => 55, :facility => 'LDJ1' )").formats(@server_format) do
|
79
|
+
pending if Fog.mocking?
|
80
|
+
data = Voxel[:compute].voxcloud_create( :hostname => @name, :disk_size => 10, :processing_cores => 1, :image_id => 55, :facility => "LDJ1" ).body
|
81
|
+
@server_id = data['device']['id']
|
82
|
+
data
|
83
|
+
end
|
84
|
+
|
85
|
+
unless Fog.mocking?
|
86
|
+
Voxel[:compute].servers.get(@server_id).wait_for { ready? }
|
87
|
+
end
|
88
|
+
|
89
|
+
tests('#devices_list').formats(@devices_format) do
|
90
|
+
pending if Fog.mocking?
|
91
|
+
Voxel[:compute].devices_list.body
|
92
|
+
end
|
93
|
+
|
94
|
+
tests('#devices_list(@server_id)').formats(@devices_format) do
|
95
|
+
pending if Fog.mocking?
|
96
|
+
Voxel[:compute].devices_list(@server_id).body
|
97
|
+
end
|
98
|
+
|
99
|
+
tests("#voxcloud_delete(#{@server_id})").succeeds do
|
100
|
+
pending if Fog.mocking?
|
101
|
+
Voxel[:compute].voxcloud_delete(@server_id)
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
tests('failure') do
|
107
|
+
tests('#voxcloud_delete(0)').raises(Fog::Voxel::Compute::Error) do
|
108
|
+
pending if Fog.mocking?
|
109
|
+
Voxel[:compute].voxcloud_delete(0)
|
110
|
+
end
|
111
|
+
|
112
|
+
tests('#voxcloud_status(0)').raises(Fog::Voxel::Compute::Error) do
|
113
|
+
pending if Fog.mocking?
|
114
|
+
Voxel[:compute].voxcloud_status(0)
|
115
|
+
end
|
116
|
+
|
117
|
+
tests('#devices_list(0)').raises(Fog::Voxel::Compute::Error) do
|
118
|
+
pending if Fog.mocking?
|
119
|
+
Voxel[:compute].devices_list(0)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
data/tests/dns/helper.rb
CHANGED
@@ -3,6 +3,12 @@ def dns_providers
|
|
3
3
|
AWS => {
|
4
4
|
:mocked => false
|
5
5
|
},
|
6
|
+
Bluebox => {
|
7
|
+
:mocked => false,
|
8
|
+
:zone_attributes => {
|
9
|
+
:ttl => 60
|
10
|
+
}
|
11
|
+
},
|
6
12
|
Linode => {
|
7
13
|
:mocked => false,
|
8
14
|
:zone_attributes => {
|
@@ -14,6 +20,9 @@ def dns_providers
|
|
14
20
|
},
|
15
21
|
Zerigo => {
|
16
22
|
:mocked => false
|
23
|
+
},
|
24
|
+
DNSimple => {
|
25
|
+
:mocked => false
|
17
26
|
}
|
18
27
|
}
|
19
|
-
end
|
28
|
+
end
|
@@ -0,0 +1,271 @@
|
|
1
|
+
Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do
|
2
|
+
|
3
|
+
@domain = ''
|
4
|
+
@new_zones = []
|
5
|
+
@new_records =[]
|
6
|
+
|
7
|
+
def generate_unique_domain(with_trailing_dot = false)
|
8
|
+
#get time (with 1/100th of sec accuracy)
|
9
|
+
#want unique domain name and if provider is fast, this can be called more than once per second
|
10
|
+
time= (Time.now.to_f * 100).to_i
|
11
|
+
domain = 'test-' + time.to_s + '.com'
|
12
|
+
if with_trailing_dot
|
13
|
+
domain+= '.'
|
14
|
+
end
|
15
|
+
|
16
|
+
domain
|
17
|
+
end
|
18
|
+
|
19
|
+
tests( 'success') do
|
20
|
+
|
21
|
+
test('get current zone count') do
|
22
|
+
pending if Fog.mocking?
|
23
|
+
|
24
|
+
@org_zone_count= 0
|
25
|
+
response = Bluebox[:dns].get_zones()
|
26
|
+
if response.status == 200
|
27
|
+
zones = response.body['zones']
|
28
|
+
@org_zone_count = zones.count
|
29
|
+
end
|
30
|
+
|
31
|
+
response.status == 200
|
32
|
+
end
|
33
|
+
|
34
|
+
test('create zone - simple') do
|
35
|
+
pending if Fog.mocking?
|
36
|
+
|
37
|
+
domain = generate_unique_domain
|
38
|
+
response = Bluebox[:dns].create_zone(:name => domain, :ttl => 360)
|
39
|
+
if response.status == 202
|
40
|
+
zone_id = response.body['id']
|
41
|
+
@new_zones << zone_id
|
42
|
+
end
|
43
|
+
|
44
|
+
response.status == 202
|
45
|
+
end
|
46
|
+
|
47
|
+
test('create zone - set all parameters') do
|
48
|
+
pending if Fog.mocking?
|
49
|
+
|
50
|
+
options = { :ttl => 60, :retry => 3600, :refresh => 1800, :minimum => 30 }
|
51
|
+
@domain= generate_unique_domain
|
52
|
+
response = Bluebox[:dns].create_zone(options.merge(:name => @domain))
|
53
|
+
if response.status == 202
|
54
|
+
@zone_id = response.body['id']
|
55
|
+
@new_zones << @zone_id
|
56
|
+
end
|
57
|
+
|
58
|
+
response.status == 202
|
59
|
+
end
|
60
|
+
|
61
|
+
test("get zone #{@zone_id} - check all parameters for #{@domain}") do
|
62
|
+
pending if Fog.mocking?
|
63
|
+
|
64
|
+
result = false
|
65
|
+
|
66
|
+
response = Bluebox[:dns].get_zone(@zone_id)
|
67
|
+
if response.status == 200
|
68
|
+
zone = response.body
|
69
|
+
if (zone['name'] == @domain) and (zone['ttl'] == 60)
|
70
|
+
result = true
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
result
|
75
|
+
end
|
76
|
+
|
77
|
+
test('get zones - make sure total count is correct') do
|
78
|
+
pending if Fog.mocking?
|
79
|
+
|
80
|
+
result = false
|
81
|
+
|
82
|
+
response = Bluebox[:dns].get_zones()
|
83
|
+
if response.status == 200
|
84
|
+
zones = response.body['zones']
|
85
|
+
if (@org_zone_count+2) == zones.count
|
86
|
+
result= true;
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
result
|
91
|
+
end
|
92
|
+
|
93
|
+
test('get zones - check all parameters for a zone') do
|
94
|
+
pending if Fog.mocking?
|
95
|
+
|
96
|
+
result= false
|
97
|
+
|
98
|
+
response = Bluebox[:dns].get_zones()
|
99
|
+
if response.status == 200
|
100
|
+
zones = response.body['zones']
|
101
|
+
zones.each { |zone|
|
102
|
+
if zone['id'] == @new_zones[1]
|
103
|
+
options = { :ttl => 60, :retry => 3600, :refresh => 1800, :minimum => 30 }
|
104
|
+
if (zone['name'] == @domain) and (zone['ttl'] == 60) and (zone['retry'] == 3600) and (zone['refresh'] == 1800) and (zone['minimum'] == 30)
|
105
|
+
result = true;
|
106
|
+
end
|
107
|
+
end
|
108
|
+
}
|
109
|
+
if (@org_zone_count+2) == zones.count
|
110
|
+
result = true;
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
result
|
115
|
+
end
|
116
|
+
|
117
|
+
test('create record - simple A record') do
|
118
|
+
pending if Fog.mocking?
|
119
|
+
|
120
|
+
host= 'www.' + @domain
|
121
|
+
zone_id= @new_zones[1]
|
122
|
+
response = Bluebox[:dns].create_record(zone_id, 'A', host, '1.2.3.4')
|
123
|
+
if response.status == 202
|
124
|
+
record_id = response.body['id']
|
125
|
+
@new_records << record_id
|
126
|
+
end
|
127
|
+
|
128
|
+
response.status == 202
|
129
|
+
end
|
130
|
+
|
131
|
+
test('create record - A record - all parameters set') do
|
132
|
+
pending if Fog.mocking?
|
133
|
+
|
134
|
+
host= 'ftp.' + @domain
|
135
|
+
zone_id= @new_zones[1]
|
136
|
+
response = Bluebox[:dns].create_record( zone_id, 'A', host, '1.2.3.4')
|
137
|
+
if response.status == 202
|
138
|
+
record_id = response.body['id']
|
139
|
+
@new_records << record_id
|
140
|
+
end
|
141
|
+
|
142
|
+
response.status == 202
|
143
|
+
end
|
144
|
+
|
145
|
+
test('create record - CNAME record') do
|
146
|
+
pending if Fog.mocking?
|
147
|
+
|
148
|
+
zone_id= @new_zones[1]
|
149
|
+
response = Bluebox[:dns].create_record( zone_id, 'CNAME', 'mail', @domain)
|
150
|
+
if response.status == 202
|
151
|
+
record_id = response.body['id']
|
152
|
+
@new_records << record_id
|
153
|
+
end
|
154
|
+
|
155
|
+
response.status == 202
|
156
|
+
end
|
157
|
+
|
158
|
+
test('create record - NS record') do
|
159
|
+
pending if Fog.mocking?
|
160
|
+
|
161
|
+
ns_domain = 'ns.' + @domain
|
162
|
+
zone_id= @new_zones[1]
|
163
|
+
response = Bluebox[:dns].create_record( zone_id, 'NS', @domain, ns_domain)
|
164
|
+
if response.status == 202
|
165
|
+
record_id = response.body['id']
|
166
|
+
@new_records << record_id
|
167
|
+
end
|
168
|
+
|
169
|
+
response.status == 202
|
170
|
+
end
|
171
|
+
|
172
|
+
test('create record - MX record') do
|
173
|
+
pending if Fog.mocking?
|
174
|
+
|
175
|
+
mail_domain = 'mail.' + @domain
|
176
|
+
zone_id= @new_zones[1]
|
177
|
+
response = Bluebox[:dns].create_record( zone_id, 'MX', @domain, mail_domain, :priority => 10)
|
178
|
+
if response.status == 202
|
179
|
+
@record_id = response.body['id']
|
180
|
+
@new_records << @record_id
|
181
|
+
end
|
182
|
+
|
183
|
+
response.status == 202
|
184
|
+
end
|
185
|
+
|
186
|
+
test("get record #{@record_id} - verify all parameters") do
|
187
|
+
pending if Fog.mocking?
|
188
|
+
|
189
|
+
result= false
|
190
|
+
|
191
|
+
response = Bluebox[:dns].get_record(@new_zones[1], @record_id)
|
192
|
+
if response.status == 200
|
193
|
+
mail_domain = 'mail.' + @domain + "."
|
194
|
+
record = response.body
|
195
|
+
if (record['type'] == 'MX') and (record['name'] == @domain) and (record['content'] == mail_domain) and (record['priority'] == '10')
|
196
|
+
result= true
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
result
|
201
|
+
end
|
202
|
+
|
203
|
+
test('get records - verify all parameters for one record') do
|
204
|
+
pending if Fog.mocking?
|
205
|
+
|
206
|
+
result= false
|
207
|
+
|
208
|
+
response = Bluebox[:dns].get_records(@new_zones[1])
|
209
|
+
if response.status == 200
|
210
|
+
records = response.body['records']
|
211
|
+
|
212
|
+
#find mx record
|
213
|
+
records.each {|record|
|
214
|
+
if record['type'] == 'MX'
|
215
|
+
|
216
|
+
mail_domain = 'mail.' + @domain + "."
|
217
|
+
if (record['type'] == 'MX') and (record['name'] == @domain) and (record['content'] == mail_domain) and (record['priority'] == '10')
|
218
|
+
result= true
|
219
|
+
break
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
223
|
+
}
|
224
|
+
end
|
225
|
+
|
226
|
+
result
|
227
|
+
end
|
228
|
+
|
229
|
+
test("delete #{@new_records.count} records created") do
|
230
|
+
pending if Fog.mocking?
|
231
|
+
|
232
|
+
result= true
|
233
|
+
@new_records.each { |record_id|
|
234
|
+
response = Bluebox[:dns].delete_record(@new_zones[1], record_id)
|
235
|
+
if response.status != 200
|
236
|
+
result= false;
|
237
|
+
end
|
238
|
+
}
|
239
|
+
result
|
240
|
+
end
|
241
|
+
|
242
|
+
test("delete #{@new_zones.count} zones created") do
|
243
|
+
pending if Fog.mocking?
|
244
|
+
|
245
|
+
result= true
|
246
|
+
|
247
|
+
@new_zones.each { |zone_id|
|
248
|
+
response = Bluebox[:dns].delete_zone( zone_id)
|
249
|
+
if response.status != 200
|
250
|
+
result= false;
|
251
|
+
end
|
252
|
+
}
|
253
|
+
|
254
|
+
result
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
|
260
|
+
tests( 'failure') do
|
261
|
+
|
262
|
+
#create a zone with invalid parameters
|
263
|
+
#get zonfo info with invalid zone id
|
264
|
+
#delete a zone with an invalid zone id
|
265
|
+
|
266
|
+
tests('#create_zone') do
|
267
|
+
end
|
268
|
+
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|