Class: Mccloud::Command::VmCommand
- Defined in:
- lib/mccloud/command/vm.rb
Instance Attribute Summary
Attributes inherited from GroupBase
Instance Method Summary collapse
Methods inherited from GroupBase
Methods included from Helpers
Constructor Details
This class inherits a constructor from Mccloud::Command::GroupBase
Instance Method Details
#define(vm_name, definition_name) ⇒ Object
7 8 9 |
# File 'lib/mccloud/command/vm.rb', line 7 def define(vm_name,definition_name) env.config.vms.define(vm_name,definition_name) end |
#list ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mccloud/command/vm.rb', line 12 def list vms = env.config.vms.sort printf("%-30s|%-20s|%-15s|%-15s\n","alias","provider","ip-address","private-address") 80.times do print '-' end puts vms.each do |name,vm| printf("%-30s|%-20s|%-15s|%-15s\n",name,vm.provider.name,vm.ip_address,vm.private_ip_address) end end |