Tag class - Platform - BlueCat Gateway - 24.3.3

Gateway Administration Guide

ft:locale
en-US
Product name
BlueCat Gateway
Version
24.3.3

Click a link to jump to the indicated section.

class bluecat.tag.Tag(api, api_entity)

Bases: bluecat.tag.TagGroup

Wraps the BAM Tag Entity type.

Parameters Description
api

API instance used by the entity to communicate with BAM.

api_entity

the returned by the BAM API.

add_tag(name, properties=None)

Creates a tag and return its entity id (not per Configuration).

Parameters Description
name (str)

Name of tag to be created.

properties (dict, optional)

Optional properties, including user-defined fields.

Return type: int

Returns: Object ID of created tag.

get_shared_networks()

Returns multiple IPv4 networks linked to the given shared network tag

Return type: list

Returns: Array of entities of all the IPv4 networks linked to the given shared network tag

Example:

api = g.user.get_api()              # get api object
tag_id = 10543                      # tag id
tag = api.get_entity_by_id(tag)

networks = tag.get_shared_networks()

for network in networks:
    print(network)

get_tag_by_name(name)

Searches a Tag by name.

Parameters Description
name (str)

name of the Tag.

Return type: Entity

Returns: A Tag object with the specified name.

get_tags()

Using Entity.get_children_of_type to get children of type ‘Tag’

Returns: A iterator of Tag objects listed under the TagGroup object.