fog-libvirt 0.5.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -1
  3. data/fog-libvirt.gemspec +3 -3
  4. data/lib/fog/bin/libvirt.rb +1 -1
  5. data/lib/fog/libvirt.rb +1 -3
  6. data/lib/fog/libvirt/compute.rb +12 -11
  7. data/lib/fog/libvirt/models/compute/README.md +16 -0
  8. data/lib/fog/libvirt/models/compute/interface.rb +2 -2
  9. data/lib/fog/libvirt/models/compute/interfaces.rb +3 -3
  10. data/lib/fog/libvirt/models/compute/network.rb +3 -3
  11. data/lib/fog/libvirt/models/compute/networks.rb +3 -3
  12. data/lib/fog/libvirt/models/compute/nic.rb +2 -2
  13. data/lib/fog/libvirt/models/compute/nics.rb +3 -3
  14. data/lib/fog/libvirt/models/compute/node.rb +2 -2
  15. data/lib/fog/libvirt/models/compute/nodes.rb +3 -3
  16. data/lib/fog/libvirt/models/compute/pool.rb +2 -2
  17. data/lib/fog/libvirt/models/compute/pools.rb +3 -3
  18. data/lib/fog/libvirt/models/compute/server.rb +23 -8
  19. data/lib/fog/libvirt/models/compute/servers.rb +3 -3
  20. data/lib/fog/libvirt/models/compute/templates/server.xml.erb +65 -0
  21. data/lib/fog/libvirt/models/compute/templates/volume.xml.erb +8 -4
  22. data/lib/fog/libvirt/models/compute/util/uri.rb +2 -2
  23. data/lib/fog/libvirt/models/compute/util/util.rb +2 -2
  24. data/lib/fog/libvirt/models/compute/volume.rb +11 -9
  25. data/lib/fog/libvirt/models/compute/volumes.rb +3 -3
  26. data/lib/fog/libvirt/requests/compute/clone_volume.rb +3 -3
  27. data/lib/fog/libvirt/requests/compute/create_domain.rb +2 -2
  28. data/lib/fog/libvirt/requests/compute/create_volume.rb +2 -2
  29. data/lib/fog/libvirt/requests/compute/define_domain.rb +2 -2
  30. data/lib/fog/libvirt/requests/compute/define_pool.rb +2 -2
  31. data/lib/fog/libvirt/requests/compute/destroy_interface.rb +2 -2
  32. data/lib/fog/libvirt/requests/compute/destroy_network.rb +2 -2
  33. data/lib/fog/libvirt/requests/compute/dhcp_leases.rb +2 -2
  34. data/lib/fog/libvirt/requests/compute/get_node_info.rb +2 -2
  35. data/lib/fog/libvirt/requests/compute/libversion.rb +2 -2
  36. data/lib/fog/libvirt/requests/compute/list_domains.rb +9 -3
  37. data/lib/fog/libvirt/requests/compute/list_interfaces.rb +2 -2
  38. data/lib/fog/libvirt/requests/compute/list_networks.rb +11 -3
  39. data/lib/fog/libvirt/requests/compute/list_pool_volumes.rb +2 -2
  40. data/lib/fog/libvirt/requests/compute/list_pools.rb +2 -2
  41. data/lib/fog/libvirt/requests/compute/list_volumes.rb +16 -8
  42. data/lib/fog/libvirt/requests/compute/pool_action.rb +2 -2
  43. data/lib/fog/libvirt/requests/compute/update_autostart.rb +18 -0
  44. data/lib/fog/libvirt/requests/compute/update_display.rb +2 -2
  45. data/lib/fog/libvirt/requests/compute/upload_volume.rb +2 -2
  46. data/lib/fog/libvirt/requests/compute/vm_action.rb +2 -2
  47. data/lib/fog/libvirt/requests/compute/volume_action.rb +2 -2
  48. data/lib/fog/libvirt/version.rb +1 -1
  49. data/minitests/server/server_test.rb +1 -1
  50. data/minitests/server/user_data_iso_test.rb +8 -11
  51. data/minitests/test_helper.rb +1 -1
  52. data/tests/helper.rb +1 -1
  53. data/tests/helpers/formats_helper.rb +58 -56
  54. data/tests/helpers/formats_helper_tests.rb +22 -25
  55. data/tests/helpers/mock_helper.rb +1 -1
  56. data/tests/helpers/succeeds_helper.rb +2 -2
  57. data/tests/libvirt/compute_tests.rb +2 -1
  58. data/tests/libvirt/models/compute/interface_tests.rb +1 -1
  59. data/tests/libvirt/models/compute/interfaces_tests.rb +1 -1
  60. data/tests/libvirt/models/compute/network_tests.rb +1 -1
  61. data/tests/libvirt/models/compute/networks_tests.rb +1 -1
  62. data/tests/libvirt/models/compute/nic_tests.rb +1 -1
  63. data/tests/libvirt/models/compute/pool_tests.rb +1 -1
  64. data/tests/libvirt/models/compute/pools_tests.rb +1 -1
  65. data/tests/libvirt/models/compute/server_tests.rb +4 -1
  66. data/tests/libvirt/models/compute/servers_tests.rb +1 -1
  67. data/tests/libvirt/models/compute/volume_tests.rb +1 -1
  68. data/tests/libvirt/models/compute/volumes_tests.rb +2 -1
  69. data/tests/libvirt/requests/compute/update_autostart_tests.rb +12 -0
  70. metadata +12 -16
