Method: Jamf::NetworkSegment#set_ip_range

Defined in:
lib/jamf/api/classic/api_objects/network_segment.rb

#set_ip_range(starting_address: nil, ending_address: nil, mask: nil, cidr: nil) ⇒ void

This method returns an undefined value.

set a new starting and ending addr at the same time.

and ending addresses.

Parameters:

  • starting_address (String) (defaults to: nil)

    The starting address, possibly masked

  • ending_address (String) (defaults to: nil)

    The ending address

  • mask (String) (defaults to: nil)

    The subnet mask to apply to the starting address to get the ending address

  • cidr (String, Integer) (defaults to: nil)

    he cidr value to apply to the starting address to get the ending address



659
660
661
662
663
664
665
666
667
668
669
# File 'lib/jamf/api/classic/api_objects/network_segment.rb', line 659

def set_ip_range(starting_address: nil, ending_address: nil, mask: nil, cidr: nil)
  range = self.class.ip_range(
    starting_address: starting_address,
    ending_address: ending_address,
    mask: mask,
    cidr: cidr
  )
  @starting_address = range.first
  @ending_address = range.last
  @need_to_update = true
end