fog-vsphere 1.7.0.1 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -2
  3. data/.travis.yml +7 -6
  4. data/CHANGELOG.md +13 -2
  5. data/CONTRIBUTORS.md +0 -8
  6. data/Rakefile +1 -10
  7. data/gemfiles/Gemfile.1.9.2+ +9 -0
  8. data/lib/fog/vsphere/compute.rb +2 -0
  9. data/lib/fog/vsphere/models/compute/scsicontroller.rb +6 -1
  10. data/lib/fog/vsphere/models/compute/server.rb +37 -8
  11. data/lib/fog/vsphere/models/compute/volume.rb +62 -28
  12. data/lib/fog/vsphere/models/compute/volumes.rb +1 -1
  13. data/lib/fog/vsphere/requests/compute/create_vm.rb +32 -44
  14. data/lib/fog/vsphere/requests/compute/list_vm_scsi_controllers.rb +4 -11
  15. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +2 -1
  16. data/lib/fog/vsphere/requests/compute/modify_vm_controller.rb +2 -14
  17. data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +3 -3
  18. data/lib/fog/vsphere/requests/compute/vm_clone.rb +2 -2
  19. data/lib/fog/vsphere/requests/compute/vm_migrate.rb +1 -0
  20. data/lib/fog/vsphere/requests/compute/vm_reconfig_volumes.rb +26 -15
  21. data/lib/fog/vsphere/version.rb +1 -1
  22. data/tests/class_from_string_tests.rb +3 -3
  23. data/tests/compute_tests.rb +17 -16
  24. data/tests/helpers/mock_helper.rb +3 -3
  25. data/tests/models/compute/cluster_tests.rb +5 -4
  26. data/tests/models/compute/hosts_tests.rb +4 -2
  27. data/tests/models/compute/rules_tests.rb +16 -10
  28. data/tests/models/compute/server_tests.rb +29 -33
  29. data/tests/models/compute/servers_tests.rb +4 -2
  30. data/tests/requests/compute/current_time_tests.rb +4 -2
  31. data/tests/requests/compute/folder_destroy_tests.rb +7 -5
  32. data/tests/requests/compute/get_network_tests.rb +22 -18
  33. data/tests/requests/compute/list_child_snapshots_tests.rb +2 -1
  34. data/tests/requests/compute/list_clusters_tests.rb +6 -5
  35. data/tests/requests/compute/list_datastores_tests.rb +7 -6
  36. data/tests/requests/compute/list_hosts_tests.rb +4 -3
  37. data/tests/requests/compute/list_networks_tests.rb +7 -6
  38. data/tests/requests/compute/list_storage_pods_test.rb +4 -3
  39. data/tests/requests/compute/list_virtual_machines_tests.rb +20 -16
  40. data/tests/requests/compute/list_vm_cdroms_tests.rb +2 -1
  41. data/tests/requests/compute/list_vm_snapshots_tests.rb +2 -1
  42. data/tests/requests/compute/modify_vm_cdrom_tests.rb +4 -3
  43. data/tests/requests/compute/revert_to_snapshot_tests.rb +4 -2
  44. data/tests/requests/compute/set_vm_customvalue_tests.rb +2 -0
  45. data/tests/requests/compute/vm_clone_tests.rb +20 -20
  46. data/tests/requests/compute/vm_config_vnc_tests.rb +4 -3
  47. data/tests/requests/compute/vm_destroy_tests.rb +4 -1
  48. data/tests/requests/compute/vm_migrate_tests.rb +2 -1
  49. data/tests/requests/compute/vm_power_off_tests.rb +4 -2
  50. data/tests/requests/compute/vm_power_on_tests.rb +3 -1
  51. data/tests/requests/compute/vm_reboot_tests.rb +4 -2
  52. data/tests/requests/compute/vm_reconfig_cdrom_tests.rb +3 -2
  53. data/tests/requests/compute/vm_reconfig_cpus_tests.rb +3 -1
  54. data/tests/requests/compute/vm_reconfig_hardware_tests.rb +4 -2
  55. data/tests/requests/compute/vm_reconfig_memory_tests.rb +3 -1
  56. data/tests/requests/compute/vm_take_snapshot_tests.rb +3 -1
  57. metadata +4 -22
  58. data/.rubocop.yml +0 -8
  59. data/.rubocop_todo.yml +0 -217
  60. data/lib/fog/vsphere/models/compute/ticket.rb +0 -16
  61. data/lib/fog/vsphere/models/compute/tickets.rb +0 -25
  62. data/lib/fog/vsphere/requests/compute/host_finish_maintenance.rb +0 -14
  63. data/lib/fog/vsphere/requests/compute/host_shutdown.rb +0 -14
  64. data/lib/fog/vsphere/requests/compute/host_start_maintenance.rb +0 -14
  65. data/lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb +0 -34
  66. data/lib/fog/vsphere/requests/compute/vm_relocate.rb +0 -54
  67. data/lib/fog/vsphere/requests/compute/vm_remove_snapshot.rb +0 -29
  68. data/lib/fog/vsphere/requests/compute/vm_rename.rb +0 -24
  69. data/lib/fog/vsphere/requests/compute/vm_revert_snapshot.rb +0 -29
  70. data/lib/fog/vsphere/requests/compute/vm_suspend.rb +0 -54
  71. data/tests/models/compute/ticket_tests.rb +0 -12
  72. data/tests/models/compute/tickets_tests.rb +0 -8
  73. data/tests/requests/compute/vm_suspend_tests.rb +0 -23
