Class: Wakame::Cli::Subcommand::PropagateService
- Inherits:
-
Object
- Object
- Wakame::Cli::Subcommand::PropagateService
show all
- Includes:
- Wakame::Cli::Subcommand
- Defined in:
- lib/wakame/runner/administrator_command.rb
Instance Method Summary
collapse
#create_parser, included, #print_result
Instance Method Details
#parse(args) ⇒ Object
557
558
559
560
561
562
563
564
565
566
567
|
# File 'lib/wakame/runner/administrator_command.rb', line 557
def parse(args)
@params = {}
create_parser(args) {|opts|
opts.banner = 'Usage: propagate_service [options] "Service ID"'
opts.separator('Options:')
opts.on('-h CLOUD_HOST_ID', '--host CLOUD_HOST_ID', String, "Cloud Host ID to be used as template."){ |i| @params["cloud_host_id"] = i }
opts.on('-n NUMBER', '--number NUMBER', Integer, "Number (>0) to propagate the specified service."){ |i| @params["number"] = i.to_i }
}
raise "Unknown Service ID: #{args}" unless args.size > 0
@params[:service_id] = args.shift
end
|
#run(requester) ⇒ Object
569
570
571
|
# File 'lib/wakame/runner/administrator_command.rb', line 569
def run(requester)
requester.request(@params)
end
|