Method: VMC::Cli::Command::Micro#build_config
- Defined in:
- lib/cli/commands/micro.rb
#build_config ⇒ Object
Returns the configuration needed to run the micro related subcommands. First loads saved config from file (if there is any), then overrides loaded values with command line arguments, and finally tries to guess in case neither was used:
vmx location of micro.vmx file
vmrun location of vmrun command
password password for vcap user (in the guest vm)
platform current platform
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/cli/commands/micro.rb', line 49 def build_config conf = VMC::Cli::Config.micro # returns {} if there isn't a saved config override(conf, 'vmx', true) do locate_vmx(Micro.platform) end override(conf, 'vmrun', true) do VMC::Micro::VMrun.locate(Micro.platform) end override(conf, 'password') do @password = ask("Please enter your Micro Cloud Foundry VM password (vcap user) password", :echo => "*") end conf['platform'] = Micro.platform conf end |