Don't use .fog for vSphere credentials

This commit is contained in:
Scott Schneider 2013-10-01 16:41:15 -07:00
parent 5838315609
commit 882fc36521

View file

@ -9,12 +9,14 @@ class VsphereHelper
raise "Unable to load RbVmomi, please ensure its installed" raise "Unable to load RbVmomi, please ensure its installed"
end end
fog_file = File.expand_path("~/.fog") Dir.chdir(File.dirname(__FILE__))
fog_data = YAML.load_file(fog_file)[:default]
@connection = RbVmomi::VIM.connect :host => fog_data[:vsphere_server], config_file = File.expand_path('../vmware-host-pooler.yaml')
:user => fog_data[:vsphere_username], vsphere = YAML.load_file(config_file)[:vsphere]
:password => fog_data[:vsphere_password],
@connection = RbVmomi::VIM.connect :host => vsphere['server'],
:user => vsphere['username'],
:password => vsphere['password'],
:insecure => true :insecure => true
end end