Skip to content

Release v2.11.0 #6180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 245 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
0a6ebde
Upgrade Django to 3.2b1
jeremystretch Feb 25, 2021
bec7ea7
Standardize model types based on function
jeremystretch Feb 25, 2021
3208c83
Switch docs to mkdocs-material
jeremystretch Feb 25, 2021
992657c
Introduce SelectSpeedWidget
jeremystretch Feb 25, 2021
2a517cd
Add support for form fieldsets
jeremystretch Feb 25, 2021
42e82f0
Update object edit template to use fieldsets where possible
jeremystretch Feb 25, 2021
cef8204
Merge tags fields with primary object fields in form display
jeremystretch Feb 25, 2021
d6cf385
Update CircuitTermination fields to use SelectSpeedWidget
jeremystretch Feb 25, 2021
664a399
Add custom field support for organizational models to API serializers
jeremystretch Feb 25, 2021
ed059d8
Introduce OrganizationalModelSerializer
jeremystretch Feb 25, 2021
12fbd34
Introduce NestedGroupModelSerializer
jeremystretch Feb 25, 2021
cf78307
Update organizational models to use custom field forms
jeremystretch Feb 26, 2021
7e6cb9d
Closes #1638: Migrate all primary keys to 64-bit integers
jeremystretch Feb 26, 2021
1dcd857
Closes #5370: Extend custom field support to organizational models
jeremystretch Feb 26, 2021
6a9b50f
Closes #5873: Use numeric IDs in all object URLs
jeremystretch Feb 26, 2021
d6ee4d5
Add custom field support for device component models
jeremystretch Mar 1, 2021
9db492e
Add custom field support to ComponentCreateForm
jeremystretch Mar 1, 2021
9d526b0
Add custom field support to component creation forms
jeremystretch Mar 1, 2021
5418520
Add custom field support to component bulk edit forms
jeremystretch Mar 1, 2021
fdda307
Add custom fields section to interface edit template
jeremystretch Mar 1, 2021
4fb79e6
Changelog for #5401
jeremystretch Mar 1, 2021
3f216fa
Remove unused CustomFieldModel class
jeremystretch Mar 1, 2021
1ddc1a6
Closes #5451: Add support for multiple-selection custom fields
jeremystretch Mar 1, 2021
07e6abd
Closes #5901: Add 'created' and 'last_updated' fields to device compo…
jeremystretch Mar 1, 2021
6ed2e7b
Closes #5894: Use primary keys when filtering object lists by related…
jeremystretch Mar 1, 2021
8dd7123
Closes #3648: Mark cable termination models as connected without atta…
jeremystretch Mar 2, 2021
51120cc
Introduce generic object template
jeremystretch Mar 2, 2021
8de20fc
Closes #5375: Add 'speed' attribute to console port models
jeremystretch Mar 3, 2021
a17018a
#3648: Add missing mark_connected form fields
jeremystretch Mar 3, 2021
fdb3e3f
Closes #5895: Rename RackGroup to Location
jeremystretch Mar 3, 2021
d750b69
Closes #4971: Allow assigning devices to locations without a rack
jeremystretch Mar 3, 2021
f495add
Update documentation
jeremystretch Mar 3, 2021
9c967ee
Fixes #5913: Improve change logging (#5924)
jeremystretch Mar 4, 2021
23b58cc
Override value() on custom table columns
jeremystretch Mar 4, 2021
20a85c1
Introduce TenantColumn to simplify representation
jeremystretch Mar 4, 2021
a8a272b
Enable table-based export
jeremystretch Mar 4, 2021
0d44a32
Add tablib as a required package
jeremystretch Mar 4, 2021
6149ba6
Export only visible columns
jeremystretch Mar 4, 2021
32501c9
Introduce MPTTColumn to represent MPTT models
jeremystretch Mar 5, 2021
e703d9f
Introduce UtilizationColumn to render utilization graphs consistently
jeremystretch Mar 5, 2021
0015c8d
Changelog for #4999
jeremystretch Mar 5, 2021
d3974c9
Merge pull request #5929 from netbox-community/4999-table-export
jeremystretch Mar 5, 2021
5406e8e
Optimize background site/location updates
jeremystretch Mar 5, 2021
7a5cf80
Clean up extraneous imports
jeremystretch Mar 5, 2021
8e1fe63
Rename parent attribute on CableTerminations to parent_object
jeremystretch Mar 5, 2021
e1a8613
Add parent field to Interface
jeremystretch Mar 5, 2021
d74c07e
Clean up parent/LAG interface form validation
jeremystretch Mar 5, 2021
69a3d14
Add filter tests for interface parent and LAG
jeremystretch Mar 5, 2021
2ef85ea
Changelog for #1519
jeremystretch Mar 5, 2021
1c66733
Merge pull request #5930 from netbox-community/1519-interface-parent
jeremystretch Mar 5, 2021
79b1982
Closes #5892: Introduce SiteGroup model (#5937)
jeremystretch Mar 8, 2021
14bc3a3
Closes #5938: Deprecate support for Python 3.6
jeremystretch Mar 8, 2021
38ded66
Closes #5608: Add REST API endpoint for custom links
jeremystretch Mar 9, 2021
6ffadb5
Closes #5610: Add REST API endpoint for webhooks
jeremystretch Mar 9, 2021
c083b86
Improve JSON output formatting of webhook receiver
jeremystretch Mar 9, 2021
c6641ec
Closes #3451: Add pre-/post-change snapshots to webhooks
jeremystretch Mar 9, 2021
4dae781
Change VLANGroup site to scope (GFK)
jeremystretch Mar 9, 2021
bac2387
Merge branch 'develop' into feature
jeremystretch Mar 10, 2021
653af17
Merge branch 'feature' into 5284-vlangroup-scope
jeremystretch Mar 10, 2021
19b78e6
Introduce ChangeLoggedModel as a standard model
jeremystretch Mar 10, 2021
ac0c54c
#5401: Add custom field support for VMInterface
jeremystretch Mar 10, 2021
20f60cd
Fix feature assignments for device component templates
jeremystretch Mar 10, 2021
fc5bb96
Declare TaggableManager on PrimaryModel base class
jeremystretch Mar 10, 2021
4397d3d
Remove redundant TreeManager from TenantGroup
jeremystretch Mar 10, 2021
c072ba0
Add webhook support for additional models
jeremystretch Mar 10, 2021
f4e4949
Merge branch 'feature' into 5284-vlangroup-scope
jeremystretch Mar 10, 2021
d3fee54
Fix VLAN.clean()
jeremystretch Mar 10, 2021
6ab1c06
Extend VLAN group assignment form
jeremystretch Mar 10, 2021
fadf15d
Fix VLAN group assignment for VLANs
jeremystretch Mar 11, 2021
0115a61
Add changelog for #5284
jeremystretch Mar 11, 2021
947da63
Move Location from racks.py to sites.py
jeremystretch Mar 12, 2021
fca5acc
Clean up base serializers
jeremystretch Mar 12, 2021
61d23df
Closes #5972: Bulk edit support for organizational models (#5974)
jeremystretch Mar 12, 2021
1aa22d1
Add missing SiteGroup filter test case
jeremystretch Mar 12, 2021
c0c4eed
Extend VLANGroup to support cluster/cluster group assignment
jeremystretch Mar 15, 2021
bb6360c
Fix up VLANGroup tests
jeremystretch Mar 16, 2021
10778f8
Merge branch 'feature' into 5284-vlangroup-scope
jeremystretch Mar 16, 2021
f64f205
Omit prefetch_related() for VLANGroup
jeremystretch Mar 16, 2021
ee7f7c8
Merge pull request #5985 from netbox-community/5284-vlangroup-scope
jeremystretch Mar 16, 2021
fb48c1f
Add 'display' field to all REST API serializers
jeremystretch Mar 16, 2021
c64f96d
Drop usage of display_field on DynamicModelChoiceFields
jeremystretch Mar 16, 2021
f74c880
Merge pull request #5992 from netbox-community/5891-api-serializer-di…
jeremystretch Mar 16, 2021
a694dbb
Closes #5990: Deprecated display_field parameter for custom script Ob…
jeremystretch Mar 16, 2021
46a0244
Closes #5995: Dropped backward compatibility for queryset parameter o…
jeremystretch Mar 16, 2021
2bb4a81
Closes #5975: Allow partial vCPU allocations for virtual machines
jeremystretch Mar 16, 2021
e97adcb
Move ConfigContext classes out of models.py
jeremystretch Mar 16, 2021
1f1a62d
Initial work on #151: Object journaling
jeremystretch Mar 16, 2021
64d11d3
Fix conditional display journal & change log tabs
jeremystretch Mar 16, 2021
8be4fbb
Add JournalEntry list view w/filtering
jeremystretch Mar 16, 2021
f2c079d
Add JournalEntry tests
jeremystretch Mar 16, 2021
7f1d9ae
Skip secondary check if get_absolute_url() not defined for model
jeremystretch Mar 16, 2021
956e272
Add bulk edit, delete views for journal entries
jeremystretch Mar 17, 2021
bd95d2b
Changelog and documentation for #151
jeremystretch Mar 17, 2021
82fbd97
Add kind field to JournalEntry
jeremystretch Mar 17, 2021
7e65a3d
Add JournalEntry filter for kind
jeremystretch Mar 17, 2021
9a68a61
Merge pull request #5999 from netbox-community/151-journaling
jeremystretch Mar 17, 2021
8893160
Closes #5998: Introduce ContentTypeColumn
jeremystretch Mar 17, 2021
433c48a
Fix IP address interface validation
jeremystretch Mar 17, 2021
6ff8a26
Introduce the Cloud model
jeremystretch Mar 18, 2021
574a43f
Enable attaching circuit terminations to clouds
jeremystretch Mar 18, 2021
872e936
Add termination FKs on Circuit model
jeremystretch Mar 18, 2021
2e97bf4
Include circuits list on cloud view
jeremystretch Mar 18, 2021
d45a172
Add circuit cloud filters & tests
jeremystretch Mar 18, 2021
89c487d
Documentation and changelog for #5986
jeremystretch Mar 18, 2021
d45edcd
Linkify circuit terminations in table
jeremystretch Mar 18, 2021
b6f6293
Prevent the attachment of a Cable to a CircuitTermination on a Cloud
jeremystretch Mar 18, 2021
b9176ad
Merge pull request #6011 from netbox-community/5986-cloud-model
jeremystretch Mar 18, 2021
c828806
Merge branch 'develop' into feature
jeremystretch Mar 25, 2021
65d90aa
Merge branch 'develop' into feature
jeremystretch Mar 26, 2021
bb00f2f
Introduce paginate_table() utility to simplify table pagination
jeremystretch Mar 26, 2021
b7e44a7
Add dedicated views for organizational models
jeremystretch Mar 26, 2021
2820d26
Add dedicated views for nested group models
jeremystretch Mar 26, 2021
981e701
Enable get view tests for organizational objects
jeremystretch Mar 26, 2021
36c903d
Add dedicated view for tags
jeremystretch Mar 26, 2021
b793ee3
Merge pull request #6062 from netbox-community/5971-org-object-views
jeremystretch Mar 26, 2021
1544823
Closes #5926: Strip leading/trailing whitespace from TemplateColumns …
jeremystretch Mar 26, 2021
0364d8c
Closes #6014: Move virtual machine interfaces list to a separate view
jeremystretch Mar 27, 2021
ab612c1
Update changelog
jeremystretch Mar 27, 2021
0fae750
Add Markdown support for JournalEntry comments
jeremystretch Mar 29, 2021
e52702f
Fix journal entry table ordering
jeremystretch Mar 29, 2021
8a8342b
Strip microseconds from JournalEntry creation time
jeremystretch Mar 29, 2021
fe4bf62
Truncate comments in JournalEntryTable
jeremystretch Mar 29, 2021
7396975
Update documentation for journal entries
jeremystretch Mar 29, 2021
2c9b791
Improve Interface validation
jeremystretch Mar 29, 2021
042f359
Update interfaces documentation
jeremystretch Mar 29, 2021
a9716af
Tweak table display for components marked as connected
jeremystretch Mar 29, 2021
30e4504
Enable bulk editing of device location assignment
jeremystretch Mar 29, 2021
93353e9
Note that 'table' is a reserved name for ExportTemplates
jeremystretch Mar 29, 2021
b1935dd
Fix initial tab display
jeremystretch Mar 29, 2021
08ef5c9
Update docs to indicate location assignment ability
jeremystretch Mar 29, 2021
3135dc4
Update changelog
jeremystretch Mar 29, 2021
8fa37d3
Device component lists should link to component-specific device view
jeremystretch Mar 29, 2021
b070be1
Closes #5425: Create separate tabs for VMs and devices under the clus…
jeremystretch Mar 29, 2021
cd629fc
Closes #4833: Allow assigning config contexts by device type
jeremystretch Mar 29, 2021
1294570
Fix ConfigContext application for SiteGroups
jeremystretch Mar 29, 2021
3869028
Clean up organizational object URLs
jeremystretch Mar 29, 2021
1e3c7e1
Fix form errors
jeremystretch Mar 29, 2021
0986fd1
Rearrange locations link in navigation menu
jeremystretch Mar 29, 2021
eac53a7
Migrate prefix, VLAN templates to new structure
jeremystretch Mar 29, 2021
c7040fd
Closes #6038: Include tagged objects list on tag view
jeremystretch Mar 29, 2021
be3d33e
Add support for custom fields in tables (#5460)
TomGrozev Mar 29, 2021
7885ec5
Clean up custom field column implementation
jeremystretch Mar 29, 2021
bfa95c1
Add missing tests for SiteGroup
jeremystretch Mar 30, 2021
9ede726
Add boolean as_attachment to Export template
rodvand Mar 30, 2021
878154c
Closes #5830: Add as_attachment field to API serializers and admin view.
rodvand Mar 30, 2021
34457ea
Merge pull request #6072 from rodvand/origin/feature
jeremystretch Mar 30, 2021
0eb9f41
Changelog & docs for #5380
jeremystretch Mar 30, 2021
e1e840e
Fix VLANGroup 'add VLAN' button
jeremystretch Mar 31, 2021
b91e576
Add 'available_on' VLAN filters for devices & VMs
jeremystretch Mar 31, 2021
a292ff5
Remove brief_mode parameter from DynamicModelChoiceMixin
jeremystretch Mar 31, 2021
d33d952
Fix VM VLAN filtering
jeremystretch Mar 31, 2021
ad5e167
Remove obsolete grouping logic
jeremystretch Mar 31, 2021
9a5f54b
Add tests for filtering VLANs by device/VM
jeremystretch Mar 31, 2021
04fc3a5
Closes #6001: Paginate component tables under device views
jeremystretch Mar 31, 2021
613e0d1
Add link to v2.11 release notes
jeremystretch Mar 31, 2021
83c4577
Merge branch 'develop' into feature
jeremystretch Mar 31, 2021
d572223
Rename Cloud to ProviderNetwork
jeremystretch Apr 1, 2021
96759af
Closes #6071: Cable traces now traverse circuits
jeremystretch Apr 1, 2021
cd64fca
Linkify connected object
jeremystretch Apr 1, 2021
8713ed5
Add test for trace through multiple circuits
jeremystretch Apr 2, 2021
e7f10fd
Include termination side in CircuitTermination string repr
jeremystretch Apr 2, 2021
5e4432b
Show the last node in a CablePath with no destination
jeremystretch Apr 2, 2021
b77c228
Rebuild CablePaths when a CircuitTermination is modified
jeremystretch Apr 2, 2021
a86178f
Simplify VLANGroup scope assignment (WIP)
jeremystretch Apr 2, 2021
73e9842
Introduce ContentTypeChoiceField
jeremystretch Apr 2, 2021
d82f2e2
Use ContentTypeChoiceField for all ContentType fields
jeremystretch Apr 2, 2021
6287f75
Toggle VLANGroup scope selector fields
jeremystretch Apr 2, 2021
eb8e4f6
Restore 'brief' parameter (regression from a292ff5cc089626d75bc96b480…
jeremystretch Apr 2, 2021
e4f3b34
Remove redundant prechange_data assignments
jeremystretch Apr 2, 2021
2b0ccf3
Provide absolute URL for object search form
jeremystretch Apr 2, 2021
237dfce
Fix tab headers
jeremystretch Apr 2, 2021
ea9e9d7
Add the models index
jeremystretch Apr 2, 2021
7798373
Convert all LinkColumns to Column(linkify=True)
jeremystretch Apr 2, 2021
d69ec7f
Add manufacturer column to DeviceTable
jeremystretch Apr 2, 2021
f28edd0
Use CommentField for JournalEntry comments
jeremystretch Apr 2, 2021
72a115b
Add child interfaces table to interface view
jeremystretch Apr 2, 2021
4883bc3
Empty MAC address should be null
jeremystretch Apr 2, 2021
7b8bd2d
Location model cleanup
jeremystretch Apr 5, 2021
0a1531c
TenantColumn should export null if no tenant is assigned
jeremystretch Apr 5, 2021
7949a5e
Migrate VLANGroup site assignments
jeremystretch Apr 5, 2021
f0018dc
LinkedCountColumn should always invoke filter by ID
jeremystretch Apr 5, 2021
374cb74
Filter parent location by ID
jeremystretch Apr 5, 2021
83496c6
Move breadcrumb generation to template
jeremystretch Apr 5, 2021
2664826
Update VLAN documentation
jeremystretch Apr 5, 2021
d844ee2
Empty time_zone should be null
jeremystretch Apr 5, 2021
2e07ac5
Rearrange provider, provider network templates
jeremystretch Apr 5, 2021
aa2beb1
Add tagged items count to tag view
jeremystretch Apr 5, 2021
85359bb
Fix ContentType assignment
jeremystretch Apr 5, 2021
3cfab25
Tweak JournalEntry form layout
jeremystretch Apr 5, 2021
19cb575
Permit the assignment of virtual interfaces as parents
jeremystretch Apr 5, 2021
3ad7622
Catch AttributeError when generating ContentType labels
jeremystretch Apr 5, 2021
ae18693
Add 'add export template' link to dropdown
jeremystretch Apr 5, 2021
a313b67
Simplify CircuitTermination display in circuits table
jeremystretch Apr 5, 2021
71022d5
Site is required when creating devices
jeremystretch Apr 5, 2021
e543b30
Docs cleanup
jeremystretch Apr 6, 2021
8382002
Include child regions, site groups
jeremystretch Apr 6, 2021
8f674ae
Bump Django to 3.2
jeremystretch Apr 6, 2021
0635e7a
Update dependencies for v2.11-beta1
jeremystretch Apr 6, 2021
f1e2b99
Release v2.11-beta1
jeremystretch Apr 6, 2021
b5ad29e
Fixes #6100: Fix VM interfaces table "add interfaces" link
jeremystretch Apr 7, 2021
59e185b
Fixes #6104: Fix location column on racks table
jeremystretch Apr 7, 2021
38b09dc
Fixes #6105: Hide checkboxes for VMs under cluster VMs view
jeremystretch Apr 7, 2021
81193eb
Fixes #6106: Allow assigning a virtual interface as the parent of an …
jeremystretch Apr 7, 2021
4f76268
Fixes #6107: Fix rack selection field on device form
jeremystretch Apr 7, 2021
05d8a06
Closes #6109: Add device counts to locations table
jeremystretch Apr 8, 2021
54d9ca8
Add racks count to location view
jeremystretch Apr 8, 2021
d6fcd22
Fixes #6110: Fix handling of TemplateColumn values for table export
jeremystretch Apr 8, 2021
696b5c8
Closes #6097: Redirect old slug-based object views
jeremystretch Apr 8, 2021
9e62d1a
Fixes #6130: Improve display of assigned models in custom fields list
jeremystretch Apr 9, 2021
6efe54a
Closes #6125: Add locations count to home page
jeremystretch Apr 9, 2021
7439faa
Fixes #6123: Prevent device from being assigned to mismatched site an…
jeremystretch Apr 9, 2021
a3721a9
Closes #6121: Extend parent interface assignment to VM interfaces
jeremystretch Apr 9, 2021
b0573f8
Merge branch 'develop' into feature
jeremystretch Apr 11, 2021
65ed047
Fixes #6124: Location parent filter should return all child locations…
jeremystretch Apr 11, 2021
0bce1da
Clean up stray references to old RackGroup model
jeremystretch Apr 11, 2021
18f2067
Closes #6088: Improved table configuration form
jeremystretch Apr 12, 2021
f8903a8
Merge branch 'develop' into feature
jeremystretch Apr 12, 2021
f503c72
Closes #6146: Add bulk disconnect support for power feeds
jeremystretch Apr 12, 2021
d0be5f0
Merge branch 'develop' into feature
jeremystretch Apr 12, 2021
608bf30
Add cable trace view tests
jeremystretch Apr 12, 2021
b4b68c0
Move create_test_device() to testing utils
jeremystretch Apr 12, 2021
a1d32c3
Add view tests for CircuitTermination
jeremystretch Apr 12, 2021
9bda2a4
Fix permissions for cable trace view tests
jeremystretch Apr 12, 2021
e5bbf47
Fixes #5583: Eliminate redundant change records when adding/removing …
jeremystretch Apr 13, 2021
a296a9e
Closes #6150: Enable change logging for journal entries
jeremystretch Apr 13, 2021
e5602ab
Closes #5848: Filter custom fields by content type in format <app_lab…
jeremystretch Apr 13, 2021
b1d20d3
Closes #6149: Support image attachments for locations
jeremystretch Apr 13, 2021
6ad20c5
Delete unused template
jeremystretch Apr 13, 2021
46e144f
Clean up object header
jeremystretch Apr 13, 2021
d427e05
Closes #5757: Add unique identifier to every object view
jeremystretch Apr 13, 2021
e3f5062
Merge branch 'develop' into feature
jeremystretch Apr 13, 2021
8701b20
Fixes #6155: Fix admin links for plugins, background tasks
jeremystretch Apr 14, 2021
664ba55
Reorganize base TestCase classes
jeremystretch Apr 14, 2021
b393ec2
Enable webhooks for JournalEntry
jeremystretch Apr 14, 2021
0fb8291
Documentation cleanup
jeremystretch Apr 14, 2021
ef78a7d
Merge branch 'develop' into feature
jeremystretch Apr 15, 2021
0bb2a05
Fixes #6171: Fix display of horizontally-scrolling object lists
jeremystretch Apr 15, 2021
8a425a9
Fixes #6173: Fix assigned device/VM count when bulk editing/deleting …
jeremystretch Apr 15, 2021
428858d
Merge pull request #6175 from netbox-community/feature
jeremystretch Apr 16, 2021
2bc9730
Merge release notes from v2.11-beta1
jeremystretch Apr 16, 2021
c24cac9
Fixes #6176: Correct position of MAC address field when creating VM i…
jeremystretch Apr 16, 2021
5bd3006
Fixes #6177: Prevent VM interface from being assigned as its own parent
jeremystretch Apr 16, 2021
7e8ffd8
Fix markdown list indentation
jeremystretch Apr 16, 2021
8af78c6
Release v2.11.0
jeremystretch Apr 16, 2021
c002501
Merge branch 'master' into develop
jeremystretch Apr 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ redis
# SVG image rendering (used for rack elevations)
# https://github.com/mozman/svgwrite
svgwrite

# Tabular dataset library (for table-based exports)
# https://github.com/jazzband/tablib
tablib
2 changes: 1 addition & 1 deletion docs/additional-features/change-logging.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Logging

Every time an object in NetBox is created, updated, or deleted, a serialized copy of that object is saved to the database, along with meta data including the current time and the user associated with the change. These records form a persistent record of changes both for each individual object as well as NetBox as a whole. The global change log can be viewed by navigating to Other > Change Log.
Every time an object in NetBox is created, updated, or deleted, a serialized copy of that object taken both before and after the change is saved to the database, along with meta data including the current time and the user associated with the change. These records form a persistent record of changes both for each individual object as well as NetBox as a whole. The global change log can be viewed by navigating to Other > Change Log.

A serialized representation of the instance being modified is included in JSON format. This is similar to how objects are conveyed within the REST API, but does not include any nested representations. For instance, the `tenant` field of a site will record only the tenant's ID, not a representation of the tenant.

Expand Down
3 changes: 2 additions & 1 deletion docs/additional-features/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Custom fields must be created through the admin UI under Extras > Custom Fields.
* Date: A date in ISO 8601 format (YYYY-MM-DD)
* URL: This will be presented as a link in the web UI
* Selection: A selection of one of several pre-defined custom choices
* Multiple selection: A selection field which supports the assignment of multiple values

Each custom field must have a name; this should be a simple database-friendly string, e.g. `tps_report`. You may also assign a corresponding human-friendly label (e.g. "TPS report"); the label will be displayed on web forms. A weight is also required: Higher-weight fields will be ordered lower within a form. (The default weight is 100.) If a description is provided, it will appear beneath the field in a form.

Expand All @@ -37,7 +38,7 @@ NetBox supports limited custom validation for custom field values. Following are

Each custom selection field must have at least two choices. These are specified as a comma-separated list. Choices appear in forms in the order they are listed. Note that choice values are saved exactly as they appear, so it's best to avoid superfluous punctuation or symbols where possible.

If a default value is specified for a selection field, it must exactly match one of the provided choices.
If a default value is specified for a selection field, it must exactly match one of the provided choices. The value of a multiple selection field will always return a list, even if only one value is selected.

## Custom Fields in Templates

Expand Down
13 changes: 4 additions & 9 deletions docs/additional-features/custom-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,13 @@ Similar to `ChoiceVar`, but allows for the selection of multiple choices.
A particular object within NetBox. Each ObjectVar must specify a particular model, and allows the user to select one of the available instances. ObjectVar accepts several arguments, listed below.

* `model` - The model class
* `display_field` - The name of the REST API object field to display in the selection list (default: `'name'`)
* `display_field` - The name of the REST API object field to display in the selection list (default: `'display'`)
* `query_params` - A dictionary of query parameters to use when retrieving available options (optional)
* `null_option` - A label representing a "null" or empty choice (optional)

The `display_field` argument is useful when referencing a model which does not have a `name` field. For example, when displaying a list of device types, you would likely use the `model` field:

```python
device_type = ObjectVar(
model=DeviceType,
display_field='model'
)
```
!!! warning
The `display_field` parameter is now deprecated, and will be removed in NetBox v2.12. All ObjectVar instances will
instead use the new standard `display` field for all serializers (introduced in NetBox v2.11).

To limit the selections available within the list, additional query parameters can be passed as the `query_params` dictionary. For example, to show only devices with an "active" status:

Expand Down
7 changes: 6 additions & 1 deletion docs/additional-features/export-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

NetBox allows users to define custom templates that can be used when exporting objects. To create an export template, navigate to Extras > Export Templates under the admin interface.

Each export template is associated with a certain type of object. For instance, if you create an export template for VLANs, your custom template will appear under the "Export" button on the VLANs list.
Each export template is associated with a certain type of object. For instance, if you create an export template for VLANs, your custom template will appear under the "Export" button on the VLANs list. Each export template must have a name, and may optionally designate a specific export [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) and/or file extension.

!!! note
The name `table` is reserved for internal use.

Export templates must be written in [Jinja2](https://jinja.palletsprojects.com/).

Expand All @@ -26,6 +29,8 @@ If you need to use the config context data in an export template, you'll should
{% endfor %}
```

The `as_attachment` attribute of an export template controls its behavior when rendered. If true, the rendered content will be returned to the user as a downloadable file. If false, it will be displayed within the browser. (This may be handy e.g. for generating HTML content.)

A MIME type and file extension can optionally be defined for each export template. The default MIME type is `text/plain`.

## Example
Expand Down
5 changes: 5 additions & 0 deletions docs/additional-features/journaling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Journaling

All primary objects in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object.

Each journal entry has a selectable kind (info, success, warning, or danger) and a user-populated `comments` field. Each entry automatically records the date, time, and associated user upon being created.
16 changes: 14 additions & 2 deletions docs/additional-features/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ The following data is available as context for Jinja2 templates:
* `timestamp` - The time at which the event occurred (in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* `username` - The name of the user account associated with the change.
* `request_id` - The unique request ID. This may be used to correlate multiple changes associated with a single request.
* `data` - A serialized representation of the object _after_ the change was made. This is typically equivalent to the model's representation in NetBox's REST API.
* `data` - A detailed representation of the object in its current state. This is typically equivalent to the model's representation in NetBox's REST API.
* `snapshots` - Minimal "snapshots" of the object state both before and after the change was made; provided ass a dictionary with keys named `prechange` and `postchange`. These are not as extensive as the fully serialized representation, but contain enough information to convey what has changed.

### Default Request Body

Expand All @@ -47,7 +48,7 @@ If no body template is specified, the request body will be populated with a JSON
```no-highlight
{
"event": "created",
"timestamp": "2020-02-25 15:10:26.010582+00:00",
"timestamp": "2021-03-09 17:55:33.968016+00:00",
"model": "site",
"username": "jstretch",
"request_id": "fdbca812-3142-4783-b364-2e2bd5c16c6a",
Expand All @@ -62,6 +63,17 @@ If no body template is specified, the request body will be populated with a JSON
},
"region": null,
...
},
"snapshots": {
"prechange": null,
"postchange": {
"created": "2021-03-09",
"last_updated": "2021-03-09T17:55:33.851Z",
"name": "Site 1",
"slug": "site-1",
"status": "active",
...
}
}
}
```
Expand Down
1 change: 1 addition & 0 deletions docs/core-functionality/circuits.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Circuits

{!docs/models/circuits/provider.md!}
{!docs/models/circuits/providernetwork.md!}

---

Expand Down
2 changes: 2 additions & 0 deletions docs/core-functionality/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

## Device Components

Device components represent discrete objects within a device which are used to terminate cables, house child devices, or track resources.

{!docs/models/dcim/consoleport.md!}
{!docs/models/dcim/consoleserverport.md!}
{!docs/models/dcim/powerport.md!}
Expand Down
5 changes: 3 additions & 2 deletions docs/core-functionality/sites-and-racks.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Sites and Racks

{!docs/models/dcim/site.md!}
{!docs/models/dcim/region.md!}
{!docs/models/dcim/sitegroup.md!}
{!docs/models/dcim/site.md!}
{!docs/models/dcim/location.md!}

---

{!docs/models/dcim/rack.md!}
{!docs/models/dcim/rackgroup.md!}
{!docs/models/dcim/rackrole.md!}
{!docs/models/dcim/rackreservation.md!}
98 changes: 98 additions & 0 deletions docs/development/models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# NetBox Models

## Model Types

A NetBox model represents a discrete object type such as a device or IP address. Each model is defined as a Python class and has its own SQL table. All NetBox data models can be categorized by type.

The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/) framework can be used to reference models within the database. A ContentType instance references a model by its `app_label` and `name`: For example, the Site model is referred to as `dcim.site`. The content type combined with an object's primary key form a globally unique identifier for the object (e.g. `dcim.site:123`).

### Features Matrix

* [Change logging](../additional-features/change-logging.md) - Changes to these objects are automatically recorded in the change log
* [Webhooks](../additional-features/webhooks.md) - NetBox is capable of generating outgoing webhooks for these objects
* [Custom fields](../additional-features/custom-fields.md) - These models support the addition of user-defined fields
* [Export templates](../additional-features/export-templates.md) - Users can create custom export templates for these models
* [Tagging](../models/extras/tag.md) - The models can be tagged with user-defined tags
* [Journaling](../additional-features/journaling.md) - These models support persistent historical commentary
* Nesting - These models can be nested recursively to create a hierarchy

| Type | Change Logging | Webhooks | Custom Fields | Export Templates | Tags | Journaling | Nesting |
| ------------------ | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- |
| Primary | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | |
| Organizational | :material-check: | :material-check: | :material-check: | :material-check: | | | |
| Nested Group | :material-check: | :material-check: | :material-check: | :material-check: | | | :material-check: |
| Component | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
| Component Template | :material-check: | :material-check: | :material-check: | | | | |

## Models Index

### Primary Models

* [circuits.Circuit](../models/circuits/circuit.md)
* [circuits.Provider](../models/circuits/provider.md)
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
* [dcim.Cable](../models/dcim/cable.md)
* [dcim.Device](../models/dcim/device.md)
* [dcim.DeviceType](../models/dcim/devicetype.md)
* [dcim.PowerFeed](../models/dcim/powerfeed.md)
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
* [dcim.Rack](../models/dcim/rack.md)
* [dcim.RackReservation](../models/dcim/rackreservation.md)
* [dcim.Site](../models/dcim/site.md)
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
* [ipam.Aggregate](../models/ipam/aggregate.md)
* [ipam.IPAddress](../models/ipam/ipaddress.md)
* [ipam.Prefix](../models/ipam/prefix.md)
* [ipam.RouteTarget](../models/ipam/routetarget.md)
* [ipam.Service](../models/ipam/service.md)
* [ipam.VLAN](../models/ipam/vlan.md)
* [ipam.VRF](../models/ipam/vrf.md)
* [secrets.Secret](../models/secrets/secret.md)
* [tenancy.Tenant](../models/tenancy/tenant.md)
* [virtualization.Cluster](../models/virtualization/cluster.md)
* [virtualization.VirtualMachine](../models/virtualization/virtualmachine.md)

### Organizational Models

* [circuits.CircuitType](../models/circuits/circuittype.md)
* [dcim.DeviceRole](../models/dcim/devicerole.md)
* [dcim.Manufacturer](../models/dcim/manufacturer.md)
* [dcim.Platform](../models/dcim/platform.md)
* [dcim.RackRole](../models/dcim/rackrole.md)
* [ipam.RIR](../models/ipam/rir.md)
* [ipam.Role](../models/ipam/role.md)
* [ipam.VLANGroup](../models/ipam/vlangroup.md)
* [secrets.SecretRole](../models/secrets/secretrole.md)
* [virtualization.ClusterGroup](../models/virtualization/clustergroup.md)
* [virtualization.ClusterType](../models/virtualization/clustertype.md)

### Nested Group Models

* [dcim.Location](../models/dcim/location.md) (formerly RackGroup)
* [dcim.Region](../models/dcim/region.md)
* [dcim.SiteGroup](../models/dcim/sitegroup.md)
* [tenancy.TenantGroup](../models/tenancy/tenantgroup.md)

### Component Models

* [dcim.ConsolePort](../models/dcim/consoleport.md)
* [dcim.ConsoleServerPort](../models/dcim/consoleserverport.md)
* [dcim.DeviceBay](../models/dcim/devicebay.md)
* [dcim.FrontPort](../models/dcim/frontport.md)
* [dcim.Interface](../models/dcim/interface.md)
* [dcim.InventoryItem](../models/dcim/inventoryitem.md)
* [dcim.PowerOutlet](../models/dcim/poweroutlet.md)
* [dcim.PowerPort](../models/dcim/powerport.md)
* [dcim.RearPort](../models/dcim/rearport.md)
* [virtualization.VMInterface](../models/virtualization/vminterface.md)

### Component Template Models

* [dcim.ConsolePortTemplate](../models/dcim/consoleporttemplate.md)
* [dcim.ConsoleServerPortTemplate](../models/dcim/consoleserverporttemplate.md)
* [dcim.DeviceBayTemplate](../models/dcim/devicebaytemplate.md)
* [dcim.FrontPortTemplate](../models/dcim/frontporttemplate.md)
* [dcim.InterfaceTemplate](../models/dcim/interfacetemplate.md)
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)
37 changes: 18 additions & 19 deletions docs/installation/1-postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@ This section entails the installation and configuration of a local PostgreSQL da

## Installation

#### Ubuntu
=== "Ubuntu"

Install the PostgreSQL server and client development libraries using `apt`.
```no-highlight
sudo apt update
sudo apt install -y postgresql libpq-dev
```

```no-highlight
sudo apt update
sudo apt install -y postgresql libpq-dev
```
=== "CentOS"

#### CentOS
```no-highlight
sudo yum install -y postgresql-server libpq-devel
sudo postgresql-setup --initdb
```

PostgreSQL 9.6 and later are available natively on CentOS 8.2. If using an earlier CentOS release, you may need to [install it from an RPM](https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/).
!!! info
PostgreSQL 9.6 and later are available natively on CentOS 8.2. If using an earlier CentOS release, you may need to [install it from an RPM](https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/).

```no-highlight
sudo yum install -y postgresql-server libpq-devel
sudo postgresql-setup --initdb
```
CentOS configures ident host-based authentication for PostgreSQL by default. Because NetBox will need to authenticate using a username and password, modify `/var/lib/pgsql/data/pg_hba.conf` to support MD5 authentication by changing `ident` to `md5` for the lines below:

CentOS configures ident host-based authentication for PostgreSQL by default. Because NetBox will need to authenticate using a username and password, modify `/var/lib/pgsql/data/pg_hba.conf` to support MD5 authentication by changing `ident` to `md5` for the lines below:

```no-highlight
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
```
```no-highlight
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
```

Then, start the service and enable it to run at boot:
Once PostgreSQL has been installed, start the service and enable it to run at boot:

```no-highlight
sudo systemctl start postgresql
Expand Down
20 changes: 10 additions & 10 deletions docs/installation/2-redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
!!! note
NetBox v2.9.0 and later require Redis v4.0 or higher. If your distribution does not offer a recent enough release, you will need to build Redis from source. Please see [the Redis installation documentation](https://github.com/redis/redis) for further details.

### Ubuntu
=== "Ubuntu"

```no-highlight
sudo apt install -y redis-server
```
```no-highlight
sudo apt install -y redis-server
```

### CentOS
=== "CentOS"

```no-highlight
sudo yum install -y redis
sudo systemctl start redis
sudo systemctl enable redis
```
```no-highlight
sudo yum install -y redis
sudo systemctl start redis
sudo systemctl enable redis
```

You may wish to modify the Redis configuration at `/etc/redis.conf` or `/etc/redis/redis.conf`, however in most cases the default configuration is sufficient.

Expand Down
Loading