opennebula 5.0.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16cda589536bb5239ef70cb6898e8b00e3ebd9c9
4
- data.tar.gz: 4e71745bc284fb49c762321fc7523064c3f11716
3
+ metadata.gz: 0b3f5a3432e11308e671bec5f860d0ffe8ff9681
4
+ data.tar.gz: 0cbc97bfb8280440743319d12ef1a2db9a05bd49
5
5
  SHA512:
6
- metadata.gz: cd3b03e5187e2efe9d6cee742e58e917b6fec606388282657c9a4a0b276facc22e859084b9e26d9447e2b664997727653ff33e6792d0744b80a7e7c16436da87
7
- data.tar.gz: 3dec23410ed0b0b8f53f9bdec6bea441b70d1df9f8cdb3f1a270a8cbba313750565e16a0f2c78985c9f00184120c03252b53fc7e63ca1a111a4350116c70e239
6
+ metadata.gz: ccfbb4c8dfd7d67bfe64e3049b50c2885b193cf74ca6693d618dce9af6632e5d27e5b6f30ad11864bcafb68dcfd9a52d525cfb6ac38146f23a5468271df4f0bd
7
+ data.tar.gz: d7ef9a12c93613878d1d0f9431ccbeeabdb9d8cf92fe4585b84e1db69c07c08ad1b96e7cd0ff828e77efd62445b6df23096559a25ad2e949562fbca731b92b84
@@ -50,7 +50,7 @@ end
50
50
  module CloudClient
51
51
 
52
52
  # OpenNebula version
53
- VERSION = '5.0.0'
53
+ VERSION = '5.0.2'
54
54
 
55
55
  # #########################################################################
56
56
  # Default location for the authentication file
data/lib/opennebula.rb CHANGED
@@ -66,5 +66,5 @@ require 'opennebula/marketplaceapp_pool'
66
66
  module OpenNebula
67
67
 
68
68
  # OpenNebula version
69
- VERSION = '5.0.0'
69
+ VERSION = '5.0.2'
70
70
  end
@@ -85,8 +85,7 @@ module OpenNebula
85
85
  # Allocates a new Datastore in OpenNebula
86
86
  #
87
87
  # @param description [String] The template of the Datastore.
88
- # @param cluster_id [Integer] Id of the cluster. If it is -1,
89
- # this datastore won't be added to any cluster.
88
+ # @param cluster_id [Integer] Id of the cluster, -1 to use default
90
89
  #
91
90
  # @return [Integer, OpenNebula::Error] the new ID in case of
92
91
  # success, error otherwise
@@ -51,5 +51,27 @@ module OpenNebula
51
51
  end
52
52
 
53
53
  alias_method :info!, :info
54
+
55
+ #######################################################################
56
+ # Helpers to get information
57
+ #######################################################################
58
+
59
+ # Returns a list of user IDs that have the given password. info() needs
60
+ # to be called before.
61
+ #
62
+ # @param driver [String] auth driver to match
63
+ # @param password [String] password to match
64
+ # @return [Array] an array of IDs
65
+ def users_with_password(driver, password)
66
+ ids = []
67
+
68
+ each do |user|
69
+ if user["PASSWORD"] == password
70
+ ids << user["ID"]
71
+ end
72
+ end
73
+
74
+ return ids
75
+ end
54
76
  end
55
77
  end
@@ -213,6 +213,7 @@ module OpenNebula
213
213
  EXTERNAL_IP_ATTRS = [
214
214
  'GUEST_IP',
215
215
  'AWS_IP_ADDRESS',
216
+ 'AWS_PRIVATE_IP_ADDRESS',
216
217
  'AZ_IPADDRESS',
217
218
  'SL_PRIMARYIPADDRESS'
218
219
  ]
@@ -76,8 +76,7 @@ module OpenNebula
76
76
  # Allocates a new VirtualNetwork in OpenNebula
77
77
  #
78
78
  # @param description [String] The template of the VirtualNetwork.
79
- # @param cluster_id [Integer] Id of the cluster. If it is -1,
80
- # this VirtualNetwork won't be added to any cluster.
79
+ # @param cluster_id [Integer] Id of the cluster, -1 to use default
81
80
  #
82
81
  # @return [Integer, OpenNebula::Error] the new ID in case of
83
82
  # success, error otherwise
@@ -591,6 +591,7 @@ class VIClient
591
591
  datastores.each { |ds|
592
592
  next if !ds.is_a? RbVmomi::VIM::Datastore
593
593
  # Find the Cluster from which to access this ds
594
+ next if !ds.host[0]
594
595
  cluster_name = ds.host[0].key.parent.name
595
596
 
596
597
  if !dspool["DATASTORE[NAME=\"#{ds.name}\"]"] and
@@ -2003,7 +2004,9 @@ private
2003
2004
  # Checks if a RbVmomi::VIM::VirtualDevice is a disk
2004
2005
  ########################################################################
2005
2006
  def self.is_disk?(device)
2006
- !device.class.ancestors.index(RbVmomi::VIM::VirtualDisk).nil?
2007
+ is_disk = !(device.class.ancestors.index(RbVmomi::VIM::VirtualDisk)).nil?
2008
+ is_cdrom = !(device.class.ancestors.index(RbVmomi::VIM::VirtualCdrom)).nil?
2009
+ is_disk or is_cdrom
2007
2010
  end
2008
2011
 
2009
2012
  ########################################################################
@@ -2437,7 +2440,7 @@ private
2437
2440
  img_name = disk.elements["SOURCE"].text
2438
2441
  type_str = disk.elements["TYPE"].text
2439
2442
 
2440
- disk_array += attach_disk("", "", ds_name, img_name, 0, type_str, vm, connection)[:deviceChange]
2443
+ disk_array += attach_disk("", "", ds_name, img_name, type_str, 0, vm, connection)[:deviceChange]
2441
2444
  }
2442
2445
 
2443
2446
  device_change += disk_array
@@ -2647,6 +2650,7 @@ private
2647
2650
  ds_and_img_name = "[#{ds_name}] #{img_path}"
2648
2651
 
2649
2652
  disk = vm.config.hardware.device.select { |d| is_disk?(d) &&
2653
+ d.backing.respond_to?(:fileName) &&
2650
2654
  d.backing.fileName == ds_and_img_name }
2651
2655
 
2652
2656
  raise "Disk #{img_path} not found." if disk.nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2016-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri