Skip to content

DCIM

pynautobot.models.dcim

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.Racks

Bases: Record

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"]}}