@@ -41,7 +41,7 @@ class ServerTest < Minitest::Test
41
41
  result.expect(:status, 0)
42
42
  result.expect(:stdout, "any_ip")
43
43
  fog_ssh.expect(:run, [result], [String])
44
- uri = ::Fog::Compute::LibvirtUtil::URI.new('qemu+ssh://localhost:22?keyfile=nofile')
44
+ uri = ::Fog::Libvirt::Util::URI.new('qemu+ssh://localhost:22?keyfile=nofile')
45
45
  Fog::SSH.stub(:new, fog_ssh) do
46
46
  @server.send(:ssh_ip_command, "test command", uri)
47
47
  end
@@ -32,30 +32,27 @@ class UserDataIsoTest < Minitest::Test
32
32
  end
33
33
 
34
34
  def test_volume_is_created_during_user_data_iso_generation
35
- iso_path = "iso_file_path"
36
35
  @server.stubs(:system).returns(true)
37
- Fog::Compute::Libvirt::Volumes.any_instance.expects(:create).
36
+ Fog::Libvirt::Compute::Volumes.any_instance.expects(:create).
38
37
  with(has_entries(:name => @server.cloud_init_volume_name)).
39
38
  returns(@compute.volumes.new)
40
- Fog::Compute::Libvirt::Volume.any_instance.stubs(:upload_image)
39
+ Fog::Libvirt::Compute::Volume.any_instance.stubs(:upload_image)
41
40
 
42
41
  @server.create_user_data_iso
43
42
  end
44
43
 
45
44
  def test_volume_is_uploaded_during_user_data_iso_generation
46
- iso_path = "iso_file_path"
47
45
  @server.stubs(:system).returns(true)
48
- Fog::Compute::Libvirt::Volumes.any_instance.stubs(:create).returns(@compute.volumes.new)
49
- Fog::Compute::Libvirt::Volume.any_instance.expects(:upload_image).returns(true)
46
+ Fog::Libvirt::Compute::Volumes.any_instance.stubs(:create).returns(@compute.volumes.new)
47
+ Fog::Libvirt::Compute::Volume.any_instance.expects(:upload_image).returns(true)
50
48
 
51
49
  @server.create_user_data_iso
52
50
  end
53
51
 
54
52
  def test_iso_file_is_set_during_user_data_iso_generation
55
- iso_path = "iso_file_path"
56
53
  @server.stubs(:system).returns(true)
57
- Fog::Compute::Libvirt::Volumes.any_instance.stubs(:create).returns(@compute.volumes.new)
58
- Fog::Compute::Libvirt::Volume.any_instance.stubs(:upload_image)
54
+ Fog::Libvirt::Compute::Volumes.any_instance.stubs(:create).returns(@compute.volumes.new)
55
+ Fog::Libvirt::Compute::Volume.any_instance.stubs(:upload_image)
59
56
 
60
57
  @server.create_user_data_iso
