fog-libvirt 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/fog-libvirt.gemspec +1 -1
  3. data/lib/fog/bin/libvirt.rb +1 -1
  4. data/lib/fog/libvirt.rb +1 -3
  5. data/lib/fog/libvirt/compute.rb +4 -4
  6. data/lib/fog/libvirt/models/compute/interface.rb +2 -2
  7. data/lib/fog/libvirt/models/compute/interfaces.rb +3 -3
  8. data/lib/fog/libvirt/models/compute/network.rb +3 -3
  9. data/lib/fog/libvirt/models/compute/networks.rb +3 -3
  10. data/lib/fog/libvirt/models/compute/nic.rb +2 -2
  11. data/lib/fog/libvirt/models/compute/nics.rb +3 -3
  12. data/lib/fog/libvirt/models/compute/node.rb +2 -2
  13. data/lib/fog/libvirt/models/compute/nodes.rb +3 -3
  14. data/lib/fog/libvirt/models/compute/pool.rb +2 -2
  15. data/lib/fog/libvirt/models/compute/pools.rb +3 -3
  16. data/lib/fog/libvirt/models/compute/server.rb +3 -3
  17. data/lib/fog/libvirt/models/compute/servers.rb +3 -3
  18. data/lib/fog/libvirt/models/compute/templates/volume.xml.erb +4 -4
  19. data/lib/fog/libvirt/models/compute/util/uri.rb +2 -2
  20. data/lib/fog/libvirt/models/compute/util/util.rb +2 -2
  21. data/lib/fog/libvirt/models/compute/volume.rb +7 -3
  22. data/lib/fog/libvirt/models/compute/volumes.rb +3 -3
  23. data/lib/fog/libvirt/requests/compute/clone_volume.rb +3 -3
  24. data/lib/fog/libvirt/requests/compute/create_domain.rb +2 -2
  25. data/lib/fog/libvirt/requests/compute/create_volume.rb +2 -2
  26. data/lib/fog/libvirt/requests/compute/define_domain.rb +2 -2
  27. data/lib/fog/libvirt/requests/compute/define_pool.rb +2 -2
  28. data/lib/fog/libvirt/requests/compute/destroy_interface.rb +2 -2
  29. data/lib/fog/libvirt/requests/compute/destroy_network.rb +2 -2
  30. data/lib/fog/libvirt/requests/compute/dhcp_leases.rb +2 -2
  31. data/lib/fog/libvirt/requests/compute/get_node_info.rb +2 -2
  32. data/lib/fog/libvirt/requests/compute/libversion.rb +2 -2
  33. data/lib/fog/libvirt/requests/compute/list_domains.rb +2 -2
  34. data/lib/fog/libvirt/requests/compute/list_interfaces.rb +2 -2
  35. data/lib/fog/libvirt/requests/compute/list_networks.rb +2 -2
  36. data/lib/fog/libvirt/requests/compute/list_pool_volumes.rb +2 -2
  37. data/lib/fog/libvirt/requests/compute/list_pools.rb +2 -2
  38. data/lib/fog/libvirt/requests/compute/list_volumes.rb +2 -2
  39. data/lib/fog/libvirt/requests/compute/pool_action.rb +2 -2
  40. data/lib/fog/libvirt/requests/compute/update_display.rb +2 -2
  41. data/lib/fog/libvirt/requests/compute/upload_volume.rb +2 -2
  42. data/lib/fog/libvirt/requests/compute/vm_action.rb +2 -2
  43. data/lib/fog/libvirt/requests/compute/volume_action.rb +2 -2
  44. data/lib/fog/libvirt/version.rb +1 -1
  45. data/minitests/server/server_test.rb +1 -1
  46. data/minitests/server/user_data_iso_test.rb +8 -8
  47. data/tests/libvirt/models/compute/interface_tests.rb +1 -1
  48. data/tests/libvirt/models/compute/interfaces_tests.rb +1 -1
  49. data/tests/libvirt/models/compute/network_tests.rb +1 -1
  50. data/tests/libvirt/models/compute/networks_tests.rb +1 -1
  51. data/tests/libvirt/models/compute/nic_tests.rb +1 -1
  52. data/tests/libvirt/models/compute/pool_tests.rb +1 -1
  53. data/tests/libvirt/models/compute/pools_tests.rb +1 -1
  54. data/tests/libvirt/models/compute/server_tests.rb +1 -1
  55. data/tests/libvirt/models/compute/servers_tests.rb +1 -1
  56. data/tests/libvirt/models/compute/volume_tests.rb +1 -1
  57. data/tests/libvirt/models/compute/volumes_tests.rb +1 -1
  58. metadata +3 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a924f47a387da6a04d3f10ca5528ad6df73153b
