Class: Wakame::Cli::Subcommand::StopService

Inherits:
Object
  • Object
show all
Includes:
Wakame::Cli::Subcommand
Defined in:
lib/wakame/runner/administrator_command.rb

Instance Method Summary collapse

Methods included from Wakame::Cli::Subcommand

#create_parser, included, #print_result

Instance Method Details

#parse(args) ⇒ Object



604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/wakame/runner/administrator_command.rb', line 604

def parse(args)
  @params = {}
  create_parser(args) {|opts|
    opts.banner = "Usage: stop_service [options] \"Service ID\""
    opts.separator ""
    opts.separator "options:"
    opts.on("-i INSTANCE_ID", "--instance INSTANCE_ID"){|i| @params[:service_id] = i}
    opts.on("-s SERVICE_NAME", "--service SERVICE_NAME"){|str| @params[:service_name] = str}
    opts.on("-a AGENT_ID", "--agent AGENT_ID"){|i| @params[:agent_id] = i}
  }
  @params
end

#run(requester) ⇒ Object



617
618
619
# File 'lib/wakame/runner/administrator_command.rb', line 617

def run(requester)
  requester.request(@params)
end