Sha256: 8b29da94cb3ad227ca90dbd3dddfbdd66eb06ac89c2894f565f4e120f1872100

Contents?: true

Size: 1.35 KB

Versions: 14

Compression:

Stored size: 1.35 KB

Contents

module HammerCLIForeman
  module CommandExtensions
    class Subnet < HammerCLI::CommandExtensions
      option '--prefix', 'PREFIX', _('Network prefix in CIDR notation (e.g. 64) for this subnet')

      option_sources do |sources, command|
        sources.find_by_name('IdResolution').insert_relative(
          :after,
          'IdParams',
          HammerCLIForeman::OptionSources::ReferencedResourceIdParams.new(command)
        )
        sources
      end

      option_family associate: 'tftp' do
        child '--tftp', 'TFTP_NAME', _('TFTP Proxy to use within this subnet'),
              attribute_name: :option_tftp_name,
              referenced_resource: :smart_proxy
      end

      option_family associate: 'dns' do
        child '--dns', 'DNS_NAME', _('DNS Proxy to use within this subnet'),
              attribute_name: :option_dns_name,
              referenced_resource: :smart_proxy
      end

      option_family associate: 'dhcp' do
        child '--dhcp', 'DHCP_NAME', _('DHCP Proxy to use within this subnet'),
              attribute_name: :option_dhcp_name,
              referenced_resource: :smart_proxy
      end

      option_family associate: 'bmc' do
        child '--bmc', 'BMC_NAME', _('BMC Proxy to use within this subnet'),
              attribute_name: :option_bmc_name,
              referenced_resource: :smart_proxy
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.14.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.13.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.12.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.10.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.9.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.8.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.7.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.5.1 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.6.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.5.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.4.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.3.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.2.0 lib/hammer_cli_foreman/command_extensions/subnet.rb
hammer_cli_foreman-3.1.0 lib/hammer_cli_foreman/command_extensions/subnet.rb