fog-vsphere 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +8 -0
  3. data/.rubocop_todo.yml +217 -0
  4. data/.travis.yml +1 -0
  5. data/CHANGELOG.md +4 -0
  6. data/Rakefile +10 -1
  7. data/fog-vsphere.gemspec +2 -2
  8. data/lib/fog/bin/vsphere.rb +1 -1
  9. data/lib/fog/vsphere/compute.rb +320 -301
  10. data/lib/fog/vsphere/models/compute/cdrom.rb +10 -10
  11. data/lib/fog/vsphere/models/compute/cdroms.rb +2 -2
  12. data/lib/fog/vsphere/models/compute/cluster.rb +20 -20
  13. data/lib/fog/vsphere/models/compute/clusters.rb +1 -1
  14. data/lib/fog/vsphere/models/compute/customfields.rb +4 -4
  15. data/lib/fog/vsphere/models/compute/customvalues.rb +8 -8
  16. data/lib/fog/vsphere/models/compute/datacenter.rb +16 -16
  17. data/lib/fog/vsphere/models/compute/datastores.rb +1 -1
  18. data/lib/fog/vsphere/models/compute/folder.rb +2 -2
  19. data/lib/fog/vsphere/models/compute/folders.rb +2 -2
  20. data/lib/fog/vsphere/models/compute/hosts.rb +4 -4
  21. data/lib/fog/vsphere/models/compute/interface.rb +12 -12
  22. data/lib/fog/vsphere/models/compute/interfaces.rb +14 -16
  23. data/lib/fog/vsphere/models/compute/interfacetype.rb +2 -2
  24. data/lib/fog/vsphere/models/compute/interfacetypes.rb +6 -8
  25. data/lib/fog/vsphere/models/compute/networks.rb +1 -1
  26. data/lib/fog/vsphere/models/compute/resource_pools.rb +1 -1
  27. data/lib/fog/vsphere/models/compute/rule.rb +8 -9
  28. data/lib/fog/vsphere/models/compute/rules.rb +9 -10
  29. data/lib/fog/vsphere/models/compute/scsicontroller.rb +1 -1
  30. data/lib/fog/vsphere/models/compute/server.rb +68 -80
  31. data/lib/fog/vsphere/models/compute/servers.rb +12 -13
  32. data/lib/fog/vsphere/models/compute/servertype.rb +6 -6
  33. data/lib/fog/vsphere/models/compute/servertypes.rb +2 -2
  34. data/lib/fog/vsphere/models/compute/snapshot.rb +5 -6
  35. data/lib/fog/vsphere/models/compute/snapshots.rb +1 -1
  36. data/lib/fog/vsphere/models/compute/ticket.rb +0 -1
  37. data/lib/fog/vsphere/models/compute/volume.rb +12 -14
  38. data/lib/fog/vsphere/models/compute/volumes.rb +10 -10
  39. data/lib/fog/vsphere/requests/compute/cloudinit_to_customspec.rb +8 -8
  40. data/lib/fog/vsphere/requests/compute/create_folder.rb +5 -5
  41. data/lib/fog/vsphere/requests/compute/create_group.rb +16 -16
  42. data/lib/fog/vsphere/requests/compute/create_rule.rb +13 -13
  43. data/lib/fog/vsphere/requests/compute/create_vm.rb +117 -119
  44. data/lib/fog/vsphere/requests/compute/destroy_group.rb +8 -8
  45. data/lib/fog/vsphere/requests/compute/destroy_rule.rb +8 -8
  46. data/lib/fog/vsphere/requests/compute/folder_destroy.rb +3 -3
  47. data/lib/fog/vsphere/requests/compute/get_cluster.rb +2 -2
  48. data/lib/fog/vsphere/requests/compute/get_compute_resource.rb +16 -16
  49. data/lib/fog/vsphere/requests/compute/get_datacenter.rb +7 -7
  50. data/lib/fog/vsphere/requests/compute/get_datastore.rb +1 -2
  51. data/lib/fog/vsphere/requests/compute/get_folder.rb +24 -24
  52. data/lib/fog/vsphere/requests/compute/get_host.rb +2 -3
  53. data/lib/fog/vsphere/requests/compute/get_interface_type.rb +6 -6
  54. data/lib/fog/vsphere/requests/compute/get_network.rb +7 -10
  55. data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +1 -2
  56. data/lib/fog/vsphere/requests/compute/get_server_type.rb +14 -14
  57. data/lib/fog/vsphere/requests/compute/get_storage_pod.rb +2 -2
  58. data/lib/fog/vsphere/requests/compute/get_template.rb +1 -2
  59. data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +26 -26
  60. data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +6 -7
  61. data/lib/fog/vsphere/requests/compute/host_finish_maintenance.rb +1 -1
  62. data/lib/fog/vsphere/requests/compute/host_shutdown.rb +1 -1
  63. data/lib/fog/vsphere/requests/compute/host_start_maintenance.rb +1 -1
  64. data/lib/fog/vsphere/requests/compute/list_child_snapshots.rb +37 -39
  65. data/lib/fog/vsphere/requests/compute/list_clusters.rb +8 -9
  66. data/lib/fog/vsphere/requests/compute/list_compute_resources.rb +57 -59
  67. data/lib/fog/vsphere/requests/compute/list_customfields.rb +5 -6
  68. data/lib/fog/vsphere/requests/compute/list_datacenters.rb +17 -17
  69. data/lib/fog/vsphere/requests/compute/list_datastores.rb +16 -15
  70. data/lib/fog/vsphere/requests/compute/list_folders.rb +4 -4
  71. data/lib/fog/vsphere/requests/compute/list_groups.rb +5 -5
  72. data/lib/fog/vsphere/requests/compute/list_hosts.rb +30 -14
  73. data/lib/fog/vsphere/requests/compute/list_interface_types.rb +7 -7
  74. data/lib/fog/vsphere/requests/compute/list_networks.rb +12 -16
  75. data/lib/fog/vsphere/requests/compute/list_processes.rb +14 -14
  76. data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +13 -14
  77. data/lib/fog/vsphere/requests/compute/list_rules.rb +4 -4
  78. data/lib/fog/vsphere/requests/compute/list_server_types.rb +24 -26
  79. data/lib/fog/vsphere/requests/compute/list_storage_pods.rb +8 -8
  80. data/lib/fog/vsphere/requests/compute/list_templates.rb +4 -5
  81. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +15 -15
  82. data/lib/fog/vsphere/requests/compute/list_vm_cdroms.rb +16 -12
  83. data/lib/fog/vsphere/requests/compute/list_vm_customvalues.rb +3 -4
  84. data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +54 -56
  85. data/lib/fog/vsphere/requests/compute/list_vm_scsi_controllers.rb +7 -7
  86. data/lib/fog/vsphere/requests/compute/list_vm_snapshots.rb +36 -36
  87. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +43 -36
  88. data/lib/fog/vsphere/requests/compute/modify_vm_cdrom.rb +4 -4
  89. data/lib/fog/vsphere/requests/compute/modify_vm_controller.rb +2 -2
  90. data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +26 -19
  91. data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +7 -7
  92. data/lib/fog/vsphere/requests/compute/revert_to_snapshot.rb +2 -2
  93. data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +2 -2
  94. data/lib/fog/vsphere/requests/compute/update_vm.rb +111 -0
  95. data/lib/fog/vsphere/requests/compute/upload_iso.rb +10 -10
  96. data/lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb +3 -3
  97. data/lib/fog/vsphere/requests/compute/vm_clone.rb +245 -247
  98. data/lib/fog/vsphere/requests/compute/vm_config_vnc.rb +15 -15
  99. data/lib/fog/vsphere/requests/compute/vm_destroy.rb +2 -2
  100. data/lib/fog/vsphere/requests/compute/vm_execute.rb +16 -16
  101. data/lib/fog/vsphere/requests/compute/vm_migrate.rb +11 -11
  102. data/lib/fog/vsphere/requests/compute/vm_power_off.rb +8 -8
  103. data/lib/fog/vsphere/requests/compute/vm_power_on.rb +2 -2
  104. data/lib/fog/vsphere/requests/compute/vm_reboot.rb +5 -5
  105. data/lib/fog/vsphere/requests/compute/vm_reconfig_cdrom.rb +11 -11
  106. data/lib/fog/vsphere/requests/compute/vm_reconfig_cpus.rb +8 -8
  107. data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +6 -6
  108. data/lib/fog/vsphere/requests/compute/vm_reconfig_memory.rb +8 -8
  109. data/lib/fog/vsphere/requests/compute/vm_reconfig_volumes.rb +14 -16
  110. data/lib/fog/vsphere/requests/compute/vm_relocate.rb +8 -8
  111. data/lib/fog/vsphere/requests/compute/vm_remove_snapshot.rb +2 -2
  112. data/lib/fog/vsphere/requests/compute/vm_rename.rb +5 -5
  113. data/lib/fog/vsphere/requests/compute/vm_revert_snapshot.rb +1 -1
  114. data/lib/fog/vsphere/requests/compute/vm_take_snapshot.rb +8 -8
  115. data/lib/fog/vsphere/version.rb +1 -1
  116. data/tests/compute_tests.rb +16 -17
  117. data/tests/helpers/mock_helper.rb +3 -3
  118. data/tests/models/compute/cluster_tests.rb +4 -5
  119. data/tests/models/compute/hosts_tests.rb +2 -4
  120. data/tests/models/compute/rules_tests.rb +10 -16
  121. data/tests/models/compute/server_tests.rb +30 -31
  122. data/tests/models/compute/servers_tests.rb +2 -4
  123. data/tests/models/compute/ticket_tests.rb +4 -6
  124. data/tests/models/compute/tickets_tests.rb +1 -3
  125. data/tests/requests/compute/current_time_tests.rb +2 -4
  126. data/tests/requests/compute/folder_destroy_tests.rb +5 -7
  127. data/tests/requests/compute/get_network_tests.rb +20 -23
  128. data/tests/requests/compute/list_child_snapshots_tests.rb +1 -2
  129. data/tests/requests/compute/list_clusters_tests.rb +5 -6
  130. data/tests/requests/compute/list_datastores_tests.rb +6 -7
  131. data/tests/requests/compute/list_hosts_tests.rb +3 -4
  132. data/tests/requests/compute/list_networks_tests.rb +6 -7
  133. data/tests/requests/compute/list_storage_pods_test.rb +3 -4
  134. data/tests/requests/compute/list_virtual_machines_tests.rb +16 -20
  135. data/tests/requests/compute/list_vm_cdroms_tests.rb +1 -2
  136. data/tests/requests/compute/list_vm_snapshots_tests.rb +1 -2
  137. data/tests/requests/compute/modify_vm_cdrom_tests.rb +3 -4
  138. data/tests/requests/compute/revert_to_snapshot_tests.rb +2 -4
  139. data/tests/requests/compute/set_vm_customvalue_tests.rb +0 -2
  140. data/tests/requests/compute/update_vm_tests.rb +13 -0
  141. data/tests/requests/compute/vm_clone_tests.rb +20 -20
  142. data/tests/requests/compute/vm_config_vnc_tests.rb +3 -4
  143. data/tests/requests/compute/vm_destroy_tests.rb +1 -4
  144. data/tests/requests/compute/vm_migrate_tests.rb +1 -2
  145. data/tests/requests/compute/vm_power_off_tests.rb +2 -4
  146. data/tests/requests/compute/vm_power_on_tests.rb +1 -3
  147. data/tests/requests/compute/vm_reboot_tests.rb +2 -4
  148. data/tests/requests/compute/vm_reconfig_cdrom_tests.rb +2 -3
  149. data/tests/requests/compute/vm_reconfig_cpus_tests.rb +1 -3
  150. data/tests/requests/compute/vm_reconfig_hardware_tests.rb +2 -4
  151. data/tests/requests/compute/vm_reconfig_memory_tests.rb +1 -3
  152. data/tests/requests/compute/vm_take_snapshot_tests.rb +1 -3
  153. metadata +9 -4