4
- data.tar.gz: 9f578e6cfe50d4994a610e2b427e819d633d76ba
3
+ metadata.gz: 4d3e03b125cb0f12ce53c57d60771ca49907477e
4
+ data.tar.gz: 7ace802207daa028a1bfbc94a0c182ffe7f51e2d
5
5
  SHA512:
6
- metadata.gz: 66e744dc9c9b7e0072b9f5c10912f0626e7355d3c1bacf2dad20a102033dc62213fd5bc9237ea66ac38d48115bc7bfa183043d59bff2f1faffa66a804e683c95
7
- data.tar.gz: e2f735103f4af3889a9679f6ba5c8bf578e5ba2966c8bcb9a902996232bee239631d433092fa90ee88073e08af29902c54f18875ec0334a4c0552212108617e5
6
+ metadata.gz: 983092becd604cceed9072b7a26ae8970a1f078bd5e0af97ebdf7f09ea11c3ac01cc7af6ce68be46303c8a11be1b101fa01501d4f31af16ac11ec61030b9fc4c
7
+ data.tar.gz: 59c5488a0938ac843c8a6405e868b11cba9e027e32782de9d12be7bd7b6ec7964d3e42dc068be636f58a1d12eed53dd7ab925d9b788aa75b93f0b48b1fd073ad
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
 
26
26
  s.required_ruby_version = '>= 2.0.0'
27
27
 
28
- s.add_dependency("fog-core", "~> 1.27", ">= 1.27.4")
28
+ s.add_dependency("fog-core", ">= 1.27.4")
29
29
  s.add_dependency("fog-json")
30
30
  s.add_dependency("fog-xml", "~> 0.1.1")
31
31
  s.add_dependency('ruby-libvirt','>= 0.7.0')
@@ -3,7 +3,7 @@ module Libvirt # deviates from other bin stuff to accommodate gem
3
3
  def class_for(key)
4
4
  case key
5
5
  when :compute
6
- Fog::Compute::Libvirt
6
+ Fog::Libvirt::Compute
7
7
  else
8
8
  raise ArgumentError, "Unrecognized service: #{key}"
9
9
  end
@@ -9,9 +9,7 @@ module Fog
9
9
  module Libvirt
10
10
  extend Fog::Provider
11
11
 
12
- module Compute
13
- autoload :Libvirt, File.expand_path('../libvirt/compute', __FILE__)
14
- end
12
+ autoload :Compute, File.expand_path('../libvirt/compute', __FILE__)
15
13
 
16
14
  service(:compute, 'Compute')
17
15
  end
@@ -2,8 +2,8 @@ require 'fog/libvirt/models/compute/util/util'
2
2
  require 'fog/libvirt/models/compute/util/uri'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt < Fog::Service
5
+ module Libvirt
6
+ class Compute < Fog::Service
7
7
  requires :libvirt_uri
8
8
  recognizes :libvirt_username, :libvirt_password
9
9
  recognizes :libvirt_ip_command
@@ -48,7 +48,7 @@ module Fog
48
48
  request :libversion
49
49
 
50
50
  module Shared
51
- include Fog::Compute::LibvirtUtil
51
+ include Fog::Libvirt::Util
52
52
  end
53
53
 
54
54
  class Mock
@@ -78,7 +78,7 @@ module Fog
78
78
  attr_reader :ip_command
79
79
 
80
80
  def initialize(options={})
81
- @uri = ::Fog::Compute::LibvirtUtil::URI.new(enhance_uri(options[:libvirt_uri]))
81
+ @uri = ::Fog::Libvirt::Util::URI.new(enhance_uri(options[:libvirt_uri]))
82
82
  @ip_command = options[:libvirt_ip_command]
83
83
 
84
84
  # libvirt is part of the gem => ruby-libvirt
@@ -1,8 +1,8 @@
1
1
  require 'fog/core/model'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Libvirt
4
+ module Libvirt
5
+ class Compute
6
6
  class Interface < Fog::Model
7
7
  identity :name
8
8
  attribute :mac
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/interface'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Interfaces < Fog::Collection
8
- model Fog::Compute::Libvirt::Interface
8
+ model Fog::Libvirt::Compute::Interface
9
9
 
10
10
  def all(filter={})
11
11
  load(service.list_interfaces(filter))
@@ -2,10 +2,10 @@ require 'fog/core/model'
2
2
  require 'fog/libvirt/models/compute/util/util'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Network < Fog::Model
8
- include Fog::Compute::LibvirtUtil
8
+ include Fog::Libvirt::Util
9
9
 
