Class: RbVmomi::VIM::ReflectManagedMethodExecuter
- Inherits:
-
Object
- Object
- RbVmomi::VIM::ReflectManagedMethodExecuter
- Defined in:
- lib/rbvmomi/vim/ReflectManagedMethodExecuter.rb
Instance Method Summary collapse
Instance Method Details
#execute(moid, method, args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rbvmomi/vim/ReflectManagedMethodExecuter.rb', line 10 def execute moid, method, args soap_args = args.map do |k,v| VIM::ReflectManagedMethodExecuterSoapArgument.new.tap do |soap_arg| soap_arg.name = k xml = Builder::XmlMarkup.new :indent => 0 _connection.obj2xml xml, k, :anyType, false, v soap_arg.val = xml.target! end end result = ExecuteSoap(:moid => moid, :version => 'urn:vim25/5.0', :method => method, :argument => soap_args) _connection.xml2obj Nokogiri(result.response).root, nil end |
#fetch(moid, prop) ⇒ Object
4 5 6 7 8 |
# File 'lib/rbvmomi/vim/ReflectManagedMethodExecuter.rb', line 4 def fetch moid, prop result = FetchSoap(:moid => moid, :version => 'urn:vim25/5.0', :prop => prop) xml = Nokogiri(result.response) _connection.xml2obj xml.root, nil end |