lib/chef/knife/cloud/vcenter_service.rb
def list_servers
          vms = VSphereAutomation::VCenter::VMApi.new(api_client).list.value

          # list_resource_command uses .send(:name) syntax, so convert to OpenStruct to keep it compatible
          vms.map { |vmsummary| OpenStruct.new(vmsummary.to_hash) }
        end
# Get a list of vms from the API
#
Get a list of vms from the API
Get a list of vms from the API
def list_servers
          vms = VSphereAutomation::VCenter::VMApi.new(api_client).list.value
          vms.map { |vmsummary| OpenStruct.new(vmsummary.to_hash) }
        end
def list_servers vms = VSphereAutomation :: VCenter :: VMApi . new ( api_client ) . list . value vms . map { | vmsummary | OpenStruct . new ( vmsummary . to_hash ) } end
Get a list of vms from the API
Get a list of vms from the API
# list_resource_command uses .send(:name) syntax, so convert to OpenStruct to keep it compatible