Skip to content

DCIM

pynautobot.models.dcim

Overrides for models in the DCIM app.

Classes, attributes and methods only need to be defined here if they need to override the default behavior.

pynautobot.models.dcim.Cables

Bases: Record

Cables Object.

__str__()

Return the string representation of the Cables object.

pynautobot.models.dcim.ConnectedEndpoint

Bases: Record

ConnectedEndpoint Object.

pynautobot.models.dcim.ConsolePorts

Bases: TraceableRecord

ConsolePorts Object.

pynautobot.models.dcim.ConsoleServerPorts

Bases: TraceableRecord

ConsoleServerPorts Object.

pynautobot.models.dcim.DeviceTypes

Bases: Record

DeviceTypes Object.

__str__()

Return the string representation of the DeviceTypes object.

pynautobot.models.dcim.Devices

Bases: Record

Devices Object.

Represents a device response from nautobot.

Attributes:

Name Type Description
primary_ip, ip4, ip6 (list

Tells init in Record() to take the primary_ip field's value from the API response and return an initialized list of IpAddress objects

device_type obj

Tells init in Record() to take the device_type field's value from the API response and return an initialized DeviceType object

napalm property

Represents the napalm detail endpoint.

Returns a DetailEndpoint object that is the interface for viewing response from the napalm endpoint.

:returns: :py:class:.DetailEndpoint

:Examples:

device = nb.ipam.devices.get(123) device.napalm.list(method='get_facts') {"get_facts": {"interface_list": ["ge-0/0/0"]}}

pynautobot.models.dcim.FrontPorts

Bases: Record

FrontPorts Object.

pynautobot.models.dcim.InterfaceConnection

Bases: Record

InterfaceConnection Object.

__str__()

Return the string representation of the InterfaceConnection object.

pynautobot.models.dcim.InterfaceConnections

Bases: Record

InterfaceConnections Object.

__str__()

Return the string representation of the InterfaceConnections object.

pynautobot.models.dcim.Interfaces

Bases: TraceableRecord

Interfaces Object.

pynautobot.models.dcim.Platforms

Bases: Record

Platform object.

pynautobot.models.dcim.PowerOutlets

Bases: TraceableRecord

PowerOutlets Object.

pynautobot.models.dcim.PowerPorts

Bases: TraceableRecord

PowerPorts Object.

pynautobot.models.dcim.RUs

Bases: Record

RUs Object.

pynautobot.models.dcim.RackReservations

Bases: Record

RackReservations Object.

__str__()

Return the string representation of the RackReservations object.

pynautobot.models.dcim.Racks

Bases: Record

Racks Object.

elevation property

Represents the elevation detail endpoint.

Returns a DetailEndpoint object that is the interface for viewing response from the elevation endpoint updated in Nautobot version 2.8.

:returns: :py:class:.DetailEndpoint

:Examples:

rack = nb.dcim.racks.get(123) rack.elevation.list() {"get_facts": {"interface_list": ["ge-0/0/0"]}}

units property

Represents the units detail endpoint.

Returns a DetailEndpoint object that is the interface for viewing response from the units endpoint.

:returns: :py:class:.DetailEndpoint

:Examples:

rack = nb.dcim.racks.get(123) rack.units.list() {"get_facts": {"interface_list": ["ge-0/0/0"]}}

pynautobot.models.dcim.RearPorts

Bases: Record

RearPorts Object.

pynautobot.models.dcim.Termination

Bases: Record

Termination Object.

__str__()

Return the string representation of the Termination object.

pynautobot.models.dcim.TraceableRecord

Bases: Record

Traceable record in the DCIM (Data Center Infrastructure Management) module.

trace()

Trace the path of the record.

pynautobot.models.dcim.VirtualChassis

Bases: Record

VirtualChassis Object.

__str__()

Return the string representation of the VirtualChassis object.