IP4Address class - Platform - BlueCat Gateway - 20.12.1

Gateway Administration Guide

prodname
BlueCat Gateway
version_custom
20.12.1

class ip4_address.IP4Address(api, api_entity)

Bases: bluecat.ip_address.IPAddress

IPv4 address objects.

Parameters Description
api API instance used by the entity to communicate with BAM.
api_entity The entity returned by the BAM API.

change_state_ip4_address(target_state, mac_address='')

Converts the state of an address from and between Reserved, DHCP Reserved, and Static, or DHCP allocated to DHCP reserved.
Parameters Description
target_state  
mac_address Optional and only needed if the target requires it. For example, MAKE_DHCP_RESERVED.

get_address()

Get the address as a string.

get_reverse_name()

Get the reverse name for the address.

get_state()

Get the state of the address.

move_ip_object(address, no_server_update=False'')

Moves the IPv4 or IPv6 object to another address with the parameter no_server_update.

Parameters Description
address (string, required) The new address of the IPv4 or IPv6 object.
no_server_update (boolean, required)

Default value: False

If set to True, instant dynamic host record changes will not occur on DNS/DHCP Servers when moving an IPv4 or IPv6 address object.

Example:
api = g.user.get_api()           # get api object
ip4_address_id = 10223           # ip6 block id
new_ip_address = '10.0.0.1'
ip4_object = api.get_entity_by_id(ip4_address_id)

ip4_object.move_ip_object(new_ip_address, True)

name()

Get the BAM name of the entity.