@@ -1,19 +1,18 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_config_vnc request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
6
- vnc_spec = {:port => '5900', :password => 'ssaaa', :enabled => 'true'}
5
+ vnc_spec = { port: '5900', password: 'ssaaa', enabled: 'true' }
7
6
 
8
7
  tests('The response should') do
9
8
  response = compute.vm_config_vnc('instance_uuid' => reconfig_target).merge(vnc_spec)
10
- test('be a kind of Hash') { response.kind_of? Hash }
9
+ test('be a kind of Hash') { response.is_a? Hash }
11
10
  test('should have a task_state key') { response.key? 'task_state' }
12
11
  end
13
12
 
14
13
  tests('VNC attrs response should') do
15
14
  response = compute.vm_get_vnc(reconfig_target)
16
- test('be a kind of Hash') { response.kind_of? Hash }
15
+ test('be a kind of Hash') { response.is_a? Hash }
17
16
  test('should have a port key') { response.key? :port }
18
17
  end
19
18
  end
@@ -1,17 +1,14 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_destroy request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  booted_vm = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
6
5
 
7
6
  tests('The response should') do
8
7
  response = compute.vm_destroy('instance_uuid' => booted_vm)
9
- test('be a kind of Hash') { response.kind_of? Hash }
8
+ test('be a kind of Hash') { response.is_a? Hash }
10
9
  test('should have a task_state key') { response.key? 'task_state' }
