Class: ForemanApi::Resources::Subnet

Inherits:
Base
  • Object
show all
Defined in:
lib/foreman_api/resources/subnet.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) doc



4
5
6
# File 'lib/foreman_api/resources/subnet.rb', line 4

def self.doc
  @doc ||= ForemanApi.doc['resources']["subnets"]
end

Instance Method Details

- (Array) create(params = {}, headers = {})

First item: parsed data; second item: raw body

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • subnet (Hash)

    allowed keys are:

    • dhcp_id [String] Dhcp proxy to use within this subnet
    • dns_id [String] Dns proxy to use within this subnet
    • domain_ids [String] Domains in which this subnet is part
    • tftp_id [String] Tftp proxy to use within this subnet
    • dns_primary [String] Primary dns for this subnet
    • dns_secondary [String] Secondary dns for this subnet
    • from [String] Starting ip address for ip auto suggestion
    • gateway [String] Primary dns for this subnet
    • mask [String] Netmask for this subnet
    • name [String] Subnet name
    • network [String] Subnet network
    • to [String] Ending ip address for ip auto suggestion
    • vlanid [String] Vlan id for this subnet

Returns:

  • (Array)

    First item: parsed data; second item: raw body



48
49
50
# File 'lib/foreman_api/resources/subnet.rb', line 48

def create(params = {}, headers = {})
  perform_call(__method__, params, headers)
end

- (Array) destroy(params = {}, headers = {})

First item: parsed data; second item: raw body

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • id (String)

    Subnet numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



81
82
83
# File 'lib/foreman_api/resources/subnet.rb', line 81

def destroy(params = {}, headers = {})
  perform_call(__method__, params, headers)
end

- (Array) index(params = {}, headers = {})

First item: parsed data; second item: raw body

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • order (String)

    Sort results

  • page (String)

    Paginate results

  • per_page (String)

    Number of entries per request

  • search (String)

    Filter results

Returns:

  • (Array)

    First item: parsed data; second item: raw body



16
17
18
# File 'lib/foreman_api/resources/subnet.rb', line 16

def index(params = {}, headers = {})
  perform_call(__method__, params, headers)
end

- (Array) show(params = {}, headers = {})

First item: parsed data; second item: raw body

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • id (String)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



25
26
27
# File 'lib/foreman_api/resources/subnet.rb', line 25

def show(params = {}, headers = {})
  perform_call(__method__, params, headers)
end

- (Array) update(params = {}, headers = {})

First item: parsed data; second item: raw body

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • id (String)

    Subnet numeric identifier

  • subnet (Hash)

    allowed keys are:

    • dhcp_id [String, nil] Dhcp proxy to use within this subnet
    • dns_id [String, nil] Dns proxy to use within this subnet
    • domain_ids [String, nil] Domains in which this subnet is part
    • tftp_id [String, nil] Tftp proxy to use within this subnet
    • dns_primary [String, nil] Primary dns for this subnet
    • dns_secondary [String, nil] Secondary dns for this subnet
    • from [String, nil] Starting ip address for ip auto suggestion
    • gateway [String, nil] Primary dns for this subnet
    • mask [String] Netmask for this subnet
    • name [String] Subnet name
    • network [String] Subnet network
    • to [String, nil] Ending ip address for ip auto suggestion
    • vlanid [String, nil] Vlan id for this subnet

Returns:

  • (Array)

    First item: parsed data; second item: raw body



72
73
74
# File 'lib/foreman_api/resources/subnet.rb', line 72

def update(params = {}, headers = {})
  perform_call(__method__, params, headers)
end