@@ -1,9 +1,10 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | list_vm_cdroms request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  tests('The response should') do
5
6
  response = compute.list_vm_cdroms('5032c8a5-9c5e-ba7a-3804-832a03e16381')
6
- test('be a kind of Array') { response.is_a? Array }
7
+ test('be a kind of Array') { response.kind_of? Array }
7
8
  test('it should contains Hashes') { response.all? { |i| Hash === i } }
8
9
  end
9
10
  end
@@ -1,9 +1,10 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | list_vm_snapshots request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  tests('The response should') do
5
6
  response = compute.list_vm_snapshots('5032c8a5-9c5e-ba7a-3804-832a03e16381')
6
- test('be a kind of Array') { response.is_a? Array }
7
+ test('be a kind of Array') { response.kind_of? Array }
7
8
  test('it should contains Hashes') { response.all? { |i| Hash === i } }
8
9
  end
9
10
  end
@@ -1,20 +1,21 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | modify_vm_cdrom request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  modify_target = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
5
6
  modify_cdrom = compute.cdroms.new(
6
- instance_uuid: modify_target
7
+ instance_uuid: modify_target,
7
8
  )
8
9
 
9
10
  tests('When adding a cdrom the response should') do
10
11
  response = compute.add_vm_cdrom(modify_cdrom)
11
- test('be a kind of Hash') { response.is_a? Hash }
12
+ test('be a kind of Hash') { response.kind_of? Hash }
12
13
  test('should have a task_state key') { response.key? 'task_state' }
13
14
  end
14
15
 
15
16
  tests('When destroying a cdrom the response should') do
16
17
  response = compute.destroy_vm_cdrom(modify_cdrom)
17
- test('be a kind of Hash') { response.is_a? Hash }
18
+ test('be a kind of Hash') { response.kind_of? Hash }
18
19
  test('should have a task_state key') { response.key? 'task_state' }
19
20
  end
20
21
  end
@@ -1,13 +1,15 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | revert_to_snapshot request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  tests('The response should') do
5
- response = compute.revert_to_snapshot(Fog::Compute::Vsphere::Snapshot.new(service: 1))
6
- test('be a kind of Hash') { response.is_a? Hash }
6
+ response = compute.revert_to_snapshot(Fog::Compute::Vsphere::Snapshot.new(:service => 1))
7
+ test('be a kind of Hash') { response.kind_of? Hash }
7
8
  test('should have a task_state key') { response.key? 'state' }
8
9
  end
9
10
 
10
11
  tests('The expected options') do
11
12
  raises(ArgumentError, 'raises ArgumentError when input param is missing') { compute.revert_to_snapshot(nil) }
12
13
  end
14
+
13
15
  end
