Class: Esx4VmRepository
- Inherits:
-
VmRepository
- Object
- VmRepository
- Esx4VmRepository
- Defined in:
- lib/ovfparse/esx4_vmrepository.rb
Constant Summary
Constants inherited from VmRepository
VmRepository::ALLOWABLE_PKG_TYPES, VmRepository::ALLOWABLE_PROTOCOLS, VmRepository::STRICT_CHECKING, VmRepository::USE_CACHE
Instance Attribute Summary
Attributes inherited from VmRepository
Instance Method Summary collapse
Methods inherited from VmRepository
ESXParse, FTParse, HTTParse, LSParse, create, #get, #initialize, #simplePackageConstruction, #uri
Constructor Details
This class inherits a constructor from VmRepository
Instance Method Details
#fetch ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ovfparse/esx4_vmrepository.rb', line 16 def fetch if protocol.name != "esx4" then return 'error' end #retrieve data from filesystem $cmd = VMWARE_LIBS + "/vminfo.pl --url https://" + url + "/sdk/vimService --fields vmname --folder " + VC_FOLDER + " --username " + VC_USER + " --password " + VC_PASS pipe = IO.popen $cmd raw_file_list = pipe.read pipe.close #parse out package list package_list = VmRepository::ESXParse(raw_file_list) #construct package objects based on results return simplePackageConstruction(package_list) end |