Skip to content
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

Release v2.10.0 #5455

Merged
merged 319 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
319 commits
Select commit Hold shift + click to select a range
1b55285
Relocate CSS classes for ChoiceFields from model to ChoiceSet
jeremystretch Sep 24, 2020
18a8a91
Introduce ChoiceFieldColumn to replace template columns
jeremystretch Sep 25, 2020
28f0da0
Introduce LinkedCountColumn to standardize approach to counting relat…
jeremystretch Sep 25, 2020
12e2537
General cleanup of tables
jeremystretch Sep 25, 2020
587e6fc
Initial work on cable paths (WIP)
jeremystretch Sep 30, 2020
9851977
Add initial tests
jeremystretch Sep 30, 2020
319329e
Extend cable path tests
jeremystretch Sep 30, 2020
cd71799
Ignore the position stack when traversing single-position rear ports
jeremystretch Sep 30, 2020
e53ae1d
Extend cable path tests
jeremystretch Sep 30, 2020
46df5a9
Remove extraneous test objects
jeremystretch Sep 30, 2020
19a3a4d
Add GenericRelation to originating cable paths on PathEndpoint
jeremystretch Oct 1, 2020
105c0fd
Introduce retrace_paths management command
jeremystretch Oct 1, 2020
8abc055
CircuitTermination and PowerFeed are path endpoints
jeremystretch Oct 1, 2020
cd398b1
retrace_paths should ignore case in model names
jeremystretch Oct 1, 2020
610420c
Drop support for split paths
jeremystretch Oct 1, 2020
c974c56
Capture path end-to-end status in CablePath
jeremystretch Oct 1, 2020
0d07b03
Add test for connecting cables out of order
jeremystretch Oct 1, 2020
3b0a75e
Add test for updated paths on cable status change
jeremystretch Oct 1, 2020
d50a0d9
Add tests for multiple pass-through breakouts
jeremystretch Oct 2, 2020
9d10c57
Remove legacy CablePathTestCase
jeremystretch Oct 2, 2020
9f24221
Rename test elements to be more readable
jeremystretch Oct 2, 2020
4fd1219
Add tests for all PathEndpoint classes
jeremystretch Oct 2, 2020
e0abd7e
Remove dcim.tests.test_api.ConnectionTest
jeremystretch Oct 2, 2020
66355da
CablePath.origin should be unique
jeremystretch Oct 2, 2020
aa0d4c4
Replace connection_status filter with is_connected
jeremystretch Oct 2, 2020
e9da84f
Replace legacy trace() method
jeremystretch Oct 2, 2020
7ff247c
Add trace view for PowerFeed
jeremystretch Oct 2, 2020
8cb636b
Update console/power/interface connection tables
jeremystretch Oct 2, 2020
5737f6f
Cache each CablePath on its originating endpoint
jeremystretch Oct 2, 2020
f8800b8
Optimize console/power/interface connection lists
jeremystretch Oct 3, 2020
079c422
Remove legacy connected endpoint fields
jeremystretch Oct 5, 2020
df73737
Remove legacy connection_status fields
jeremystretch Oct 5, 2020
13db22d
Initial changelog notes for #4900
jeremystretch Oct 5, 2020
3d34f1c
Rename CablePath.is_connected to is_active
jeremystretch Oct 5, 2020
b846f63
Rename connection_status to connected_endpoint_reachable
jeremystretch Oct 5, 2020
32aa2da
PowerFeedSerializer should subclass ConnectedEndpointSerializer
jeremystretch Oct 5, 2020
b2066bc
Merge schema migrations
jeremystretch Oct 5, 2020
50aecd0
Fix up connection lists (pending additional work)
jeremystretch Oct 5, 2020
32b8148
Standardize path endpoint templates
jeremystretch Oct 5, 2020
d5d6b0e
Optimize path prefetching
jeremystretch Oct 5, 2020
19430dd
Extend cable trace view to show related paths
jeremystretch Oct 5, 2020
56ee425
Introduce PathContains lookup to allow filtering against objects in p…
jeremystretch Oct 6, 2020
ffdf551
Tweak component templates
jeremystretch Oct 6, 2020
6275c8c
Prefetch path & destination for API views
jeremystretch Oct 6, 2020
d59f089
Cache peer termination on CableTerminations
jeremystretch Oct 6, 2020
d984dbd
Extend device view to show local cable termination for all components
jeremystretch Oct 6, 2020
c813ae4
Clean up power connection tables
jeremystretch Oct 6, 2020
23cde6d
Include cable_peer on CableTermination serializers
jeremystretch Oct 6, 2020
3870f5d
Remove unused CablePathManager
jeremystretch Oct 6, 2020
52ec35b
Correct serializer field lists
jeremystretch Oct 6, 2020
534364a
Improve model docstrings
jeremystretch Oct 6, 2020
6b3a199
Add test_is_connected to CircuitTerminationTestCase
jeremystretch Oct 6, 2020
a6e0ef8
Clean up console/power/interface connections views
jeremystretch Oct 6, 2020
a072d40
Update v2.10 changelog
jeremystretch Oct 6, 2020
2c9ae60
Optimize path node representations
jeremystretch Oct 6, 2020
44b8425
Restore total length count on trace view
jeremystretch Oct 6, 2020
c7c6662
Standardize 'cabled' and 'connected' filters; complete tests
jeremystretch Oct 6, 2020
6db3c65
Swap order of cabling migrations
jeremystretch Oct 7, 2020
f560693
Rewrite trace_paths management command and call in upgrade.sh
jeremystretch Oct 7, 2020
eaf8d95
Clean up power utilization logic
jeremystretch Oct 7, 2020
85439fd
Fix PowerFeed display in cable traces
jeremystretch Oct 7, 2020
35759fd
Redo the cable trace UI (WIP)
jeremystretch Oct 7, 2020
aa0ee27
Add cable paths API detail view for pass-through ports
jeremystretch Oct 8, 2020
55268c9
Replace connection_status with connected_endpoint_reachable on Interf…
jeremystretch Oct 8, 2020
ae1ceb2
Standardize cable/connection field ordering
jeremystretch Oct 8, 2020
29eebf9
Update REST API changes
jeremystretch Oct 8, 2020
0c5efa2
Handle traces which split at a RearPort
jeremystretch Oct 8, 2020
0e41bc4
Add /trace API endpoints for CircuitTermination and PowerFeed
jeremystretch Oct 8, 2020
75ddc63
Handle split paths
jeremystretch Oct 8, 2020
a716ca7
Rewrite cablepath tests to create components within each test
jeremystretch Oct 8, 2020
44caa40
Delete obsolete LoopDetected exception
jeremystretch Oct 8, 2020
6470613
Merge pull request #5212 from netbox-community/4900-cable-paths
jeremystretch Oct 8, 2020
752b099
Exempt InventoryItem from queryset caching (MPTT)
jeremystretch Oct 8, 2020
96650b0
Merge branch 'develop' into develop-2.10
jeremystretch Oct 9, 2020
30778a9
Closes #5225: CircuitTermination port_speed is now optional
jeremystretch Oct 9, 2020
66c4597
Add RouteTarget to __all__
jeremystretch Oct 9, 2020
3df3706
Closes #5190: Add a REST API endpoint for content types
jeremystretch Oct 9, 2020
d61d620
Ditch hard-coded filtering of ContentTypes API endpoint
jeremystretch Oct 9, 2020
97ac685
Merge branch 'develop' into develop-2.10
jeremystretch Oct 12, 2020
c0c5f52
Reorganize REST API components under netbox app
jeremystretch Oct 13, 2020
80c142a
Closes #4918: Add a REST API endpoint which returns NetBox's current …
jeremystretch Oct 13, 2020
defade8
Fix plugin name resolution
jeremystretch Oct 13, 2020
143f3cc
#4711: Rename CustomField.obj_type to content_types
jeremystretch Oct 14, 2020
e7d26ca
Move Cable and CablePath to cables.py
jeremystretch Oct 14, 2020
8781cf1
Closes #609: Add min/max value and regex validation for custom fields
jeremystretch Oct 15, 2020
c9c8d33
Closes #5011: Standardized name field lengths across all models
jeremystretch Oct 15, 2020
32274de
Closes: #4967 - Adds Tenancy to Aggregate model
DanSheps Oct 16, 2020
086b1d8
Update Change Notes
DanSheps Oct 16, 2020
23d56a5
Note REST API change for #4967
jeremystretch Oct 16, 2020
73bf3b9
Reorganize DCIM tables
jeremystretch Oct 16, 2020
823aa6b
Add compatible types for PowerFeed
jeremystretch Oct 16, 2020
769b240
Extend device component tables to include cable peer
jeremystretch Oct 16, 2020
35273c7
Add connection column for path endpoints
jeremystretch Oct 16, 2020
99352a5
Convert device console ports list to table
jeremystretch Oct 16, 2020
60c30b9
Convert device console server ports list to table
jeremystretch Oct 16, 2020
3a47e0e
Convert device power ports list to table
jeremystretch Oct 16, 2020
eed2e4a
Convert device power outlets list to table
jeremystretch Oct 16, 2020
68060cf
Convert device front ports list to table
jeremystretch Oct 16, 2020
e3f98a0
Convert device rear ports list to table
jeremystretch Oct 16, 2020
2146c38
Convert device interfaces list to table
jeremystretch Oct 16, 2020
7c13166
Convert device device bays list to table
jeremystretch Oct 16, 2020
82c6fb6
Convert device inventory items list to table
jeremystretch Oct 16, 2020
5182181
Add cable trace buttons
jeremystretch Oct 16, 2020
0a67926
Fix up missing table columns
jeremystretch Oct 16, 2020
a969b81
Change color for edit button
jeremystretch Oct 16, 2020
00caa36
Remove interface IPs toggle
jeremystretch Oct 16, 2020
502b663
Convert VM interfaces list to table
jeremystretch Oct 16, 2020
e304f10
Cleanup stray output
jeremystretch Oct 16, 2020
55a2e02
Standardize device component table columns
jeremystretch Oct 19, 2020
9cbfc0c
Merge pull request #5251 from netbox-community/4786-device-component-…
jeremystretch Oct 19, 2020
2e558ba
Closes #5139: Omit utilization statistics from RIR list
jeremystretch Oct 20, 2020
2845dd4
Add a REST API endpoint for updating user preferences
jeremystretch Oct 21, 2020
4de7fcd
Convert table config updates to use REST API
jeremystretch Oct 21, 2020
ff3d0b7
Tweak the table config form for generic use
jeremystretch Oct 21, 2020
ce2210b
Introduce table_config_form template tag to simplify form generation
jeremystretch Oct 23, 2020
cf328ca
Fix interfaces table header
jeremystretch Oct 29, 2020
ffdb727
Update BaseTable to accept user instance directly
jeremystretch Oct 29, 2020
acd4054
Customize device component tables for user
jeremystretch Oct 29, 2020
a433611
Fix overwriting of existing preferences
jeremystretch Oct 29, 2020
00e102f
Fix resetting column preferences
jeremystretch Oct 29, 2020
aad32c4
Add tests for UserConfig API endpoint
jeremystretch Oct 29, 2020
6edd65c
Merge pull request #5288 from netbox-community/5252-table-config
jeremystretch Oct 29, 2020
fcb5e6a
Merge branch 'develop' into develop-2.10
jeremystretch Oct 30, 2020
f82e2a8
Fixed up device & device type tab navigation
jeremystretch Oct 30, 2020
70e9669
Add CablePath.get_path() to prefetch path nodes
jeremystretch Oct 30, 2020
8d02303
Optimize cable termination tables
jeremystretch Oct 30, 2020
97c8306
Drop add_prefetch from BaseTable; improve dynamic prefetching for tab…
jeremystretch Oct 30, 2020
9a9babf
Remove extraneous prefetch_related() calls from object list views
jeremystretch Oct 30, 2020
700aa1a
Add import/export RTs to VRFTable
jeremystretch Nov 2, 2020
9fae11a
Add present_in_vrf filters
jeremystretch Nov 2, 2020
2bb79a2
Add missing bulk update test data
jeremystretch Nov 2, 2020
bd62611
Skip signal processing when loading cables from fixtures
jeremystretch Nov 3, 2020
23cce55
Merge branch 'develop' into develop-2.10
jeremystretch Nov 5, 2020
39b322a
Closes #5313: Denote official support for Python 3.8
jeremystretch Nov 5, 2020
d388472
Add Material Design icons
jeremystretch Nov 6, 2020
867f308
Replace Font Awesome icons with Material Design
jeremystretch Nov 6, 2020
72dace2
Replace Glyphicons with Material Design
jeremystretch Nov 6, 2020
6542a32
Clean up stray Font Awesome icons
jeremystretch Nov 6, 2020
5db14f9
Tweak CSS
jeremystretch Nov 6, 2020
62b0a68
Don't use chevron-right icon for hierarchy
jeremystretch Nov 6, 2020
652e128
Merge pull request #5317 from netbox-community/2755-material-design-i…
jeremystretch Nov 10, 2020
0567f0d
Merge branch 'develop' into develop-2.10
jeremystretch Nov 10, 2020
cb79a5a
Remove old tables.py
jeremystretch Nov 10, 2020
b8a7870
Fix bulk editing of device components
jeremystretch Nov 10, 2020
3d6bf1e
Clean up CustomField regex validation
jeremystretch Nov 10, 2020
97c588a
Clean up service form
jeremystretch Nov 10, 2020
aac9302
Fix permissions for REST API status view
jeremystretch Nov 10, 2020
2377e04
Fix up device component tab navigation & return URLs
jeremystretch Nov 10, 2020
1552681
Don't use responsive tables for device components
jeremystretch Nov 10, 2020
f631f8c
Correct label for RIR
jeremystretch Nov 10, 2020
46b48ee
Add missing tenant attribute
jeremystretch Nov 10, 2020
fbe1ec3
Extend some CSV import tests to check ChoiceField slugs
jeremystretch Nov 10, 2020
5231219
Ensure consistent inclusion of custom fields for newly-supporting models
jeremystretch Nov 10, 2020
de0e698
Fix RegionTestCase
jeremystretch Nov 10, 2020
b9af6ef
Tweak icons
jeremystretch Nov 10, 2020
7a61354
Fix rack elevation image toggles
jeremystretch Nov 10, 2020
d03c14d
Closes #5154: Utilize all horizontal space for web UI
jeremystretch Nov 10, 2020
8348c5a
Fix side panel width
jeremystretch Nov 10, 2020
c496b05
Update Python dependencies
jeremystretch Nov 10, 2020
db0c61d
Consolidate middleware under NetBox core
jeremystretch Nov 10, 2020
4971469
Move APIRootView to netbox.api.views
jeremystretch Nov 10, 2020
2b359ce
Move rest_api_server_error() to utilities.api
jeremystretch Nov 10, 2020
d560e2d
Fix tracing from front/rear ports
jeremystretch Nov 11, 2020
5ed5ffe
Bulk update should return complete object representation
jeremystretch Nov 11, 2020
963df7e
Correct FrontPortTemplate update data
jeremystretch Nov 11, 2020
64d1f57
Add custom get_operation_id() method to avoid monkey-patching coreapi
jeremystretch Nov 11, 2020
d17bf67
Rewrote documentation for custom fields
jeremystretch Nov 11, 2020
3d6baea
Move selection field validation from admin form to model
jeremystretch Nov 11, 2020
a0772fd
Move context processors under NetBox core
jeremystretch Nov 11, 2020
8714c33
Move constants out of views.py
jeremystretch Nov 11, 2020
b3c7702
Relocate and group generic views
jeremystretch Nov 11, 2020
a367585
Clean up generic view templates
jeremystretch Nov 11, 2020
cbea309
Call out removal of DTL (#4360) at top of release notes
jeremystretch Nov 12, 2020
aed25fe
#259: Add present_in_vrf filters for IPAddress
jeremystretch Nov 12, 2020
4a8a1ce
Check for extraneous custom field data on clean()
jeremystretch Nov 12, 2020
f3f3993
Enforce custom field validation on the model
jeremystretch Nov 12, 2020
e84a6b9
Improved cable trace UI
jeremystretch Nov 12, 2020
eb5f616
Add segment_count property to CablePath
jeremystretch Nov 13, 2020
424d72a
Fix up related paths list
jeremystretch Nov 13, 2020
0523463
Don't wrap component names
jeremystretch Nov 13, 2020
9736d6b
Separate device component lists into discrete views
jeremystretch Nov 13, 2020
5f8b0cc
Ensure consistent display of device component buttons
jeremystretch Nov 13, 2020
d0e6e9c
Correct return URLs for device component actions
jeremystretch Nov 13, 2020
5106e87
Fix CSS for dropdown menu icons
jeremystretch Nov 16, 2020
ba2ff0a
Fix icon class
jeremystretch Nov 16, 2020
c559775
Add support for tracing split paths
jeremystretch Nov 16, 2020
83daadd
Highlight the current termination
jeremystretch Nov 16, 2020
bb15f78
Fix Cable model validation tests
jeremystretch Nov 17, 2020
fc126d7
Bump Django to 3.1.3
jeremystretch Nov 17, 2020
59df724
Updated installation docs
jeremystretch Nov 17, 2020
c1c4f28
Update installation docs to use CentOS 8
jeremystretch Nov 17, 2020
5b9e1b0
Fix badge icon CSS
jeremystretch Nov 17, 2020
e72db65
Clean up v2.10 release notes
jeremystretch Nov 17, 2020
6773709
Merge branch 'develop' into develop-2.10
jeremystretch Nov 17, 2020
ef426de
Tweak help modal icon
jeremystretch Nov 17, 2020
16a95be
Release v2.10-beta1
jeremystretch Nov 17, 2020
11fa348
Fixes #5358: Fix user table configuration for VM interfaces
jeremystretch Nov 19, 2020
e2d2ff8
Standardize on "object" for ObjectView template context
jeremystretch Nov 19, 2020
3e7cf41
Update ObjectChangeLogView to use "object" context var
jeremystretch Nov 19, 2020
d5d87e0
Update templates to use "object" context var
jeremystretch Nov 19, 2020
2f1ca90
Fall back to base template if object template doesn't exist
jeremystretch Nov 19, 2020
e5caea0
Update UserKey views to use "object" context var
jeremystretch Nov 19, 2020
790e1ee
Update created_updated.html
jeremystretch Nov 19, 2020
d237b97
Update custom_fields_panel.html
jeremystretch Nov 19, 2020
1d922ee
Migrate all ObjectView subclasses to use get_extra_context()
jeremystretch Nov 19, 2020
1d7bee5
Move device template
jeremystretch Nov 19, 2020
507fb53
Merge pull request #5361 from netbox-community/5305-standardize-objec…
jeremystretch Nov 19, 2020
6fb080f
Rename CustomFieldFilterSet
jeremystretch Nov 23, 2020
a05fe69
Add REST API endpoint for custom fields
jeremystretch Nov 23, 2020
98f2d25
Add REST API test for custom fields
jeremystretch Nov 23, 2020
8e0a647
Merge pull request #5372 from netbox-community/5274-custom-fields-api
jeremystretch Nov 23, 2020
65d2994
Changelog for #5274
jeremystretch Nov 23, 2020
6cae4d7
Fix CustomFieldSerializer content_types queryset
jeremystretch Nov 23, 2020
54af29e
Move changelog for #5274
jeremystretch Nov 24, 2020
a081d0d
Use smaller navigation tabs
jeremystretch Nov 24, 2020
e9fb91b
Fixes: #5374 - Fix exception thrown when tracing mid-point
DanSheps Nov 24, 2020
869c87e
Add tests for per-device component views
jeremystretch Nov 24, 2020
e1911a6
Merge branch 'develop-2.10' of https://github.com/netbox-community/ne…
jeremystretch Nov 24, 2020
b3d674e
Remove extraneous imports
jeremystretch Nov 24, 2020
b68c79b
Fixes #5376: Correct invalid custom field filter logic values
jeremystretch Nov 24, 2020
4e25c70
Merge branch 'develop' into develop-2.10
jeremystretch Nov 24, 2020
52aa123
Fix view tests
jeremystretch Nov 25, 2020
d9c503a
Fixes #5176: Enforce content type restrictions when creating objects …
jeremystretch Nov 25, 2020
23b3058
Add changelog for #2755
jeremystretch Nov 30, 2020
cadba74
#5306: Introduce CSVContentTypeField for cable termination types
jeremystretch Dec 1, 2020
915cf3e
Merge branch 'develop' into develop-2.10
jeremystretch Dec 1, 2020
ef77961
Fix tests
jeremystretch Dec 1, 2020
0b57389
Add a better progress indicator for trace_paths
jeremystretch Dec 1, 2020
cc271ae
Closes #5400: Store custom field defaults as JSON values
jeremystretch Dec 1, 2020
2b0ddd2
Closes #5399: Show options for cable endpoint types during bulk import
jeremystretch Dec 2, 2020
f504d1a
#5306: Standardize device/VM assignment for IP addresses & secrets
jeremystretch Dec 2, 2020
8461832
Fixes #5395: Fix cable tracing for rear ports with no corresponding f…
jeremystretch Dec 2, 2020
3cbe8dd
Consolidate CableCSVForm validation logic
jeremystretch Dec 2, 2020
5a4234f
Standardize validation of interface VLAN assignments
jeremystretch Dec 2, 2020
f5133c6
Include nested representation of nodes within each CablePath
jeremystretch Dec 2, 2020
ba00d57
Closes #4711: Rename Webhook.obj_type to content_types
jeremystretch Dec 2, 2020
c166852
Remove warning message re: DEFAULT_TIMEOUT
jeremystretch Dec 2, 2020
a80f132
Clean up tagged VLANs table column
jeremystretch Dec 2, 2020
96ce912
Clean up breadcrumbs for device component views
jeremystretch Dec 2, 2020
407b16c
Fix device component template
jeremystretch Dec 2, 2020
1159976
Release v2.10-beta2
jeremystretch Dec 3, 2020
f7e61cc
Fixes #5417: Fix exception when viewing a device installed within a d…
jeremystretch Dec 4, 2020
2c7fc5d
Closes #5411: Include cable tags in trace view
jeremystretch Dec 4, 2020
43d7d55
Merge branch 'develop' into develop-2.10
jeremystretch Dec 10, 2020
55e8d37
Post-release version bump
jeremystretch Dec 11, 2020
a371c08
Merge branch 'develop' into develop-2.10
jeremystretch Dec 11, 2020
230b503
Clarify REMOTE_AUTH_HEADER documentation (#5430)
esljaz Dec 14, 2020
1f2daaa
Merge branch 'develop' into develop-2.10
jeremystretch Dec 14, 2020
872ba89
Merge pull request #5454 from netbox-community/develop-2.10
jeremystretch Dec 14, 2020
f572f66
Release v2.10.0
jeremystretch Dec 14, 2020
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
python-version: [3.6, 3.7, 3.8]
services:
redis:
image: redis
Expand Down
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ categories for discussions:
* **Ideas** - Ideas for new functionality that isn't yet ready for a formal
feature request
* **Q&A** - Request help with installing or using NetBox
* **Show and tell** - Share a plugin, script, or something else you've made
using NetBox

### Mailing List

Expand Down
73 changes: 58 additions & 15 deletions docs/additional-features/custom-fields.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,69 @@
# Custom Fields

Each object in NetBox is represented in the database as a discrete table, and each attribute of an object exists as a column within its table. For example, sites are stored in the `dcim_site` table, which has columns named `name`, `facility`, `physical_address`, and so on. As new attributes are added to objects throughout the development of NetBox, tables are expanded to include new rows.
Each model in NetBox is represented in the database as a discrete table, and each attribute of a model exists as a column within its table. For example, sites are stored in the `dcim_site` table, which has columns named `name`, `facility`, `physical_address`, and so on. As new attributes are added to objects throughout the development of NetBox, tables are expanded to include new rows.

However, some users might want to associate with objects attributes that are somewhat esoteric in nature, and that would not make sense to include in the core NetBox database schema. For instance, suppose your organization needs to associate each device with a ticket number pointing to the support ticket that was opened to have it installed. This is certainly a legitimate use for NetBox, but it's perhaps not a common enough need to warrant expanding the internal data schema. Instead, you can create a custom field to hold this data.
However, some users might want to store additional object attributes that are somewhat esoteric in nature, and that would not make sense to include in the core NetBox database schema. For instance, suppose your organization needs to associate each device with a ticket number correlating it with an internal support system record. This is certainly a legitimate use for NetBox, but it's not a common enough need to warrant including a field for _every_ NetBox installation. Instead, you can create a custom field to hold this data.

Custom fields must be created through the admin UI under Extras > Custom Fields. To create a new custom field, select the object(s) to which you want it to apply, and the type of field it will be. NetBox supports six field types:
Within the database, custom fields are stored as JSON data directly alongside each object. This alleviates the need for complex queries when retrieving objects.

* Free-form text (up to 255 characters)
* Integer
* Boolean (true/false)
* Date
* URL
* Selection
## Creating Custom Fields

Assign the field a name. This should be a simple database-friendly string, e.g. `tps_report`. You may optionally assign the field a human-friendly label (e.g. "TPS report") as well; the label will be displayed on forms. If a description is provided, it will appear beneath the field in a form.
Custom fields must be created through the admin UI under Extras > Custom Fields. NetBox supports six types of custom field:

Marking the field as required will require the user to provide a value for the field when creating a new object or when saving an existing object. A default value for the field may also be provided. Use "true" or "false" for boolean fields. (The default value has no effect for selection fields.)
* Text: Free-form text (up to 255 characters)
* Integer: A whole number (positive or negative)
* Boolean: True or false
* 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

When creating a selection field, you should create at least two choices. These choices will be arranged first by weight, with lower weights appearing higher in the list, and then alphabetically.
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.

## Using Custom Fields
Marking a field as required will force the user to provide a value for the field when creating a new object or when saving an existing object. A default value for the field may also be provided. Use "true" or "false" for boolean fields, or the exact value of a choice for selection fields.

When a single object is edited, the form will include any custom fields which have been defined for the object type. These fields are included in the "Custom Fields" panel. On the backend, each custom field value is saved separately from the core object as an independent database call, so it's best to avoid adding too many custom fields per object.
The filter logic controls how values are matched when filtering objects by the custom field. Loose filtering (the default) matches on a partial value, whereas exact matching requires a complete match of the given string to a field's value. For example, exact filtering with the string "red" will only match the exact value "red", whereas loose filtering will match on the values "red", "red-orange", or "bored". Setting the filter logic to "disabled" disables filtering by the field entirely.

When editing multiple objects, custom field values are saved in bulk. There is no significant difference in overhead when saving a custom field value for 100 objects versus one object. However, the bulk operation must be performed separately for each custom field.
A custom field must be assigned to one or object types, or models, in NetBox. Once created, custom fields will automatically appear as part of these models in the web UI and REST API. Note that not all models support custom fields.

### Custom Field Validation

NetBox supports limited custom validation for custom field values. Following are the types of validation enforced for each field type:

* Text: Regular expression (optional)
* Integer: Minimum and/or maximum value (optional)
* Selection: Must exactly match one of the prescribed choices

### Custom Selection Fields

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.

## Custom Fields and the REST API

When retrieving an object via the REST API, all of its custom data will be included within the `custom_fields` attribute. For example, below is the partial output of a site with two custom fields defined:

```json
{
"id": 123,
"url": "http://localhost:8000/api/dcim/sites/123/",
"name": "Raleigh 42",
...
"custom_fields": {
"deployed": "2018-06-19",
"site_code": "US-NC-RAL42"
},
...
```

To set or change these values, simply include nested JSON data. For example:

```json
{
"name": "New Site",
"slug": "new-site",
"custom_fields": {
"deployed": "2019-03-24"
}
}
```
30 changes: 0 additions & 30 deletions docs/additional-features/graphs.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/administration/netbox-shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ To delete an object, simply call `delete()` on its instance. This will return a
>>> vlan
<VLAN: 123 (BetterName)>
>>> vlan.delete()
(1, {'extras.CustomFieldValue': 0, 'ipam.VLAN': 1})
(1, {'ipam.VLAN': 1})
```

To delete multiple objects at once, call `delete()` on a filtered queryset. It's a good idea to always sanity-check the count of selected objects _before_ deleting them.
Expand All @@ -194,9 +194,9 @@ To delete multiple objects at once, call `delete()` on a filtered queryset. It's
>>> Device.objects.filter(name__icontains='test').count()
27
>>> Device.objects.filter(name__icontains='test').delete()
(35, {'extras.CustomFieldValue': 0, 'dcim.DeviceBay': 0, 'secrets.Secret': 0,
'dcim.InterfaceConnection': 4, 'extras.ImageAttachment': 0, 'dcim.Device': 27,
'dcim.Interface': 4, 'dcim.ConsolePort': 0, 'dcim.PowerPort': 0})
(35, {'dcim.DeviceBay': 0, 'secrets.Secret': 0, 'dcim.InterfaceConnection': 4,
'extras.ImageAttachment': 0, 'dcim.Device': 27, 'dcim.Interface': 4,
'dcim.ConsolePort': 0, 'dcim.PowerPort': 0})
```

!!! warning
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/optional-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ NetBox can be configured to support remote user authentication by inferring user

Default: `'HTTP_REMOTE_USER'`

When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. (Requires `REMOTE_AUTH_ENABLED`.)
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. For example, to use the request header `X-Remote-User` it needs to be set to `HTTP_X_REMOTE_USER`. (Requires `REMOTE_AUTH_ENABLED`.)

---

Expand Down
1 change: 1 addition & 0 deletions docs/core-functionality/ipam.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
---

{!docs/models/ipam/vrf.md!}
{!docs/models/ipam/routetarget.md!}
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and

## Supported Python Versions

NetBox supports Python 3.6 and 3.7 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.)
NetBox supports Python 3.6, 3.7, and 3.8 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.)