@@ -1,4 +1,5 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | set_vm_customvalue request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  instance_uuid = '50137835-88a1-436e-768e-9b2677076e67'
@@ -15,4 +16,5 @@ Shindo.tests('Fog::Compute[:vsphere] | set_vm_customvalue request', ['vsphere'])
15
16
  raises(ArgumentError, 'raises ArgumentError when custom_key option is missing') { compute.set_vm_customvalue(instance_uuid) }
16
17
  raises(ArgumentError, 'raises ArgumentError when custom_value option is missing') { compute.set_vm_customvalue(instance_uuid, custom_key) }
17
18
  end
19
+
18
20
  end
@@ -1,47 +1,47 @@
1
- Shindo.tests('Fog::Compute[:vsphere] | vm_clone request', 'vsphere') do
1
+ Shindo.tests("Fog::Compute[:vsphere] | vm_clone request", 'vsphere') do
2
2
  # require 'guid'
3
3
  compute = Fog::Compute[:vsphere]
4
4
  response = nil
5
5
  response_linked = nil
6
6
 
7
- template = 'rhel64'
8
- datacenter = 'Solutions'
7
+ template = "rhel64"
8
+ datacenter = "Solutions"
9
9
 
10
- tests('Standard Clone | The return value should') do
10
+ tests("Standard Clone | The return value should") do
11
11
  servers_size = compute.servers.size
12
12
  response = compute.vm_clone('datacenter' => datacenter, 'template_path' => template, 'name' => 'cloning_vm', 'wait' => true)
13
- test('be a kind of Hash') { response.is_a? Hash }
14
- %w[vm_ref new_vm task_ref].each do |key|
13
+ test("be a kind of Hash") { response.kind_of? Hash }
14
+ %w{ vm_ref new_vm task_ref }.each do |key|
15
15
  test("have a #{key} key") { response.key? key }
16
16
  end
17
- test('creates a new server') { compute.servers.size == servers_size + 1 }
18
- test('new server name is set') { compute.get_virtual_machine(response['new_vm']['id'])['name'] == 'cloning_vm' }
17
+ test("creates a new server") { compute.servers.size == servers_size+1 }
18
+ test("new server name is set") { compute.get_virtual_machine(response['new_vm']['id'])['name'] == 'cloning_vm' }
19
19
  end
20
20
 
21
- tests('Standard Clone setting ram and cpu | The return value should') do
21
+ tests("Standard Clone setting ram and cpu | The return value should") do
22
22
  servers_size = compute.servers.size
23
23
  response = compute.vm_clone('datacenter' => datacenter, 'template_path' => template, 'name' => 'cloning_vm', 'memoryMB' => '8192', 'numCPUs' => '8', 'wait' => true)
24
- test('be a kind of Hash') { response.is_a? Hash }
25
- %w[vm_ref new_vm task_ref].each do |key|
24
+ test("be a kind of Hash") { response.kind_of? Hash }
25
+ %w{ vm_ref new_vm task_ref }.each do |key|
26
26
  test("have a #{key} key") { response.key? key }
27
27
  end
28
- test('creates a new server') { compute.servers.size == servers_size + 1 }
29
- test('new server name is set') { compute.get_virtual_machine(response['new_vm']['id'])['name'] == 'cloning_vm' }
28
+ test("creates a new server") { compute.servers.size == servers_size+1 }
29
+ test("new server name is set") { compute.get_virtual_machine(response['new_vm']['id'])['name'] == 'cloning_vm' }
30
30
  end
31
31
 
32
- tests('Linked Clone | The return value should') do
32
+ tests("Linked Clone | The return value should") do
33
33
  servers_size = compute.servers.size
34
34
  response = compute.vm_clone('datacenter' => datacenter, 'template_path' => template, 'name' => 'cloning_vm_linked', 'wait' => 1, 'linked_clone' => true)
35
- test('be a kind of Hash') { response.is_a? Hash }
36
- %w[vm_ref new_vm task_ref].each do |key|
35
+ test("be a kind of Hash") { response.kind_of? Hash }
36
+ %w{ vm_ref new_vm task_ref }.each do |key|
37
37
  test("have a #{key} key") { response.key? key }
38
38
  end
