Click a link to jump to the indicated section.
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.” |
clear_ip6_address()
Clears an IP6Address to “UNALLOCATED.”
staticmethod
convert_ip_string_to_int(ip_string)
Calculate the integer value of an IPv6 address.
Parameters | Description |
---|---|
ip_string |
IPv6 address in string form. |
Returns: Integer value of the IPv6 address.
staticmethod
convert_ip_to_high_and_low(ip)
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_address()
Get the address as a string.
get_state()
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 |
Example:
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 = '10.0.0.1' # new IP address to be allocated
ip4_object.move_ip_object(new_ip4_address)