Entity class - Platform - BlueCat Gateway - 19.8.1

Gateway Administration Guide

English (United States)
Product name
BlueCat Gateway

The entity class wraps up BAM API entities and provides methods common across all types. The class include ‘constants’ naming those types.

class entity.Entity(api, api_entity, ver='')

Bases: bluecat.api_object.APIObject

Instantiate an entity. Entities are hashable and comparable with the = operator.

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


AliasRecord= 'AliasRecord'

Configuration= 'Configuration'

CustomOptionDef= 'CustomOptionDef'

DHCP4Range= 'DHCP4Range'

DHCP6Range= 'DHCP6Range'

DHCPDeploymentRole= 'DHCPDeploymentRole'

DHCPMatchClass= 'DHCPMatchClass'

DHCPRawOption= 'DHCPRawOption'

DHCPServiceOption= 'DHCPServiceOption'

DHCPSubClass= 'DHCPSubClass'

DHCPV4ClientOption= 'DHCPV4ClientOption'

DHCPV6ClientOption= 'DHCPV6ClientOption'

DHCPV6RawOption= 'DHCPV6RawOption'

DHCPV6ServiceOption= 'DHCPV6ServiceOption'

DNSOption= 'DNSOption'

DNSRawOption= 'DNSRawOption'

DNSSECSigningPolicy= 'DNSSECSigningPolicy'

DenyMACPool= 'DenyMACPool'

DeploymentRole= 'DNSDeploymentRole'

DeploymentScheduler= 'DeploymentScheduler'

Device= 'Device'

DeviceSubtype= 'DeviceSubtype'

DeviceType= 'DeviceType'

Entity= 'Entity'

EnumNumber= 'EnumNumber'

EnumZone= 'EnumZone'

ExternalHostRecord= 'ExternalHostRecord'

GenericRecord= 'GenericRecord'

HINFORecord= 'HINFORecord'

HostRecord= 'HostRecord'

IP4Address= 'IP4Address'

IP4Block= 'IP4Block'

IP4IPGroup= 'IP4IPGroup'

IP4Network= 'IP4Network'

IP4NetworkTemplate= 'IP4NetworkTemplate'

IP4ReconciliationPolicy= 'IP4ReconciliationPolicy'

IP6Address= 'IP6Address'

IP6Block= 'IP6Block'

IP6Network= 'IP6Network'

InterfaceID= 'InterfaceID'

InternalRootZone= 'InternalRootZone'

Kerberos= 'Kerberos'

KerberosRealm= 'KerberosRealm'


Location= 'Location'

MACAddress= 'MACAddress'

MACPool= 'MACPool'

MXRecord= 'MXRecord'

NAPTRRecord= 'NAPTRRecord'

NetworkInterface= 'NetworkInterface'

NetworkServerInterface= 'NetworkServerInterface'

PublishedServerInterface= 'PublishedServerInterface'

RPZone= 'RPZone'

Radius= 'Radius'

RecordWithLink= 'RecordWithLink'

ResponsePolicy= 'ResponsePolicy'

SRVRecord= 'SRVRecord'

Server= 'Server'

StartOfAuthority= 'StartOfAuthority'

TFTPDeploymentRole= 'TFTPDeploymentRole'

TFTPFile= 'TFTPFile'

TFTPFolder= 'TFTPFolder'

TFTPGroup= 'TFTPGroup'


TXTRecord= 'TXTRecord'

Tag= 'Tag'

TagGroup= 'TagGroup'

User= 'User'

UserGroup= 'UserGroup'

VendorClientOption= 'VendorClientOption'

VendorOptionDef= 'VendorOptionDef'

VendorProfile= 'VendorProfile'

View= 'View'

VirtualInterface= 'VirtualInterface'

Zone= 'Zone'

ZoneTemplate= 'ZoneTemplate'


Delete the entity from the BAM database.

add_access_right(recipient_id, value, overrides='', properties='')

Parameter Description
recipient_id The object ID of the user or user group the access right is applied to
value The value of the access right being added.
overrides A list of type-specific overrides.

A string including the following options:

  1. workflowLevel
  2. deploymentAllowed
  3. quickDeploymentAllowed

Returns: Object ID of the created Access Right.


Delete the entity from the BAM database.


Get an AccessRight for this entity for a specific user or a user group.

Parameter Description
recipient_id The object ID of the user or user group the access right is applied to.

Returns: An AccessRight object.


Get an iterator for all access rights for an Entity.

get_child_by_name(name, entity_type)

Get a specific named immediate child entity of a given type.


Get a specific named immediate child entity of a given type.

Parameter Description
entity_type Entity type to search for.

Returns: Generator object iterating over all children of specified type.


Get deployment roles for the entity.

Parameter Description
types An optional list of deployment role types (documented in the deployment_role class). If the list is empty all types are returned.


Get the BAM ID of an entity.


Get all the linked entities of a given type.

Returns: Iterator for a given type entities.


Get the BAM name of the entity.


Get the parent entity or None if the entity is at the top of the hierarchy.


Walk up the entity hierarchy and return the Configuration entity; if none was found, returns None; if starting entity is configuration, returns itself.

Returns: An iterator of parent configuration objects.


Walk up the entity hierarchy and return the first parent entity of the given type or, if none was found, raise PortalException.


Get the BAM type of the entity.


Get URL.


Is this the null entity? (ID == 0).

link_entity(entity_id, properties='')

ink caller Entity object with another whose ID is ‘entity_id’. This method can be called by any side of a linking relationship between Entity objects.

Parameters Description
entity_id The ID of the Entity object to be linked, or to link.
properties Adds object properties, including user-defined fields.

Returns: The caller Entity object.


Get the BAM name of the entity.


Downloads an updated object from BAM.


Set the BAM name of the entity.


Persist any changes to the entity to the BAM database.