mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-12 09:17:41 +03:00
feature #1020: conf file read for vmware im
This commit is contained in:
parent
83c0541ee9
commit
4a63ee16c7
@ -34,6 +34,10 @@ end
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
|
||||
CONF_FILE = ETC_LOCATION + "/vmwarerc"
|
||||
|
||||
ENV['LANG'] = 'C'
|
||||
|
||||
require "scripts_common"
|
||||
require 'yaml'
|
||||
require "CommandManager"
|
||||
@ -90,6 +94,13 @@ if !host
|
||||
exit -1
|
||||
end
|
||||
|
||||
conf = YAML::load(File.read(CONF_FILE))
|
||||
|
||||
@uri = conf[:libvirt_uri].gsub!('@HOST@', host)
|
||||
|
||||
@user = conf[:username]
|
||||
@pass = conf[:password]
|
||||
|
||||
# Poll the VMware hypervisor
|
||||
|
||||
rc, data = do_action("virsh -c #{@uri} --readonly nodeinfo")
|
||||
|
Loading…
Reference in New Issue
Block a user