fog 1.38.0 → 1.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +13 -3
- data/CHANGELOG.md +66 -0
- data/Gemfile +1 -1
- data/LICENSE.md +1 -1
- data/README.md +13 -0
- data/fog.gemspec +27 -6
- data/gemfiles/Gemfile-1.9 +16 -0
- data/gemfiles/Gemfile-2.0 +11 -0
- data/gemfiles/Gemfile-edge +1 -1
- data/gemfiles/Gemfile-edge-1.9 +20 -0
- data/gemfiles/Gemfile-edge-2.0 +16 -0
- data/lib/fog.rb +0 -1
- data/lib/fog/bin.rb +0 -1
- data/lib/fog/cloudsigma/compute.rb +9 -0
- data/lib/fog/cloudsigma/models/server.rb +5 -0
- data/lib/fog/cloudsigma/models/snapshot.rb +77 -0
- data/lib/fog/cloudsigma/models/snapshots.rb +26 -0
- data/lib/fog/cloudsigma/models/volume.rb +15 -0
- data/lib/fog/cloudsigma/requests/clone_snapshot.rb +31 -0
- data/lib/fog/cloudsigma/requests/create_snapshot.rb +27 -0
- data/lib/fog/cloudsigma/requests/delete_snapshot.rb +17 -0
- data/lib/fog/cloudsigma/requests/get_snapshot.rb +17 -0
- data/lib/fog/cloudsigma/requests/list_snapshots.rb +17 -0
- data/lib/fog/cloudsigma/requests/stop_server.rb +5 -4
- data/lib/fog/cloudsigma/requests/update_snapshot.rb +17 -0
- data/lib/fog/cloudstack/core.rb +2 -0
- data/lib/fog/joyent/compute.rb +4 -16
- data/lib/fog/opennebula/README.md +0 -0
- data/lib/fog/opennebula/compute.rb +90 -19
- data/lib/fog/opennebula/models/compute/server.rb +9 -1
- data/lib/fog/opennebula/requests/compute/image_pool.rb +0 -1
- data/lib/fog/opennebula/requests/compute/list_vms.rb +8 -26
- data/lib/fog/opennebula/requests/compute/template_pool.rb +8 -29
- data/lib/fog/opennebula/requests/compute/vm_allocate.rb +24 -15
- data/lib/fog/opennebula/requests/compute/vm_destroy.rb +13 -4
- data/lib/fog/opennebula/requests/compute/vm_disk_snapshot.rb +8 -2
- data/lib/fog/opennebula/requests/compute/vm_resume.rb +13 -23
- data/lib/fog/opennebula/requests/compute/vm_shutdown.rb +1 -1
- data/lib/fog/opennebula/requests/compute/vm_stop.rb +3 -10
- data/lib/fog/opennebula/requests/compute/vm_suspend.rb +31 -0
- data/lib/fog/ovirt/compute.rb +4 -0
- data/lib/fog/ovirt/models/compute/instance_type.rb +39 -0
- data/lib/fog/ovirt/models/compute/instance_types.rb +20 -0
- data/lib/fog/ovirt/models/compute/server.rb +1 -0
- data/lib/fog/ovirt/requests/compute/get_instance_type.rb +17 -0
- data/lib/fog/ovirt/requests/compute/list_instance_types.rb +19 -0
- data/lib/fog/ovirt/requests/compute/mock_files/instance_type.xml +42 -0
- data/lib/fog/ovirt/requests/compute/mock_files/instance_types.xml +197 -0
- data/lib/fog/rage4/dns.rb +1 -0
- data/lib/fog/rage4/requests/dns/bulk_update_records.rb +38 -0
- data/lib/fog/vcloud_director/compute.rb +1 -0
- data/lib/fog/vcloud_director/generators/compute/compose_common.rb +17 -16
- data/lib/fog/vcloud_director/generators/compute/create_snapshot.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/post_create_snapshot.rb +21 -0
- data/lib/fog/version.rb +1 -1
- data/lib/tasks/changelog_task.rb +4 -4
- data/spec/fog/bin/dnsimple_spec.rb +2 -2
- data/spec/fog/bin_spec.rb +3 -6
- data/tests/cloudsigma/models/snapshot_tests.rb +23 -0
- data/tests/cloudsigma/models/snapshots_tests.rb +15 -0
- data/tests/cloudsigma/models/volume_tests.rb +3 -3
- data/tests/cloudsigma/requests/server_tests.rb +10 -10
- data/tests/cloudsigma/requests/snapshots_tests.rb +83 -0
- data/tests/cloudsigma/requests/volumes_tests.rb +12 -11
- data/tests/compute/helper.rb +0 -19
- data/tests/helpers/mock_helper.rb +0 -4
- data/tests/opennebula/models/compute/flavor_tests.rb +2 -2
- data/tests/opennebula/models/compute/network_tests.rb +1 -2
- data/tests/opennebula/requests/compute/vm_allocate_tests.rb +20 -3
- data/tests/opennebula/requests/compute/vm_suspend_resume_tests.rb +52 -0
- data/tests/rage4/requests/dns/dns_tests.rb +12 -0
- data/tests/storage/helper.rb +0 -6
- metadata +101 -389
- data/lib/fog/bin/digitalocean.rb +0 -29
- data/lib/fog/bin/dnsimple.rb +0 -29
- data/lib/fog/bin/ninefold.rb +0 -34
- data/lib/fog/digitalocean.rb +0 -1
- data/lib/fog/digitalocean/CHANGELOG.md +0 -6
- data/lib/fog/digitalocean/compute_v2.rb +0 -109
- data/lib/fog/digitalocean/core.rb +0 -9
- data/lib/fog/digitalocean/examples/getting_started.md +0 -124
- data/lib/fog/digitalocean/models/compute_v2/flavor.rb +0 -17
- data/lib/fog/digitalocean/models/compute_v2/flavors.rb +0 -21
- data/lib/fog/digitalocean/models/compute_v2/image.rb +0 -25
- data/lib/fog/digitalocean/models/compute_v2/images.rb +0 -42
- data/lib/fog/digitalocean/models/compute_v2/region.rb +0 -13
- data/lib/fog/digitalocean/models/compute_v2/regions.rb +0 -21
- data/lib/fog/digitalocean/models/compute_v2/server.rb +0 -170
- data/lib/fog/digitalocean/models/compute_v2/servers.rb +0 -43
- data/lib/fog/digitalocean/models/compute_v2/ssh_key.rb +0 -31
- data/lib/fog/digitalocean/models/compute_v2/ssh_keys.rb +0 -40
- data/lib/fog/digitalocean/models/paging_collection.rb +0 -41
- data/lib/fog/digitalocean/requests/compute_v2/change_kernel.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/convert_to_snapshot.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/create_server.rb +0 -93
- data/lib/fog/digitalocean/requests/compute_v2/create_ssh_key.rb +0 -49
- data/lib/fog/digitalocean/requests/compute_v2/delete_ssh_key.rb +0 -32
- data/lib/fog/digitalocean/requests/compute_v2/destroy_server.rb +0 -35
- data/lib/fog/digitalocean/requests/compute_v2/disable_backups.rb +0 -45
- data/lib/fog/digitalocean/requests/compute_v2/enable_ipv6.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/enable_private_networking.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/get_droplet_action.rb +0 -36
- data/lib/fog/digitalocean/requests/compute_v2/get_image_details.rb +0 -42
- data/lib/fog/digitalocean/requests/compute_v2/get_server_details.rb +0 -84
- data/lib/fog/digitalocean/requests/compute_v2/get_ssh_key.rb +0 -34
- data/lib/fog/digitalocean/requests/compute_v2/list_droplet_actions.rb +0 -38
- data/lib/fog/digitalocean/requests/compute_v2/list_flavors.rb +0 -131
- data/lib/fog/digitalocean/requests/compute_v2/list_images.rb +0 -50
- data/lib/fog/digitalocean/requests/compute_v2/list_regions.rb +0 -94
- data/lib/fog/digitalocean/requests/compute_v2/list_servers.rb +0 -28
- data/lib/fog/digitalocean/requests/compute_v2/list_ssh_keys.rb +0 -31
- data/lib/fog/digitalocean/requests/compute_v2/password_reset.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/power_cycle.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/power_off.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/power_on.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/reboot_server.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/rebuild.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/rename.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/resize.rb +0 -48
- data/lib/fog/digitalocean/requests/compute_v2/restore.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/shutdown.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/snapshot.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/transfer_image.rb +0 -44
- data/lib/fog/digitalocean/requests/compute_v2/update_ssh_key.rb +0 -46
- data/lib/fog/digitalocean/requests/compute_v2/upgrade.rb +0 -44
- data/lib/fog/digitalocean/service.rb +0 -51
- data/lib/fog/dnsimple.rb +0 -1
- data/lib/fog/dnsimple/core.rb +0 -10
- data/lib/fog/dnsimple/dns.rb +0 -112
- data/lib/fog/dnsimple/models/dns/record.rb +0 -63
- data/lib/fog/dnsimple/models/dns/records.rb +0 -34
- data/lib/fog/dnsimple/models/dns/zone.rb +0 -46
- data/lib/fog/dnsimple/models/dns/zones.rb +0 -25
- data/lib/fog/dnsimple/requests/dns/create_domain.rb +0 -62
- data/lib/fog/dnsimple/requests/dns/create_record.rb +0 -67
- data/lib/fog/dnsimple/requests/dns/delete_domain.rb +0 -35
- data/lib/fog/dnsimple/requests/dns/delete_record.rb +0 -30
- data/lib/fog/dnsimple/requests/dns/get_domain.rb +0 -39
- data/lib/fog/dnsimple/requests/dns/get_record.rb +0 -49
- data/lib/fog/dnsimple/requests/dns/list_domains.rb +0 -34
- data/lib/fog/dnsimple/requests/dns/list_records.rb +0 -34
- data/lib/fog/dnsimple/requests/dns/update_record.rb +0 -53
- data/lib/fog/ninefold.rb +0 -1
- data/lib/fog/ninefold/compute.rb +0 -144
- data/lib/fog/ninefold/core.rb +0 -11
- data/lib/fog/ninefold/models/compute/address.rb +0 -100
- data/lib/fog/ninefold/models/compute/addresses.rb +0 -27
- data/lib/fog/ninefold/models/compute/flavor.rb +0 -24
- data/lib/fog/ninefold/models/compute/flavors.rb +0 -26
- data/lib/fog/ninefold/models/compute/image.rb +0 -38
- data/lib/fog/ninefold/models/compute/images.rb +0 -26
- data/lib/fog/ninefold/models/compute/ip_forwarding_rule.rb +0 -76
- data/lib/fog/ninefold/models/compute/ip_forwarding_rules.rb +0 -27
- data/lib/fog/ninefold/models/compute/server.rb +0 -182
- data/lib/fog/ninefold/models/compute/servers.rb +0 -27
- data/lib/fog/ninefold/requests/compute/assign_to_load_balancer_rule.rb +0 -11
- data/lib/fog/ninefold/requests/compute/associate_ip_address.rb +0 -12
- data/lib/fog/ninefold/requests/compute/change_service_for_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/create_ip_forwarding_rule.rb +0 -12
- data/lib/fog/ninefold/requests/compute/create_load_balancer_rule.rb +0 -11
- data/lib/fog/ninefold/requests/compute/delete_ip_forwarding_rule.rb +0 -12
- data/lib/fog/ninefold/requests/compute/delete_load_balancer_rule.rb +0 -11
- data/lib/fog/ninefold/requests/compute/deploy_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/destroy_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/disable_static_nat.rb +0 -12
- data/lib/fog/ninefold/requests/compute/disassociate_ip_address.rb +0 -12
- data/lib/fog/ninefold/requests/compute/enable_static_nat.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_accounts.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_async_jobs.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_capabilities.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_disk_offerings.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_events.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_hypervisors.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_ip_forwarding_rules.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_load_balancer_rule_instances.rb +0 -11
- data/lib/fog/ninefold/requests/compute/list_load_balancer_rules.rb +0 -11
- data/lib/fog/ninefold/requests/compute/list_network_offerings.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_networks.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_public_ip_addresses.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_resource_limits.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_service_offerings.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_templates.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_virtual_machines.rb +0 -12
- data/lib/fog/ninefold/requests/compute/list_zones.rb +0 -12
- data/lib/fog/ninefold/requests/compute/query_async_job_result.rb +0 -12
- data/lib/fog/ninefold/requests/compute/reboot_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/remove_from_load_balancer_rule.rb +0 -11
- data/lib/fog/ninefold/requests/compute/reset_password_for_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/start_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/stop_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/requests/compute/update_load_balancer_rule.rb +0 -11
- data/lib/fog/ninefold/requests/compute/update_virtual_machine.rb +0 -12
- data/lib/fog/ninefold/storage.rb +0 -53
- data/spec/fog/bin/digitalocean_spec.rb +0 -9
- data/spec/fog/bin/ninefold_spec.rb +0 -10
- data/tests/digitalocean/helper.rb +0 -56
- data/tests/digitalocean/requests/compute_v2/list_flavors_tests.rb +0 -25
- data/tests/digitalocean/requests/compute_v2/list_images_tests.rb +0 -25
- data/tests/digitalocean/requests/compute_v2/list_regions_tests.rb +0 -21
- data/tests/digitalocean/requests/compute_v2/server_tests.rb +0 -77
- data/tests/dnsimple/requests/dns/dns_tests.rb +0 -122
- data/tests/hp/block_storage_tests.rb +0 -47
- data/tests/hp/cdn_tests.rb +0 -23
- data/tests/hp/compute_tests.rb +0 -22
- data/tests/hp/models/block_storage/bootable_volume_tests.rb +0 -23
- data/tests/hp/models/block_storage/snapshot_tests.rb +0 -23
- data/tests/hp/models/block_storage/volume_tests.rb +0 -21
- data/tests/hp/models/block_storage_v2/snapshot_tests.rb +0 -22
- data/tests/hp/models/block_storage_v2/snapshots_tests.rb +0 -10
- data/tests/hp/models/block_storage_v2/volume_backup_tests.rb +0 -22
- data/tests/hp/models/block_storage_v2/volume_backups_tests.rb +0 -9
- data/tests/hp/models/block_storage_v2/volume_tests.rb +0 -22
- data/tests/hp/models/block_storage_v2/volumes_tests.rb +0 -5
- data/tests/hp/models/compute/address_tests.rb +0 -18
- data/tests/hp/models/compute/addresses_tests.rb +0 -5
- data/tests/hp/models/compute/key_pair_tests.rb +0 -26
- data/tests/hp/models/compute/key_pairs_tests.rb +0 -5
- data/tests/hp/models/compute/metadata_image_tests.rb +0 -60
- data/tests/hp/models/compute/metadata_server_tests.rb +0 -54
- data/tests/hp/models/compute/security_group_tests.rb +0 -38
- data/tests/hp/models/compute/security_groups_tests.rb +0 -5
- data/tests/hp/models/compute_v2/address_tests.rb +0 -23
- data/tests/hp/models/compute_v2/addresses_tests.rb +0 -7
- data/tests/hp/models/compute_v2/availability_zone_tests.rb +0 -11
- data/tests/hp/models/compute_v2/availability_zones_tests.rb +0 -13
- data/tests/hp/models/compute_v2/key_pair_tests.rb +0 -28
- data/tests/hp/models/compute_v2/key_pairs_tests.rb +0 -7
- data/tests/hp/models/compute_v2/metadata_image_tests.rb +0 -60
- data/tests/hp/models/compute_v2/metadata_server_tests.rb +0 -56
- data/tests/hp/models/compute_v2/server_tests.rb +0 -45
- data/tests/hp/models/compute_v2/servers_tests.rb +0 -9
- data/tests/hp/models/compute_v2/volume_attachment_tests.rb +0 -40
- data/tests/hp/models/compute_v2/volume_attachments_tests.rb +0 -17
- data/tests/hp/models/dns/domain_tests.rb +0 -25
- data/tests/hp/models/dns/domains_tests.rb +0 -14
- data/tests/hp/models/dns/record_tests.rb +0 -29
- data/tests/hp/models/dns/records_tests.rb +0 -9
- data/tests/hp/models/lb/algorithms_tests.rb +0 -15
- data/tests/hp/models/lb/load_balancer_node_tests.rb +0 -9
- data/tests/hp/models/lb/load_balancer_nodes_tests.rb +0 -27
- data/tests/hp/models/lb/load_balancer_tests.rb +0 -6
- data/tests/hp/models/lb/load_balancer_virtual_ips_tests.rb +0 -22
- data/tests/hp/models/lb/load_balancers_tests.rb +0 -22
- data/tests/hp/models/lb/protocols_tests.rb +0 -15
- data/tests/hp/models/network/floating_ip_tests.rb +0 -37
- data/tests/hp/models/network/floating_ips_tests.rb +0 -8
- data/tests/hp/models/network/network_tests.rb +0 -25
- data/tests/hp/models/network/networks_tests.rb +0 -15
- data/tests/hp/models/network/port_tests.rb +0 -30
- data/tests/hp/models/network/ports_tests.rb +0 -21
- data/tests/hp/models/network/router_tests.rb +0 -55
- data/tests/hp/models/network/routers_tests.rb +0 -19
- data/tests/hp/models/network/security_group_rule_tests.rb +0 -25
- data/tests/hp/models/network/security_group_rules_tests.rb +0 -23
- data/tests/hp/models/network/security_group_tests.rb +0 -20
- data/tests/hp/models/network/security_groups_tests.rb +0 -20
- data/tests/hp/models/network/subnet_tests.rb +0 -30
- data/tests/hp/models/network/subnets_tests.rb +0 -22
- data/tests/hp/models/storage/directories_tests.rb +0 -23
- data/tests/hp/models/storage/directory_tests.rb +0 -131
- data/tests/hp/models/storage/file_tests.rb +0 -44
- data/tests/hp/models/storage/files_tests.rb +0 -38
- data/tests/hp/requests/block_storage/bootable_volume_tests.rb +0 -78
- data/tests/hp/requests/block_storage/snapshot_tests.rb +0 -56
- data/tests/hp/requests/block_storage/volume_tests.rb +0 -94
- data/tests/hp/requests/block_storage_v2/snapshot_tests.rb +0 -69
- data/tests/hp/requests/block_storage_v2/volume_backup_tests.rb +0 -117
- data/tests/hp/requests/block_storage_v2/volume_tests.rb +0 -106
- data/tests/hp/requests/cdn/container_tests.rb +0 -56
- data/tests/hp/requests/compute/address_tests.rb +0 -72
- data/tests/hp/requests/compute/flavor_tests.rb +0 -45
- data/tests/hp/requests/compute/image_tests.rb +0 -79
- data/tests/hp/requests/compute/key_pair_tests.rb +0 -65
- data/tests/hp/requests/compute/metadata_tests.rb +0 -70
- data/tests/hp/requests/compute/persistent_server_tests.rb +0 -66
- data/tests/hp/requests/compute/security_group_rule_tests.rb +0 -54
- data/tests/hp/requests/compute/security_group_tests.rb +0 -63
- data/tests/hp/requests/compute/server_address_tests.rb +0 -45
- data/tests/hp/requests/compute/server_tests.rb +0 -126
- data/tests/hp/requests/compute/server_volume_tests.rb +0 -75
- data/tests/hp/requests/compute_v2/address_tests.rb +0 -80
- data/tests/hp/requests/compute_v2/availability_zone_tests.rb +0 -19
- data/tests/hp/requests/compute_v2/flavor_tests.rb +0 -45
- data/tests/hp/requests/compute_v2/image_tests.rb +0 -86
- data/tests/hp/requests/compute_v2/key_pair_tests.rb +0 -66
- data/tests/hp/requests/compute_v2/metadata_tests.rb +0 -101
- data/tests/hp/requests/compute_v2/persistent_server_tests.rb +0 -67
- data/tests/hp/requests/compute_v2/server_address_tests.rb +0 -46
- data/tests/hp/requests/compute_v2/server_security_group_tests.rb +0 -42
- data/tests/hp/requests/compute_v2/server_tests.rb +0 -113
- data/tests/hp/requests/compute_v2/server_volume_tests.rb +0 -84
- data/tests/hp/requests/dns/domain_tests.rb +0 -72
- data/tests/hp/requests/dns/records_tests.rb +0 -64
- data/tests/hp/requests/lb/algorithms_tests.rb +0 -14
- data/tests/hp/requests/lb/limits_tests.rb +0 -16
- data/tests/hp/requests/lb/load_balancer_nodes_tests.rb +0 -46
- data/tests/hp/requests/lb/load_balancer_tests.rb +0 -56
- data/tests/hp/requests/lb/protocols_tests.rb +0 -14
- data/tests/hp/requests/lb/versions_tests.rb +0 -16
- data/tests/hp/requests/lb/virtual_ips_tests.rb +0 -34
- data/tests/hp/requests/network/floating_ip_tests.rb +0 -70
- data/tests/hp/requests/network/network_tests.rb +0 -57
- data/tests/hp/requests/network/port_tests.rb +0 -71
- data/tests/hp/requests/network/router_tests.rb +0 -108
- data/tests/hp/requests/network/security_group_rule_tests.rb +0 -58
- data/tests/hp/requests/network/security_group_tests.rb +0 -48
- data/tests/hp/requests/network/subnet_tests.rb +0 -71
- data/tests/hp/requests/storage/container_tests.rb +0 -86
- data/tests/hp/requests/storage/object_tests.rb +0 -121
- data/tests/hp/storage_tests.rb +0 -28
- data/tests/hp/user_agent_tests.rb +0 -13
- data/tests/ninefold/models/storage/file_update_tests.rb +0 -19
- data/tests/ninefold/models/storage/nested_directories_tests.rb +0 -23
- data/tests/ninefold/requests/compute/address_tests.rb +0 -42
- data/tests/ninefold/requests/compute/async_job_tests.rb +0 -33
- data/tests/ninefold/requests/compute/helper.rb +0 -369
- data/tests/ninefold/requests/compute/list_tests.rb +0 -56
- data/tests/ninefold/requests/compute/load_balancer_tests.rb +0 -66
- data/tests/ninefold/requests/compute/nat_tests.rb +0 -91
- data/tests/ninefold/requests/compute/network_tests.rb +0 -21
- data/tests/ninefold/requests/compute/template_tests.rb +0 -21
- data/tests/ninefold/requests/compute/virtual_machine_tests.rb +0 -68
@@ -1,11 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ninefold
|
4
|
-
class Real
|
5
|
-
def remove_from_load_balancer_rule(options={})
|
6
|
-
request 'removeFromLoadBalancerRule', options, :expects => [200], :response_prefix => 'removefromloadbalancerruleresponse', :response_type => Hash
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ninefold
|
4
|
-
class Real
|
5
|
-
def reset_password_for_virtual_machine(options = {})
|
6
|
-
request('resetPasswordForVirtualMachine', options, :expects => [200],
|
7
|
-
:response_prefix => 'resetpasswordforvirtualmachineresponse', :response_type => Hash)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ninefold
|
4
|
-
class Real
|
5
|
-
def start_virtual_machine(options = {})
|
6
|
-
request('startVirtualMachine', options, :expects => [200],
|
7
|
-
:response_prefix => 'startvirtualmachineresponse', :response_type => Hash)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ninefold
|
4
|
-
class Real
|
5
|
-
def stop_virtual_machine(options = {})
|
6
|
-
request('stopVirtualMachine', options, :expects => [200],
|
7
|
-
:response_prefix => 'stopvirtualmachineresponse', :response_type => Hash)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ninefold
|
4
|
-
class Real
|
5
|
-
def update_load_balancer_rule(options={})
|
6
|
-
request 'updateLoadBalancerRule', options, :expects => [200], :response_prefix => 'updateloadbalancerruleresponse', :response_type => Hash
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ninefold
|
4
|
-
class Real
|
5
|
-
def update_virtual_machine(options = {})
|
6
|
-
request('updateVirtualMachine', options, :expects => [200],
|
7
|
-
:response_prefix => 'updatevirtualmachineresponse', :response_type => Hash)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
data/lib/fog/ninefold/storage.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
require 'fog/ninefold'
|
2
|
-
require 'fog/atmos'
|
3
|
-
|
4
|
-
module Fog
|
5
|
-
module Storage
|
6
|
-
class Ninefold < Fog::Storage::Atmos
|
7
|
-
STORAGE_HOST = "onlinestorage.ninefold.com" #"api.ninefold.com"
|
8
|
-
STORAGE_PATH = "" #"/storage/v1.0"
|
9
|
-
STORAGE_PORT = "80" # "443"
|
10
|
-
STORAGE_SCHEME = "http" # "https"
|
11
|
-
|
12
|
-
requires :ninefold_storage_token, :ninefold_storage_secret
|
13
|
-
recognizes :persistent
|
14
|
-
|
15
|
-
model_path 'fog/storage/atmos/models'
|
16
|
-
model :directory
|
17
|
-
collection :directories
|
18
|
-
model :file
|
19
|
-
collection :files
|
20
|
-
|
21
|
-
module Utils
|
22
|
-
end
|
23
|
-
|
24
|
-
class Mock < Fog::Storage::Atmos::Mock
|
25
|
-
include Utils
|
26
|
-
|
27
|
-
def initialize(options={})
|
28
|
-
@ninefold_storage_token = options[:ninefold_storage_token]
|
29
|
-
@ninefold_storage_secret = options[:ninefold_storage_secret]
|
30
|
-
end
|
31
|
-
|
32
|
-
def request(options)
|
33
|
-
raise "Ninefold Storage mocks not implemented"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
class Real < Fog::Storage::Atmos::Real
|
38
|
-
include Utils
|
39
|
-
|
40
|
-
def initialize(options={})
|
41
|
-
endpoint = "#{STORAGE_SCHEME}://"\
|
42
|
-
"#{STORAGE_HOST}:"\
|
43
|
-
"#{STORAGE_PORT}"\
|
44
|
-
"#{STORAGE_PATH}"
|
45
|
-
options[:atmos_storage_endpoint] = endpoint
|
46
|
-
options[:atmos_storage_token] = options[:ninefold_storage_token]
|
47
|
-
options[:atmos_storage_secret] = options[:ninefold_storage_secret]
|
48
|
-
super(options)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
|
2
|
-
# Shortcut for Fog::Compute[:digitalocean]
|
3
|
-
def service
|
4
|
-
Fog::Compute[:digitalocean]
|
5
|
-
end
|
6
|
-
|
7
|
-
def fog_test_server_attributes
|
8
|
-
# Hard coding numbers because requests from tests are sometimes failing.
|
9
|
-
# TODO: Mock properly instead
|
10
|
-
image = service.images.find { |i| i.name == 'Ubuntu 13.10 x64' }
|
11
|
-
image_id = image.nil? ? 1505447 : image.id
|
12
|
-
region = service.regions.find { |r| r.name == 'New York 1' }
|
13
|
-
region_id = region.nil? ? 4 : region.id
|
14
|
-
flavor = service.flavors.find { |r| r.name == '512MB' }
|
15
|
-
flavor_id = flavor.nil? ? 66 : flavor.id
|
16
|
-
|
17
|
-
{
|
18
|
-
:image_id => image_id,
|
19
|
-
:region_id => region_id,
|
20
|
-
:flavor_id => flavor_id
|
21
|
-
}
|
22
|
-
end
|
23
|
-
|
24
|
-
def fog_server_name
|
25
|
-
"fog-server-test"
|
26
|
-
end
|
27
|
-
|
28
|
-
# Create a long lived server for the tests
|
29
|
-
def fog_test_server
|
30
|
-
server = service.servers.find { |s| s.name == fog_server_name }
|
31
|
-
unless server
|
32
|
-
server = service.servers.create({
|
33
|
-
:name => fog_server_name
|
34
|
-
}.merge(fog_test_server_attributes))
|
35
|
-
server.wait_for { ready? }
|
36
|
-
end
|
37
|
-
server
|
38
|
-
end
|
39
|
-
|
40
|
-
# Destroy the long lived server
|
41
|
-
def fog_test_server_destroy
|
42
|
-
server = service.servers.find { |s| s.name == fog_server_name }
|
43
|
-
server.destroy if server
|
44
|
-
end
|
45
|
-
|
46
|
-
at_exit do
|
47
|
-
unless Fog.mocking? || Fog.credentials[:digitalocean_api_key].nil?
|
48
|
-
server = service.servers.find { |s| s.name == fog_server_name }
|
49
|
-
if server
|
50
|
-
server.wait_for(120) do
|
51
|
-
reload rescue nil; ready?
|
52
|
-
end
|
53
|
-
end
|
54
|
-
fog_test_server_destroy
|
55
|
-
end
|
56
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute::DigitalOceanV2 | list_flavors request', ['digitalocean', 'compute']) do
|
2
|
-
service = Fog::Compute.new(:provider => 'DigitalOcean', :version => 'V2')
|
3
|
-
|
4
|
-
size_format = {
|
5
|
-
'slug' => String,
|
6
|
-
'memory' => Integer,
|
7
|
-
'vcpus' => Integer,
|
8
|
-
'disk' => Integer,
|
9
|
-
'transfer' => Float,
|
10
|
-
'price_monthly' => Float,
|
11
|
-
'price_hourly' => Float,
|
12
|
-
'regions' => Array,
|
13
|
-
'available' => Fog::Boolean,
|
14
|
-
}
|
15
|
-
|
16
|
-
tests('success') do
|
17
|
-
tests('#list_flavors') do
|
18
|
-
service.list_flavors.body['sizes'].each do |size|
|
19
|
-
tests('format').data_matches_schema(size_format) do
|
20
|
-
size
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute::DigitalOceanV2 | list_images request', ['digitalocean', 'compute']) do
|
2
|
-
service = Fog::Compute.new(:provider => 'DigitalOcean', :version => 'V2')
|
3
|
-
|
4
|
-
image_format = {
|
5
|
-
'id' => Integer,
|
6
|
-
'name' => String,
|
7
|
-
'type' => String,
|
8
|
-
'distribution' => String,
|
9
|
-
'slug' => Fog::Nullable::String,
|
10
|
-
'public' => Fog::Boolean,
|
11
|
-
'regions' => Array,
|
12
|
-
'min_disk_size' => Fog::Nullable::Integer,
|
13
|
-
'created_at' => String,
|
14
|
-
}
|
15
|
-
|
16
|
-
tests('success') do
|
17
|
-
tests('#list_images') do
|
18
|
-
service.list_images.body['images'].each do |image|
|
19
|
-
tests('format').data_matches_schema(image_format) do
|
20
|
-
image
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute::DigitalOceanV2 | list_regions request', ['digitalocean', 'compute']) do
|
2
|
-
service = Fog::Compute.new(:provider => 'DigitalOcean', :version => 'V2')
|
3
|
-
|
4
|
-
region_format = {
|
5
|
-
'slug' => String,
|
6
|
-
'name' => String,
|
7
|
-
'sizes' => Array,
|
8
|
-
'available' => Fog::Boolean,
|
9
|
-
'features' => Array,
|
10
|
-
}
|
11
|
-
|
12
|
-
tests('success') do
|
13
|
-
tests('#list_regions') do
|
14
|
-
service.list_regions.body['regions'].each do |region|
|
15
|
-
tests('format').data_matches_schema(region_format) do
|
16
|
-
region
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute::DigitalOceanV2 | create_server request', ['digitalocean', 'compute']) do
|
2
|
-
service = Fog::Compute.new(:provider => 'DigitalOcean', :version => 'V2')
|
3
|
-
|
4
|
-
server_format = {
|
5
|
-
'id' => Integer,
|
6
|
-
'name' => String,
|
7
|
-
'memory' => Integer,
|
8
|
-
'vcpus' => Integer,
|
9
|
-
'disk' => Integer,
|
10
|
-
'locked' => Fog::Boolean,
|
11
|
-
'created_at' => String,
|
12
|
-
}
|
13
|
-
|
14
|
-
create_server_format = {
|
15
|
-
'droplet' => {
|
16
|
-
'id' => Integer,
|
17
|
-
'name' => String,
|
18
|
-
'memory' => Integer,
|
19
|
-
'vcpus' => Integer,
|
20
|
-
'disk' => Integer,
|
21
|
-
'locked' => Fog::Boolean,
|
22
|
-
'status' => String,
|
23
|
-
'kernel' => Hash,
|
24
|
-
"created_at" => String,
|
25
|
-
"features" => Array,
|
26
|
-
"backup_ids" => Array,
|
27
|
-
"snapshot_ids" => Array,
|
28
|
-
"image" => Hash,
|
29
|
-
"size" => Hash,
|
30
|
-
"size_slug" => String,
|
31
|
-
"networks" => Hash,
|
32
|
-
"region" => Hash,
|
33
|
-
},
|
34
|
-
|
35
|
-
'links' => {
|
36
|
-
"actions" => Array,
|
37
|
-
}
|
38
|
-
|
39
|
-
}
|
40
|
-
|
41
|
-
tests('success') do
|
42
|
-
|
43
|
-
server_id = nil
|
44
|
-
server_name = "fog-#{Time.now.to_i.to_s}"
|
45
|
-
image = "ubuntu-14-04-x64"
|
46
|
-
region = "nyc3"
|
47
|
-
size = "512mb"
|
48
|
-
|
49
|
-
tests("#create_server(#{server_name}, #{size}, #{image}, #{region})").formats(create_server_format) do
|
50
|
-
body = service.create_server(server_name, size, image, region).body
|
51
|
-
server_id = body['droplet']['id']
|
52
|
-
body
|
53
|
-
end
|
54
|
-
|
55
|
-
test('#get_server_details can retrieve by id') do
|
56
|
-
body = service.get_server_details(server_id).body
|
57
|
-
tests('format').data_matches_schema(server_format) do
|
58
|
-
body['droplet']
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
server = service.servers.get(server_id)
|
63
|
-
server.wait_for { ready? }
|
64
|
-
|
65
|
-
tests('#delete_server').succeeds do
|
66
|
-
server.delete
|
67
|
-
end
|
68
|
-
|
69
|
-
tests('#list_servers') do
|
70
|
-
service.list_servers.body['droplets'].each do |droplet|
|
71
|
-
tests('format').data_matches_schema(server_format) do
|
72
|
-
droplet
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
@@ -1,122 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::DNS[:dnsimple] | DNS requests', ['dnsimple', 'dns']) do
|
2
|
-
|
3
|
-
@domain = nil
|
4
|
-
@domain_count = 0
|
5
|
-
|
6
|
-
tests("success") do
|
7
|
-
|
8
|
-
test("get current domain count") do
|
9
|
-
response = Fog::DNS[:dnsimple].list_domains()
|
10
|
-
if response.status == 200
|
11
|
-
@domain_count = response.body.size
|
12
|
-
end
|
13
|
-
|
14
|
-
response.status == 200
|
15
|
-
end
|
16
|
-
|
17
|
-
test("create domain") do
|
18
|
-
domain = generate_unique_domain
|
19
|
-
response = Fog::DNS[:dnsimple].create_domain(domain)
|
20
|
-
if response.status == 201
|
21
|
-
@domain = response.body["domain"]
|
22
|
-
end
|
23
|
-
|
24
|
-
response.status == 201
|
25
|
-
end
|
26
|
-
|
27
|
-
test("get domain by id") do
|
28
|
-
response = Fog::DNS[:dnsimple].get_domain(@domain["id"])
|
29
|
-
response.status == 200
|
30
|
-
end
|
31
|
-
|
32
|
-
test("create an A resource record") do
|
33
|
-
domain = @domain["name"]
|
34
|
-
name = "www"
|
35
|
-
type = "A"
|
36
|
-
content = "1.2.3.4"
|
37
|
-
response = Fog::DNS[:dnsimple].create_record(domain, name, type, content)
|
38
|
-
|
39
|
-
if response.status == 201
|
40
|
-
@record = response.body["record"]
|
41
|
-
end
|
42
|
-
|
43
|
-
response.status == 201
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
test("create a MX record") do
|
48
|
-
domain = @domain["name"]
|
49
|
-
name = ""
|
50
|
-
type = "MX"
|
51
|
-
content = "mail.#{domain}"
|
52
|
-
options = { "ttl" => 60, "prio" => 10 }
|
53
|
-
response = Fog::DNS[:dnsimple].create_record(domain, name, type, content, options)
|
54
|
-
|
55
|
-
test "MX record creation returns 201" do
|
56
|
-
response.status == 201
|
57
|
-
end
|
58
|
-
|
59
|
-
options.each do |key, value|
|
60
|
-
test("MX record has option #{key}") { value == response.body["record"][key.to_s] }
|
61
|
-
end
|
62
|
-
|
63
|
-
test "MX record is correct type" do
|
64
|
-
response.body["record"]["record_type"] == "MX"
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
test("get a record") do
|
69
|
-
domain = @domain["name"]
|
70
|
-
record_id = @record["id"]
|
71
|
-
|
72
|
-
response = Fog::DNS[:dnsimple].get_record(domain, record_id)
|
73
|
-
|
74
|
-
(response.status == 200) and (@record == response.body["record"])
|
75
|
-
end
|
76
|
-
|
77
|
-
test("update a record") do
|
78
|
-
domain = @domain["name"]
|
79
|
-
record_id = @record["id"]
|
80
|
-
options = { "content" => "2.3.4.5", "ttl" => 600 }
|
81
|
-
response = Fog::DNS[:dnsimple].update_record(domain, record_id, options)
|
82
|
-
response.status == 200
|
83
|
-
end
|
84
|
-
|
85
|
-
test("list records") do
|
86
|
-
response = Fog::DNS[:dnsimple].list_records(@domain["name"])
|
87
|
-
|
88
|
-
if response.status == 200
|
89
|
-
@records = response.body
|
90
|
-
end
|
91
|
-
|
92
|
-
test "list records returns all records for domain" do
|
93
|
-
@records.reject { |record| record["record"]["system_record"] }.size == 2
|
94
|
-
end
|
95
|
-
|
96
|
-
response.status == 200
|
97
|
-
end
|
98
|
-
|
99
|
-
test("delete records") do
|
100
|
-
domain = @domain["name"]
|
101
|
-
|
102
|
-
result = true
|
103
|
-
@records.each do |record|
|
104
|
-
next if record["record"]["system_record"]
|
105
|
-
response = Fog::DNS[:dnsimple].delete_record(domain, record["record"]["id"])
|
106
|
-
if response.status != 200
|
107
|
-
result = false
|
108
|
-
break
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
result
|
113
|
-
end
|
114
|
-
|
115
|
-
test("delete domain") do
|
116
|
-
response = Fog::DNS[:dnsimple].delete_domain(@domain["name"])
|
117
|
-
response.status == 200
|
118
|
-
end
|
119
|
-
|
120
|
-
end
|
121
|
-
|
122
|
-
end
|