You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeviceRole, RackRole, IPAM Role, and IPAddressRoleChoices have all been merged into a single generic Role model. A role can now be created and associated to one or more of the content-types that previously implemented role as a field. These model content-types include dcim.device, dcim.rack, virtualization.virtualmachine, ipam.ipaddress, ipam.prefix, and ipam.vlan.
Added Site Model Fields to Location. Location Model now has asn, comments, contact_email, contact_name, contact_phone, facility, latitude, longitude, physical_address, shipping_address and time_zone fields.
Natural Key Support Across Nautobot Models (#2900)
Nautobot's BaseModel base class and related classes now implement automatic support for Django natural keys for lookup and referencing, as well as supporting a natural_key_slug concept similar to that introduced by django-natural-keys. (Nautobot does not depend on django-natural-keys but its implementation is heavily inspired by that project.) For example:
The ipam.Aggregate model has been removed and all existing aggregates will be migrated to ipam.Prefix with type set to "Container". The Aggregate.date_added field will be migrated to Prefix.date_allocated and changed from a Date field to a DateTime field with the time set to 00:00. Aggregate.tenant, Aggregate.rir and Aggregate.description will be migrated over to the same fields on Prefix.
See the upgrade guide for more details on the data migration.
Collapse Region and Site Models into Location (#2517)
Initial Data Migration
The Site and Region models have been removed in v2.0 and have been replaced with Location of specific LocationType. As a result, the existing Site and Region data will be migrated to corresponding LocationType and Location objects. Here is what to expect:
If you do not have any Site and Region instances in your existing database, running this data migration will do nothing.
If you only have Region instances in your existing database, a LocationType named Region will be created and for each legacy Region instance, a corresponding Location instance with the same attributes (id, name, description, etc.) and hierarchy will be created.
If you only have Site instances in your existing database:
A LocationType named Site will be created and every preexisting root level LocationType in your database will be updated to have the new SiteLocationType as their parent.
For each legacy Site instance, a corresponding Location instance with the same attributes (id, name, description, tenant, facility, asn, latitude, longitude, etc.) will be created, and any preexisting Locations in your database will be updated to have the appropriate "site" Locations as their parents.
Model instances that had a site field (CircuitTermination, Device, PowerPanel, RackGroup, Rack, Prefix, VLANGroup, VLAN, Cluster) assigned and did not have a location attribute assigned will be updated to have their location point to the new Location corresponding to that Site. All other attributes on these models will remain unchanged.
Model instances that were previously associated to the ContentType for Site (ComputedField, CustomField, CustomLink, ExportTemplate, ImageAttachment, JobHook, Note, Relationship, Status, Tag and Webhook) will have their ContentType replaced with Location. All other attributes on these models will remain unchanged.
For Example:
We will start with a Site instance with name AMS01 as the base Site for two top-level Location objects with names root-01 and root-02 respectively.
During the data migration, a LocationType named Site will be created, and a Location of SiteLocationType named AMS01 with all the information (asn, latitude, etc.) from the base Site will be created.
The Location objects named root-01 and root-02 will have this AMS01Location set as their parent.
If you have both Site and Region instances in your existing database:
A LocationType named Region will be created.
For each legacy Region instance, a corresponding Location instance with the same attributes (id, name, description, etc.) will be created.
A LocationType named Site will be created with the new LocationType named Region set as its parent.
Every pre-existing root-level LocationType in your database will be updated to have the new LocationType named Site as its parent.
For each legacy Site instance, a corresponding "site" Location instance with the same attributes (id, name, description, tenant, facility, asn, latitude, longitude, etc.) will be created with its parent set to the corresponding "region" Location if any.
If you have Site instances in your database without a Region assigned to them, one additional Location named Global Region of LocationTypeRegion will be created and each Location of LocationTypeSite created from the legacy region-less Site instances will have the Global RegionLocation as their parent.
Model instances that had a site attribute (CircuitTermination, Device, Location, PowerPanel, Rack, RackGroup, Prefix, VLANGroup, VLAN, Cluster) assigned and did not have a location attribute assigned will be updated to have their location point to the new Location of LocationTypeSite. All other attributes on these models will remain unchanged.
Model instances that were previously associated to the ContentType for Site or Region (ComputedField, CustomField, CustomLink, ExportTemplate, ImageAttachment, JobHook, Note, Relationship, Status, Tag and Webhook) will have their ContentType replaced with Location. All other attributes on these models will remain unchanged.
For Example:
There are two Site instances and one Region instance in your existing database. The Region with name America has one child Site instance named AMS01. And the other Site instance named AUS01 is not associated with any Region (region attribute is set to None).
The SiteAMS01 is the base Site for two top-level Location objects with names root-01 and root-02 respectively.
During the data migration, a LocationType named Region and a Location of this LocationType named America with all the same information will be created.
The LocationType named Site with its parent set as the new LocationTypeRegion and a Location of LocationType named AMS01 with all the same information (asn, latitude, etc.) will be created. The LocationAMS01 will have LocationAmerica as its parent and each - Locationroot-01 and root-02 will have LocationAMS01 as its parent.
Finally, the Site instance AUS01, since it does not have a Region instance associated with it, its corresponding LocationAUS01 will have a new Location named Global Region of LocationTypeRegion as its parent.
In addition, legacy Site instance with name AMS01 also has three Device instances associated with it named ams01-edge-01, ams01-edge-02, and ams01-edge-03.
However, ams01-edge-01 only has its site attribute set as SiteAMS01 whereas ams01-edge-02 and ams01-edge-03 have both its site and location attributes set SiteAMS01 and Locationroot-01 respectively.
During the data migration, ams01-edge-01's location attribute will point to the new Location of LocationTypeSite with name AMS01 while devices ams01-edge-02 and ams01-edge-03 will remain unchanged.
Remove Site and Region Related Fields from Models
Region and Site relationships are being removed from these models: CircuitTermination, Device, Location, Rack, RackGroup, PowerFeed, PowerPanel, ConfigContext, Prefix, VLAN, VLANGroup, Cluster.
The ContentType for Region and Site are being replaced with Location on these models: ComputedField, CustomField, CustomLink, ExportTemplate, ImageAttachment, JobHook, Note, Relationship, Status, Tag and Webhook.
The region and site fields are being removed in the filter data of DynamicGroup objects. The previously associated values are being added to the existing location field and its associated list of filter values or to a new location key with an empty list if one does not exist.
Check out the API and UI endpoints changes incurred by the changes stated above in the "Upgrading from Nautobot v1.X" guide.
Collapsed nautobot.utilities into nautobot.core (#2721)
nautobot.utilities no longer exists as a separate Python module or Django app. Its functionality has been collapsed into the nautobot.core app. See details at Python Code Location Changes.
Renamed Database Foreign Keys and Related Names (#2520)
Some Foreign Key fields have been renamed to follow a more self-consistent pattern across the Nautobot app. This change is aimed to offer more clarity and predictability when it comes to related object database operations:
For example in v1.x to create a circuit object with type "circuit-type-1", you would do:
and to filter Circuit objects of type "circuit-type-2", you would do:
Circuit.objects.filter(type="circuit-type-2")
Now in v2.x, we have renamed the Foreign Key field type on Circuit Model to circuit_type, because this naming convention made it clearer that this Foregin Key field is pointing to the model CircuitType. The same operations would look like:
Now in v2.x, we have renamed the Foreign Key field circuit's related_name attribute terminations on CircuitTermination Model to circuit_terminations, the same operations would look like:
Many filter fields have been enhanced to enable filtering by both slugs and UUID primary keys.
For example in v1.X, to filter Regions with a specific parent value in the UI or make changes to them via Rest API, you are only able to input slugs as the filter values:
/dcim/regions/?parent=<slug>
Now in v2.x, you are able to filter those Regions by slugs or UUID primary keys:
/dcim/regions/?parent=<slug> or /dcim/regions/?parent=<uuid>
There were also instances where a foreign-key related field (e.g. console_ports) was incorrectly mapped to a boolean membership filter (e.g. has_console_ports), making it impossible to filter based on specific values of the foreign key:
For example in v1.x:
/dcim/devices/?console_ports=True and /dcim/devices/?has_console_ports=True are functionally the same and this behavior is incorrect.
This has been addressed in v2.x as follows:
console_ports and similar filters are taking foreign key UUIDs as input values and can be used in this format: /dcim/devices/?console_ports=<uuid> whereas has_console_ports and similar filters remain the same.
The DeviceRole, RackRole, ipam.Role, and IPAddressRoleChoices have all been removed and replaced with a extras.Role model, This means that all references to any of the replaced models and choices now points to this generic role model.
In addition, the role field of the IPAddress model has also been changed from a choice field to a foreign key related field to the extras.Role model.
Prefix is_pool field and "Container" status replaced by new field Prefix.type (#1362)
A new type field was added to Prefix to replace the is_pool boolean field and the "Container" status. The type field can be set to "Network", "Pool" or "Container", with "Network" being the default.
Existing prefixes with a status of "Container" will be migrated to the "Container" type. Existing prefixes with is_pool set will be migrated to the "Pool" type. Prefixes with both is_pool set and a status of "Container" will be migrated to the "Pool" type.
The "Container" status will be removed and all prefixes will be migrated to the "Active" status if it exists. If the "Active" status was deleted, prefixes will be migrated to the first available prefix status in the database that is not "Container".
As a part of breaking changes made in v2.X, shadowed filter/filterset fields are being removed throughout Nautobot.
In Nautobot 1.x, for some of the foreign-key related fields:
- The field was shadowed for the purpose of replacing the PK filter with a lookup-based on a more human-readable value (typically slug, if available).
- A PK-based filter was available as well, generally with a name suffixed by _id
Now these two filter fields will be replaced by a single filter field that can support both slugs and UUID primary keys as inputs; As a result, PK-based filters suffixed by _id will no longer be supported in v2.0.
For example in v1.X, to filter Devices with a specific site value in the UI or make changes to them via Rest API with a UUID primary key, you will use:
/dcim/devices/?site_id=<uuid>
Now in v2.x, that format is no longer supported. Instead, you would use:
#3222 - Added Site and Region data migration for ConfigContext class and ensured that "Site" LocationType allows the correct ContentTypes.
#3255 - Added --cache-test-fixtures command line argument to Nautobot unit and integration tests.
#3256 - Added Site and Region data migration for ComputedFields, CustomFields, CustomLinks, ExportTemplates, ImageAttachments, JobHooks, Notes, Relationships, Webhooks, Statuses and Tags
#3283 - Added Site and Region migration to Location for filter data of DynamicGroups.
#3360 - Added an alternate approach to updating model feature registry without having to decorate a model with @extras_features.
#3364 - Added FK fields migrated_location to Site and Region models before data migration is applied.
#3403 - Added support for Nautobot Apps to provide Django Constance Fields for the settings.
#3418 - Added ObjectPermission Data Migration from Region/Site to Location.
Changed
#824 - Renamed slug field to key on CustomField model class.
#824 - Changed validation of CustomField key to enforce that it is valid as a GraphQL identifier.
#951 - The nautobot-server nbshell command is now based on shell_plus from django-extensions.
#1362 - Added type field to Prefix, replacing "Container" status and is_pool field.
#2076 - Changed the created field of all models from a DateField to a DateTimeField for added granularity. Preexisting records will show as created at midnight UTC on their original creation date.
#2611 - Changed Job model uniqueness constraints and slug field.
#3066 - Changed related_name values for path endpoints on CablePath for consistency and readability (dcim_interface_related to interfaces, circuits_circuittermination_related to circuit_terminations, etc.)
#3066 - Changed related_name values for device components on Device for consistency and readability (consoleports to console_ports, devicebays to device_bays, etc.)
#3066 - Changed related_name values for device component templates on DeviceType for consistency and readability (consoleporttemplates to console_port_templates, devicebaytemplates to device_bay_templates, etc.)
#3066 - Changed DeviceType.instances to devices and renamed the corresponding query filters.
#3066 - Changed DeviceRedundancyGroup.members to devices.
#3066 - Changed FrontPortTemplate.rear_port to rear_port_template.
#3066 - Changed Location.powerpanels to power_panels.
#3066 - Changed PowerOutletTemplate.power_port to power_port_template.
#3066 - Changed PowerPanel.powerfeeds to power_feeds.
#3066 - Changed PowerPort.poweroutlets to power_outlets.
#3066 - Changed PowerPortTemplate.poweroutlet_templates to power_outlet_templates.
#3066 - Changed Rack.powerfeed_set to power_feeds.
#3066 - Changed Rack.group and Rack.reservations to rack_group and rack_reservations and renamed the corresponding query filters.
#3066 - Changed RackGroup.powerpanel_set to power_panels.
#3066 - Changed RearPort.frontports to front_ports.
#3066 - Changed RearPortTemplate.frontport_templates to front_port_templates.
#3066 - Changed SecretsGroup.device_set and SecretsGroup.deviceredundancygroup_set to devices and device_redundancy_groups.
#3066 - Changed Tenant.rackreservations to rack_reservations.
#3066 - Changed User.rackreservation_set to rack_reservations.
#3066 - Changed REST API field on Interface from count_ipaddresses to ip_address_count.
#3066 - Changed REST API fields on Manufacturer from devicetype_count and inventoryitem_count to device_type_count and inventory_item_count.
#3066 - Changed REST API field on Platform from virtualmachine_count to virtual_machine_count.
#3066 - Changed REST API field on PowerPanel from powerfeed_count to power_feed_count.
#3066 - Changed REST API field on Rack from powerfeed_count to power_feed_count.
#3066 - Changed RackReservationgroup filter to rack_group.
#3154 - Renamed various tag filters to tags for self-consistency.
#3160 - Changed logger names to use __name__ instead of explicit module names.
#3215 - Changed representation of related Status objects in the REST API to use a NestedStatusSerializer instead of presenting as enums.
#3236 - Changed Interface and VMInterface relationship to IPAddress to many-to-many instead of one-to-many.
#1422 - Improved OpenAPI schema representation of polymorphic fields such as cable_peer, assigned_object, etc.
#2806 - Fixed some issues with initialization and updating of the dynamic ("advanced") filter form.
#3066 - Fixed incorrect field_class when filtering FloatField and DecimalField model fields.
#3066 - Fixed inability to provide non-integer values when filtering on FloatField and DecimalField fields in GraphQL.
#3066 - Fixed inability to specify partial substrings in the UI when filtering by MAC address.
#3154 - Fixed incorrect initialization of TagFilter when auto-attached to a FilterSet.
#3164 - Merged TaskResult from django-celery-results into JobResult.
#3291 - Fixed inheritance and RoleField definition on Role model mixins.
#3342 - Fixed BaseFilterSet not using multiple choice filters for CharFields with choices.
#3457 - Fixed bug preventing scheduled job from running.
Removed
#824 - Removed name field from CustomField model class.
#1634 - Removed unnecessary legacy manage.py file from Nautobot repository.
#2521 - Removed support for storing Git repository credentials (username/token) in the Nautobot database. Use Secrets instead.
#2957 - Removed Site constraints for model classes (CircuitTermination, Device, Location, PowerPanel, PowerFeed, RackGroup, Rack, Prefix, VLAN, VLANGroup, Cluster).
#2957 - Removed regions and sites attributes from ConfigContext model class.
#2957 - Removed region and site related fields from Serializers for aforementioned model classes.
#2957 - Removed region and site related fields from Forms for aforementioned model classes.
#2957 - Removed region and site related UI and API Endpoints for aforementioned model classes.
#2957 - Removed region and site columns from Tables for aforementioned model classes.
#2958 - Removed Region and Site factories, filtersets, forms, factories, models, navigation menu items, serializers, tables, templates, tests and urls.
#3224 - Removed support for Nautobot "1.x" REST API versions. The minimum supported REST API version is now "2.0".
#3233 - Removed CeleryTestCase and associated calling code as it is no longer needed.
#3302 - Removed Aggregate and migrated all existing instances to Prefix.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Nautobot v2.0
This document describes all new features and changes in Nautobot 2.0.
If you are a user migrating from Nautobot v1.X, please refer to the "Upgrading from Nautobot v1.X" documentation.
Release Overview
Added
Generic Role Model (#1063)
DeviceRole, RackRole, IPAM Role, and IPAddressRoleChoices have all been merged into a single generic Role model. A role can now be created and associated to one or more of the content-types that previously implemented role as a field. These model content-types include dcim.device, dcim.rack, virtualization.virtualmachine, ipam.ipaddress, ipam.prefix, and ipam.vlan.
Added Site Fields to Location (#2954)
Added Site Model Fields to Location. Location Model now has
asn
,comments
,contact_email
,contact_name
,contact_phone
,facility
,latitude
,longitude
,physical_address
,shipping_address
andtime_zone
fields.Natural Key Support Across Nautobot Models (#2900)
Nautobot's
BaseModel
base class and related classes now implement automatic support for Django natural keys for lookup and referencing, as well as supporting anatural_key_slug
concept similar to that introduced bydjango-natural-keys
. (Nautobot does not depend ondjango-natural-keys
but its implementation is heavily inspired by that project.) For example:Developers can refer to the documentation on natural keys for details on how to support and use this feature.
Changed
Aggregate model Migrated to Prefix (#3302)
The
ipam.Aggregate
model has been removed and all existing aggregates will be migrated toipam.Prefix
withtype
set to "Container". TheAggregate.date_added
field will be migrated toPrefix.date_allocated
and changed from a Date field to a DateTime field with the time set to00:00
.Aggregate.tenant
,Aggregate.rir
andAggregate.description
will be migrated over to the same fields onPrefix
.See the upgrade guide for more details on the data migration.
Collapse Region and Site Models into Location (#2517)
Initial Data Migration
The
Site
andRegion
models have been removed in v2.0 and have been replaced withLocation
of specificLocationType
. As a result, the existingSite
andRegion
data will be migrated to correspondingLocationType
andLocation
objects. Here is what to expect:If you do not have any
Site
andRegion
instances in your existing database, running this data migration will do nothing.If you only have
Region
instances in your existing database, aLocationType
named Region will be created and for each legacyRegion
instance, a correspondingLocation
instance with the same attributes (id
,name
,description
, etc.) and hierarchy will be created.If you only have
Site
instances in your existing database:A
LocationType
named Site will be created and every preexisting root levelLocationType
in your database will be updated to have the new SiteLocationType
as their parent.For each legacy
Site
instance, a correspondingLocation
instance with the same attributes (id
,name
,description
,tenant
,facility
,asn
,latitude
,longitude
, etc.) will be created, and any preexistingLocations
in your database will be updated to have the appropriate "site"Locations
as their parents.Model instances that had a
site
field (CircuitTermination
,Device
,PowerPanel
,RackGroup
,Rack
,Prefix
,VLANGroup
,VLAN
,Cluster
) assigned and did not have alocation
attribute assigned will be updated to have theirlocation
point to the newLocation
corresponding to thatSite
. All other attributes on these models will remain unchanged.Model instances that were previously associated to the
ContentType
forSite
(ComputedField
,CustomField
,CustomLink
,ExportTemplate
,ImageAttachment
,JobHook
,Note
,Relationship
,Status
,Tag
andWebhook
) will have theirContentType
replaced withLocation
. All other attributes on these models will remain unchanged.For Example:
We will start with a
Site
instance with name AMS01 as the baseSite
for two top-levelLocation
objects with names root-01 and root-02 respectively.During the data migration, a
LocationType
named Site will be created, and aLocation
of SiteLocationType
named AMS01 with all the information (asn
,latitude
, etc.) from the baseSite
will be created.The
Location
objects named root-01 and root-02 will have this AMS01Location
set as theirparent
.If you have both
Site
andRegion
instances in your existing database:A
LocationType
named Region will be created.For each legacy
Region
instance, a correspondingLocation
instance with the same attributes (id
,name
,description
, etc.) will be created.A
LocationType
named Site will be created with the newLocationType
named Region set as itsparent
.Every pre-existing root-level
LocationType
in your database will be updated to have the newLocationType
named Site as itsparent
.For each legacy
Site
instance, a corresponding "site"Location
instance with the same attributes (id
,name
,description
,tenant
,facility
,asn
,latitude
,longitude
, etc.) will be created with its parent set to the corresponding "region"Location
if any.Site
instances in your database without aRegion
assigned to them, one additionalLocation
named Global Region ofLocationType
Region will be created and eachLocation
ofLocationType
Site created from the legacy region-lessSite
instances will have the Global RegionLocation
as their parent.Model instances that had a
site
attribute (CircuitTermination
,Device
,Location
,PowerPanel
,Rack
,RackGroup
,Prefix
,VLANGroup
,VLAN
,Cluster
) assigned and did not have alocation
attribute assigned will be updated to have theirlocation
point to the newLocation
ofLocationType
Site. All other attributes on these models will remain unchanged.Model instances that were previously associated to the
ContentType
forSite
orRegion
(ComputedField
,CustomField
,CustomLink
,ExportTemplate
,ImageAttachment
,JobHook
,Note
,Relationship
,Status
,Tag
andWebhook
) will have theirContentType
replaced withLocation
. All other attributes on these models will remain unchanged.For Example:
There are two
Site
instances and oneRegion
instance in your existing database. TheRegion
with name America has one childSite
instance named AMS01. And the otherSite
instance named AUS01 is not associated with anyRegion
(region
attribute is set toNone
).The
Site
AMS01 is the baseSite
for two top-levelLocation
objects with names root-01 and root-02 respectively.During the data migration, a
LocationType
named Region and aLocation
of thisLocationType
named America with all the same information will be created.The
LocationType
named Site with itsparent
set as the newLocationType
Region and aLocation
ofLocationType
named AMS01 with all the same information (asn
,latitude
, etc.) will be created. TheLocation
AMS01 will haveLocation
America as itsparent
and each -Location
root-01 and root-02 will haveLocation
AMS01 as itsparent
.Finally, the
Site
instance AUS01, since it does not have aRegion
instance associated with it, its correspondingLocation
AUS01 will have a newLocation
named Global Region ofLocationType
Region as itsparent
.In addition, legacy
Site
instance with name AMS01 also has threeDevice
instances associated with it named ams01-edge-01, ams01-edge-02, and ams01-edge-03.However, ams01-edge-01 only has its
site
attribute set asSite
AMS01 whereas ams01-edge-02 and ams01-edge-03 have both itssite
andlocation
attributes setSite
AMS01 andLocation
root-01 respectively.During the data migration, ams01-edge-01's
location
attribute will point to the newLocation
ofLocationType
Site with name AMS01 while devices ams01-edge-02 and ams01-edge-03 will remain unchanged.Remove Site and Region Related Fields from Models
Region
andSite
relationships are being removed from these models:CircuitTermination
,Device
,Location
,Rack
,RackGroup
,PowerFeed
,PowerPanel
,ConfigContext
,Prefix
,VLAN
,VLANGroup
,Cluster
.The
ContentType
forRegion
andSite
are being replaced withLocation
on these models:ComputedField
,CustomField
,CustomLink
,ExportTemplate
,ImageAttachment
,JobHook
,Note
,Relationship
,Status
,Tag
andWebhook
.The
region
andsite
fields are being removed in thefilter
data ofDynamicGroup
objects. The previously associated values are being added to the existinglocation
field and its associated list of filter values or to a newlocation
key with an empty list if one does not exist.Check out the API and UI endpoints changes incurred by the changes stated above in the "Upgrading from Nautobot v1.X" guide.
Check out the Region and Site Related Data Model Migration Guide to learn how to migrate your Nautobot Apps and data models from
Site
andRegion
toLocation
.Collapsed
nautobot.utilities
intonautobot.core
(#2721)nautobot.utilities
no longer exists as a separate Python module or Django app. Its functionality has been collapsed into thenautobot.core
app. See details at Python Code Location Changes.Renamed Database Foreign Keys and Related Names (#2520)
Some Foreign Key fields have been renamed to follow a more self-consistent pattern across the Nautobot app. This change is aimed to offer more clarity and predictability when it comes to related object database operations:
For example in v1.x to create a circuit object with
type
"circuit-type-1", you would do:and to filter
Circuit
objects oftype
"circuit-type-2", you would do:Now in v2.x, we have renamed the Foreign Key field
type
on Circuit Model tocircuit_type
, because this naming convention made it clearer that this Foregin Key field is pointing to the modelCircuitType
. The same operations would look like:Check out more Foreign Key related changes documented in the table Renamed Database Fields
In addition to the changes made to Foreign Key fields' own names, some of their
related_names
are also renamed:For example in v1.x, to query
Circuit
objects withCircuitTermination
instances located in sites ["ams01", "ams02", "atl03"], you would do:Now in v2.x, we have renamed the Foreign Key field
circuit
'srelated_name
attributeterminations
onCircuitTermination
Model tocircuit_terminations
, the same operations would look like:Check out more
related-name
changes documented in the table Renamed Database FieldsRenamed Filter Fields (#2804)
Some filter fields have been renamed to reflect their functionalities better.
For example in v1.X, to filter
FrontPorts
that has a cable attached in the UI or make changes to them via Rest API, you would use thecabled
filter:/dcim/front-ports/?cabled=True
Now in v2.x, you would instead use the
has_cable
filter which has a more user-friendly name:/dcim/front-ports/?has_cable=True
Check out the specific changes documented in the table at UI and REST API Filter Changes
Enhanced Filter Fields (#2804)
Many filter fields have been enhanced to enable filtering by both slugs and UUID primary keys.
For example in v1.X, to filter
Regions
with a specificparent
value in the UI or make changes to them via Rest API, you are only able to input slugs as the filter values:/dcim/regions/?parent=<slug>
Now in v2.x, you are able to filter those
Regions
by slugs or UUID primary keys:/dcim/regions/?parent=<slug>
or/dcim/regions/?parent=<uuid>
Check out the specific changes documented in the table at UI and REST API Filter Changes
Corrected Filter Fields (#2804)
There were also instances where a foreign-key related field (e.g.
console_ports
) was incorrectly mapped to a boolean membership filter (e.g.has_console_ports
), making it impossible to filter based on specific values of the foreign key:For example in v1.x:
/dcim/devices/?console_ports=True
and/dcim/devices/?has_console_ports=True
are functionally the same and this behavior is incorrect.This has been addressed in v2.x as follows:
console_ports
and similar filters are taking foreign key UUIDs as input values and can be used in this format:/dcim/devices/?console_ports=<uuid>
whereashas_console_ports
and similar filters remain the same.Check out the specific changes documented in the table at UI and REST API Filter Changes
Generic Role Model (#1063)
The
DeviceRole
,RackRole
,ipam.Role
, andIPAddressRoleChoices
have all been removed and replaced with aextras.Role
model, This means that all references to any of the replaced models and choices now points to this generic role model.In addition, the
role
field of theIPAddress
model has also been changed from a choice field to a foreign key related field to theextras.Role
model.Prefix
is_pool
field and "Container" status replaced by new fieldPrefix.type
(#1362)A new
type
field was added toPrefix
to replace theis_pool
boolean field and the "Container" status. Thetype
field can be set to "Network", "Pool" or "Container", with "Network" being the default.Existing prefixes with a status of "Container" will be migrated to the "Container" type. Existing prefixes with
is_pool
set will be migrated to the "Pool" type. Prefixes with bothis_pool
set and a status of "Container" will be migrated to the "Pool" type.The "Container" status will be removed and all prefixes will be migrated to the "Active" status if it exists. If the "Active" status was deleted, prefixes will be migrated to the first available prefix status in the database that is not "Container".
Removed
Removed Redundant Filter Fields (#2804)
As a part of breaking changes made in v2.X, shadowed filter/filterset fields are being removed throughout Nautobot.
In Nautobot 1.x, for some of the foreign-key related fields:
- The field was shadowed for the purpose of replacing the PK filter with a lookup-based on a more human-readable value (typically
slug
, if available).- A PK-based filter was available as well, generally with a name suffixed by
_id
Now these two filter fields will be replaced by a single filter field that can support both slugs and UUID primary keys as inputs; As a result, PK-based filters suffixed by
_id
will no longer be supported in v2.0.For example in v1.X, to filter
Devices
with a specificsite
value in the UI or make changes to them via Rest API with a UUID primary key, you will use:/dcim/devices/?site_id=<uuid>
Now in v2.x, that format is no longer supported. Instead, you would use:
/dcim/devices/?site=<uuid>
Check out the specific changes documented in the table at UI and REST API Filter Changes
Removed RQ support (#2523)
Support for RQ and
django-rq
, deprecated since Nautobot 1.1.0, has been fully removed from Nautobot 2.0.v2.0.0-alpha.2 (2023-03-29)
Added
django-natural-keys
library.ForeignKeyWithAutoRelatedName
helper class.tags
filters to filter by UUID as well as by slug.--cache-test-fixtures
command line argument to Nautobot unit and integration tests.@extras_features
.Changed
slug
field tokey
on CustomField model class.key
to enforce that it is valid as a GraphQL identifier.nautobot-server nbshell
command is now based onshell_plus
fromdjango-extensions
.type
field toPrefix
, replacing "Container" status andis_pool
field.created
field of all models from a DateField to a DateTimeField for added granularity. Preexisting records will show as created at midnight UTC on their original creation date.Job
model uniqueness constraints andslug
field.available_on_device
filter to permit specifying multiple Devices.related_name
values for path endpoints onCablePath
for consistency and readability (dcim_interface_related
tointerfaces
,circuits_circuittermination_related
tocircuit_terminations
, etc.)related_name
values for device components onDevice
for consistency and readability (consoleports
toconsole_ports
,devicebays
todevice_bays
, etc.)related_name
values for device component templates onDeviceType
for consistency and readability (consoleporttemplates
toconsole_port_templates
,devicebaytemplates
todevice_bay_templates
, etc.)DeviceType.instances
todevices
and renamed the corresponding query filters.DeviceRedundancyGroup.members
todevices
.FrontPortTemplate.rear_port
torear_port_template
.Location.powerpanels
topower_panels
.PowerOutletTemplate.power_port
topower_port_template
.PowerPanel.powerfeeds
topower_feeds
.PowerPort.poweroutlets
topower_outlets
.PowerPortTemplate.poweroutlet_templates
topower_outlet_templates
.Rack.powerfeed_set
topower_feeds
.Rack.group
andRack.reservations
torack_group
andrack_reservations
and renamed the corresponding query filters.RackGroup.powerpanel_set
topower_panels
.RearPort.frontports
tofront_ports
.RearPortTemplate.frontport_templates
tofront_port_templates
.SecretsGroup.device_set
andSecretsGroup.deviceredundancygroup_set
todevices
anddevice_redundancy_groups
.Tenant.rackreservations
torack_reservations
.User.rackreservation_set
torack_reservations
.Interface
fromcount_ipaddresses
toip_address_count
.Manufacturer
fromdevicetype_count
andinventoryitem_count
todevice_type_count
andinventory_item_count
.Platform
fromvirtualmachine_count
tovirtual_machine_count
.PowerPanel
frompowerfeed_count
topower_feed_count
.Rack
frompowerfeed_count
topower_feed_count
.RackReservation
group
filter torack_group
.tag
filters totags
for self-consistency.__name__
instead of explicit module names.Interface
andVMInterface
relationship toIPAddress
to many-to-many instead of one-to-many.Aggregate
model toPrefix
with type set to "Container".Dependencies
django-cryptography
.drf-yasg
dependency.Fixed
Prefix.type
.cable_peer
,assigned_object
, etc.field_class
when filteringFloatField
andDecimalField
model fields.FloatField
andDecimalField
fields in GraphQL.TagFilter
when auto-attached to a FilterSet.TaskResult
fromdjango-celery-results
intoJobResult
.RoleField
definition onRole
model mixins.Removed
name
field from CustomField model class.manage.py
file from Nautobot repository.regions
andsites
attributes from ConfigContext model class.region
andsite
related fields from Serializers for aforementioned model classes.region
andsite
related fields from Forms for aforementioned model classes.region
andsite
related UI and API Endpoints for aforementioned model classes.region
andsite
columns from Tables for aforementioned model classes.CeleryTestCase
and associated calling code as it is no longer needed.Aggregate
and migrated all existing instances toPrefix
.Contributors
New Contributors
Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2
This discussion was created from the release v2.0.0-alpha.2 - 2023-03-29.
Beta Was this translation helpful? Give feedback.
All reactions