IP6Block class - Platform - BlueCat Gateway - 20.6.1

Gateway Administration Guide

prodname
BlueCat Gateway
version_custom
20.6.1

IPv6 block objects. Blocks form the nodes of a tree with networks as the leaves.

class ip6_block.IP6Block(api, api_entity)

Bases: bluecat.configuration.IP6SpaceConfiguration, bluecat.configuration.IP6SpaceConfigurationBlockNet

An IPv6 block is a group of IPv6 addresses that is separated from a larger network by subnetting.

add_ip6_block_by_mac(mac_address, name, properties='')

Adds an IPv6 block by specifying the MAC address of the server.
Warning: This method has been deprecated, use add_ip6_block_by_mac_address instead.
Parameters Description
mac_address The MAC address of the server in the format nnnnnnnnnnnn, nn-nn-nn-nn-nn-nn or nn:nn:nn:nn:nn:nn, where nn is a hexadecimal value.
name Descriptive name for the IPv6 block. This value can be empty.
properties Adds object properties, including user-defined fields. This value can be empty.

Returns: Creates an IPv6 block instance.

add_ip6_block_by_mac_address(mac_address, name, properties='')

Adds an IPv6 block by specifying the MAC address of the server.

Parameters Description
mac_address (string, required) The MAC address of the server in the format nnnnnnnnnnnn, nn-nn-nn-nn-nn-nn or nn:nn:nn:nn:nn:nn, where nn is a hexadecimal value.
name (string, required) Descriptive name for the IPv6 block. This value can be empty.
properties (string, required) Adds object properties, including user-defined fields. This value can be empty.

Returns: Creates an IPv6 block instance.

add_ip6_block_by_prefix(ip6_prefix, block_name, properties='')

Adds an IPv6 block by specifying the prefix for the block.

Parameters Description
ip6_prefix The IPv6 prefix for the new block. This value cannot be empty.
name Descriptive name for the IPv6 block. This value can be empty.
properties Adds object properties, including user-defined fields. This value can be empty.

Returns: Creates an IPv6 block instance.

add_ip6_network_by_prefix(prefix, name, properties='')

Parameters Description
prefix The IPv6 prefix for the new network. This value cannot be empty.
name Descriptive name for the IPv6 network. This value can be empty.
properties Adds object properties, including user-defined fields. This value can be empty.

Returns: Creates an IPv6 network instance.

add_parent_block(block_or_network_ids)

Parameters Description
block_or_network_ids An array containing the object IDs of IPv6 blocks or networks.

Returns: Creates an IPv6 block with a name from a list of IPv6 blocks or networks.

get_ip6_block_by_prefix(ip6_prefix)

Get an immediate child ip6_block using an ip6_prefix.

Parameter Description
ip6_prefix An IP6CIDR block.

Returns: An IP6 block instance.

get_ip6_blocks()

Get all immediate child IPv6 blocks.

Returns: Iterator of ip6_blocks instances or empty list.

get_ip6_network_by_prefix(ip6_prefix)

Get an immediate network child using an ip6_prefix.

Parameter Description
ip6_prefix An IP6CIDR block.

Returns: An IP6 block instance.

get_ip6_networks()

Get all immediate child IPv6 networks.

Returns: Iterator of network instances or empty list.

get_ip6_object_by_hint(hint,access_right="",count=10)

Get an array of IPv6 objects.
Note: Only supports IPv6 networks.
Parameter Description
hint (string, required) The partial or full name of the IPv6 object.
access_right (string, required) The access right option.
count (integer, required) The number of elements to return.
Returns: Returns an array of any IPv6 object that match the given hint as data in JSON.
Example:
from constants import AccessRightValues

api = g.user.get_api()                          # get api object
ip6_block_id = 10223                            # ip6 block id
ip6_block = api.get_entity_by_id(ip6_block_id)

ip6_networks = ip6_block.get_ip6_objects_by_hint('2001', access_right=AccessRightValues.AddAccess,
count=10)