Sha256: c0cab17c319ab158abcafdc50eca4b092340c1f7523efe06cb8a311798cb4e1f

Contents?: true

Size: 777 Bytes

Versions: 16

Compression:

Stored size: 777 Bytes

Contents

module Mccloud
  module Command
    class VmCommand < Mccloud::Command::GroupBase
      register "vm", "Subcommand to manage vms"

      desc "define [VM-NAME] [DEFINITION-NAME]", "define a new vm based on a definition"
      def define(vm_name,definition_name)
        env.config.vms.define(vm_name,definition_name)
      end

      desc "list", "list all known vms"
      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

    end #Class

  end #Module
end # Module

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mccloud-0.1.1 lib/mccloud/command/vm.rb
mccloud-0.0.28 lib/mccloud/command/vm.rb
mccloud-0.0.27 lib/mccloud/command/vm.rb
mccloud-0.0.26 lib/mccloud/command/vm.rb
mccloud-0.0.25 lib/mccloud/command/vm.rb
mccloud-0.0.24 lib/mccloud/command/vm.rb
mccloud-0.0.23 lib/mccloud/command/vm.rb
mccloud-0.0.22 lib/mccloud/command/vm.rb
mccloud-0.0.21 lib/mccloud/command/vm.rb
mccloud-0.0.20 lib/mccloud/command/vm.rb
mccloud-0.0.19 lib/mccloud/command/vm.rb
mccloud-0.0.18 lib/mccloud/command/vm.rb
mccloud-0.0.17 lib/mccloud/command/vm.rb
mccloud-0.0.16 lib/mccloud/command/vm.rb
mccloud-0.0.15 lib/mccloud/command/vm.rb
mccloud-0.0.14 lib/mccloud/command/vm.rb