fog 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -2
- data/README.md +9 -10
- data/Rakefile +15 -299
- data/changelog.txt +153 -0
- data/docs/about/contributing.markdown +1 -0
- data/docs/dns/index.markdown +1 -1
- data/docs/index.markdown +8 -3
- data/fog.gemspec +3 -3
- data/lib/fog.rb +0 -5
- data/lib/fog/aws/auto_scaling.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +1 -1
- data/lib/fog/aws/compute.rb +2 -1
- data/lib/fog/aws/dynamodb.rb +30 -64
- data/lib/fog/aws/elb.rb +1 -1
- data/lib/fog/aws/glacier.rb +1 -1
- data/lib/fog/aws/iam.rb +1 -0
- data/lib/fog/aws/models/auto_scaling/group.rb +1 -1
- data/lib/fog/aws/models/compute/server.rb +2 -0
- data/lib/fog/aws/models/compute/volume.rb +0 -1
- data/lib/fog/aws/models/iam/user.rb +1 -1
- data/lib/fog/aws/parsers/compute/describe_instances.rb +3 -1
- data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
- data/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +50 -0
- data/lib/fog/aws/rds.rb +2 -2
- data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
- data/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +11 -8
- data/lib/fog/aws/requests/compute/modify_volume_attribute.rb +51 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +1 -0
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +172 -0
- data/lib/fog/aws/signaturev4.rb +1 -1
- data/lib/fog/aws/sqs.rb +1 -1
- data/lib/fog/aws/storage.rb +2 -0
- data/lib/fog/bluebox/requests/compute/create_block.rb +1 -3
- data/lib/fog/brightbox/compute.rb +239 -84
- data/lib/fog/brightbox/models/compute/account.rb +9 -3
- data/lib/fog/brightbox/models/compute/server.rb +2 -1
- data/lib/fog/brightbox/models/compute/servers.rb +33 -1
- data/lib/fog/brightbox/oauth2.rb +164 -0
- data/lib/fog/brightbox/requests/compute/activate_console_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +11 -2
- data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +11 -2
- data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +9 -11
- data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +11 -2
- data/lib/fog/brightbox/requests/compute/create_api_client.rb +11 -2
- data/lib/fog/brightbox/requests/compute/create_application.rb +11 -2
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +11 -1
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +13 -2
- data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +17 -2
- data/lib/fog/brightbox/requests/compute/create_image.rb +18 -2
- data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +14 -2
- data/lib/fog/brightbox/requests/compute/create_server.rb +17 -2
- data/lib/fog/brightbox/requests/compute/create_server_group.rb +11 -2
- data/lib/fog/brightbox/requests/compute/destroy_api_client.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_application.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_firewall_policy.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_firewall_rule.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_image.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_load_balancer.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/destroy_server_group.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_account.rb +7 -15
- data/lib/fog/brightbox/requests/compute/get_api_client.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_application.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +1 -3
- data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_image.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_interface.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +1 -5
- data/lib/fog/brightbox/requests/compute/get_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_server_group.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_server_type.rb +9 -2
- data/lib/fog/brightbox/requests/compute/get_user.rb +7 -15
- data/lib/fog/brightbox/requests/compute/get_zone.rb +9 -2
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +6 -2
- data/lib/fog/brightbox/requests/compute/list_api_clients.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_applications.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_images.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_server_groups.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_server_types.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_servers.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_users.rb +8 -2
- data/lib/fog/brightbox/requests/compute/list_zones.rb +8 -2
- data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +11 -2
- data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +10 -12
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +11 -2
- data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +11 -2
- data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +11 -2
- data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +9 -10
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +22 -3
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +18 -0
- data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +13 -1
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +9 -2
- data/lib/fog/brightbox/requests/compute/shutdown_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/start_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/stop_server.rb +9 -2
- data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +9 -2
- data/lib/fog/brightbox/requests/compute/update_account.rb +32 -34
- data/lib/fog/brightbox/requests/compute/update_api_client.rb +12 -2
- data/lib/fog/brightbox/requests/compute/update_application.rb +12 -2
- data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +13 -2
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +16 -1
- data/lib/fog/brightbox/requests/compute/update_image.rb +17 -2
- data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +15 -2
- data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +12 -19
- data/lib/fog/brightbox/requests/compute/update_server.rb +12 -2
- data/lib/fog/brightbox/requests/compute/update_server_group.rb +12 -2
- data/lib/fog/brightbox/requests/compute/update_user.rb +15 -2
- data/lib/fog/cloudstack/models/compute/server.rb +3 -1
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/connection.rb +1 -0
- data/lib/fog/google/storage.rb +13 -2
- data/lib/fog/libvirt/models/compute/server.rb +1 -0
- data/lib/fog/libvirt/requests/compute/list_domains.rb +2 -2
- data/lib/fog/openstack.rb +57 -58
- data/lib/fog/openstack/compute.rb +15 -14
- data/lib/fog/openstack/identity.rb +10 -2
- data/lib/fog/openstack/image.rb +1 -1
- data/lib/fog/openstack/models/compute/flavor.rb +5 -1
- data/lib/fog/openstack/models/compute/security_group.rb +1 -1
- data/lib/fog/openstack/models/compute/server.rb +5 -0
- data/lib/fog/openstack/models/identity/users.rb +1 -2
- data/lib/fog/openstack/requests/compute/create_flavor.rb +4 -1
- data/lib/fog/openstack/requests/compute/create_security_group.rb +1 -1
- data/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
- data/lib/fog/openstack/requests/compute/release_address.rb +13 -1
- data/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
- data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
- data/lib/fog/openstack/volume.rb +2 -1
- data/lib/fog/rackspace/models/compute_v2/server.rb +27 -0
- data/lib/fog/rackspace/models/compute_v2/servers.rb +8 -0
- data/lib/fog/rackspace/models/dns/record.rb +14 -1
- data/lib/fog/rackspace/models/storage/file.rb +68 -2
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +3 -0
- data/lib/fog/version.rb +5 -0
- data/lib/fog/vsphere/compute.rb +74 -8
- data/lib/fog/vsphere/models/compute/cluster.rb +31 -0
- data/lib/fog/vsphere/models/compute/clusters.rb +26 -0
- data/lib/fog/vsphere/models/compute/datacenter.rb +35 -0
- data/lib/fog/vsphere/models/compute/datacenters.rb +23 -0
- data/lib/fog/vsphere/models/compute/datastore.rb +24 -0
- data/lib/fog/vsphere/models/compute/datastores.rb +25 -0
- data/lib/fog/vsphere/models/compute/folder.rb +28 -0
- data/lib/fog/vsphere/models/compute/folders.rb +27 -0
- data/lib/fog/vsphere/models/compute/interface.rb +39 -0
- data/lib/fog/vsphere/models/compute/interfaces.rb +33 -0
- data/lib/fog/vsphere/models/compute/network.rb +21 -0
- data/lib/fog/vsphere/models/compute/networks.rb +25 -0
- data/lib/fog/vsphere/models/compute/resource_pool.rb +23 -0
- data/lib/fog/vsphere/models/compute/resource_pools.rb +26 -0
- data/lib/fog/vsphere/models/compute/server.rb +78 -12
- data/lib/fog/vsphere/models/compute/servers.rb +16 -20
- data/lib/fog/vsphere/models/compute/template.rb +13 -0
- data/lib/fog/vsphere/models/compute/templates.rb +23 -0
- data/lib/fog/vsphere/models/compute/volume.rb +45 -0
- data/lib/fog/vsphere/models/compute/volumes.rb +33 -0
- data/lib/fog/vsphere/requests/compute/create_vm.rb +114 -0
- data/lib/fog/vsphere/requests/compute/get_cluster.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_datacenter.rb +29 -0
- data/lib/fog/vsphere/requests/compute/get_datastore.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_folder.rb +73 -0
- data/lib/fog/vsphere/requests/compute/get_network.rb +25 -0
- data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +26 -0
- data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +62 -0
- data/lib/fog/vsphere/requests/compute/list_clusters.rb +37 -0
- data/lib/fog/vsphere/requests/compute/list_datacenters.rb +34 -0
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +40 -0
- data/lib/fog/vsphere/requests/compute/list_folders.rb +45 -0
- data/lib/fog/vsphere/requests/compute/list_networks.rb +38 -0
- data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +39 -0
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -166
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +52 -0
- data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +51 -0
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +6 -8
- data/lib/fog/vsphere/requests/compute/vm_destroy.rb +1 -8
- data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -2
- data/lib/tasks/changelog_task.rb +98 -0
- data/lib/tasks/documentation_task.rb +155 -0
- data/lib/tasks/test_task.rb +46 -0
- data/tests/aws/models/iam/users_tests.rb +16 -2
- data/tests/aws/requests/auto_scaling/notification_configuration_tests.rb +1 -0
- data/tests/aws/requests/auto_scaling/tag_tests.rb +1 -0
- data/tests/aws/requests/compute/instance_tests.rb +2 -0
- data/tests/aws/requests/compute/volume_tests.rb +8 -0
- data/tests/aws/requests/storage/object_tests.rb +18 -1
- data/tests/aws/requests/storage/versioning_tests.rb +70 -0
- data/tests/brightbox/compute_tests.rb +96 -4
- data/tests/brightbox/models/compute/account_tests.rb +15 -0
- data/tests/brightbox/oauth2_tests.rb +103 -0
- data/tests/brightbox/requests/compute/account_tests.rb +9 -2
- data/tests/brightbox/requests/compute/interface_tests.rb +18 -4
- data/tests/dns/models/record_tests.rb +17 -3
- data/tests/openstack/requests/compute/address_tests.rb +22 -19
- data/tests/openstack/requests/compute/flavor_tests.rb +4 -2
- data/tests/openstack/requests/compute/limit_tests.rb +60 -0
- data/tests/openstack/requests/compute/quota_tests.rb +16 -3
- data/tests/openstack/requests/compute/security_group_tests.rb +1 -1
- data/tests/rackspace/models/compute_v2/servers_tests.rb +6 -0
- data/tests/rackspace/models/storage/file_tests.rb +172 -0
- data/tests/rackspace/requests/dns/helper.rb +12 -26
- data/tests/vsphere/compute_tests.rb +3 -3
- data/tests/vsphere/models/compute/server_tests.rb +1 -2
- data/tests/vsphere/requests/compute/list_virtual_machines_tests.rb +5 -13
- data/tests/vsphere/requests/compute/vm_clone_tests.rb +2 -2
- metadata +59 -11
- data/lib/fog/vsphere/requests/compute/datacenters.rb +0 -34
- data/lib/fog/vsphere/requests/compute/find_vm_by_ref.rb +0 -41
- data/lib/fog/vsphere/requests/compute/vm_create.rb +0 -97
- data/tests/vsphere/requests/compute/find_vm_by_ref_tests.rb +0 -26
- data/tests/vsphere/requests/compute/vm_create_tests.rb +0 -20
@@ -2,24 +2,21 @@ SUBDOMAIN_FORMAT = {
|
|
2
2
|
'name' => String,
|
3
3
|
'id' => Integer,
|
4
4
|
'created' => String,
|
5
|
-
'updated' => String
|
5
|
+
'updated' => String,
|
6
|
+
'emailAddress' => String
|
6
7
|
}
|
7
8
|
|
9
|
+
DOMAIN_FORMAT = SUBDOMAIN_FORMAT.merge({
|
10
|
+
'accountId' => Integer
|
11
|
+
})
|
12
|
+
|
8
13
|
LIST_SUBDOMAINS_FORMAT = {
|
9
14
|
'domains' => [SUBDOMAIN_FORMAT],
|
10
15
|
'totalEntries' => Integer
|
11
16
|
}
|
12
17
|
|
13
18
|
LIST_DOMAIN_FORMAT = {
|
14
|
-
'domains' => [
|
15
|
-
{
|
16
|
-
'name' => String,
|
17
|
-
'id' => Integer,
|
18
|
-
'accountId' => Integer,
|
19
|
-
'updated' => String,
|
20
|
-
'created' => String
|
21
|
-
}
|
22
|
-
],
|
19
|
+
'domains' => [DOMAIN_FORMAT],
|
23
20
|
'totalEntries' => Integer,
|
24
21
|
'links' => [
|
25
22
|
{
|
@@ -50,16 +47,10 @@ NAME_SERVERS_FORMAT = [{
|
|
50
47
|
'name' => String
|
51
48
|
}]
|
52
49
|
|
53
|
-
BASIC_DOMAIN_DETAIL_FORMAT = {
|
54
|
-
'
|
55
|
-
'
|
56
|
-
|
57
|
-
'updated' => String,
|
58
|
-
'created' =>String,
|
59
|
-
'ttl' => Integer,
|
60
|
-
'emailAddress' => String,
|
61
|
-
'nameservers' => NAME_SERVERS_FORMAT
|
62
|
-
}
|
50
|
+
BASIC_DOMAIN_DETAIL_FORMAT = DOMAIN_FORMAT.merge({
|
51
|
+
'nameservers' => NAME_SERVERS_FORMAT,
|
52
|
+
'ttl' => Integer
|
53
|
+
})
|
63
54
|
|
64
55
|
LIST_DOMAIN_DETAILS_WITH_RECORDS = BASIC_DOMAIN_DETAIL_FORMAT.merge({
|
65
56
|
'recordsList' => RECORD_LIST_FORMAT
|
@@ -68,12 +59,7 @@ LIST_DOMAIN_DETAILS_WITH_RECORDS = BASIC_DOMAIN_DETAIL_FORMAT.merge({
|
|
68
59
|
LIST_DOMAIN_DETAILS_WITH_RECORDS_AND_SUBDOMAINS_FORMAT = BASIC_DOMAIN_DETAIL_FORMAT.merge({
|
69
60
|
'recordsList' => RECORD_LIST_FORMAT,
|
70
61
|
'subdomains' => {
|
71
|
-
'domains' => [
|
72
|
-
'created' => String,
|
73
|
-
'name' => String,
|
74
|
-
'id' => Integer,
|
75
|
-
'updated' => String
|
76
|
-
}],
|
62
|
+
'domains' => [SUBDOMAIN_FORMAT],
|
77
63
|
'totalEntries' => Integer
|
78
64
|
}
|
79
65
|
})
|
@@ -21,10 +21,10 @@ Shindo.tests('Fog::Compute[:vsphere]', ['vsphere']) do
|
|
21
21
|
|
22
22
|
tests("When converting an incomplete vm object") do
|
23
23
|
test("it should return a Hash") do
|
24
|
-
compute.convert_vm_mob_ref_to_attr_hash
|
24
|
+
compute.send(:convert_vm_mob_ref_to_attr_hash, fake_vm_mob_ref).kind_of? Hash
|
25
25
|
end
|
26
26
|
tests("The converted Hash should") do
|
27
|
-
attr_hash = compute.convert_vm_mob_ref_to_attr_hash
|
27
|
+
attr_hash = compute.send(:convert_vm_mob_ref_to_attr_hash, fake_vm_mob_ref)
|
28
28
|
test("have a name") { attr_hash['name'] == 'fakevm' }
|
29
29
|
test("have a mo_ref") {attr_hash['mo_ref'] == 'vm-123' }
|
30
30
|
test("have an id") { attr_hash['id'] == 'vm-123' }
|
@@ -33,7 +33,7 @@ Shindo.tests('Fog::Compute[:vsphere]', ['vsphere']) do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
tests("When passed a nil object") do
|
36
|
-
attr_hash = compute.convert_vm_mob_ref_to_attr_hash
|
36
|
+
attr_hash = compute.send :convert_vm_mob_ref_to_attr_hash, nil
|
37
37
|
test("it should return a nil object") do
|
38
38
|
attr_hash.nil?
|
39
39
|
end
|
@@ -26,8 +26,7 @@ Shindo.tests('Fog::Compute[:vsphere] | server model', ['vsphere']) do
|
|
26
26
|
:connection_state,
|
27
27
|
:hypervisor,
|
28
28
|
:name,
|
29
|
-
:ipaddress
|
30
|
-
:is_a_template]
|
29
|
+
:ipaddress]
|
31
30
|
tests("The server model should respond to") do
|
32
31
|
attributes.each do |attribute|
|
33
32
|
test("#{attribute}") { server.respond_to? attribute }
|
@@ -1,19 +1,11 @@
|
|
1
1
|
Shindo.tests('Fog::Compute[:vsphere] | list_virtual_machines request', ['vsphere']) do
|
2
2
|
|
3
|
-
key = 'virtual_machines'
|
4
|
-
|
5
3
|
tests("When listing all machines") do
|
6
4
|
|
7
5
|
response = Fog::Compute[:vsphere].list_virtual_machines
|
8
6
|
|
9
7
|
tests("The response data format ...") do
|
10
|
-
test("be a kind of Hash") { response.kind_of?
|
11
|
-
test("have a #{key} key") do
|
12
|
-
response.has_key? key
|
13
|
-
end
|
14
|
-
test("it should be a kind of Array") do
|
15
|
-
response[key].kind_of? Array
|
16
|
-
end
|
8
|
+
test("be a kind of Hash") { response.kind_of? Array }
|
17
9
|
end
|
18
10
|
end
|
19
11
|
|
@@ -26,9 +18,9 @@ Shindo.tests('Fog::Compute[:vsphere] | list_virtual_machines request', ['vsphere
|
|
26
18
|
response = Fog::Compute[:vsphere].list_virtual_machines({'instance_uuid' => uuid})
|
27
19
|
|
28
20
|
tests("The response should") do
|
29
|
-
test("contain one vm") { response
|
30
|
-
test("contain that is an attribute hash") { response[
|
31
|
-
test("find jefftest") { response
|
21
|
+
test("contain one vm") { response.length == 1 }
|
22
|
+
test("contain that is an attribute hash") { response[0].kind_of? Hash }
|
23
|
+
test("find jefftest") { response.first[:name] == 'jefftest' }
|
32
24
|
end
|
33
25
|
end
|
34
26
|
|
@@ -37,7 +29,7 @@ Shindo.tests('Fog::Compute[:vsphere] | list_virtual_machines request', ['vsphere
|
|
37
29
|
response = Fog::Compute[:vsphere].list_virtual_machines({'instance_uuid' => uuid})
|
38
30
|
|
39
31
|
tests("The response should") do
|
40
|
-
test("be empty") { response
|
32
|
+
test("be empty") { response.empty? }
|
41
33
|
end
|
42
34
|
end
|
43
35
|
end
|
@@ -4,7 +4,7 @@ Shindo.tests("Fog::Compute[:vsphere] | vm_clone request", 'vsphere') do
|
|
4
4
|
response = nil
|
5
5
|
response_linked = nil
|
6
6
|
|
7
|
-
template = "/Datacenters/Solutions/vm/
|
7
|
+
template = "/Datacenters/Solutions/vm/rhel64"
|
8
8
|
tests("Standard Clone | The return value should") do
|
9
9
|
response = compute.vm_clone('path' => template, 'name' => 'cloning_vm', 'wait' => 1)
|
10
10
|
test("be a kind of Hash") { response.kind_of? Hash }
|
@@ -13,7 +13,7 @@ Shindo.tests("Fog::Compute[:vsphere] | vm_clone request", 'vsphere') do
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
template = "/Datacenters/Solutions/vm/
|
16
|
+
template = "/Datacenters/Solutions/vm/rhel64"
|
17
17
|
tests("Linked Clone | The return value should") do
|
18
18
|
response = compute.vm_clone('path' => template, 'name' => 'cloning_vm_linked', 'wait' => 1, 'linked_clone' => true)
|
19
19
|
test("be a kind of Hash") { response.kind_of? Hash }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -204,7 +204,7 @@ dependencies:
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
- !ruby/object:Gem::Dependency
|
207
|
-
name:
|
207
|
+
name: yard
|
208
208
|
requirement: !ruby/object:Gem::Requirement
|
209
209
|
none: false
|
210
210
|
requirements:
|
@@ -796,6 +796,7 @@ files:
|
|
796
796
|
- lib/fog/aws/parsers/storage/access_control_list.rb
|
797
797
|
- lib/fog/aws/parsers/storage/complete_multipart_upload.rb
|
798
798
|
- lib/fog/aws/parsers/storage/copy_object.rb
|
799
|
+
- lib/fog/aws/parsers/storage/delete_multiple_objects.rb
|
799
800
|
- lib/fog/aws/parsers/storage/get_bucket.rb
|
800
801
|
- lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb
|
801
802
|
- lib/fog/aws/parsers/storage/get_bucket_location.rb
|
@@ -974,6 +975,7 @@ files:
|
|
974
975
|
- lib/fog/aws/requests/compute/modify_instance_attribute.rb
|
975
976
|
- lib/fog/aws/requests/compute/modify_network_interface_attribute.rb
|
976
977
|
- lib/fog/aws/requests/compute/modify_snapshot_attribute.rb
|
978
|
+
- lib/fog/aws/requests/compute/modify_volume_attribute.rb
|
977
979
|
- lib/fog/aws/requests/compute/monitor_instances.rb
|
978
980
|
- lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb
|
979
981
|
- lib/fog/aws/requests/compute/reboot_instances.rb
|
@@ -1204,6 +1206,7 @@ files:
|
|
1204
1206
|
- lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb
|
1205
1207
|
- lib/fog/aws/requests/storage/delete_bucket_policy.rb
|
1206
1208
|
- lib/fog/aws/requests/storage/delete_bucket_website.rb
|
1209
|
+
- lib/fog/aws/requests/storage/delete_multiple_objects.rb
|
1207
1210
|
- lib/fog/aws/requests/storage/delete_object.rb
|
1208
1211
|
- lib/fog/aws/requests/storage/get_bucket.rb
|
1209
1212
|
- lib/fog/aws/requests/storage/get_bucket_acl.rb
|
@@ -1367,6 +1370,7 @@ files:
|
|
1367
1370
|
- lib/fog/brightbox/models/compute/users.rb
|
1368
1371
|
- lib/fog/brightbox/models/compute/zone.rb
|
1369
1372
|
- lib/fog/brightbox/models/compute/zones.rb
|
1373
|
+
- lib/fog/brightbox/oauth2.rb
|
1370
1374
|
- lib/fog/brightbox/requests/compute/activate_console_server.rb
|
1371
1375
|
- lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb
|
1372
1376
|
- lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb
|
@@ -1425,6 +1429,7 @@ files:
|
|
1425
1429
|
- lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb
|
1426
1430
|
- lib/fog/brightbox/requests/compute/remove_servers_server_group.rb
|
1427
1431
|
- lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb
|
1432
|
+
- lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb
|
1428
1433
|
- lib/fog/brightbox/requests/compute/reset_secret_api_client.rb
|
1429
1434
|
- lib/fog/brightbox/requests/compute/reset_secret_application.rb
|
1430
1435
|
- lib/fog/brightbox/requests/compute/shutdown_server.rb
|
@@ -2368,6 +2373,7 @@ files:
|
|
2368
2373
|
- lib/fog/openstack/requests/compute/get_flavor_details.rb
|
2369
2374
|
- lib/fog/openstack/requests/compute/get_host_details.rb
|
2370
2375
|
- lib/fog/openstack/requests/compute/get_image_details.rb
|
2376
|
+
- lib/fog/openstack/requests/compute/get_limits.rb
|
2371
2377
|
- lib/fog/openstack/requests/compute/get_metadata.rb
|
2372
2378
|
- lib/fog/openstack/requests/compute/get_quota.rb
|
2373
2379
|
- lib/fog/openstack/requests/compute/get_quota_defaults.rb
|
@@ -2405,6 +2411,7 @@ files:
|
|
2405
2411
|
- lib/fog/openstack/requests/compute/release_address.rb
|
2406
2412
|
- lib/fog/openstack/requests/compute/remove_fixed_ip.rb
|
2407
2413
|
- lib/fog/openstack/requests/compute/rescue_server.rb
|
2414
|
+
- lib/fog/openstack/requests/compute/reset_server_state.rb
|
2408
2415
|
- lib/fog/openstack/requests/compute/resize_server.rb
|
2409
2416
|
- lib/fog/openstack/requests/compute/resume_server.rb
|
2410
2417
|
- lib/fog/openstack/requests/compute/revert_resize_server.rb
|
@@ -2441,6 +2448,7 @@ files:
|
|
2441
2448
|
- lib/fog/openstack/requests/identity/list_user_global_roles.rb
|
2442
2449
|
- lib/fog/openstack/requests/identity/list_users.rb
|
2443
2450
|
- lib/fog/openstack/requests/identity/remove_user_from_tenant.rb
|
2451
|
+
- lib/fog/openstack/requests/identity/set_tenant.rb
|
2444
2452
|
- lib/fog/openstack/requests/identity/update_tenant.rb
|
2445
2453
|
- lib/fog/openstack/requests/identity/update_user.rb
|
2446
2454
|
- lib/fog/openstack/requests/identity/validate_token.rb
|
@@ -2923,6 +2931,7 @@ files:
|
|
2923
2931
|
- lib/fog/vcloud/requests/compute/power_reset.rb
|
2924
2932
|
- lib/fog/vcloud/requests/compute/power_shutdown.rb
|
2925
2933
|
- lib/fog/vcloud/requests/compute/undeploy.rb
|
2934
|
+
- lib/fog/version.rb
|
2926
2935
|
- lib/fog/virtual_box.rb
|
2927
2936
|
- lib/fog/virtual_box/compute.rb
|
2928
2937
|
- lib/fog/virtual_box/models/compute/medium.rb
|
@@ -2962,15 +2971,46 @@ files:
|
|
2962
2971
|
- lib/fog/voxel/requests/compute/voxcloud_status.rb
|
2963
2972
|
- lib/fog/vsphere.rb
|
2964
2973
|
- lib/fog/vsphere/compute.rb
|
2974
|
+
- lib/fog/vsphere/models/compute/cluster.rb
|
2975
|
+
- lib/fog/vsphere/models/compute/clusters.rb
|
2976
|
+
- lib/fog/vsphere/models/compute/datacenter.rb
|
2977
|
+
- lib/fog/vsphere/models/compute/datacenters.rb
|
2978
|
+
- lib/fog/vsphere/models/compute/datastore.rb
|
2979
|
+
- lib/fog/vsphere/models/compute/datastores.rb
|
2980
|
+
- lib/fog/vsphere/models/compute/folder.rb
|
2981
|
+
- lib/fog/vsphere/models/compute/folders.rb
|
2982
|
+
- lib/fog/vsphere/models/compute/interface.rb
|
2983
|
+
- lib/fog/vsphere/models/compute/interfaces.rb
|
2984
|
+
- lib/fog/vsphere/models/compute/network.rb
|
2985
|
+
- lib/fog/vsphere/models/compute/networks.rb
|
2986
|
+
- lib/fog/vsphere/models/compute/resource_pool.rb
|
2987
|
+
- lib/fog/vsphere/models/compute/resource_pools.rb
|
2965
2988
|
- lib/fog/vsphere/models/compute/server.rb
|
2966
2989
|
- lib/fog/vsphere/models/compute/servers.rb
|
2990
|
+
- lib/fog/vsphere/models/compute/template.rb
|
2991
|
+
- lib/fog/vsphere/models/compute/templates.rb
|
2992
|
+
- lib/fog/vsphere/models/compute/volume.rb
|
2993
|
+
- lib/fog/vsphere/models/compute/volumes.rb
|
2994
|
+
- lib/fog/vsphere/requests/compute/create_vm.rb
|
2967
2995
|
- lib/fog/vsphere/requests/compute/current_time.rb
|
2968
|
-
- lib/fog/vsphere/requests/compute/
|
2969
|
-
- lib/fog/vsphere/requests/compute/
|
2996
|
+
- lib/fog/vsphere/requests/compute/get_cluster.rb
|
2997
|
+
- lib/fog/vsphere/requests/compute/get_datacenter.rb
|
2998
|
+
- lib/fog/vsphere/requests/compute/get_datastore.rb
|
2999
|
+
- lib/fog/vsphere/requests/compute/get_folder.rb
|
3000
|
+
- lib/fog/vsphere/requests/compute/get_network.rb
|
3001
|
+
- lib/fog/vsphere/requests/compute/get_resource_pool.rb
|
3002
|
+
- lib/fog/vsphere/requests/compute/get_virtual_machine.rb
|
3003
|
+
- lib/fog/vsphere/requests/compute/list_clusters.rb
|
3004
|
+
- lib/fog/vsphere/requests/compute/list_datacenters.rb
|
3005
|
+
- lib/fog/vsphere/requests/compute/list_datastores.rb
|
3006
|
+
- lib/fog/vsphere/requests/compute/list_folders.rb
|
3007
|
+
- lib/fog/vsphere/requests/compute/list_networks.rb
|
3008
|
+
- lib/fog/vsphere/requests/compute/list_resource_pools.rb
|
2970
3009
|
- lib/fog/vsphere/requests/compute/list_virtual_machines.rb
|
3010
|
+
- lib/fog/vsphere/requests/compute/list_vm_interfaces.rb
|
3011
|
+
- lib/fog/vsphere/requests/compute/list_vm_volumes.rb
|
2971
3012
|
- lib/fog/vsphere/requests/compute/vm_clone.rb
|
2972
3013
|
- lib/fog/vsphere/requests/compute/vm_config_vnc.rb
|
2973
|
-
- lib/fog/vsphere/requests/compute/vm_create.rb
|
2974
3014
|
- lib/fog/vsphere/requests/compute/vm_destroy.rb
|
2975
3015
|
- lib/fog/vsphere/requests/compute/vm_migrate.rb
|
2976
3016
|
- lib/fog/vsphere/requests/compute/vm_power_off.rb
|
@@ -3064,6 +3104,9 @@ files:
|
|
3064
3104
|
- lib/fog/zerigo/requests/dns/list_zones.rb
|
3065
3105
|
- lib/fog/zerigo/requests/dns/update_host.rb
|
3066
3106
|
- lib/fog/zerigo/requests/dns/update_zone.rb
|
3107
|
+
- lib/tasks/changelog_task.rb
|
3108
|
+
- lib/tasks/documentation_task.rb
|
3109
|
+
- lib/tasks/test_task.rb
|
3067
3110
|
- tests/atmos/models/storage/file_update_tests.rb
|
3068
3111
|
- tests/atmos/models/storage/nested_directories_tests.rb
|
3069
3112
|
- tests/aws/credentials_tests.rb
|
@@ -3235,6 +3278,8 @@ files:
|
|
3235
3278
|
- tests/bluebox/requests/compute/template_tests.rb
|
3236
3279
|
- tests/bluebox/requests/dns/dns_tests.rb
|
3237
3280
|
- tests/brightbox/compute_tests.rb
|
3281
|
+
- tests/brightbox/models/compute/account_tests.rb
|
3282
|
+
- tests/brightbox/oauth2_tests.rb
|
3238
3283
|
- tests/brightbox/requests/compute/account_tests.rb
|
3239
3284
|
- tests/brightbox/requests/compute/api_client_tests.rb
|
3240
3285
|
- tests/brightbox/requests/compute/application_test.rb
|
@@ -3396,6 +3441,7 @@ files:
|
|
3396
3441
|
- tests/openstack/requests/compute/helper.rb
|
3397
3442
|
- tests/openstack/requests/compute/image_tests.rb
|
3398
3443
|
- tests/openstack/requests/compute/keypair_tests.rb
|
3444
|
+
- tests/openstack/requests/compute/limit_tests.rb
|
3399
3445
|
- tests/openstack/requests/compute/quota_tests.rb
|
3400
3446
|
- tests/openstack/requests/compute/security_group_tests.rb
|
3401
3447
|
- tests/openstack/requests/compute/server_tests.rb
|
@@ -3455,6 +3501,7 @@ files:
|
|
3455
3501
|
- tests/rackspace/models/load_balancers/nodes_tests.rb
|
3456
3502
|
- tests/rackspace/models/load_balancers/virtual_ip_tests.rb
|
3457
3503
|
- tests/rackspace/models/load_balancers/virtual_ips_tests.rb
|
3504
|
+
- tests/rackspace/models/storage/file_tests.rb
|
3458
3505
|
- tests/rackspace/requests/block_storage/snapshot_tests.rb
|
3459
3506
|
- tests/rackspace/requests/block_storage/volume_tests.rb
|
3460
3507
|
- tests/rackspace/requests/block_storage/volume_type_tests.rb
|
@@ -3544,11 +3591,9 @@ files:
|
|
3544
3591
|
- tests/vsphere/models/compute/server_tests.rb
|
3545
3592
|
- tests/vsphere/models/compute/servers_tests.rb
|
3546
3593
|
- tests/vsphere/requests/compute/current_time_tests.rb
|
3547
|
-
- tests/vsphere/requests/compute/find_vm_by_ref_tests.rb
|
3548
3594
|
- tests/vsphere/requests/compute/list_virtual_machines_tests.rb
|
3549
3595
|
- tests/vsphere/requests/compute/vm_clone_tests.rb
|
3550
3596
|
- tests/vsphere/requests/compute/vm_config_vnc_tests.rb
|
3551
|
-
- tests/vsphere/requests/compute/vm_create_tests.rb
|
3552
3597
|
- tests/vsphere/requests/compute/vm_destroy_tests.rb
|
3553
3598
|
- tests/vsphere/requests/compute/vm_migrate_tests.rb
|
3554
3599
|
- tests/vsphere/requests/compute/vm_power_off_tests.rb
|
@@ -3603,7 +3648,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
3603
3648
|
version: '0'
|
3604
3649
|
segments:
|
3605
3650
|
- 0
|
3606
|
-
hash: -
|
3651
|
+
hash: -4071252991676114740
|
3607
3652
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
3608
3653
|
none: false
|
3609
3654
|
requirements:
|
@@ -3788,6 +3833,8 @@ test_files:
|
|
3788
3833
|
- tests/bluebox/requests/compute/template_tests.rb
|
3789
3834
|
- tests/bluebox/requests/dns/dns_tests.rb
|
3790
3835
|
- tests/brightbox/compute_tests.rb
|
3836
|
+
- tests/brightbox/models/compute/account_tests.rb
|
3837
|
+
- tests/brightbox/oauth2_tests.rb
|
3791
3838
|
- tests/brightbox/requests/compute/account_tests.rb
|
3792
3839
|
- tests/brightbox/requests/compute/api_client_tests.rb
|
3793
3840
|
- tests/brightbox/requests/compute/application_test.rb
|
@@ -3949,6 +3996,7 @@ test_files:
|
|
3949
3996
|
- tests/openstack/requests/compute/helper.rb
|
3950
3997
|
- tests/openstack/requests/compute/image_tests.rb
|
3951
3998
|
- tests/openstack/requests/compute/keypair_tests.rb
|
3999
|
+
- tests/openstack/requests/compute/limit_tests.rb
|
3952
4000
|
- tests/openstack/requests/compute/quota_tests.rb
|
3953
4001
|
- tests/openstack/requests/compute/security_group_tests.rb
|
3954
4002
|
- tests/openstack/requests/compute/server_tests.rb
|
@@ -4008,6 +4056,7 @@ test_files:
|
|
4008
4056
|
- tests/rackspace/models/load_balancers/nodes_tests.rb
|
4009
4057
|
- tests/rackspace/models/load_balancers/virtual_ip_tests.rb
|
4010
4058
|
- tests/rackspace/models/load_balancers/virtual_ips_tests.rb
|
4059
|
+
- tests/rackspace/models/storage/file_tests.rb
|
4011
4060
|
- tests/rackspace/requests/block_storage/snapshot_tests.rb
|
4012
4061
|
- tests/rackspace/requests/block_storage/volume_tests.rb
|
4013
4062
|
- tests/rackspace/requests/block_storage/volume_type_tests.rb
|
@@ -4097,11 +4146,9 @@ test_files:
|
|
4097
4146
|
- tests/vsphere/models/compute/server_tests.rb
|
4098
4147
|
- tests/vsphere/models/compute/servers_tests.rb
|
4099
4148
|
- tests/vsphere/requests/compute/current_time_tests.rb
|
4100
|
-
- tests/vsphere/requests/compute/find_vm_by_ref_tests.rb
|
4101
4149
|
- tests/vsphere/requests/compute/list_virtual_machines_tests.rb
|
4102
4150
|
- tests/vsphere/requests/compute/vm_clone_tests.rb
|
4103
4151
|
- tests/vsphere/requests/compute/vm_config_vnc_tests.rb
|
4104
|
-
- tests/vsphere/requests/compute/vm_create_tests.rb
|
4105
4152
|
- tests/vsphere/requests/compute/vm_destroy_tests.rb
|
4106
4153
|
- tests/vsphere/requests/compute/vm_migrate_tests.rb
|
4107
4154
|
- tests/vsphere/requests/compute/vm_power_off_tests.rb
|
@@ -4141,3 +4188,4 @@ test_files:
|
|
4141
4188
|
- tests/xenserver/requests/compute/set_attribute_tests.rb
|
4142
4189
|
- tests/xenserver/xenserver_tests.rb
|
4143
4190
|
- tests/zerigo/requests/dns/dns_tests.rb
|
4191
|
+
has_rdoc:
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Vsphere
|
4
|
-
class Real
|
5
|
-
def datacenters
|
6
|
-
@datacenters ||= datacenters_reload
|
7
|
-
# Hide the values which are the RbVmomi instances
|
8
|
-
@datacenters.keys
|
9
|
-
end
|
10
|
-
|
11
|
-
private
|
12
|
-
|
13
|
-
def datacenters_reload
|
14
|
-
@rootfolder ||= @connection.rootFolder
|
15
|
-
inventory = @rootfolder.inventory(:Datacenter => [ 'name' ])[@rootfolder]
|
16
|
-
# Convert the inventory into a Hash of the form: We remove the
|
17
|
-
# property selectors. { "<dc_name>" => #<RbVmomi::VIM::Datacenter> }
|
18
|
-
# The Datacenter instance itself is at index 0 and the properties we
|
19
|
-
# collected are at index 1.
|
20
|
-
inventory.inject({}) do |memo, (name,dc_ary)|
|
21
|
-
memo[name] = dc_ary[0]
|
22
|
-
memo
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
class Mock
|
28
|
-
def datacenters
|
29
|
-
[ "Solutions", "Solutions2", "Solutions3" ]
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Vsphere
|
4
|
-
|
5
|
-
module Shared
|
6
|
-
|
7
|
-
# REVISIT: This is a naive implementation and not very efficient since
|
8
|
-
# we find ALL VM's and then iterate over them looking for the managed object
|
9
|
-
# reference id... There should be an easier way to obtain a reference to a
|
10
|
-
# VM using only the name or the _ref. This request is primarily intended to
|
11
|
-
# reload the attributes of a cloning VM which does not yet have an instance_uuid
|
12
|
-
def find_vm_by_ref(options = {})
|
13
|
-
raise ArgumentError, "Must pass a vm_ref option" unless options['vm_ref']
|
14
|
-
|
15
|
-
# This is the inefficient call
|
16
|
-
all_vm_attributes = list_virtual_machines['virtual_machines']
|
17
|
-
# Find the VM attributes of the reference
|
18
|
-
if vm_attributes = all_vm_attributes.find { |vm| vm['mo_ref'] == options['vm_ref'] }
|
19
|
-
response = { 'virtual_machine' => vm_attributes }
|
20
|
-
else
|
21
|
-
raise Fog::Compute::Vsphere::NotFound, "VirtualMachine with Managed Object Reference #{options['vm_ref']} could not be found."
|
22
|
-
end
|
23
|
-
response
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
# The Real and Mock classes share the same method
|
29
|
-
# because list_virtual_machines will be properly mocked for us
|
30
|
-
|
31
|
-
class Real
|
32
|
-
include Shared
|
33
|
-
end
|
34
|
-
|
35
|
-
class Mock
|
36
|
-
include Shared
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|