ip_object module - Platform - BlueCat Gateway - 22.4.1

Gateway Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
22.4.1

Generic IP Address class

class bluecat.ip_object.IP4BlockNetwork(api, api_entity, ver='')

Bases: bluecat.ip_object.IPObject, bluecat.deployment_role.DHCPDeploymentRoleActionsMixin, bluecat.deployment_role.DNSDeploymentRoleActionsMixin, bluecat.deployment_option.RawDeploymentOptionActionsMixin

Base class for IP4 Space objects

get_ksk(ksk_format)

Get Key Signing Key (KSK) associated to an ip4 block

Parameters Description
ksk_format ksk return type, accepted formats are: TRUST_ANCHOR, DNS_KEY and DS_RECORD

Returns: List of KSKs in string format

Example:

from bluecat.constants import DNSSECKeyFormats

api = g.user.get_api()                              # get api object
ip4_network_id = 10223                              # ip4 network id
ip4_object = api.get_entity_by_id(ip4_network_id)

ksk_list = ip4_object.get_ksk(DNSSECKeyFormats.TRUST_ANCHOR)

class bluecat.ip_object.IP6BlockNetwork(api, api_entity, ver='')

Bases: bluecat.ip_object.IPObject, bluecat.deployment_role.DHCPDeploymentRoleActionsMixin, bluecat.deployment_role.DNSDeploymentRoleActionsMixin, bluecat.deployment_option.RawDeploymentOptionActionsMixin

Base class for IP6 Space objects

class bluecat.ip_object.IPAddress(api, api_entity)

Bases: bluecat.ip_object.IPObject

Generic IP address object implementing common IP address functions.

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

get_address()

Get the address as a string.

get_state()

Get the state of the address.

class bluecat.ip_object.IPObject(api, api_entity, ver='')

Bases: bluecat.entity.Entity

Generic IP object for network address and blocks

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.

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)