Class: RbVmomi::VIM::ManagedObject
- Inherits:
-
Object
- Object
- RbVmomi::VIM::ManagedObject
- Defined in:
- lib/rvc/modules/vsan.rb,
lib/rvc/modules/spbm.rb
Instance Method Summary collapse
- #_catch_spbm_resets(conn) ⇒ Object
- #dup_on_conn(conn) ⇒ Object
- #pbm_associated_profiles ⇒ Object
- #to_pbmobjref ⇒ Object
Instance Method Details
#_catch_spbm_resets(conn) ⇒ Object
192 193 194 195 196 197 198 199 200 201 |
# File 'lib/rvc/modules/spbm.rb', line 192 def _catch_spbm_resets(conn) begin yield rescue EOFError if conn conn.pbm = nil end raise "Connection to SPBM timed out, try again" end end |
#dup_on_conn(conn) ⇒ Object
2453 2454 2455 |
# File 'lib/rvc/modules/vsan.rb', line 2453 def dup_on_conn conn self.class.new(conn, self._ref) end |
#pbm_associated_profiles ⇒ Object
182 183 184 185 186 187 188 189 190 |
# File 'lib/rvc/modules/spbm.rb', line 182 def pbm_associated_profiles conn = _connection _catch_spbm_resets(conn) do pbm = _connection.pbm pm = pbm.serviceContent.profileManager ids = pm.PbmQueryAssociatedProfile(:entity => self.to_pbmobjref) pm.PbmRetrieveContent(:profileIds => ids) end end |
#to_pbmobjref ⇒ Object
172 173 174 175 176 177 178 179 180 |
# File 'lib/rvc/modules/spbm.rb', line 172 def to_pbmobjref type = self.class.wsdl_name type = "%s%s" % [type[0].downcase, type[1..-1]] PBM::PbmServerObjectRef( :objectType => type, :key => _ref, :serverUuid => _connection.serviceContent.about.instanceUuid ) end |