Module: HammerCLIForeman::SubnetUpdateCreateCommons

Included in:
HammerCLIForeman::Subnet::CreateCommand, HammerCLIForeman::Subnet::UpdateCommand
Defined in:
lib/hammer_cli_foreman/subnet.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
# 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

Instance Method Details

#request_paramsObject



11
12
13
14
15
16
17
# 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