class RbVmomi::BasicTypes::ManagedObject
Public Class Methods
kind()
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 173 def self.kind; :managed end
new(connection, ref)
click to toggle source
Calls superclass method
# File lib/rbvmomi/basic_types.rb, line 175 def initialize connection, ref super() @connection = connection @soap = @connection # XXX deprecated @ref = ref end
Public Instance Methods
==(x)
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 228 def == x out = (x.class == self.class && x._ref == @ref) out = (x._connection.instanceUuid == self._connection.instanceUuid) if out && x._connection.host out end
Also aliased as: eql?
[](k)
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 224 def [] k _get_property k end
_call(method, o={})
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 210 def _call method, o={} fail "parameters must be passed as a hash" unless o.is_a? Hash desc = self.class.full_methods_desc[method.to_s] or fail "unknown method" @connection.call method, desc, self, o end
_connection()
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 182 def _connection @connection end
_get_property(sym)
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 190 def _get_property sym ret = @connection.propertyCollector.RetrieveProperties(:specSet => [{ :propSet => [{ :type => self.class.wsdl_name, :pathSet => [sym.to_s] }], :objectSet => [{ :obj => self }], }])[0] if !ret return nil elsif ret.propSet.empty? return nil if ret.missingSet.empty? raise ret.missingSet[0].fault else ret.propSet[0].val end end
_ref()
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 186 def _ref @ref end
_set_property(sym, val)
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 206 def _set_property sym, val fail 'unimplemented' end
hash()
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 236 def hash [self.class, @ref].hash end
pretty_print(pp)
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 220 def pretty_print pp pp.text to_s end
to_s()
click to toggle source
# File lib/rbvmomi/basic_types.rb, line 216 def to_s "#{self.class.wsdl_name}(#{@ref.inspect})" end