Sha256: cb9e50fc9b6c94d2fa2012434bc075859167d7b8b9249da80427fb3ee3b2976a

Contents?: true

Size: 621 Bytes

Versions: 16

Compression:

Stored size: 621 Bytes

Contents

module Mccloud::Provider
  module Vmfusion
    module ProviderCommand

      def status(selection=nil,options=nil)

        env.ui.info ""
        80.times { |i| printf "*"}; env.ui.info ""
        all_vms = ::Fission::VM.all
        all_running_vms = ::Fission::VM.all_running

        longest_vm_name = all_vms.max { |a,b| a.length <=> b.length }

        ::Fission::VM.all.each do |vm|
          status = all_running_vms.include?(vm) ? '[running]' : '[not running]'
          Fission.ui.output_printf "%-#{longest_vm_name.length}s   %s\n", vm, status
        end

      end

    end #module
  end #module
end #module

Version data entries

16 entries across 16 versions & 1 rubygems

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