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.
155 156 157 158 159 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 155 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.
153 154 155 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 153 def cli_info @cli_info end |
#ns ⇒ Object (readonly)
Returns the value of attribute ns.
153 154 155 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 153 def ns @ns end |
#type_info ⇒ Object (readonly)
Returns the value of attribute type_info.
153 154 155 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 153 def type_info @type_info end |
Instance Method Details
#call(args = {}) ⇒ Object
169 170 171 172 173 174 175 176 177 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 169 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
161 162 163 |
# File 'lib/rbvmomi/vim/HostSystem.rb', line 161 def name @type_info.name end |