61
58
  assert_equal @server.cloud_init_volume_name, @server.iso_file
@@ -65,8 +62,8 @@ class UserDataIsoTest < Minitest::Test
65
62
  @server.stubs(:system).returns(true)
66
63
  volume = @compute.volumes.new
67
64
  volume.stubs(:path).returns("/srv/libvirt/#{@server.cloud_init_volume_name}")
68
- Fog::Compute::Libvirt::Volumes.any_instance.stubs(:create).returns(volume)
69
- Fog::Compute::Libvirt::Volume.any_instance.stubs(:upload_image)
65
+ Fog::Libvirt::Compute::Volumes.any_instance.stubs(:create).returns(volume)
66
+ Fog::Libvirt::Compute::Volume.any_instance.stubs(:upload_image)
70
67
 
71
68
  @server.create_user_data_iso
72
69
  assert_equal '/srv/libvirt', @server.iso_dir
@@ -1,5 +1,5 @@
1
1
  require 'minitest/autorun'
2
- require 'mocha/mini_test'
2
+ require 'mocha/minitest'
3
3
  require 'fileutils'
4
4
 
5
5
  $: << File.join(File.dirname(__FILE__), '..', 'lib')
data/tests/helper.rb CHANGED
@@ -3,7 +3,7 @@ ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default'
3
3
 
4
4
  require 'fog/libvirt'
5
5
 
6
- Excon.defaults.merge!(:debug_request => true, :debug_response => true)
6
+ Excon.defaults.merge!(debug_request: true, debug_response: true)
7
7
 
8
8
  require File.expand_path(File.join(File.dirname(__FILE__), 'helpers', 'mock_helper'))
9
9
 
@@ -1,4 +1,6 @@
1
- require "fog/schema/data_validator"
1
+ # frozen_string_literal: true
2
+
3
+ require 'fog/schema/data_validator'
2
4
 
3
5
  # format related hackery
4
6
  # allows both true.is_a?(Fog::Boolean) and false.is_a?(Fog::Boolean)
@@ -15,62 +17,62 @@ module Fog
15
17
  module Array; end
16
18
  end
17
19
  end
18
- [FalseClass, TrueClass].each {|klass| klass.send(:include, Fog::Boolean)}
19
- [FalseClass, TrueClass, NilClass, Fog::Boolean].each {|klass| klass.send(:include, Fog::Nullable::Boolean)}
20
- [NilClass, String].each {|klass| klass.send(:include, Fog::Nullable::String)}
21
- [NilClass, Time].each {|klass| klass.send(:include, Fog::Nullable::Time)}
22
- [Integer, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Integer)}
23
- [Float, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Float)}
24
- [Hash, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Hash)}
25
- [Array, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Array)}
20
+ [FalseClass, TrueClass].each { |klass| klass.send(:include, Fog::Boolean) }
21
+ [FalseClass, TrueClass, NilClass, Fog::Boolean].each { |klass| klass.send(:include, Fog::Nullable::Boolean) }
22
+ [NilClass, String].each { |klass| klass.send(:include, Fog::Nullable::String) }
23
+ [NilClass, Time].each { |klass| klass.send(:include, Fog::Nullable::Time) }
24
+ [Integer, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Integer) }
25
+ [Float, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Float) }
26
+ [Hash, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Hash) }
27
+ [Array, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Array) }
26
28
 
27
29
  module Shindo
