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 v3.2.0 #9041

Merged
merged 323 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
323 commits
Select commit Hold shift + click to select a range
ae3c871
Merge pull request #8186 from netbox-community/8118-inventoryitem-tem…
jeremystretch Dec 29, 2021
9f53497
Clean up & expand button color choices
jeremystretch Dec 30, 2021
8e69961
Fix CustomLinkButtonClassChoices references in tests
jeremystretch Dec 30, 2021
0978777
Merge v3.1.4
jeremystretch Jan 3, 2022
fa1e28e
Initial work on #7006
jeremystretch Dec 30, 2021
954d811
Reindex migrations
jeremystretch Jan 4, 2022
88ac0f5
Work on #6221 - Make templatetags safe for consumption when using plu…
DanSheps Jan 5, 2022
271b7ad
Extend to support the assignment of multiple objects per field
jeremystretch Jan 5, 2022
85c0637
Fix bulk editing for custom object fields
jeremystretch Jan 6, 2022
7aa1fab
Fix tests
jeremystretch Jan 6, 2022
1e80cc6
Clean up & extend custom field tests
jeremystretch Jan 6, 2022
bfc6954
Add object_type validation
jeremystretch Jan 6, 2022
3002382
Documentation and changelog for #7006
jeremystretch Jan 6, 2022
453f2ab
Merge pull request #8261 from netbox-community/7006-custom-object-fields
jeremystretch Jan 6, 2022
58f7eb3
Initial work on #7679
jeremystretch Jan 6, 2022
00a8fd6
Refactor table utilities
jeremystretch Jan 7, 2022
6d48ce4
Always include actions as a default column
jeremystretch Jan 7, 2022
ededa69
Only show relevant links for user permissions
jeremystretch Jan 7, 2022
1024adc
Exclude actions column from export
jeremystretch Jan 7, 2022
bff7400
Convert ActionsMenuItem to dataclass
jeremystretch Jan 7, 2022
8b07fbc
Allow passing additional columns & specifying a sequence
jeremystretch Jan 7, 2022
3e277de
Closes #7852: Enable assigning interfaces to VRFs
jeremystretch Jan 7, 2022
447a5f0
Merge pull request #8282 from netbox-community/7852-interface-vrf
jeremystretch Jan 7, 2022
0f58faa
#7853 - Initial work on Speed/Duplex.
DanSheps Jan 8, 2022
aed23d6
Replace ButtonsColumn with ActionsColumn
jeremystretch Jan 10, 2022
94c1166
Changelog for #7679
jeremystretch Jan 10, 2022
17aa37a
Merge pull request #8303 from netbox-community/7679-table-actions
jeremystretch Jan 10, 2022
72e1791
Closes #8296: Allow disabling custom links
jeremystretch Jan 10, 2022
21e0e6e
Closes #6954: Remember users' table ordering preferences
jeremystretch Jan 10, 2022
ff396b5
Fix CSV import test & form cleanup
jeremystretch Jan 10, 2022
c8713d9
Merge branch 'develop' into feature
jeremystretch Jan 11, 2022
5cbc978
Render the payload_url of the Webhook with Jinja2
rodvand Jan 12, 2022
97e7ef9
Introduce ServiceTemplate
jeremystretch Jan 12, 2022
b07a7ba
Fix display of custom object fields within tables
jeremystretch Jan 12, 2022
bb5ded2
Enable creating services from templates in the UI
jeremystretch Jan 13, 2022
5b851a2
Changelog for #1591
jeremystretch Jan 13, 2022
707aad2
Add view test for creating service from template
jeremystretch Jan 13, 2022
cf89984
Merge pull request #8339 from rodvand/feature
jeremystretch Jan 13, 2022
b21b623
Fix test permissions
jeremystretch Jan 13, 2022
5077ff1
Merge pull request #8343 from netbox-community/1591-service-templates
jeremystretch Jan 13, 2022
7767692
Changelog for #8295
jeremystretch Jan 13, 2022
3e38808
Merge v3.1.6
jeremystretch Jan 17, 2022
3fcae36
Closes #8307: Add data_type indicator to REST API serializer for cust…
jeremystretch Jan 18, 2022
bf6345a
Closes #5429: Enable toggling the placement of table paginators
jeremystretch Jan 19, 2022
c7825e3
Designate feature mixin classes & employ class_prepared signal to reg…
jeremystretch Jan 19, 2022
cdae0c2
Remove extras_features() decorator
jeremystretch Jan 19, 2022
047bed2
Tweak registry initialization
jeremystretch Jan 19, 2022
dd55226
Draft documentation for model features
jeremystretch Jan 19, 2022
d104544
Add mkdocstrings
jeremystretch Jan 19, 2022
1967844
Update documentation requirements
jeremystretch Jan 19, 2022
b7682ca
Fix documentation build
jeremystretch Jan 20, 2022
1a8f144
Include custom validation in BaseModel
jeremystretch Jan 20, 2022
e6acae5
Omit job results as a supported feature
jeremystretch Jan 20, 2022
7002319
Merge pull request #8414 from netbox-community/8392-plugins-features
jeremystretch Jan 20, 2022
375a140
Merge branch 'feature' of https://github.com/netbox-community/netbox …
DanSheps Jan 20, 2022
5f8870d
#7853 - Change Duplex Filterset to allow multivalues
DanSheps Jan 20, 2022
1a80741
#7853 - Add columns to tables
DanSheps Jan 20, 2022
d0bfd7e
#7853 - Add tests
DanSheps Jan 20, 2022
54834c4
Refactor generic views; add plugins dev documentation
jeremystretch Jan 20, 2022
3d6c2c5
Merge pull request #8420 from netbox-community/7853-speed_duplex
jeremystretch Jan 21, 2022
e03593d
Move get_extra_context() to base views
jeremystretch Jan 21, 2022
a74ed33
Move get_object() to BaseObjectView
jeremystretch Jan 21, 2022
1c94625
Remove widget_attrs from BulkImportView
jeremystretch Jan 21, 2022
05d4c12
Merge pull request #8428 from netbox-community/8334-plugins-views
jeremystretch Jan 21, 2022
5abfe82
Changelog cnad cleanup for #7853
jeremystretch Jan 21, 2022
571e980
Closes #8195: Ensure all GenericForeignKey ID fields employ PositiveB…
jeremystretch Jan 24, 2022
497afcc
Rearrange plugins documentation
jeremystretch Jan 25, 2022
acc9ca7
Move TagFilter to PrimaryFilterSet
jeremystretch Jan 25, 2022
28de9b8
Refactor ChangeLoggedModelFilterSet
jeremystretch Jan 25, 2022
e4abbfb
Closes #8454: Set DEFAULT_AUTO_FIELD to BigAutoField
jeremystretch Jan 25, 2022
b797b08
Remove BigIDModel
jeremystretch Jan 26, 2022
eb00e20
Revert "Refactor ChangeLoggedModelFilterSet"
jeremystretch Jan 26, 2022
b678598
Refactor to_objectchange()
jeremystretch Jan 27, 2022
a795b95
Closes #8451: Include ChangeLoggingMixin in BaseModel
jeremystretch Jan 27, 2022
c5650bb
Rename PrimaryModel to NetBoxModel
jeremystretch Jan 27, 2022
083d1ac
Closes #8453: Rename PrimaryModelFilterSet to NetBoxModelFilterSet & …
jeremystretch Jan 27, 2022
4a1b4e0
Closes #8469: Move BaseTable, columns to netbox core app
jeremystretch Jan 27, 2022
59d3f5c
Split out NetBoxTable from BaseTable
jeremystretch Jan 27, 2022
3c1ea5d
Closes #8470: Expose NetBoxTable in the plugins framework
jeremystretch Jan 27, 2022
f1697c6
Add change log for plugins framework additions
jeremystretch Jan 27, 2022
75aa1c7
Merge feature
jeremystretch Jan 27, 2022
3a447d5
Merge pull request #8473 from netbox-community/6221-pluginviews
jeremystretch Jan 27, 2022
0fe7237
Remove unused form attribute from BulkDeleteView
jeremystretch Jan 28, 2022
f477673
Establish 4 core forms in netbox.forms.base
jeremystretch Jan 28, 2022
e4eee1c
Clean up nullable fields declaration for bulk edit forms
jeremystretch Jan 28, 2022
cf3ca5a
Refactor & document supported form fields
jeremystretch Jan 31, 2022
ccb3a75
Move fieldsets out of Meta for model forms
jeremystretch Jan 31, 2022
353e132
Replace filter_groups with fieldsets on filter forms
jeremystretch Jan 31, 2022
d1672f8
Move nullable_fields out of Meta for bulk edit forms
jeremystretch Jan 31, 2022
bfb1a82
Update docstrings for base form classes
jeremystretch Jan 31, 2022
4347f62
Merge pull request #8504 from netbox-community/8488-plugins-forms
jeremystretch Jan 31, 2022
3621b1a
Set model as attribute on bulk edit forms
jeremystretch Feb 1, 2022
d38620b
Fix bulk nullification of custom fields
jeremystretch Feb 1, 2022
5af18c2
Move pk field declaration under NetBoxModelBulkEditForm
jeremystretch Feb 1, 2022
74c4f12
Closes #8509: CSRF_TRUSTED_ORIGINS is now a discrete configuration pa…
jeremystretch Feb 1, 2022
478eefb
Merge v3.1.7
jeremystretch Feb 3, 2022
ef75f7e
Upgrade to Django 4.0
jeremystretch Feb 1, 2022
7611cfd
Tweak related names in old migrations to avoid creating new ones
jeremystretch Feb 1, 2022
630ff2a
Remove dependency on is_safe_url()
jeremystretch Feb 1, 2022
0e95ca7
Fix ProgrammingError exception when annotating config context data
jeremystretch Feb 1, 2022
6575af6
Fix saving interfaces
jeremystretch Feb 3, 2022
ac1c0b0
#8054: Allow replacing default static choices
jeremystretch Feb 3, 2022
60e87cd
Enable the use of fieldsets on bulk edit forms
jeremystretch Feb 4, 2022
a298187
#7844: Allow installing modules via UI without replicating components
jeremystretch Feb 4, 2022
5fea012
Fix GitHub templates
jeremystretch Feb 4, 2022
df95115
Refactor plugins registry
jeremystretch Jan 27, 2022
03ea257
Initial work on GraphQL
jeremystretch Jan 27, 2022
dae5c94
Expose BaseObjectType and NetBoxObjectType for plugins
jeremystretch Feb 4, 2022
3651ef5
#7852: Extend VRF assignment to VM interfaces
jeremystretch Feb 7, 2022
2157f93
Clean up merge conflict remnants
jeremystretch Feb 7, 2022
9ac769e
Pull graphene-django from v2 branch
jeremystretch Feb 7, 2022
733a9bb
Merge pull request #8510 from netbox-community/8032-django-40
jeremystretch Feb 7, 2022
049acde
Closes #8572: Add a pre_run() method for reports
jeremystretch Feb 7, 2022
0e827b6
Merge pull request #8562 from netbox-community/8405-plugins-graphql
jeremystretch Feb 7, 2022
d816f79
Clean up release notes
jeremystretch Feb 7, 2022
26db326
Fix field group header
jeremystretch Feb 7, 2022
624eda2
Clean up and document object, object list templates
jeremystretch Feb 7, 2022
b0039e9
Clean up and document object edit & delete templates
jeremystretch Feb 8, 2022
e796fd1
Clean up and document the bulk import/edit/delete templates
jeremystretch Feb 8, 2022
1e55d06
Document the base layout template
jeremystretch Feb 8, 2022
270288f
Rename bulk operation templates
jeremystretch Feb 8, 2022
d9b7c01
Document templates supported for plugin use
jeremystretch Feb 8, 2022
45e5c4e
Merge pull request #8586 from netbox-community/template-cleanup
jeremystretch Feb 8, 2022
272d6e7
Closes #8463: Change the created field on all change-logged models fr…
jeremystretch Feb 8, 2022
e2286a4
Fix plugin name resolution
jeremystretch Feb 9, 2022
10e6ae2
Introduce get_viewname() as a standard utility
jeremystretch Feb 9, 2022
23a8077
Move configure_table() logic to NetBoxTable.configure()
jeremystretch Feb 9, 2022
ee56672
Document supported table columns
jeremystretch Feb 9, 2022
7c10501
Closes #8600: Document built-in template tags & filters
jeremystretch Feb 9, 2022
d42c597
#8334: Move object changelog & journaling to generic views
jeremystretch Feb 9, 2022
d52105b
Merge branch 'develop' into feature
jeremystretch Feb 10, 2022
f111380
Disable I10N to restore pre-4.0 datetime formatting
jeremystretch Feb 10, 2022
71d3dc6
Improve ChoiceFieldColumn to not rely on model method to derive label…
jeremystretch Feb 10, 2022
3b80f67
#7844: Show module when viewing/editing device components
jeremystretch Feb 11, 2022
47e99ec
Use ContentTypeChoiceField for object_type
jeremystretch Feb 11, 2022
8e888b4
Use ColoredLabelColumn for InventoryItem role
jeremystretch Feb 11, 2022
fe6acf0
Fix component column on InventoryItemTemplateTable
jeremystretch Feb 11, 2022
0bf1789
Fix template context for API token views
jeremystretch Feb 11, 2022
9cf9f1b
Update documentation for v3.2
jeremystretch Feb 11, 2022
1319b62
Standardize on get_FOO_color() method for returning ChoiceField colors
jeremystretch Feb 11, 2022
189e835
Use project requirements to build docs
jeremystretch Feb 11, 2022
af01122
Fix mkdocs requirements specification
jeremystretch Feb 11, 2022
b40afd1
Create custom RTD configuration
jeremystretch Feb 11, 2022
aa85ae8
Merge v3.1.8
jeremystretch Feb 15, 2022
e728738
Closes #8649: Enable customization of configuration module using NETB…
jeremystretch Feb 15, 2022
85b534a
Merge pull request #8650 from netbox-community/8649-config-module
jeremystretch Feb 15, 2022
1aa295d
Release v3.2-beta1
jeremystretch Feb 15, 2022
fdbdf26
Fixes #8655: Fix AttributeError when viewing cabled interfaces
jeremystretch Feb 16, 2022
92c4e5b
Fixes #8659: Fix display of multi-object custom fields after deleting…
jeremystretch Feb 16, 2022
bcdd006
Fixes #8661: Fix ValueError exception when trying to connect a cable
jeremystretch Feb 16, 2022
90558a2
Fixes #8671: Fix AttributeError when viewing console/power/interface …
jeremystretch Feb 16, 2022
eb02f61
Fixes #8670: Fix filtering device components by installed module
jeremystretch Feb 17, 2022
39b8eb0
Fixes #8656: Fix migration error when upgrading from a v2.11 database
jeremystretch Feb 17, 2022
e8df373
Change results tab name for clarity
jeremystretch Feb 18, 2022
a5c8bbf
Closes #8684: Change custom link template context variable 'obj' to '…
jeremystretch Feb 18, 2022
e1f06ec
Enable adding inventory items to components from device component lis…
jeremystretch Feb 18, 2022
bca0978
Clean up component template creation for ModuleTypes
jeremystretch Feb 18, 2022
5f92ed4
Update development docs
jeremystretch Feb 18, 2022
7c937bf
Fixes #8692: Restore misisng tabs under cluster, VM views
jeremystretch Feb 22, 2022
d9696ae
Fixes #8714: Remove label from comments form field
jeremystretch Feb 22, 2022
7872460
Fixes #8682: Limit available VLANs by group min/max VIDs
jeremystretch Feb 22, 2022
6604ebf
Fix tag background color
jeremystretch Feb 22, 2022
a2fe235
Closes #8667: Support position patterning when creating module bays &…
jeremystretch Feb 23, 2022
6638f56
Fixes #8683: Fix ZoneInfoNotFoundError exception under Python 3.9+
jeremystretch Feb 23, 2022
0953bba
Closes #8747: Rename ObjectListView action_buttons to actions
jeremystretch Feb 24, 2022
fab4d95
Merge branch 'develop' into feature
jeremystretch Feb 25, 2022
7823fa0
Fix changelog table column ordering
jeremystretch Feb 25, 2022
da6ed8e
Fixes #8761: Correct view name resolution under journal entry views
jeremystretch Feb 28, 2022
d6c272c
Fixes #8764: Correct view name resolution for dynamic form fields
jeremystretch Feb 28, 2022
e7496c8
Use get_viewname() to resolve view name under ObjectDeleteView
jeremystretch Feb 28, 2022
4dc428d
Closes #8764: Correct the endpoint for plugin API view names
peteeckel Mar 1, 2022
638d89e
Merge pull request #8767 from peteeckel/fix/plugin-api-endpoint
jeremystretch Mar 1, 2022
5f8af6a
Closes #8779: Enable the use of ChoiceSet by plugins
jeremystretch Mar 2, 2022
dadd8cb
Support the direct use of TagFilter
jeremystretch Mar 2, 2022
21e3159
Hide table checkboxes when no bulk actions are enabled
jeremystretch Mar 2, 2022
e6072a5
Closes #8765: Display and enable bulk clearing of user's table prefer…
jeremystretch Mar 3, 2022
62a1d4b
Fixes #8763: Fix inventory item component assignment
jeremystretch Mar 3, 2022
64acfc3
#8787: Fix toggling of PK table column
jeremystretch Mar 3, 2022
d4d2af4
Refactor tables modules
jeremystretch Mar 3, 2022
25dc9cc
Fixes #7891: Fix display of form validation failures during device co…
jeremystretch Mar 3, 2022
a740203
Fixes #8792: Fix creation of circuit terminations via UI
jeremystretch Mar 3, 2022
cd29293
Merge v3.1.9
jeremystretch Mar 7, 2022
06781be
Fixes #8815: Fix display of custom object fields in table columns
jeremystretch Mar 7, 2022
07f2cda
Fixes #8810: Enable filtering modules by type
jeremystretch Mar 7, 2022
18c9ee2
Closes #8804: Include module type count on manufacturer view
jeremystretch Mar 7, 2022
655bc49
Clean up form select widgets
jeremystretch Mar 7, 2022
28f7b41
Revise plugins documentation
jeremystretch Mar 8, 2022
a11abf8
Refactor API serializers
jeremystretch Mar 9, 2022
efd5a73
Refactor API views
jeremystretch Mar 9, 2022
bbdeae0
Move CustomFieldModelViewSet functionality into NetBoxModelViewSet
jeremystretch Mar 9, 2022
e36ae4f
Document support for NetBoxModelSerializer, NetBoxModelViewSet
jeremystretch Mar 9, 2022
f559cee
Merge pull request #8833 from netbox-community/8823-api-serializers
jeremystretch Mar 9, 2022
7cffa6e
Release v3.2.0-beta2
jeremystretch Mar 9, 2022
ffc29d1
Add tags field to NetBoxModelForm
jeremystretch Mar 10, 2022
5a3e996
Simplify add/import/export button invocation
jeremystretch Mar 10, 2022
76445bd
Move bulk edit/delete buttons to template tags
jeremystretch Mar 10, 2022
49e5268
Fitlerset class declration on ObjectListField should be optional
jeremystretch Mar 11, 2022
6d05a41
Update plugins documentation
jeremystretch Mar 11, 2022
59aba52
Rename OrderedDefaultRouter to NetBoxRouter & document for plugins
jeremystretch Mar 11, 2022
245cff8
Move q filter to NetBoxModelFilterSet
jeremystretch Mar 11, 2022
6170138
Rename ActionsColumn sequence to actions
jeremystretch Mar 14, 2022
b912183
Fixes #8869: Fix NoReverseMatch exception when displaying tag w/assig…
jeremystretch Mar 14, 2022
93527d8
Fixes #8845: Correct default ASN formatting in table
jeremystretch Mar 14, 2022
f2079de
Fixes #8838: Fix FieldError exception during global search
jeremystretch Mar 14, 2022
2101f71
Closes #8848: Show module bay & type in API serilizer display
jeremystretch Mar 14, 2022
57ad730
Fixes #8888: Use HTTPS to pull graphene-django branch from GitHub
jeremystretch Mar 17, 2022
8d53b46
Merge branch 'develop' into feature
jeremystretch Mar 18, 2022
1500520
Merge branch 'develop' into feature
jeremystretch Mar 18, 2022
ed0c198
Link to plugin tutorial in development docs
jeremystretch Mar 18, 2022
ba1e6e9
Rename ObjectEditView.model_form to form
jeremystretch Mar 21, 2022
3dc6713
Introduce local ChoiceField and MultipleChoiceField classes
jeremystretch Mar 21, 2022
0c5eab6
Document the use of WritableNestedSerializer
jeremystretch Mar 21, 2022
48dc76a
Closes #8685: Add modules, module types to global search
jeremystretch Mar 21, 2022
ca44a65
Closes #8794: Support dynamic configuration for JournalEntry kinds
jeremystretch Mar 21, 2022
ce87e0d
Merge branch 'develop' into feature
jeremystretch Mar 22, 2022
dc92e19
Limit custom field object types to suitable models
jeremystretch Mar 22, 2022
75dae5f
Introduce linkify template filter
jeremystretch Mar 22, 2022
8d68204
Extend linkify() to accept an attr name for the link text
jeremystretch Mar 22, 2022
7c14b8d
Clean up display of tenant groups
jeremystretch Mar 22, 2022
61eb22f
Merge pull request #8943 from netbox-community/8912-linkify-filter
jeremystretch Mar 22, 2022
42446cb
Clean up interface template
jeremystretch Mar 23, 2022
b65404a
Fix cable creation view
jeremystretch Mar 23, 2022
f72d160
Add form examples to plugin dev docs
jeremystretch Mar 23, 2022
fab90ec
Closes #8803: Enable adding components from module view
jeremystretch Mar 23, 2022
fdc0036
Closes #8846: Enable image attachments for module types
jeremystretch Mar 23, 2022
3b69f07
Clean up module template
jeremystretch Mar 23, 2022
df2f6d4
Fixes #8872: Enable filtering by custom object fields
jeremystretch Mar 23, 2022
58f97bc
Merge develop into feature
jeremystretch Mar 24, 2022
22908a1
Merge branch 'develop' into feature
jeremystretch Mar 25, 2022
340ff82
Fixes #8970: Permit nested inventory item templates on device types
jeremystretch Mar 28, 2022
227bac7
Fixes #8976: Add missing object_type field on CustomField REST API se…
jeremystretch Mar 28, 2022
bf50134
#8976: Set required=False on serializer field
jeremystretch Mar 28, 2022
3ff4fd8
Merge branch 'develop' into feature
jeremystretch Mar 30, 2022
cdacd2a
Closes #8593: Add link field to contact model
jeremystretch Mar 30, 2022
bddc35b
Closes #8496: Enable assigning multiple ASNs to a provider
jeremystretch Mar 30, 2022
7a54658
Fixes #8978: Fix instantiation of front ports when provisioning a module
jeremystretch Mar 31, 2022
1d55c04
Closes #9006: Enable custom fields, custom links, and tags for journa…
jeremystretch Mar 31, 2022
4fae42d
Fixes #9007: Fix FieldError exception when instantiating a device typ…
jeremystretch Mar 31, 2022
b576ce7
Merge branch 'develop' into feature
jeremystretch Apr 1, 2022
7fff1e6
Closes #9003: Enable bulk module assignment/removal for device compon…
jeremystretch Apr 1, 2022
e2b6d69
Monkey-patch Django's force_text in lieu of graphene-django 2.16 release
jeremystretch Apr 1, 2022
ea88b04
Fixes #8658: Fix display of assigned components under inventory item …
jeremystretch Apr 4, 2022
fcfdbfc
Merge branch 'develop' into feature
jeremystretch Apr 5, 2022
830b56a
Check that ChoiceSet CHOICES is mutable if key is set
jeremystretch Apr 5, 2022
8b92bc6
Add migration safeguard to prevent accidental destruction of data
jeremystretch Apr 5, 2022
66464fd
Implement bypass for migration safeguard
jeremystretch Apr 5, 2022
9addde0
Merge branch 'feature' into develop
jeremystretch Apr 5, 2022
c1b7f09
Ensure legacy data checks run before other migrations
jeremystretch Apr 5, 2022
6f0ae8a
Release v3.2.0
jeremystretch Apr 5, 2022
6ee6227
Pin Jinja2 to v3.0
jeremystretch Apr 5, 2022
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/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.1.11
placeholder: v3.2.0
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.1.11
placeholder: v3.2.0
validations:
required: true
- type: dropdown
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
NETBOX_CONFIGURATION: netbox.configuration_testing
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
node-version: [14.x]
python-version: ['3.8', '3.9', '3.10']
node-version: ['14.x']
services:
redis:
image: redis
Expand Down Expand Up @@ -57,7 +59,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pycodestyle coverage tblib
ln -s configuration.testing.py netbox/netbox/configuration.py

