Class: GreenAndSecure::Block

Inherits:
Chef::Knife
  • Object
show all
Defined in:
lib/chef/knife/block.rb

Instance Method Summary collapse

Instance Method Details

#runObject



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/chef/knife/block.rb', line 27

def run
   	    list = GreenAndSecure::BlockList.new
           if name_args.size == 1 and list.servers.include?(name_args[0])
   	        use = GreenAndSecure::BlockUse.new
               use.name_args = name_args
               use.run
           else
        puts 'Did you mean to run "knife block list" instead?'
        puts 'Running "knife block list" for you now'
   	        list.run
           end
end