IP6Address class - Platform - BlueCat Gateway - 22.4.1

Gateway Administration Guide

English (United States)
Product name
BlueCat Gateway

class bluecat.ip6_address.IP6Address(api, api_entity)

Bases: bluecat.ip_object.IPAddress

Instantiate an IPv6 address.

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

change_state_ip6_address(action, duid='')

Converts the state of an IPv6 address to the specified target state.

Parameters Description
action Target state to change, available actions: “MAKE_DHCP_RESERVED”, “MAKE_STATIC”
duid Only required if “MAKE_DHCP_RESERVED.”


Clears an IP6Address to “UNALLOCATED.”


Calculate the integer value of an IPv6 address.

Parameters Description
ip_string IPv6 address in string form.

Returns: Integer value of the IPv6 address.


Calculate the first 8 bytes and second 8 bytes of an IPv6 address.

Parameters Description
ip Integer value of an IPv6 address.

Returns: (first 8 bytes, last 8 bytes)


Get the address as a string.


Get the state of the address.

move_ip_object(address, no_server_update=False)

Allows users to move the IP object to another address

Parameters Description
address New address to be allocated
no_server_update ONLY FOR IPV4 ADDRESSES, A boolean value. If set to True, instant dynamic host record changes will not occur on DNS/DHCP Servers when moving an IPv4 address object.


api = g.user.get_api()                  # get api object
ip4_id = 10234                          # ip4 block/ip4 network id
ip4_object = api.get_entity_by_id(ip4_id)
new_ip4_address = ''            # new IP address to be allocated