veritas.sot.device

Module Contents

Classes

Device

Device class to interact with nautobot to update devices and interfaces

class veritas.sot.device.Device(sot, device)

Device class to interact with nautobot to update devices and interfaces

Parameters:
  • sot (Sot) – Sot object

  • device (str) – device name

interface(interface_name: str) None
update(*unnamed, **named) bool

update device or interface

Parameters:
  • unnamed (list) – list of unnamed arguments

  • named (dict) – dictionary of named arguments

Returns:

True if successful, False otherwise

Return type:

bool

update_interface(properties: dict) bool

update interface

Parameters:

properties (dict) – properties to update

Returns:

true if successful, false otherwise

Return type:

bool

set_tags(new_tags: list) bool

set tags of device or interface

Parameters:

new_tags (list) – list of tags to set

Returns:

true if successful, false otherwise

Return type:

bool

add_tags(new_tags: list, set_tag: bool = False) bool

add tags on device

Parameters:
  • new_tags (list) – list of tags to add

  • set_tag (bool, optional) – if true, tags are set otherewise tags are added, by default False

Returns:

true if successful, false otherwise

Return type:

bool

delete_tags(tags_to_delete: list) bool

delete tags from device or interface

Parameters:

tags_to_delete (list) – list of tags to delete

Returns:

true if successful, false otherwise

Return type:

bool

add_interface_tags(new_tags: list, set_tag: bool = False) bool

add tags on interface

Parameters:
  • new_tags (list) – list of tags to add

  • set_tag (bool, optional) – if true tags are set otherwise tags are added, by default False

Returns:

true if successful, false otherwise

Return type:

bool

delete_interface_tags(tags_to_delete: list) bool

delete interface tags

Parameters:

tags_to_delete (list) – list of tags to delete

Returns:

true if successful, false otherwise

Return type:

bool

set_customfield(properties: dict) bool

set customfield on device or interface

Parameters:

properties (dict) – properties to set

Returns:

true if successful, false otherwise

Return type:

bool

set_interface_customfield(properties: dict) bool

set interface customfield

Parameters:

properties (dict) – properties to set

Returns:

true if successful, false otherwise

Return type:

bool