11
-
12
10
  end
13
11
  tests('The expected options') do
14
12
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_destroy }
15
13
  end
16
-
17
14
  end
@@ -1,12 +1,11 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_migrate request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  powered_on_vm = '50137835-88a1-436e-768e-9b2677076e67'
6
5
 
7
6
  tests('The response should') do
8
7
  response = compute.vm_migrate('instance_uuid' => powered_on_vm)
9
- test('be a kind of Hash') { response.kind_of? Hash }
8
+ test('be a kind of Hash') { response.is_a? Hash }
10
9
  test('should have a task_state key') { response.key? 'task_state' }
11
10
  end
12
11
 
@@ -1,18 +1,17 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_power_off request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  powered_on_vm = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
6
5
 
7
6
  tests('The response should') do
8
7
  response = compute.vm_power_off('instance_uuid' => powered_on_vm)
9
- test('be a kind of Hash') { response.kind_of? Hash }
8
+ test('be a kind of Hash') { response.is_a? Hash }
10
9
  test('should have a task_state key') { response.key? 'task_state' }
11
10
  test('should have a power_off_type key') { response.key? 'power_off_type' }
12
11
  end
13
12
 
14
13
  # When forcing the shutdown, we expect the result to be
15
- { true => 'cut_power', false => 'shutdown_guest'}.each do |force, expected|
14
+ { true => 'cut_power', false => 'shutdown_guest' }.each do |force, expected|
16
15
  tests("When 'force' => #{force}") do