39
- test('creates a new server') { compute.servers.size == servers_size + 1 }
40
- test('new server name is set') { compute.get_virtual_machine(response['new_vm']['id'])['name'] == 'cloning_vm_linked' }
39
+ test("creates a new server") { compute.servers.size == servers_size+1 }
40
+ test("new server name is set") { compute.get_virtual_machine(response['new_vm']['id'])['name'] == 'cloning_vm_linked' }
41
41
  end
42
42
 
43
- tests('When invalid input is presented') do
44
- raises(ArgumentError, 'it should raise ArgumentError') { compute.vm_clone(foo: 1) }
43
+ tests("When invalid input is presented") do
44
+ raises(ArgumentError, 'it should raise ArgumentError') { compute.vm_clone(:foo => 1) }
45
45
  raises(Fog::Compute::Vsphere::NotFound, 'it should raise Fog::Compute::Vsphere::NotFound when the UUID is not a string') do
46
46
  pending # require 'guid'
47
47
  compute.vm_clone('instance_uuid' => Guid.from_s(template), 'name' => 'jefftestfoo')
@@ -1,18 +1,19 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_config_vnc request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
5
- vnc_spec = { port: '5900', password: 'ssaaa', enabled: 'true' }
6
+ vnc_spec = {:port => '5900', :password => 'ssaaa', :enabled => 'true'}
6
7
 
7
8
  tests('The response should') do
8
9
  response = compute.vm_config_vnc('instance_uuid' => reconfig_target).merge(vnc_spec)
9
- test('be a kind of Hash') { response.is_a? Hash }
10
+ test('be a kind of Hash') { response.kind_of? Hash }
10
11
  test('should have a task_state key') { response.key? 'task_state' }
11
12
  end
12
13
 
13
14
  tests('VNC attrs response should') do
14
15
  response = compute.vm_get_vnc(reconfig_target)
15
- test('be a kind of Hash') { response.is_a? Hash }
16
+ test('be a kind of Hash') { response.kind_of? Hash }
16
17
  test('should have a port key') { response.key? :port }
17
18
  end
18
19
  end
@@ -1,14 +1,17 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_destroy request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  booted_vm = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
5
6
 
6
7
  tests('The response should') do
7
8
  response = compute.vm_destroy('instance_uuid' => booted_vm)
8
- test('be a kind of Hash') { response.is_a? Hash }
9
+ test('be a kind of Hash') { response.kind_of? Hash }
9
10
  test('should have a task_state key') { response.key? 'task_state' }
11
+
10
12
  end
11
13
  tests('The expected options') do
12
14
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_destroy }
13
15
  end
16
+
14
17
  end
@@ -1,11 +1,12 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_migrate request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  powered_on_vm = '50137835-88a1-436e-768e-9b2677076e67'
5
6
 
6
7
  tests('The response should') do
7
8
  response = compute.vm_migrate('instance_uuid' => powered_on_vm)
8
- test('be a kind of Hash') { response.is_a? Hash }
9
+ test('be a kind of Hash') { response.kind_of? Hash }
9
10
  test('should have a task_state key') { response.key? 'task_state' }
10
11
  end
11
12
 
@@ -1,17 +1,18 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_power_off request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  powered_on_vm = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
5
6
 
6
7
  tests('The response should') do
7
8
  response = compute.vm_power_off('instance_uuid' => powered_on_vm)
8
- test('be a kind of Hash') { response.is_a? Hash }
9
+ test('be a kind of Hash') { response.kind_of? Hash }
9
10
  test('should have a task_state key') { response.key? 'task_state' }
10
11
  test('should have a power_off_type key') { response.key? 'power_off_type' }
11
12
  end
12
13
 
13
14
  # When forcing the shutdown, we expect the result to be
14
- { true => 'cut_power', false => 'shutdown_guest' }.each do |force, expected|
15
+ { true => 'cut_power', false => 'shutdown_guest'}.each do |force, expected|
15
16
  tests("When 'force' => #{force}") do
16
17
  response = compute.vm_power_off('instance_uuid' => powered_on_vm, 'force' => force)
17
18
  test('should retur power_off_type of #{expected}') { response['power_off_type'] == expected }
@@ -21,4 +22,5 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_power_off request', ['vsphere']) do
21
22
  tests('The expected options') do
22
23
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_power_off }
23
24
  end