10
10
  identity :uuid
11
11
  attribute :name
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/network'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Networks < Fog::Collection
8
- model Fog::Compute::Libvirt::Network
8
+ model Fog::Libvirt::Compute::Network
9
9
 
10
10
  def all(filter={})
11
11
  load(service.list_networks(filter))
@@ -1,8 +1,8 @@
1
1
  require 'fog/core/model'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Libvirt
4
+ module Libvirt
5
+ class Compute
6
6
  class Nic < Fog::Model
7
7
  identity :mac
8
8
  attribute :id
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/nic'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Nics < Fog::Collection
8
- model Fog::Compute::Libvirt::Nic
8
+ model Fog::Libvirt::Compute::Nic
9
9
  end
10
10
  end
11
11
  end
@@ -1,8 +1,8 @@
1
1
  require 'fog/core/model'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Libvirt
4
+ module Libvirt
5
+ class Compute
6
6
  class Node < Fog::Model
7
7
  identity :uuid
8
8
 
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/node'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Nodes < Fog::Collection
8
- model Fog::Compute::Libvirt::Node
8
+ model Fog::Libvirt::Compute::Node
9
9
 
10
10
  def all(filter={ })
11
11
  load(service.get_node_info)
@@ -1,8 +1,8 @@
1
1
  require 'fog/core/model'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Libvirt
4
+ module Libvirt
5
+ class Compute
6
6
  class Pool < Fog::Model
7
7
  attr_reader :xml
8
8
 
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/pool'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Pools < Fog::Collection
8
- model Fog::Compute::Libvirt::Pool
8
+ model Fog::Libvirt::Compute::Pool
9
9
 
10
10
  def all(filter = {})
11
11
  load(service.list_pools(filter))
@@ -3,10 +3,10 @@ require 'fog/libvirt/models/compute/util/util'
3
3
  require 'fileutils'
4
4
 
5
5
  module Fog
6
- module Compute
7
- class Libvirt
6
+ module Libvirt
7
+ class Compute
8
8
  class Server < Fog::Compute::Server
9
- include Fog::Compute::LibvirtUtil
9
+ include Fog::Libvirt::Util
10
10
  attr_reader :xml
11
11
 
12
12
  identity :id, :aliases => 'uuid'
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/server'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Servers < Fog::Collection
8
- model Fog::Compute::Libvirt::Server
8
+ model Fog::Libvirt::Compute::Server
9
9
 
10
10
  def all(filter={})
11
11
  load(service.list_domains(filter))
@@ -5,8 +5,8 @@
5
5
  <target>
6
6
  <format type="<%= format_type %>"/>
7
7
  <permissions>
8
- <owner>0</owner>
9
- <group>0</group>
8
+ <owner><%= owner %></owner>
9
+ <group><%= group %></group>
10
10
  <mode>0744</mode>
11
11
  <label>virt_image_t</label>
12
12
  </permissions>
@@ -16,8 +16,8 @@
16
16
  <path><%= backing_volume.path %></path>
17
17
  <format type="<%= backing_volume.format_type %>"/>
18
18
  <permissions>
19
- <owner>0</owner>
20
- <group>0</group>
19
+ <owner><%= owner %></owner>
20
+ <group><%= group %></group>
21
21
  <mode>0744</mode>
22
22
  <label>virt_image_t</label>
23
23
  </permissions>
@@ -2,8 +2,8 @@ require 'uri'
2
2
  require 'cgi'
3
3
 
4
4
  module Fog
5
- module Compute
6
- module LibvirtUtil
5
+ module Libvirt
6
+ module Util
7
7
  class URI
8
8
  attr_reader :uri
9
9
 
@@ -4,8 +4,8 @@ require 'ostruct'
4
4
  require 'securerandom'
5
5
 
6
6
  module Fog
7
- module Compute
8
- module LibvirtUtil
7
+ module Libvirt
8
+ module Util
9
9
  def xml_element(xml, path, attribute=nil)
10
10
  xml = Nokogiri::XML(xml)
11
11
  attribute.nil? ? (xml/path).first.text : (xml/path).first[attribute.to_sym]
@@ -2,11 +2,11 @@ require 'fog/core/model'
2
2
  require 'fog/libvirt/models/compute/util/util'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Volume < Fog::Model
8
8
  attr_reader :xml
9
- include Fog::Compute::LibvirtUtil
9
+ include Fog::Libvirt::Util
10
10
 
11
11
  identity :id, :aliases => 'key'
12
12
 
@@ -16,6 +16,8 @@ module Fog
16
16
  attribute :path
17
17
  attribute :capacity
18
18
  attribute :allocation
