Sha256: 913108dc890aa287640badc67fd499c244169ba55625a419ac501b47ac4b3be1

Contents?: true

Size: 665 Bytes

Versions: 25

Compression:

Stored size: 665 Bytes

Contents

module Fission
  class Command
    class Status < Command

      def initialize(args=[])
        super
      end

      def execute

        all_vms=Fission::VM.all
        vm_with_longest_name = all_vms.max { |a,b| a.name.length <=> b.name.length }
        max_name_length=vm_with_longest_name.name.length
        all_vms.each do |vm|
          status = vm.state
          Fission.ui.output_printf "%-#{max_name_length}s   %s\n", vm.name, "["+status+"]"
        end

      end

      def option_parser
        optparse = OptionParser.new do |opts|
          opts.banner = "\nstatus usage: fission status"
        end

        optparse
      end

    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
veewee-0.5.0.alpha4 lib/fission.old/command/status.rb
veewee-0.5.0.alpha3 lib/fission.old/command/status.rb
veewee-0.5.0.alpha2 lib/fission.old/command/status.rb
veewee-0.5.0.alpha1 lib/fission.old/command/status.rb
veewee-0.4.5.1 lib/fission.old/command/status.rb
veewee-0.4.5 lib/fission.old/command/status.rb
veewee-0.4.5.pre1 lib/fission.old/command/status.rb
veewee-0.4.4 lib/fission.old/command/status.rb
veewee-0.4.3 lib/fission.old/command/status.rb
veewee-0.4.2 lib/fission.old/command/status.rb
veewee-0.4.1 lib/fission.old/command/status.rb
veewee-0.4.0 lib/fission.old/command/status.rb
veewee-0.3.12 lib/fission.old/command/status.rb
veewee-0.3.11 lib/fission.old/command/status.rb
veewee-0.3.10 lib/fission.old/command/status.rb
veewee-0.3.9 lib/fission.old/command/status.rb
veewee-0.3.0.alpha9 lib/fission/command/status.rb
veewee-0.3.0.alpha8 lib/fission/command/status.rb
veewee-0.3.0.alpha7 lib/fission/command/status.rb
veewee-0.3.0.alpha6 lib/fission/command/status.rb