25
+
24
26
  end
@@ -1,15 +1,17 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_power_on request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  powered_off_vm = nil
5
6
 
6
7
  tests('The response should') do
7
8
  response = compute.vm_power_on('instance_uuid' => powered_off_vm)
8
- test('be a kind of Hash') { response.is_a? Hash }
9
+ test('be a kind of Hash') { response.kind_of? Hash }
9
10
  test('should have a task_state key') { response.key? 'task_state' }
10
11
  end
11
12
 
12
13
  tests('The expected options') do
13
14
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_power_on }
14
15
  end
16
+
15
17
  end
@@ -1,17 +1,18 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reboot request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  powered_on_vm = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
5
6
 
6
7
  tests('The response should') do
7
8
  response = compute.vm_reboot('instance_uuid' => powered_on_vm)
8
- test('be a kind of Hash') { response.is_a? Hash }
9
+ test('be a kind of Hash') { response.kind_of? Hash }
9
10
  test('should have a task_state key') { response.key? 'task_state' }
10
11
  test('should have a reboot_type key') { response.key? 'reboot_type' }
11
12
  end
12
13
 
13
14
  # When forcing the shutdown, we expect the result to be
14
- { true => 'reset_power', false => 'reboot_guest' }.each do |force, expected|
15
+ { true => 'reset_power', false => 'reboot_guest'}.each do |force, expected|
15
16
  tests("When force => #{force}") do
16
17
  response = compute.vm_reboot('instance_uuid' => powered_on_vm, 'force' => force)
17
18
  test("should return reboot_type of #{expected}") { response['reboot_type'] == expected }
@@ -21,4 +22,5 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reboot request', ['vsphere']) do
21
22
  tests('The expected options') do
22
23
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reboot }
23
24
  end
25
+
24
26
  end
@@ -1,14 +1,15 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cdrom request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  reconfig_target = '5032c8a5-9c5e-ba7a-3804-832a03e16381'
5
6
  reconfig_spec = {
6
- 'start_connected' => false
7
+ 'start_connected' => false,
7
8
  }
8
9
 
9
10
  tests('the response should') do
10
11
  response = compute.vm_reconfig_cdrom('instance_uuid' => reconfig_target, 'hardware_spec' => reconfig_spec)
11
- test('be a kind of Hash') { response.is_a? Hash }
12
+ test('be a kind of Hash') { response.kind_of? Hash }
12
13
  test('should have a task_state key') { response.key? 'task_state' }
13
14
  end
14
15
  end
@@ -1,4 +1,5 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cpus request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
@@ -6,7 +7,7 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cpus request', ['vsphere']) d
6
7
 
7
8
  tests('The response should') do
8
9
  response = compute.vm_reconfig_cpus('instance_uuid' => reconfig_target, 'cpus' => reconfig_spec)
9
- test('be a kind of Hash') { response.is_a? Hash }
10
+ test('be a kind of Hash') { response.kind_of? Hash }
10
11
  test('should have a task_state key') { response.key? 'task_state' }
11
12
  end
12
13
 
@@ -14,4 +15,5 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_cpus request', ['vsphere']) d
14
15
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reconfig_cpus('cpus' => reconfig_spec) }
15
16
  raises(ArgumentError, 'raises ArgumentError when cpus option is missing') { compute.vm_reconfig_cpus('instance_uuid' => reconfig_target) }
16
17
  end
18
+
17
19
  end
@@ -1,12 +1,13 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_hardware request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
5
- reconfig_spec = { 'guestId' => 'rhel5_64Guest' }
6
+ reconfig_spec = {'guestId' => 'rhel5_64Guest'}
6
7
 
7
8
  tests('The response should') do
8
9
  response = compute.vm_reconfig_hardware('instance_uuid' => reconfig_target, 'hardware_spec' => reconfig_spec)
9
- test('be a kind of Hash') { response.is_a? Hash }
10
+ test('be a kind of Hash') { response.kind_of? Hash }
10
11
  test('should have a task_state key') { response.key? 'task_state' }
11
12
  end
12
13
 