30
+ # Generates a Shindo test that compares a hash schema to the result
31
+ # of the passed in block returning true if they match.
32
+ #
33
+ # The schema that is passed in is a Hash or Array of hashes that
34
+ # have Classes in place of values. When checking the schema the
35
+ # value should match the Class.
36
+ #
37
+ # Strict mode will fail if the data has additional keys. Setting
38
+ # +strict+ to +false+ will allow additional keys to appear.
39
+ #
40
+ # @param [Hash] schema A Hash schema
41
+ # @param [Hash] options Options to change validation rules
42
+ # @option options [Boolean] :allow_extra_keys
43
+ # If +true+ does not fail when keys are in the data that are
44
+ # not specified in the schema. This allows new values to
45
+ # appear in API output without breaking the check.
46
+ # @option options [Boolean] :allow_optional_rules
47
+ # If +true+ does not fail if extra keys are in the schema
48
+ # that do not match the data. Not recommended!
49
+ # @yield Data to check with schema
50
+ #
51
+ # @example Using in a test
52
+ # Shindo.tests("comparing welcome data against schema") do
53
+ # data = {:welcome => "Hello" }
54
+ # data_matches_schema(:welcome => String) { data }
55
+ # end
56
+ #
57
+ # comparing welcome data against schema
58
+ # + data matches schema
59
+ #
60
+ # @example Example schema
61
+ # {
62
+ # "id" => String,
63
+ # "ram" => Integer,
64
+ # "disks" => [
65
+ # {
66
+ # "size" => Float
67
+ # }
68
+ # ],
69
+ # "dns_name" => Fog::Nullable::String,
70
+ # "active" => Fog::Boolean,
71
+ # "created" => DateTime
72
+ # }
73
+ #
74
+ # @return [Boolean]
28
75
  class Tests
29
- # Generates a Shindo test that compares a hash schema to the result
30
- # of the passed in block returning true if they match.
31
- #
32
- # The schema that is passed in is a Hash or Array of hashes that
33
- # have Classes in place of values. When checking the schema the
34
- # value should match the Class.
35
- #
36
- # Strict mode will fail if the data has additional keys. Setting
37
- # +strict+ to +false+ will allow additional keys to appear.
38
- #
39
- # @param [Hash] schema A Hash schema
40
- # @param [Hash] options Options to change validation rules
41
- # @option options [Boolean] :allow_extra_keys
42
- # If +true+ does not fail when keys are in the data that are
43
- # not specified in the schema. This allows new values to
44
- # appear in API output without breaking the check.
45
- # @option options [Boolean] :allow_optional_rules
46
- # If +true+ does not fail if extra keys are in the schema
47
- # that do not match the data. Not recommended!
48
- # @yield Data to check with schema
49
- #
50
- # @example Using in a test
51
- # Shindo.tests("comparing welcome data against schema") do
52
- # data = {:welcome => "Hello" }
53
- # data_matches_schema(:welcome => String) { data }
54
- # end
55
- #
56
- # comparing welcome data against schema
57
- # + data matches schema
58
- #
59
- # @example Example schema
60
- # {
61
- # "id" => String,
62
- # "ram" => Integer,
63
- # "disks" => [
64
- # {
65
- # "size" => Float
66
- # }
67
- # ],
68
- # "dns_name" => Fog::Nullable::String,
69
- # "active" => Fog::Boolean,
70
- # "created" => DateTime
71
- # }
72
- #
73
- # @return [Boolean]
74
76
  def data_matches_schema(schema, options = {})
75
77
  test('data matches schema') do
76
78
  validator = Fog::Schema::DataValidator.new
@@ -84,9 +86,9 @@ module Shindo
84
86
  def formats(format, strict = true)
85
87
  test('has proper format') do
86
88
  if strict
87
- options = {:allow_extra_keys => false, :allow_optional_rules => true}
89
+ options = { allow_extra_keys: false, allow_optional_rules: true }
88
90
  else
89
- options = {:allow_extra_keys => true, :allow_optional_rules => true}
91
+ options = { allow_extra_keys: true, allow_optional_rules: true }
90
92
  end
91
93
  validator = Fog::Schema::DataValidator.new
92
94
  valid = validator.validate(yield, format, options)
@@ -1,37 +1,37 @@
1
1
  Shindo.tests('test_helper', 'meta') do
2
2
 
3
3
  tests('comparing welcome data against schema') do
4
- data = {:welcome => "Hello" }
5
- data_matches_schema(:welcome => String) { data }
4
+ data = { welcome: 'Hello' }
5
+ data_matches_schema(welcome: String) { data }
6
6
  end
7
7
 
8
8
  tests('#data_matches_schema') do
9
9
  tests('when value matches schema expectation') do
10
- data_matches_schema({"key" => String}) { {"key" => "Value"} }
10
+ data_matches_schema('key' => String) { { 'key' => 'Value' } }
11
11
  end
12
12
 
13
13
  tests('when values within an array all match schema expectation') do
14
- data_matches_schema({"key" => [Integer]}) { {"key" => [1, 2]} }
14
+ data_matches_schema('key' => [Integer]) { { 'key' => [1, 2] } }
15
15
  end