- name: Build documentation
run: mkdocs build
Expand Down
10 changes: 10 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.9"
mkdocs:
configuration: mkdocs.yml
python:
install:
- requirements: requirements.txt
13 changes: 11 additions & 2 deletions base_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Python web framework on which NetBox is built
# https://github.com/django/django
Django<4.0
Django

# Django middleware which permits cross-domain API requests
# https://github.com/OttoYiu/django-cors-headers
Expand Down Expand Up @@ -68,7 +68,8 @@ gunicorn

# Platform-agnostic template rendering engine
# https://github.com/pallets/jinja
Jinja2
# Pin to v3.0 for mkdocstrings
Jinja2<3.1

# Simple markup language for rendering HTML
# https://github.com/Python-Markdown/markdown
Expand All @@ -82,6 +83,10 @@ markdown-include
# https://github.com/squidfunk/mkdocs-material
mkdocs-material

# Introspection for embedded code
# https://github.com/mkdocstrings/mkdocstrings
mkdocstrings<=0.17.0

# Library for manipulating IP prefixes and addresses
# https://github.com/netaddr/netaddr
netaddr
Expand Down Expand Up @@ -113,3 +118,7 @@ svgwrite
# Tabular dataset library (for table-based exports)
# https://github.com/jazzband/tablib
tablib

