Class: RbVmomi::VIM::EsxcliCommand
- Inherits:
-
Object
- Object
- RbVmomi::VIM::EsxcliCommand
- Defined in:
- lib/rbvmomi/vim/HostSystem.rb
Instance Attribute Summary collapse
-
#cli_info ⇒ Object
readonly
Returns the value of attribute cli_info.
-
#ns ⇒ Object
readonly
Returns the value of attribute ns.
-
#type_info ⇒ Object
readonly
Returns the value of attribute type_info.
Instance Method Summary collapse
- #call(args = {}) ⇒ Object
-
#initialize(ns, type_info) ⇒ EsxcliCommand
constructor
A new instance of EsxcliCommand.
- #name ⇒ Object
Constructor Details
#initialize(ns, type_info) ⇒ EsxcliCommand
Returns a new instance of EsxcliCommand.
152 153 154 155 156 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 152 def initialize ns, type_info @ns = ns @type_info = type_info @cached_cli_info = nil end |
Instance Attribute Details
#cli_info ⇒ Object (readonly)
Returns the value of attribute cli_info.
150 151 152 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 150 def cli_info @cli_info end |
#ns ⇒ Object (readonly)
Returns the value of attribute ns.
150 151 152 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 150 def ns @ns end |
#type_info ⇒ Object (readonly)
Returns the value of attribute type_info.
150 151 152 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 150 def type_info @type_info end |
Instance Method Details
#call(args = {}) ⇒ Object
166 167 168 169 170 171 172 173 174 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 166 def call args={} if @ns.host.direct? @ns.obj._call @type_info.wsdlName, args else real_args = Set.new(type_info.paramTypeInfo.map(&:name)) args = args.reject { |k,v| !real_args.member?(k.to_s) } @ns.host.mme.execute(@ns.obj._ref, "#{@ns.type_name}.#{@type_info.name}", args) end end |
#name ⇒ Object
158 159 160 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 158 def name @type_info.name end |