17
16
  response = compute.vm_power_off('instance_uuid' => powered_on_vm, 'force' => force)
18
17
  test('should retur power_off_type of #{expected}') { response['power_off_type'] == expected }
@@ -22,5 +21,4 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_power_off request', ['vsphere']) do
22
21
  tests('The expected options') do
23
22
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_power_off }
24
23
  end
25
-
26
24
  end
@@ -1,17 +1,15 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_power_on request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  powered_off_vm = nil
6
5
 
7
6
  tests('The response should') do
8
7
  response = compute.vm_power_on('instance_uuid' => powered_off_vm)
9
- test('be a kind of Hash') { response.kind_of? Hash }
8
+ test('be a kind of Hash') { response.is_a? Hash }
10
9
  test('should have a task_state key') { response.key? 'task_state' }
11
10
  end
12
11
 
13
12
  tests('The expected options') do
14
13
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_power_on }
15
14
  end
16
-
17
15
  end
@@ -1,18 +1,17 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reboot request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  powered_on_vm = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
6
5
 
7
6
  tests('The response should') do
8
7
  response = compute.vm_reboot('instance_uuid' => powered_on_vm)
9
- test('be a kind of Hash') { response.kind_of? Hash }
8
+ test('be a kind of Hash') { response.is_a? Hash }
10
9
  test('should have a task_state key') { response.key? 'task_state' }