16
16
 
17
17
  tests('when nested values match schema expectation') do
18
- data_matches_schema({"key" => {:nested_key => String}}) { {"key" => {:nested_key => "Value"}} }
18
+ data_matches_schema('key' => { nested_key: String }) { { 'key' => { nested_key: 'Value' } } }
19
19
  end
20
20
 
21
21
  tests('when collection of values all match schema expectation') do
22
- data_matches_schema([{"key" => String}]) { [{"key" => "Value"}, {"key" => "Value"}] }
22
+ data_matches_schema([{ 'key' => String }]) { [{ 'key' => 'Value' }, { 'key' => 'Value' }] }
23
23
  end
24
24
 
25
25
  tests('when collection is empty although schema covers optional members') do
26
- data_matches_schema([{"key" => String}], {:allow_optional_rules => true}) { [] }
26
+ data_matches_schema([{ 'key' => String }], allow_optional_rules: true) { [] }
27
27
  end
28
28
 
29
29
  tests('when additional keys are passed and not strict') do
30
- data_matches_schema({"key" => String}, {:allow_extra_keys => true}) { {"key" => "Value", :extra => "Bonus"} }
30
+ data_matches_schema({ 'key' => String }, allow_extra_keys: true) { { 'key' => 'Value', extra: 'Bonus' } }
31
31
  end
32
32
 
33
33
  tests('when value is nil and schema expects NilClass') do
34
- data_matches_schema({"key" => NilClass}) { {"key" => nil} }
34
+ data_matches_schema('key' => NilClass) { { 'key' => nil } }
35
35
  end
36
36
 
37
37
  tests('when value and schema match as hashes') do
@@ -43,46 +43,45 @@ Shindo.tests('test_helper', 'meta') do
43
43
  end
44
44
 
45
45
  tests('when value is a Time') do
46
- data_matches_schema({"time" => Time}) { {"time" => Time.now} }
46
+ data_matches_schema('time' => Time) { { 'time' => Time.now } }
47
47
  end
48
48
 
49
49
  tests('when key is missing but value should be NilClass (#1477)') do
50
- data_matches_schema({"key" => NilClass}, {:allow_optional_rules => true}) { {} }
50
+ data_matches_schema({ 'key' => NilClass }, allow_optional_rules: true) { {} }
51
51
  end
52
52
 
53
53
  tests('when key is missing but value is nullable (#1477)') do
54
- data_matches_schema({"key" => Fog::Nullable::String}, {:allow_optional_rules => true}) { {} }
54
+ data_matches_schema({ 'key' => Fog::Nullable::String }, allow_optional_rules: true) { {} }
55
55
  end
56
56
  end
57
57
 
58
58
  tests('#formats backwards compatible changes') do
59
-
60
59
  tests('when value matches schema expectation') do
61
- formats({"key" => String}) { {"key" => "Value"} }
60
+ formats('key' => String) { { 'key' => 'Value' } }
62
61
  end
63
62
 
64
63
  tests('when values within an array all match schema expectation') do
65
- formats({"key" => [Integer]}) { {"key" => [1, 2]} }
64
+ formats('key' => [Integer]) { { 'key' => [1, 2] } }
66
65
  end
67
66
 
68
67
  tests('when nested values match schema expectation') do
69
- formats({"key" => {:nested_key => String}}) { {"key" => {:nested_key => "Value"}} }
68
+ formats('key' => { nested_key: String }) { { 'key' => { nested_key: 'Value' } } }
70
69
  end
71
70
 
72
71
  tests('when collection of values all match schema expectation') do
73
- formats([{"key" => String}]) { [{"key" => "Value"}, {"key" => "Value"}] }
72
+ formats([{ 'key' => String }]) { [{ 'key' => 'Value' }, { 'key' => 'Value' }] }
74
73
  end
75
74
 
76
75
  tests('when collection is empty although schema covers optional members') do
77
- formats([{"key" => String}]) { [] }
76
+ formats([{ 'key' => String }]) { [] }
78
77
  end
79
78
 
80
79
  tests('when additional keys are passed and not strict') do
