Module: Vagabond::Actions::Status

Defined in:
lib/vagabond/actions/status.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/vagabond/actions/status.rb', line 5

def included(klass)
  klass.class_eval do
    class << self
      def _status_desc
        if(defined?(Server) && self == Server)
          ['status', 'Status of server']
        else
          ['status [NODE]', 'Status of NODE or all nodes']
        end
      end
    end
  end
end

Instance Method Details

#_statusObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/vagabond/actions/status.rb', line 20

def _status
  ui.info ui.color("Vagabond node status:\n", :bold)
  if(name)
    status_for(name)
  else
    (Array(vagabondfile[:boxes].keys) | Array(internal_config[mappings_key].keys)).sort.each do |n|
      status_for(n)
    end
  end
end