@@ -14,4 +15,5 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_hardware request', ['vsphere'
14
15
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reconfig_hardware('hardware_spec' => reconfig_spec) }
15
16
  raises(ArgumentError, 'raises ArgumentError when hardware_spec option is missing') { compute.vm_reconfig_hardware('instance_uuid' => reconfig_target) }
16
17
  end
18
+
17
19
  end
@@ -1,4 +1,5 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_memory request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  reconfig_target = '50137835-88a1-436e-768e-9b2677076e67'
@@ -6,7 +7,7 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_memory request', ['vsphere'])
6
7
 
7
8
  tests('The response should') do
8
9
  response = compute.vm_reconfig_memory('instance_uuid' => reconfig_target, 'memory' => reconfig_spec)
9
- test('be a kind of Hash') { response.is_a? Hash }
10
+ test('be a kind of Hash') { response.kind_of? Hash }
10
11
  test('should have a task_state key') { response.key? 'task_state' }
11
12
  end
12
13
 
@@ -14,4 +15,5 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_reconfig_memory request', ['vsphere'])
14
15
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_reconfig_memory('memory' => reconfig_spec) }
15
16
  raises(ArgumentError, 'raises ArgumentError when memory option is missing') { compute.vm_reconfig_memory('instance_uuid' => reconfig_target) }
16
17
  end
18
+
17
19
  end
@@ -1,11 +1,12 @@
1
1
  Shindo.tests('Fog::Compute[:vsphere] | vm_take_snapshot request', ['vsphere']) do
2
+
2
3
  compute = Fog::Compute[:vsphere]
3
4
 
4
5
  powered_off_vm = nil
5
6
 
6
7
  tests('The response should') do
7
8
  response = compute.vm_take_snapshot('instance_uuid' => powered_off_vm, 'name' => 'foobar')
8
- test('be a kind of Hash') { response.is_a? Hash }
9
+ test('be a kind of Hash') { response.kind_of? Hash }
9
10
  test('should have a task_state key') { response.key? 'task_state' }
10
11
  test('should have a was_cancelled key') { response.key? 'was_cancelled' }
11
12
  end
@@ -14,4 +15,5 @@ Shindo.tests('Fog::Compute[:vsphere] | vm_take_snapshot request', ['vsphere']) d
14
15
  raises(ArgumentError, 'raises ArgumentError when instance_uuid option is missing') { compute.vm_take_snapshot('name' => 'foobar') }
15
16
  raises(ArgumentError, 'raises ArgumentError when name option is missing') { compute.vm_take_snapshot('instance_uuid' => powered_off_vm) }
16
17
  end
18
+
17
19
  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: 1.7.0.1
4
+ version: 1.7.1
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-05-16 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -131,8 +131,6 @@ extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
- - ".rubocop.yml"
135
- - ".rubocop_todo.yml"
136
134
  - ".travis.yml"
137
135
  - CHANGELOG.md
138
136
  - CONTRIBUTING.md
@@ -142,6 +140,7 @@ files:
142
140
  - README.md
143
141
  - Rakefile
144
142
  - fog-vsphere.gemspec
143
+ - gemfiles/Gemfile.1.9.2+
145
144
  - lib/fog/bin/vsphere.rb
146
145
  - lib/fog/vsphere.rb
147
146
  - lib/fog/vsphere/compute.rb
@@ -183,8 +182,6 @@ files:
183
182
  - lib/fog/vsphere/models/compute/storage_pods.rb
184
183
  - lib/fog/vsphere/models/compute/template.rb
185
184
  - lib/fog/vsphere/models/compute/templates.rb
186
- - lib/fog/vsphere/models/compute/ticket.rb
187
- - lib/fog/vsphere/models/compute/tickets.rb
188
185
  - lib/fog/vsphere/models/compute/volume.rb
189
186
  - lib/fog/vsphere/models/compute/volumes.rb
190
187
  - lib/fog/vsphere/requests/compute/cloudinit_to_customspec.rb
@@ -210,9 +207,6 @@ files:
210
207
  - lib/fog/vsphere/requests/compute/get_template.rb
211
208
  - lib/fog/vsphere/requests/compute/get_virtual_machine.rb
212
209
  - lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb
213
- - lib/fog/vsphere/requests/compute/host_finish_maintenance.rb
214
- - lib/fog/vsphere/requests/compute/host_shutdown.rb
215
- - lib/fog/vsphere/requests/compute/host_start_maintenance.rb
216
210
  - lib/fog/vsphere/requests/compute/list_child_snapshots.rb
217
211
  - lib/fog/vsphere/requests/compute/list_clusters.rb
218
212
  - lib/fog/vsphere/requests/compute/list_compute_resources.rb
@@ -244,7 +238,6 @@ files:
244
238
  - lib/fog/vsphere/requests/compute/revert_to_snapshot.rb
245
239
  - lib/fog/vsphere/requests/compute/set_vm_customvalue.rb
246
240
  - lib/fog/vsphere/requests/compute/upload_iso.rb
247
- - lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
248
241
  - lib/fog/vsphere/requests/compute/vm_clone.rb
249
242
  - lib/fog/vsphere/requests/compute/vm_config_vnc.rb
250
243
  - lib/fog/vsphere/requests/compute/vm_destroy.rb
@@ -258,11 +251,6 @@ files:
258
251
  - lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb
259
252
  - lib/fog/vsphere/requests/compute/vm_reconfig_memory.rb
260
253
  - lib/fog/vsphere/requests/compute/vm_reconfig_volumes.rb
261
- - lib/fog/vsphere/requests/compute/vm_relocate.rb
262
- - lib/fog/vsphere/requests/compute/vm_remove_snapshot.rb
263
- - lib/fog/vsphere/requests/compute/vm_rename.rb
264
- - lib/fog/vsphere/requests/compute/vm_revert_snapshot.rb
265
- - lib/fog/vsphere/requests/compute/vm_suspend.rb
266
254
  - lib/fog/vsphere/requests/compute/vm_take_snapshot.rb
267
255
  - lib/fog/vsphere/version.rb
268
256
  - tests/class_from_string_tests.rb
@@ -276,8 +264,6 @@ files:
276
264
  - tests/models/compute/server_tests.rb
277
265
  - tests/models/compute/server_unit_tests.rb
278
266
  - tests/models/compute/servers_tests.rb
279
- - tests/models/compute/ticket_tests.rb
280
- - tests/models/compute/tickets_tests.rb
281
267
  - tests/requests/compute/current_time_tests.rb
282
268
  - tests/requests/compute/folder_destroy_tests.rb
283
269
  - tests/requests/compute/get_network_tests.rb
@@ -304,7 +290,6 @@ files:
304
290
  - tests/requests/compute/vm_reconfig_cpus_tests.rb
305
291
  - tests/requests/compute/vm_reconfig_hardware_tests.rb
306
292
  - tests/requests/compute/vm_reconfig_memory_tests.rb
307
- - tests/requests/compute/vm_suspend_tests.rb
308
293
  - tests/requests/compute/vm_take_snapshot_tests.rb
309
294
  homepage: https://github.com/fog/fog-vsphere
310
295
  licenses:
@@ -326,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
311
  version: '0'
327
312
  requirements: []
328
313
  rubyforge_project:
329
- rubygems_version: 2.7.6
314
+ rubygems_version: 2.6.10
330
315
  signing_key:
331
316
  specification_version: 4
332
317
  summary: Module for the 'fog' gem to support VMware vSphere.
@@ -342,8 +327,6 @@ test_files:
342
327
  - tests/models/compute/server_tests.rb
343
328
  - tests/models/compute/server_unit_tests.rb
344
329
  - tests/models/compute/servers_tests.rb
345
- - tests/models/compute/ticket_tests.rb
346
- - tests/models/compute/tickets_tests.rb
347
330
  - tests/requests/compute/current_time_tests.rb
348
331
  - tests/requests/compute/folder_destroy_tests.rb
349
332
  - tests/requests/compute/get_network_tests.rb
@@ -370,5 +353,4 @@ test_files:
370
353
  - tests/requests/compute/vm_reconfig_cpus_tests.rb
371
354
  - tests/requests/compute/vm_reconfig_hardware_tests.rb
372
355
  - tests/requests/compute/vm_reconfig_memory_tests.rb
373
- - tests/requests/compute/vm_suspend_tests.rb
374
356
  - tests/requests/compute/vm_take_snapshot_tests.rb