81
- formats({"key" => String}, false) { {"key" => "Value", :extra => "Bonus"} }
80
+ formats({ 'key' => String }, false) { { 'key' => 'Value', :extra => 'Bonus' } }
82
81
  end
83
82
 
84
83
  tests('when value is nil and schema expects NilClass') do
85
- formats({"key" => NilClass}) { {"key" => nil} }
84
+ formats('key' => NilClass) { { 'key' => nil } }
86
85
  end
87
86
 
88
87
  tests('when value and schema match as hashes') do
@@ -94,17 +93,15 @@ Shindo.tests('test_helper', 'meta') do
94
93
  end
95
94
 
96
95
  tests('when value is a Time') do
97
- formats({"time" => Time}) { {"time" => Time.now} }
96
+ formats('time' => Time) { { 'time' => Time.now } }
98
97
  end
99
98
 
100
99
  tests('when key is missing but value should be NilClass (#1477)') do
101
- formats({"key" => NilClass}) { {} }
100
+ formats('key' => NilClass) { {} }
102
101
  end
103
102
 
104
103
  tests('when key is missing but value is nullable (#1477)') do
105
- formats({"key" => Fog::Nullable::String}) { {} }
104
+ formats('key' => Fog::Nullable::String) { {} }
106
105
  end
107
-
108
106
  end
109
-
110
107
  end
@@ -9,6 +9,6 @@ end
9
9
  # if in mocked mode, fill in some fake credentials for us
10
10
  if Fog.mock?
11
11
  Fog.credentials = {
12
- :libvirt_uri => 'qemu://libvirt/system',
12
+ libvirt_uri: 'qemu://libvirt/system',
13
13
  }.merge(Fog.credentials)
14
14
  end
@@ -1,8 +1,8 @@
1
1
  module Shindo
2
2
  class Tests
3
- def succeeds
3
+ def succeeds(&block)
4
4
  test('succeeds') do
5
- !!instance_eval(&Proc.new)
5
+ !instance_eval(&Proc.new(&block)).nil?
6
6
  end
7
7
  end
8
8
  end
@@ -9,7 +9,8 @@ Shindo.tests('Fog::Compute[:libvirt]', ['libvirt']) do
9
9
  end
10
10
 
11
11
  tests("Compute requests") do