# Timezone data (required by django-timezone-field on Python 3.9+)
# https://github.com/python/tzdata
tzdata
16 changes: 16 additions & 0 deletions docs/configuration/dynamic-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ CUSTOM_VALIDATORS = {

---

## DEFAULT_USER_PREFERENCES

This is a dictionary defining the default preferences to be set for newly-created user accounts. For example, to set the default page size for all users to 100, define the following:

```python
DEFAULT_USER_PREFERENCES = {
"pagination": {
"per_page": 100
}
}
```

For a complete list of available preferences, log into NetBox and navigate to `/user/preferences/`. A period in a preference name indicates a level of nesting in the JSON data. The example above maps to `pagination.per_page`.

---

## ENFORCE_GLOBAL_UNIQUE

Default: False
Expand Down
7 changes: 6 additions & 1 deletion docs/configuration/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# NetBox Configuration

NetBox's local configuration is stored in `$INSTALL_ROOT/netbox/netbox/configuration.py`. An example configuration is provided as `configuration.example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file. While NetBox has many configuration settings, only a few of them must be defined at the time of installation: these are defined under "required settings" below.
NetBox's local configuration is stored in `$INSTALL_ROOT/netbox/netbox/configuration.py` by default. An example configuration is provided as `configuration_example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file. While NetBox has many configuration settings, only a few of them must be defined at the time of installation: these are defined under "required settings" below.

!!! info "Customizing the Configuration Module"
A custom configuration module may be specified by setting the `NETBOX_CONFIGURATION` environment variable. This must be a dotted path to the desired Python module. For example, a file named `my_config.py` in the same directory as `settings.py` would be referenced as `netbox.my_config`.

For the sake of brevity, the NetBox documentation refers to the configuration file simply as `configuration.py`.

Some configuration parameters may alternatively be defined either in `configuration.py` or within the administrative section of the user interface. Settings which are "hard-coded" in the configuration file take precedence over those defined via the UI.

Expand Down
92 changes: 92 additions & 0 deletions docs/configuration/optional-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ ADMINS = [

---

## AUTH_PASSWORD_VALIDATORS

This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).

```python
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 10,
}
},
]
```

---

## BASE_PATH

Default: None
Expand Down Expand Up @@ -49,6 +66,21 @@ CORS_ORIGIN_WHITELIST = [

---

## CSRF_TRUSTED_ORIGINS

Default: `[]`

Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://).

```python
CSRF_TRUSTED_ORIGINS = (
'http://netbox.local',
'https://netbox.local',
)
```

---

## DEBUG

Default: False
Expand Down Expand Up @@ -140,6 +172,66 @@ EXEMPT_VIEW_PERMISSIONS = ['*']

---

## FIELD_CHOICES

Some static choice fields on models can be configured with custom values. This is done by defining `FIELD_CHOICES` as a dictionary mapping model fields to their choices. Each choice in the list must have a database value and a human-friendly label, and may optionally specify a color. (A list of available colors is provided below.)

The choices provided can either replace the stock choices provided by NetBox, or append to them. To _replace_ the available choices, specify the app, model, and field name separated by dots. For example, the site model would be referenced as `dcim.Site.status`. To _extend_ the available choices, append a plus sign to the end of this string (e.g. `dcim.Site.status+`).

For example, the following configuration would replace the default site status choices with the options Foo, Bar, and Baz:

```python
FIELD_CHOICES = {
'dcim.Site.status': (
('foo', 'Foo', 'red'),
('bar', 'Bar', 'green'),
('baz', 'Baz', 'blue'),
)
}
```

Appending a plus sign to the field identifier would instead _add_ these choices to the ones already offered:

```python
FIELD_CHOICES = {
'dcim.Site.status+': (
...
)
}
```

The following model fields support configurable choices:

* `circuits.Circuit.status`
* `dcim.Device.status`
* `dcim.PowerFeed.status`
* `dcim.Rack.status`
* `dcim.Site.status`
* `extras.JournalEntry.kind`
* `ipam.IPAddress.status`
* `ipam.IPRange.status`
* `ipam.Prefix.status`
* `ipam.VLAN.status`
* `virtualization.VirtualMachine.status`

The following colors are supported:

* `blue`
* `indigo`
* `purple`
* `pink`
* `red`
* `orange`
* `yellow`
* `green`
* `teal`
* `cyan`
* `gray`
* `black`
* `white`

---

## HTTP_PROXIES

Default: None
Expand Down
1 change: 1 addition & 0 deletions docs/core-functionality/device-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ Once component templates have been created, every new device that you create as
{!models/dcim/interfacetemplate.md!}
{!models/dcim/frontporttemplate.md!}
{!models/dcim/rearporttemplate.md!}
{!models/dcim/modulebaytemplate.md!}
{!models/dcim/devicebaytemplate.md!}
1 change: 1 addition & 0 deletions docs/core-functionality/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Device components represent discrete objects within a device which are used to t
{!models/dcim/interface.md!}
{!models/dcim/frontport.md!}
{!models/dcim/rearport.md!}
{!models/dcim/modulebay.md!}
{!models/dcim/devicebay.md!}
{!models/dcim/inventoryitem.md!}

Expand Down
4 changes: 4 additions & 0 deletions docs/core-functionality/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Modules

{!models/dcim/moduletype.md!}
{!models/dcim/module.md!}
1 change: 1 addition & 0 deletions docs/core-functionality/services.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Service Mapping

{!models/ipam/servicetemplate.md!}
{!models/ipam/service.md!}
2 changes: 1 addition & 1 deletion docs/customization/reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The following methods are available to log results within a report:

The recording of one or more failure messages will automatically flag a report as failed. It is advised to log a success for each object that is evaluated so that the results will reflect how many objects are being reported on. (The inclusion of a log message is optional for successes.) Messages recorded with `log()` will appear in a report's results but are not associated with a particular object or status. Log messages also support using markdown syntax and will be rendered on the report result page.

To perform additional tasks, such as sending an email or calling a webhook, after a report has been run, extend the `post_run()` method. The status of the report is available as `self.failed` and the results object is `self.result`.
To perform additional tasks, such as sending an email or calling a webhook, before or after a report is run, extend the `pre_run()` and/or `post_run()` methods, respectively. The status of a completed report is available as `self.failed` and the results object is `self.result`.

By default, reports within a module are ordered alphabetically in the reports list page. To return reports in a specific order, you can define the `report_order` variable at the end of your module. The `report_order` variable is a tuple which contains each Report class in the desired order. Any reports that are omitted from this list will be listed last.

Expand Down
2 changes: 1 addition & 1 deletion docs/development/adding-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1. Define the model class

Models within each app are stored in either `models.py` or within a submodule under the `models/` directory. When creating a model, be sure to subclass the [appropriate base model](models.md) from `netbox.models`. This will typically be PrimaryModel or OrganizationalModel. Remember to add the model class to the `__all__` listing for the module.
Models within each app are stored in either `models.py` or within a submodule under the `models/` directory. When creating a model, be sure to subclass the [appropriate base model](models.md) from `netbox.models`. This will typically be NetBoxModel or OrganizationalModel. Remember to add the model class to the `__all__` listing for the module.

Each model should define, at a minimum:

Expand Down
57 changes: 38 additions & 19 deletions docs/development/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@ Getting started with NetBox development is pretty straightforward, and should fe

### Fork the Repo

Assuming you'll be working on your own fork, your first step will be to fork the [official git repository](https://github.com/netbox-community/netbox). (If you're a maintainer who's going to be working directly with the official repo, skip this step.) You can then clone your GitHub fork locally for development:
Assuming you'll be working on your own fork, your first step will be to fork the [official git repository](https://github.com/netbox-community/netbox). (If you're a maintainer who's going to be working directly with the official repo, skip this step.) Click the "fork" button at top right (be sure that you've logged into GitHub first).

![GitHub fork button](../media/development/github_fork_button.png)

Copy the URL provided in the dialog box.

![GitHub fork dialog](../media/development/github_fork_dialog.png)

You can then clone your GitHub fork locally for development:

```no-highlight
$ git clone https://github.com/youruseraccount/netbox.git
$ git clone https://github.com/$username/netbox.git
Cloning into 'netbox'...
remote: Enumerating objects: 231, done.
remote: Counting objects: 100% (231/231), done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 56705 (delta 134), reused 145 (delta 84), pack-reused 56474
Receiving objects: 100% (56705/56705), 27.96 MiB | 34.92 MiB/s, done.
Resolving deltas: 100% (44177/44177), done.
remote: Enumerating objects: 85949, done.
remote: Counting objects: 100% (4672/4672), done.
remote: Compressing objects: 100% (1224/1224), done.
remote: Total 85949 (delta 3538), reused 4332 (delta 3438), pack-reused 81277
Receiving objects: 100% (85949/85949), 55.16 MiB | 44.90 MiB/s, done.
Resolving deltas: 100% (68008/68008), done.
$ ls netbox/
base_requirements.txt contrib docs mkdocs.yml NOTICE requirements.txt upgrade.sh
CHANGELOG.md CONTRIBUTING.md LICENSE.txt netbox README.md scripts
Expand All @@ -33,7 +41,7 @@ The NetBox project utilizes three persistent git branches to track work:
* `develop` - All development on the upcoming stable release occurs here
* `feature` - Tracks work on an upcoming major release

Typically, you'll base pull requests off of the `develop` branch, or off of `feature` if you're working on a new major release. **Never** merge pull requests into the `master` branch, which receives merged only from the `develop` branch.
Typically, you'll base pull requests off of the `develop` branch, or off of `feature` if you're working on a new major release. **Never** merge pull requests into the `master` branch: This branch only ever merges pull requests from the `develop` branch, to effect a new release.

For example, assume that the current NetBox release is v3.1.1. Work applied to the `develop` branch will appear in v3.1.2, and work done under the `feature` branch will be included in the next minor release (v3.2.0).

Expand All @@ -60,7 +68,7 @@ $ python3 -m venv ~/.venv/netbox
This will create a directory named `.venv/netbox/` in your home directory, which houses a virtual copy of the Python executable and its related libraries and tooling. When running NetBox for development, it will be run using the Python binary at `~/.venv/netbox/bin/python`.

!!! info "Where to Create Your Virtual Environments"
Keeping virtual environments in `~/.venv/` is a common convention but entirely optional: Virtual environments can be created almost wherever you please.
Keeping virtual environments in `~/.venv/` is a common convention but entirely optional: Virtual environments can be created almost wherever you please. Also consider using [`virtualenvwrapper`](https://virtualenvwrapper.readthedocs.io/en/stable/) to simplify the management of multiple venvs.

Once created, activate the virtual environment:

Expand All @@ -85,7 +93,7 @@ Collecting Django==3.1 (from -r requirements.txt (line 1))

### Configure NetBox

Within the `netbox/netbox/` directory, copy `configuration.example.py` to `configuration.py` and update the following parameters:
Within the `netbox/netbox/` directory, copy `configuration_example.py` to `configuration.py` and update the following parameters:

* `ALLOWED_HOSTS`: This can be set to `['*']` for development purposes
* `DATABASE`: PostgreSQL database connection parameters
Expand All @@ -99,12 +107,13 @@ Within the `netbox/netbox/` directory, copy `configuration.example.py` to `confi
Django provides a lightweight, auto-updating HTTP/WSGI server for development use. It is started with the `runserver` management command:

```no-highlight
$ python netbox/manage.py runserver
$ ./manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
November 18, 2020 - 15:52:31
Django version 3.1, using settings 'netbox.settings'
February 18, 2022 - 20:29:57
Django version 4.0.2, using settings 'netbox.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
```
Expand All @@ -122,26 +131,36 @@ The demo data is provided in JSON format and loaded into an empty database using

## Running Tests

Prior to committing any substantial changes to the code base, be sure to run NetBox's test suite to catch any potential errors. Tests are run using the `test` management command. Remember to ensure the Python virtual environment is active before running this command. Also keep in mind that these commands are executed in the `/netbox/` directory, not the root directory of the repository.
Prior to committing any substantial changes to the code base, be sure to run NetBox's test suite to catch any potential errors. Tests are run using the `test` management command, which employs Python's [`unittest`](https://docs.python.org/3/library/unittest.html#module-unittest) library. Remember to ensure the Python virtual environment is active before running this command. Also keep in mind that these commands are executed in the `netbox/` directory, not the root directory of the repository.

When running tests, it's advised to use the special testing configuration file that ships with NetBox. This ensures that tests are run with the same configuration parameters consistently. To override your local configuration when running tests, set the `NETBOX_CONFIGURATION` environment variable to `netbox.configuration_testing`.
To avoid potential issues with your local configuration file, set the `NETBOX_CONFIGURATION` to point to the packaged test configuration at `netbox/configuration_testing.py`. This will handle things like ensuring that the dummy plugin is enabled for comprehensive testing.

```no-highlight
$ NETBOX_CONFIGURATION=netbox.configuration_testing python manage.py test
$ export NETBOX_CONFIGURATION=netbox.configuration_testing
$ cd netbox/
$ python manage.py test
```

In cases where you haven't made any changes to the database (which is most of the time), you can append the `--keepdb` argument to this command to reuse the test database between runs. This cuts down on the time it takes to run the test suite since the database doesn't have to be rebuilt each time. (Note that this argument will cause errors if you've modified any model fields since the previous test run.)
In cases where you haven't made any changes to the database schema (which is typical), you can append the `--keepdb` argument to this command to reuse the test database between runs. This cuts down on the time it takes to run the test suite since the database doesn't have to be rebuilt each time. (Note that this argument will cause errors if you've modified any model fields since the previous test run.)

```no-highlight
$ python manage.py test --keepdb
```

You can also limit the command to running only a specific subset of tests. For example, to run only IPAM and DCIM view tests:
You can also reduce testing time by enabling parallel test execution with the `--parallel` flag. (By default, this will run as many parallel tests as you have processors. To avoid sluggishness, it's a good idea to specify a lower number of parallel tests.) This flag can be combined with `--keepdb`, although if you encounter any strange errors, try running the test suite again with parallelization disabled.

```no-highlight
$ python manage.py test --parallel <n>
```

Finally, it's possible to limit the run to a specific set of tests, specified by their Python path. For example, to run only IPAM and DCIM view tests:

```no-highlight
$ python manage.py test dcim.tests.test_views ipam.tests.test_views
```

This is handy for instances where just a few tests are failing and you want to re-run them individually.

## Submitting Pull Requests

Once you're happy with your work and have verified that all tests pass, commit your changes and push it upstream to your fork. Always provide descriptive (but not excessively verbose) commit messages. When working on a specific issue, be sure to prefix your commit message with the word "Fixes" or "Closes" and the issue number (with a hash mark). This tells GitHub to automatically close the referenced issue once the commit has been merged.
Expand Down
Loading