## Getting Started

Expand Down
34 changes: 17 additions & 17 deletions docs/installation/1-postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,27 @@ This section entails the installation and configuration of a local PostgreSQL da
!!! warning
NetBox requires PostgreSQL 9.6 or higher. Please note that MySQL and other relational databases are **not** currently supported.

The installation instructions provided here have been tested to work on Ubuntu 18.04 and CentOS 7.5. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.

## Installation

#### Ubuntu

If a recent enough version of PostgreSQL is not available through your distribution's package manager, you'll need to install it from an official [PostgreSQL repository](https://wiki.postgresql.org/wiki/Apt).
Install the PostgreSQL server and client development libraries using `apt`.

```no-highlight
# apt-get update
# apt-get install -y postgresql libpq-dev
sudo apt update
sudo apt install -y postgresql libpq-dev
```

#### CentOS

CentOS 7 does not ship with a recent enough version of PostgreSQL, so it will need to be installed from an external repository. The instructions below show the installation of PostgreSQL 9.6, however you may opt to install a more recent version.
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
# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# yum install -y postgresql96 postgresql96-server postgresql96-devel
# /usr/pgsql-9.6/bin/postgresql96-setup initdb
sudo yum install -y postgresql-server libpq-devel
sudo postgresql-setup --initdb
```

CentOS users should modify the PostgreSQL configuration to accept password-based authentication by replacing `ident` with `md5` for all host entries within `/var/lib/pgsql/9.6/data/pg_hba.conf`. For example:
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
Expand All @@ -38,8 +35,8 @@ host all all ::1/128 md5
Then, start the service and enable it to run at boot:

```no-highlight
# systemctl start postgresql-9.6
# systemctl enable postgresql-9.6
sudo systemctl start postgresql
sudo systemctl enable postgresql
```

## Database Creation
Expand All @@ -50,8 +47,8 @@ At a minimum, we need to create a database for NetBox and assign it a username a
**Do not use the password from the example.** Choose a strong, random password to ensure secure database authentication for your NetBox installation.

```no-highlight
# sudo -u postgres psql
psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1))
$ sudo -u postgres psql
psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))
Type "help" for help.

postgres=# CREATE DATABASE netbox;
Expand All @@ -68,13 +65,16 @@ postgres=# \q
You can verify that authentication works issuing the following command and providing the configured password. (Replace `localhost` with your database server if using a remote database.)

```no-highlight
# psql --username netbox --password --host localhost netbox
$ psql --username netbox --password --host localhost netbox
Password for user netbox:
psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1))
psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

netbox=> \conninfo
You are connected to database "netbox" as user "netbox" on host "localhost" (address "127.0.0.1") at port "5432".
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
netbox=> \q
```

If successful, you will enter a `netbox` prompt. Type `\q` to exit.
If successful, you will enter a `netbox` prompt. Type `\conninfo` to confirm your connection, or type `\q` to exit.
9 changes: 4 additions & 5 deletions docs/installation/2-redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
### Ubuntu

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

### CentOS

```no-highlight
# yum install -y epel-release
# yum install -y redis
# systemctl start redis
# systemctl enable redis
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