19
+ attribute :owner
20
+ attribute :group
19
21
  attribute :format_type
20
22
  attribute :backing_volume
21
23
 
@@ -106,6 +108,8 @@ module Fog
106
108
  :name => randomized_name,
107
109
  :capacity => "10G",
108
110
  :allocation => "1G",
111
+ :owner => "0",
112
+ :group => "0",
109
113
  }
110
114
  end
111
115
 
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/libvirt/models/compute/volume'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Libvirt
5
+ module Libvirt
6
+ class Compute
7
7
  class Volumes < Fog::Collection
8
- model Fog::Compute::Libvirt::Volume
8
+ model Fog::Libvirt::Compute::Volume
9
9
 
10
10
  def all(filter = {})
11
11
  load(service.list_volumes(filter))
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def clone_volume (pool_name, xml, name)
6
6
  vol = client.lookup_storage_pool_by_name(pool_name).lookup_volume_by_name(name)
@@ -10,7 +10,7 @@ module Fog
10
10
 
11
11
  class Mock
12
12
  def clone_volume(pool_name, xml, name)
13
- Fog::Compute::Libvirt::Volume.new({:pool_name => pool_name, :xml => xml})
13
+ Fog::Libvirt::Compute::Volume.new({:pool_name => pool_name, :xml => xml})
14
14
  end
15
15
  end
16
16
  end
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def create_domain(xml)
6
6
  client.create_domain_xml(xml)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def create_volume(pool_name, xml)
6
6
  client.lookup_storage_pool_by_name(pool_name).create_vol_xml(xml)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def define_domain(xml)
6
6
  client.define_domain_xml(xml)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def define_pool(xml)
6
6
  client.define_storage_pool_xml(xml)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  #shutdown the interface
6
6
  def destroy_interface(uuid)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def destroy_network(uuid)
6
6
  client.lookup_network_by_uuid(uuid).destroy
@@ -1,8 +1,8 @@
1
1
  require 'socket'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Libvirt
4
+ module Libvirt
5
+ class Compute
6
6
  class Real
7
7
  def dhcp_leases(uuid, mac, flags = 0)
8
8
  client.lookup_network_by_uuid(uuid).dhcp_leases(mac, flags)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def get_node_info
6
6
  node_hash = Hash.new
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Fog
3
- module Compute
4
- class Libvirt
3
+ module Libvirt
4
+ class Compute
5
5
  class Real
6
6
  def libversion()
7
7
  client.libversion
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def list_domains(filter = { })
6
6
  data=[]
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def list_interfaces(filter = { })
6
6
  data=[]
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def list_networks(filter = { })
6
6
  data=[]
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def list_pool_volumes(uuid)
6
6
  pool = client.lookup_storage_pool_by_uuid uuid
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def list_pools(filter = { })
6
6
  data=[]
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def list_volumes(filter = { })
6
6
  data = []
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def pool_action(uuid, action)
6
6
  pool = client.lookup_storage_pool_by_uuid uuid
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def update_display(options = { })
6
6
  raise ArgumentError, "uuid is a required parameter" unless options.key? :uuid
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def upload_volume(pool_name, volume_name, file_path)
6
6
  volume = client.lookup_storage_pool_by_name(pool_name).lookup_volume_by_name(volume_name)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def vm_action(uuid, action)
6
6
  domain = client.lookup_domain_by_uuid(uuid)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Libvirt
2
+ module Libvirt
3
+ class Compute
4
4
  class Real
5
5
  def volume_action(key, action, options={})
6
6
  get_volume({:key => key}, true).send(action)
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Libvirt
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
@@ -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
@@ -34,10 +34,10 @@ class UserDataIsoTest < Minitest::Test
34
34
  def test_volume_is_created_during_user_data_iso_generation
35
35
  iso_path = "iso_file_path"
36
36
  @server.stubs(:system).returns(true)
37
- Fog::Compute::Libvirt::Volumes.any_instance.expects(:create).
37
+ Fog::Libvirt::Compute::Volumes.any_instance.expects(:create).
38
38
  with(has_entries(:name => @server.cloud_init_volume_name)).
39
39
  returns(@compute.volumes.new)
40
- Fog::Compute::Libvirt::Volume.any_instance.stubs(:upload_image)
40
+ Fog::Libvirt::Compute::Volume.any_instance.stubs(:upload_image)
41
41
 
42
42
  @server.create_user_data_iso
43
43
  end
@@ -45,8 +45,8 @@ class UserDataIsoTest < Minitest::Test
45
45
  def test_volume_is_uploaded_during_user_data_iso_generation
46
46
  iso_path = "iso_file_path"
47
47
  @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)