11
10
  test('should have a reboot_type key') { response.key? 'reboot_type' }
12
11
  end
13
12
 
14
13
  # When forcing the shutdown, we expect the result to be
15
- { true => 'reset_power', false => 'reboot_guest'}.each do |force, expected|
14
+ { true => 'reset_power', false => 'reboot_guest' }.each do |force, expected|
16
15
  tests("When force => #{force}") do
17
16
  response = compute.vm_reboot('instance_uuid' => powered_on_vm, 'force' => force)
18
17
  test("should return reboot_type of #{expected}") { response['reboot_type'] == expected }
@@ -22,5 +21,4 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reboot request', ['vsphere']) do
22
21
  tests('The expected options') do
23
22
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reboot }
24
23
  end
25
-
26
24
  end
@@ -1,15 +1,14 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cdrom request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  reconfig_target = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
6
5
  reconfig_spec = {
7
- 'start_connected' => false,
6
+ 'start_connected' => false
8
7
  }
9
8
 
10
9
  tests('the response should') do
11
10
  response = compute.vm_reconfig_cdrom('instance_uuid' => reconfig_target, 'hardware_spec' => reconfig_spec)
12
- test('be a kind of Hash') { response.kind_of? Hash }
11
+ test('be a kind of Hash') { response.is_a? Hash }
13
12
  test('should have a task_state key') { response.key? 'task_state' }
14
13
  end
15
14
  end
@@ -1,5 +1,4 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cpus request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
@@ -7,7 +6,7 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cpus request', ['vsphere']) d
7
6
 
8
7
  tests('The response should') do
9
8
  response = compute.vm_reconfig_cpus('instance_uuid' => reconfig_target, 'cpus' => reconfig_spec)
10
- test('be a kind of Hash') { response.kind_of? Hash }
9
+ test('be a kind of Hash') { response.is_a? Hash }
11
10
  test('should have a task_state key') { response.key? 'task_state' }
12
11
  end
13
12
 
@@ -15,5 +14,4 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cpus request', ['vsphere']) d
15
14
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reconfig_cpus('cpus' => reconfig_spec) }
16
15
  raises(ArgumentError, 'raises ArgumentError when cpus option is missing') { compute.vm_reconfig_cpus('instance_uuid' => reconfig_target) }
17
16
  end
18
-
19
17
  end
@@ -1,13 +1,12 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_hardware request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
6
- reconfig_spec = {'guestId' => 'rhel5_64Guest'}
5
+ reconfig_spec = { 'guestId' => 'rhel5_64Guest' }
7
6
 
8
7
  tests('The response should') do
9
8
  response = compute.vm_reconfig_hardware('instance_uuid' => reconfig_target, 'hardware_spec' => reconfig_spec)
10
- test('be a kind of Hash') { response.kind_of? Hash }
9
+ test('be a kind of Hash') { response.is_a? Hash }
11
10
  test('should have a task_state key') { response.key? 'task_state' }
12
11
  end
13
12
 
@@ -15,5 +14,4 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_hardware request', ['vsphere'
15
14
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reconfig_hardware('hardware_spec' => reconfig_spec) }
16
15
  raises(ArgumentError, 'raises ArgumentError when hardware_spec option is missing') { compute.vm_reconfig_hardware('instance_uuid' => reconfig_target) }
17
16
  end
18
-
19
17
  end