12
- %w{ create_domain create_volume define_domain define_pool destroy_interface destroy_network get_node_info list_domains
12
+ %w{ create_domain create_volume define_domain define_pool destroy_interface destroy_network get_node_info
13
+ update_autostart list_domains
13
14
  list_interfaces list_networks list_pools list_pool_volumes list_volumes pool_action vm_action volume_action
14
15
  dhcp_leases }.each do |request|
15
16
  test("it should respond to #{request}") { compute.respond_to? request }
@@ -21,7 +21,7 @@ Shindo.tests('Fog::Compute[:libvirt] | interface model', ['libvirt']) do
21
21
  end
22
22
  end
23
23
  end
24
- test('be a kind of Fog::Compute::Libvirt::Interface') { interface.kind_of? Fog::Compute::Libvirt::Interface }
24
+ test('be a kind of Fog::Libvirt::Compute::Interface') { interface.kind_of? Fog::Libvirt::Compute::Interface }
25
25
  end
26
26
 
27
27
  end
@@ -4,7 +4,7 @@ Shindo.tests('Fog::Compute[:libvirt] | interfaces collection', ['libvirt']) do
4
4
 
5
5
  tests('The interfaces collection') do
6
6
  test('should not be empty') { not interfaces.empty? }
7
- test('should be a kind of Fog::Compute::Libvirt::Interfaces') { interfaces.kind_of? Fog::Compute::Libvirt::Interfaces }
7
+ test('should be a kind of Fog::Libvirt::Compute::Interfaces') { interfaces.kind_of? Fog::Libvirt::Compute::Interfaces }
8
8
  tests('should be able to reload itself').succeeds { interfaces.reload }
9
9
  tests('should be able to get a model') do
10
10
  tests('by instance name').succeeds { interfaces.get interfaces.first.name }
@@ -25,7 +25,7 @@ Shindo.tests('Fog::Compute[:libvirt] | network model', ['libvirt']) do
25
25
  end
26
26
  end
27
27
  end
28
- test('be a kind of Fog::Compute::Libvirt::Network') { network.kind_of? Fog::Compute::Libvirt::Network }
28
+ test('be a kind of Fog::Libvirt::Compute::Network') { network.kind_of? Fog::Libvirt::Compute::Network }
29
29
  end
30
30
 
31
31
  end
@@ -3,7 +3,7 @@ Shindo.tests('Fog::Compute[:libvirt] | networks collection', ['libvirt']) do
3
3
  networks = Fog::Compute[:libvirt].networks
4
4
 
5
5
  tests('The networks collection') do
6
- test('should be a kind of Fog::Compute::Libvirt::Networks') { networks.kind_of? Fog::Compute::Libvirt::Networks }
6
+ test('should be a kind of Fog::Libvirt::Compute::Networks') { networks.kind_of? Fog::Libvirt::Compute::Networks }
7
7
  tests('should be able to reload itself').succeeds { networks.reload }
8
8
  tests('should be able to get a model') do
9
9
  tests('by instance id').succeeds { networks.get networks.first.uuid }
@@ -25,7 +25,7 @@ Shindo.tests('Fog::Compute[:libvirt] | nic model', ['libvirt']) do
25
25
  end
26
26
  end
27
27
  end
28
- test('be a kind of Fog::Compute::Libvirt::Nic') { nic.kind_of? Fog::Compute::Libvirt::Nic }
28
+ test('be a kind of Fog::Libvirt::Compute::Nic') { nic.kind_of? Fog::Libvirt::Compute::Nic }
29
29
  end
30
30
 
31
31
  end
@@ -21,7 +21,7 @@ Shindo.tests('Fog::Compute[:libvirt] | interface model', ['libvirt']) do
21
21
  end
22
22
  end
23
23
  end
24
- test('be a kind of Fog::Compute::Libvirt::Pool') { pool.kind_of? Fog::Compute::Libvirt::Pool }
24
+ test('be a kind of Fog::Libvirt::Compute::Pool') { pool.kind_of? Fog::Libvirt::Compute::Pool }
25
25
  end
26
26
 
27
27
  end
@@ -4,7 +4,7 @@ Shindo.tests('Fog::Compute[:libvirt] | pools request', ['libvirt']) do
4
4
 
5
5
  tests('The pools collection') do
6
6
  test('should not be empty') { not pools.empty? }
7
- test('should be a kind of Fog::Compute::Libvirt::Pools') { pools.kind_of? Fog::Compute::Libvirt::Pools }
7
+ test('should be a kind of Fog::Libvirt::Compute::Pools') { pools.kind_of? Fog::Libvirt::Compute::Pools }
8
8
  tests('should be able to reload itself').succeeds { pools.reload }
9
9
  tests('should be able to get a model') do
10
10
  tests('by instance id').succeeds { pools.get pools.first.uuid }
@@ -5,6 +5,8 @@ Shindo.tests('Fog::Compute[:libvirt] | server model', ['libvirt']) do
5
5
 
6
6
  tests('The server model should') do
7
7
  tests('have the action') do
8
+ test('autostart') { server.respond_to? 'autostart' }
9
+ test('update_autostart') { server.respond_to? 'update_autostart' }
8
10
  test('reload') { server.respond_to? 'reload' }
9
11
  %w{ start stop destroy reboot suspend }.each do |action|
10
12
  test(action) { server.respond_to? action }
@@ -42,6 +44,7 @@ Shindo.tests('Fog::Compute[:libvirt] | server model', ['libvirt']) do
42
44
  :volumes,
43
45
  :active,
44
46
  :boot_order,
47
+ :hugepages,
45
48
  :state]
46
49
  tests("The server model should respond to") do
47
50
  attributes.each do |attribute|
@@ -55,6 +58,6 @@ Shindo.tests('Fog::Compute[:libvirt] | server model', ['libvirt']) do
55
58
  end
56
59
  end
57
60
  end
58
- test('be a kind of Fog::Compute::Libvirt::Server') { server.kind_of? Fog::Compute::Libvirt::Server }
61
+ test('be a kind of Fog::Libvirt::Compute::Server') { server.kind_of? Fog::Libvirt::Compute::Server }
59
62
  end
60
63
  end