48
+ Fog::Libvirt::Compute::Volumes.any_instance.stubs(:create).returns(@compute.volumes.new)
49
+ Fog::Libvirt::Compute::Volume.any_instance.expects(:upload_image).returns(true)
50
50
 
51
51
  @server.create_user_data_iso
52
52
  end
@@ -54,8 +54,8 @@ class UserDataIsoTest < Minitest::Test
54
54
  def test_iso_file_is_set_during_user_data_iso_generation
55
55
  iso_path = "iso_file_path"
56
56
  @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)
57
+ Fog::Libvirt::Compute::Volumes.any_instance.stubs(:create).returns(@compute.volumes.new)
58
+ Fog::Libvirt::Compute::Volume.any_instance.stubs(:upload_image)
59
59
 
60
60
  @server.create_user_data_iso
61
61
  assert_equal @server.cloud_init_volume_name, @server.iso_file
@@ -65,8 +65,8 @@ class UserDataIsoTest < Minitest::Test
65
65
  @server.stubs(:system).returns(true)
66
66
  volume = @compute.volumes.new
67
67
  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)
68
+ Fog::Libvirt::Compute::Volumes.any_instance.stubs(:create).returns(volume)
69
+ Fog::Libvirt::Compute::Volume.any_instance.stubs(:upload_image)
70
70
 
71
71
  @server.create_user_data_iso
72
72
  assert_equal '/srv/libvirt', @server.iso_dir
@@ -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 }
@@ -55,6 +55,6 @@ Shindo.tests('Fog::Compute[:libvirt] | server model', ['libvirt']) do
55
55
  end
56
56
  end
57
57
  end
58
- test('be a kind of Fog::Compute::Libvirt::Server') { server.kind_of? Fog::Compute::Libvirt::Server }
58
+ test('be a kind of Fog::Libvirt::Compute::Server') { server.kind_of? Fog::Libvirt::Compute::Server }
59
59
  end
60
60
  end
@@ -4,7 +4,7 @@ Shindo.tests('Fog::Compute[:libvirt] | servers collection', ['libvirt']) do
4
4
 
5
5
  tests('The servers collection') do
6
6
  test('should not be empty') { not servers.empty? }
7
- test('should be a kind of Fog::Compute::Libvirt::Servers') { servers.kind_of? Fog::Compute::Libvirt::Servers }
7
+ test('should be a kind of Fog::Libvirt::Compute::Servers') { servers.kind_of? Fog::Libvirt::Compute::Servers }
8
8
  tests('should be able to reload itself').succeeds { servers.reload }
9
9
  tests('should be able to get a model') do
10
10
  tests('by instance uuid').succeeds { servers.get servers.first.id }
@@ -24,7 +24,7 @@ Shindo.tests('Fog::Compute[:libvirt] | volume model', ['libvirt']) do
24
24
  end
25
25
  end
26
26
  end
27
- test('be a kind of Fog::Compute::Libvirt::Volume') { volume.kind_of? Fog::Compute::Libvirt::Volume }
27
+ test('be a kind of Fog::Libvirt::Compute::Volume') { volume.kind_of? Fog::Libvirt::Compute::Volume }
28
28
  end
29
29
 
30
30
  tests('Cloning volumes should') do
@@ -4,7 +4,7 @@ Shindo.tests('Fog::Compute[:libvirt] | volumes collection', ['libvirt']) do
4
4
 
5
5
  tests('The volumes collection') do
6
6
  test('should not be empty') { not volumes.empty? }
7
- test('should be a kind of Fog::Compute::Libvirt::Volumes') { volumes.kind_of? Fog::Compute::Libvirt::Volumes }
7
+ test('should be a kind of Fog::Libvirt::Compute::Volumes') { volumes.kind_of? Fog::Libvirt::Compute::Volumes }
8
8
  tests('should be able to reload itself').succeeds { volumes.reload }
9
9
  tests('should be able to get a model') do
10
10
  tests('by instance uuid').succeeds { volumes.get volumes.first.id }
metadata CHANGED
@@ -1,22 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-libvirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - geemus (Wesley Beary)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2019-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.27'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: 1.27.4
@@ -24,9 +21,6 @@ dependencies:
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '1.27'
30
24
  - - ">="
31
25
  - !ruby/object:Gem::Version
32
26
  version: 1.27.4
@@ -333,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
333
327
  version: '0'
334
328
  requirements: []
335
329
  rubyforge_project:
336
- rubygems_version: 2.6.12
330
+ rubygems_version: 2.6.14.1
337
331
  signing_key:
338
332
  specification_version: 2
339
333
  summary: Module for the 'fog' gem to support libvirt