@@ -1,5 +1,4 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_memory request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
@@ -7,7 +6,7 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_memory request', ['vsphere'])
7
6
 
8
7
  tests('The response should') do
9
8
  response = compute.vm_reconfig_memory('instance_uuid' => reconfig_target, 'memory' => reconfig_spec)
10
- test('be a kind of Hash') { response.kind_of? Hash }
9
+ test('be a kind of Hash') { response.is_a? Hash }
11
10
  test('should have a task_state key') { response.key? 'task_state' }
12
11
  end
13
12
 
@@ -15,5 +14,4 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_memory request', ['vsphere'])
15
14
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reconfig_memory('memory' => reconfig_spec) }
16
15
  raises(ArgumentError, 'raises ArgumentError when memory option is missing') { compute.vm_reconfig_memory('instance_uuid' => reconfig_target) }
17
16
  end
18
-
19
17
  end
@@ -1,12 +1,11 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_take_snapshot request', ['vsphere']) do
2
-
3
2
  compute = Fog::Compute[:vsphere]
4
3
 
5
4
  powered_off_vm = nil
6
5
 
7
6
  tests('The response should') do
8
7
  response = compute.vm_take_snapshot('instance_uuid' => powered_off_vm, 'name' => 'foobar')
9
- test('be a kind of Hash') { response.kind_of? Hash }
8
+ test('be a kind of Hash') { response.is_a? Hash }
10
9
  test('should have a task_state key') { response.key? 'task_state' }
11
10
  test('should have a was_cancelled key') { response.key? 'was_cancelled' }
12
11
  end
@@ -15,5 +14,4 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_take_snapshot request', ['vsphere']) d
15
14
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_take_snapshot('name' => 'foobar') }
16
15
  raises(ArgumentError, 'raises ArgumentError when name option is missing') { compute.vm_take_snapshot('instance_uuid' => powered_off_vm) }
17
16
  end
18
-
19
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.R. Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.34'
103
+ version: 0.50.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.34'
110
+ version: 0.50.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: shindo
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -131,6 +131,8 @@ extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
+ - ".rubocop.yml"
135
+ - ".rubocop_todo.yml"
134
136
  - ".travis.yml"
135
137
  - CHANGELOG.md
136
138
  - CONTRIBUTING.md
@@ -241,6 +243,7 @@ files:
241
243
  - lib/fog/vsphere/requests/compute/modify_vm_volume.rb
242
244
  - lib/fog/vsphere/requests/compute/revert_to_snapshot.rb
243
245
  - lib/fog/vsphere/requests/compute/set_vm_customvalue.rb
246
+ - lib/fog/vsphere/requests/compute/update_vm.rb
244
247
  - lib/fog/vsphere/requests/compute/upload_iso.rb
245
248
  - lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
246
249
  - lib/fog/vsphere/requests/compute/vm_clone.rb
@@ -291,6 +294,7 @@ files:
291
294
  - tests/requests/compute/modify_vm_cdrom_tests.rb
292
295
  - tests/requests/compute/revert_to_snapshot_tests.rb
293
296
  - tests/requests/compute/set_vm_customvalue_tests.rb
297
+ - tests/requests/compute/update_vm_tests.rb
294
298
  - tests/requests/compute/vm_clone_tests.rb
295
299
  - tests/requests/compute/vm_config_vnc_tests.rb
296
300
  - tests/requests/compute/vm_destroy_tests.rb
@@ -357,6 +361,7 @@ test_files:
357
361
  - tests/requests/compute/modify_vm_cdrom_tests.rb
358
362
  - tests/requests/compute/revert_to_snapshot_tests.rb
359
363
  - tests/requests/compute/set_vm_customvalue_tests.rb
364
+ - tests/requests/compute/update_vm_tests.rb
360
365
  - tests/requests/compute/vm_clone_tests.rb
361
366
  - tests/requests/compute/vm_config_vnc_tests.rb
362
367
  - tests/requests/compute/vm_destroy_tests.rb