Class: Idcf::Cli::Service::Ilb::BaseServerForProtocol
- Defined in:
- lib/idcf/cli/service/ilb/base_server_for_protocol.rb
Overview
- add/delete
-
server for protocol
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Base::ARG_TYPE_OPT, Base::ARG_TYPE_REQ, Base::ARG_TYPE_REST, Base::HELP_FORMAT
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes inherited from Base
#last_command, #last_command_args
Instance Method Summary collapse
Methods inherited from Base
#between_param?, #cli_error, description, #initialize, make_param_s, #method_option_cnt, #method_rest?, option, reset, valid_params
Methods included from Lib::Include::RecurringCalling
Constructor Details
This class inherits a constructor from Idcf::Cli::Service::Base
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
9 10 11 |
# File 'lib/idcf/cli/service/ilb/base_server_for_protocol.rb', line 9 def api @api end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/idcf/cli/service/ilb/base_server_for_protocol.rb', line 9 def @options end |
Instance Method Details
#do(api, o, lb_id, protocol, protocol_port, params) ⇒ Object
do
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/idcf/cli/service/ilb/base_server_for_protocol.rb', line 19 def do(api, o, lb_id, protocol, protocol_port, params) @api = api @options = o lb = search_lb(lbs, lb_id) config = search_config(lb['configs'], protocol, protocol_port) if config.nil? not_param = o[:protocol].nil? ? 'conf_id' : 'protocol' cli_error "A target isn't found(#{not_param})" end set_last_command(lb_id, config, params) config['servers'] end |