module HammerCLIForeman::SubnetUpdateCreateCommons
Public Class Methods
included(base)
click to toggle source
# File lib/hammer_cli_foreman/subnet.rb, line 5 def self.included(base) base.option "--dns", "DNS_NAME", _("DNS Proxy to use within this subnet") base.option "--dhcp", "DHCP_NAME", _("DHCP Proxy to use within this subnet") base.option "--tftp", "TFTP_NAME", _("TFTP Proxy to use within this subnet") end
Public Instance Methods
request_params()
click to toggle source
Calls superclass method
# File lib/hammer_cli_foreman/subnet.rb, line 11 def request_params params = super params['subnet']["dns_id"] ||= proxy_feature_id(option_dns) if option_dns params['subnet']["dhcp_id"] ||= proxy_feature_id(option_dhcp) if option_dhcp params['subnet']["tftp_id"] ||= proxy_feature_id(option_tftp) if option_tftp params end
Private Instance Methods
proxy_feature_id(name)
click to toggle source
# File lib/hammer_cli_foreman/subnet.rb, line 21 def proxy_feature_id(name) resolver.smart_proxy_id('option_name' => name) if name end