Skip to content

Release v2.7.4 #4088

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 129 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
f1d5e28
CSV import/export custom fields
Jan 10, 2020
37322fc
Fixed import choice name
Jan 10, 2020
de1355e
Changelog #568
Jan 10, 2020
834fd40
Fixes #2921: Replace tags filter with Select2 widget
hSaria Jan 11, 2020
a8d9fe7
Removed tags filter field from view
hSaria Jan 13, 2020
2f28dec
Tag filter field for filter forms
hSaria Jan 13, 2020
865e3e7
Updated changelog
hSaria Jan 13, 2020
83ee831
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 13, 2020
d075bf5
Merge branch 'develop' into 568-csv-import-cf
hSaria Jan 13, 2020
e10333b
Fetch choices during form initialization
hSaria Jan 14, 2020
a7e87ee
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 15, 2020
2949bfa
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 16, 2020
8f91e9b
Added #2921 changelog
hSaria Jan 16, 2020
2c0f321
Merge branch '2921-tags-select2' of https://github.com/hSaria/netbox …
hSaria Jan 16, 2020
26ebed0
Removed legacy work regarding inc/tags_panel.html
hSaria Jan 16, 2020
89e6de3
Merge branch 'develop' into 568-csv-import-cf
hSaria Jan 16, 2020
a2d5aca
Moved changelog to v2.7
hSaria Jan 16, 2020
9f68f8d
Update component CSV forms
hSaria Jan 16, 2020
e05cecb
Moved into v2.7.1
hSaria Jan 16, 2020
42962db
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 16, 2020
c0a3285
Merge branch 'develop' into 568-csv-import-cf
hSaria Jan 16, 2020
8b02cd4
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 17, 2020
b11224a
Merge branch 'develop' into 568-csv-import-cf
hSaria Jan 17, 2020
77c8bce
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 21, 2020
bdfead6
Merge branch 'develop' into 568-csv-import-cf
hSaria Jan 21, 2020
9128435
Removed CustomFieldForm class from models without custom fields
hSaria Jan 23, 2020
0ab19d7
Moved the header join logic after the custom fields are added
hSaria Jan 23, 2020
0a5eecd
Explicitly use the value of the choice, instead of relying on __str__
hSaria Jan 23, 2020
8f86244
Cleaned the CustomField choice field
hSaria Jan 23, 2020
bed08a7
Use model's `get_custom_fields`
hSaria Jan 23, 2020
06398a9
Merge branch 'develop' into 568-csv-import-cf
hSaria Jan 23, 2020
ca035a7
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 24, 2020
c22024b
Added CSV import test
hSaria Jan 24, 2020
8ec0ad9
Formatting
hSaria Jan 24, 2020
724d3b8
Fixes #3313: YAML-format the config context in the GUI
hSaria Jan 25, 2020
265d5c8
Format for local and source contexts
hSaria Jan 25, 2020
7cfdc51
Corrected ConfigContext data
hSaria Jan 25, 2020
4abd386
Fixes #3886: Config context cluster (group)
hSaria Jan 26, 2020
73b35e7
Update nginx documentation
Jan 27, 2020
8849f4b
Added cluster groups and clusters to serializers
hSaria Jan 28, 2020
4629cda
Post-release version bump
jeremystretch Jan 28, 2020
6fefa3c
update ldap documentation
newlandk Jan 29, 2020
1849473
Merge pull request #4023 from smutel/UpdateDoc
jeremystretch Jan 29, 2020
e0d538a
Fixes #4043: Fix toggling of required fields in custom scripts
jeremystretch Jan 29, 2020
943c644
Merge pull request #4037 from newlandk/patch-1
jeremystretch Jan 29, 2020
db3b450
Merge pull request #3885 from hSaria/568-csv-import-cf
jeremystretch Jan 29, 2020
bc7cf63
Rename and refactor CustomFieldForm
jeremystretch Jan 29, 2020
f12199d
Rename and simplify CustomFieldChoiceField
jeremystretch Jan 29, 2020
9929a05
Update release notes
jeremystretch Jan 29, 2020
585ea71
Move form field generation logic to CustomField class
jeremystretch Jan 29, 2020
c3f8645
Remove get_custom_fields_for_model()
jeremystretch Jan 29, 2020
35f2291
Fix assignment of initial CustomField values when editing an object
jeremystretch Jan 29, 2020
e6b0189
Introduced CustomFieldModelCSVForm
jeremystretch Jan 29, 2020
193435b
Enable CSV import for custom fields
jeremystretch Jan 29, 2020
c75315f
Extend CSV import test
jeremystretch Jan 29, 2020
eafeaab
Add tests for invalid import data
jeremystretch Jan 29, 2020
03087e9
Fixes #4049: Restore missing tags field in IPAM service serializer
jeremystretch Jan 29, 2020
4ba2579
Closes #4051: Disable the makemigrations management command
jeremystretch Jan 30, 2020
923c272
Fixes #4056: Repair schema migration for Rack.outer_unit (from #3569)
jeremystretch Jan 30, 2020
2375d66
Added TagFilterField to device components' filter forms
hSaria Jan 30, 2020
5879671
Avoid overriding private attribute in super
hSaria Jan 30, 2020
52f7ef4
Merge branch 'develop' into 2921-tags-select2
hSaria Jan 30, 2020
7897ebb
Corrected changelog
hSaria Jan 30, 2020
d9b8bc0
Fix VM interfaces table header alignment
jeremystretch Jan 30, 2020
4b02d29
Fixes #4052: Fix error when bulk importing interfaces to virtual mach…
jeremystretch Jan 30, 2020
d0d2af4
Update 3-http-daemon.md (#4055)
agrrajag Jan 30, 2020
b9765b8
Merge pull request #4050 from netbox-community/568-customfield-csv-im…
jeremystretch Jan 30, 2020
1a25f5a
Fixes #4030: Fix exception when bulk editing interfaces (revised)
jeremystretch Jan 30, 2020
43b2c36
Introduced a custom TestCase
jeremystretch Jan 30, 2020
61ac7c4
Migrate view tests to use new TestCase class
jeremystretch Jan 30, 2020
c8c9f78
Documented the new DEVELOPER configuration parameter
jeremystretch Jan 30, 2020
ac27759
Merge branch 'develop' into 4051-disable-makemigrations
jeremystretch Jan 30, 2020
316c0b6
Merge pull request #4053 from netbox-community/4051-disable-makemigra…
jeremystretch Jan 30, 2020
179abcc
Refactor APITestCase to subclass TestCase
jeremystretch Jan 30, 2020
67fafb2
Use assertHttpStatus for evaluating HTTP response codes
jeremystretch Jan 30, 2020
a44c4d1
Convert view tests under extras to the new TestCase
jeremystretch Jan 30, 2020
4522a28
Fix headings
jeremystretch Jan 31, 2020
e01c984
Introduced a custom model_to_dict()
jeremystretch Jan 31, 2020
98cce7e
Added ViewTestCase (WIP)
jeremystretch Jan 31, 2020
0d18c29
Set default config context format to JSON to maintain existing behavior
hSaria Jan 31, 2020
939b5f2
Reorganize test classes to prevent unittest from running the base Tes…
jeremystretch Jan 31, 2020
78d43a5
Move form/CSV data declaration under setUpTestData
jeremystretch Jan 31, 2020
7daf1df
Add _get_url() for View test case
jeremystretch Jan 31, 2020
d746448
Fixes: #3961 - Edit migrate-to-systemd.md to closely match installati…
DanSheps Jan 31, 2020
6a17be7
post_data(): Ignore iterables
jeremystretch Jan 31, 2020
a208cbd
model_to_dict(): Remove fields that start with an underscore
jeremystretch Jan 31, 2020
c14496d
DeviceForm.manufacturer should not be a required field
jeremystretch Jan 31, 2020
86ef739
Migrate (most) DCIM view tests to use StandardTestCases
jeremystretch Jan 31, 2020
c9d0dce
model_to_dict(): Convert object lists to PK lists
jeremystretch Jan 31, 2020
ab7b921
Convert extras view tests to StandardTestCases
jeremystretch Jan 31, 2020
936e342
Refactor model_to_dict() to better handle tags
jeremystretch Jan 31, 2020
250bda2
Extend and correct evaluation of view permissions
jeremystretch Jan 31, 2020
8881bba
Suppress tag view test until #4071 is fixed
jeremystretch Jan 31, 2020
3668aa2
Fix DeviceTypeTestCase permissions assignment for custom tests
jeremystretch Jan 31, 2020
b361cb0
Convert IPAM view tests to use StandardTestCases
jeremystretch Jan 31, 2020
e8e39dc
Convert secrets view tests to use StandardTestCases
jeremystretch Jan 31, 2020
5517145
Convert tenancy view tests to use StandardTestCases
jeremystretch Jan 31, 2020
e50eab2
Convert virtualization view tests to use StandardTestCases
jeremystretch Jan 31, 2020
eb9538d
Clean up imports
jeremystretch Jan 31, 2020
ce081a6
Merge pull request #4072 from netbox-community/4000-view-tests
jeremystretch Jan 31, 2020
cea1e3d
Fixes #4071: Enforce "view tag" permission on individual tag view
jeremystretch Jan 31, 2020
f632b5b
Fixes #4067: Correct permission checked when creating a rack (vs. edi…
jeremystretch Jan 31, 2020
2ea9594
Removed obsolete CSV headers from DeviceType (export is now YAML-based)
jeremystretch Jan 31, 2020
5386ed4
Extend standard view test case to validate built-in CSV export
jeremystretch Jan 31, 2020
bceaa4a
Corrected models for cluster and cluster group fields
hSaria Feb 2, 2020
24ab082
Add bulk delete view tests
jeremystretch Feb 3, 2020
a4aadf7
Correct default_return_url for TagBulkEditView
jeremystretch Feb 3, 2020
c3bd188
Correct nullable_fields for ServiceBulkEditForm
jeremystretch Feb 3, 2020
4aa694f
Skip non-model fields when applying bulk changes
jeremystretch Feb 3, 2020
d431efb
Add bulk edit view tests
jeremystretch Feb 3, 2020
7b4f3e8
Correct view for PowerFeed creation URL
jeremystretch Feb 3, 2020
3f13441
Add view tests for power panels and power feeds
jeremystretch Feb 3, 2020
91929aa
Merge pull request #4080 from netbox-community/4077-view-tests
jeremystretch Feb 3, 2020
eef79e1
Fixes #4079: Fix assignment of power panel when bulk editing power feeds
jeremystretch Feb 3, 2020
0a87df4
Update GitHub issue templates
jeremystretch Feb 3, 2020
173c530
Merge pull request #4064 from netbox-community/3961-change-systemd-in…
jeremystretch Feb 3, 2020
fcd8e93
Merge pull request #4014 from hSaria/3886-config-context-cluster
jeremystretch Feb 3, 2020
b0f7fee
Changelog for #3886
jeremystretch Feb 3, 2020
ed99158
Merge branch 'develop' into 3313-config-context-gui
jeremystretch Feb 3, 2020
fe22a8d
Merge pull request #4011 from hSaria/3313-config-context-gui
jeremystretch Feb 3, 2020
efb7f15
Changelog for #3313
jeremystretch Feb 3, 2020
0d41d12
Merge branch 'develop' into 2921-tags-select2
jeremystretch Feb 4, 2020
67e4274
Merge pull request #3894 from hSaria/2921-tags-select2
jeremystretch Feb 4, 2020
c3a6a45
#3894 follow-up
jeremystretch Feb 4, 2020
cbe090c
Fixes #4084: Fix exception when creating an interface with tagged VLANs
jeremystretch Feb 4, 2020
bece115
Introduce create_test_device() to reduce test setup boilerplate
jeremystretch Feb 4, 2020
763d9b9
Convert all DCIM component view tests to use StandardTestCases
jeremystretch Feb 4, 2020
c96fc6e
Merge pull request #4087 from netbox-community/4085-dcim-component-vi…
jeremystretch Feb 4, 2020
11d6750
Release v2.7.4
jeremystretch Feb 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ about: Report a reproducible bug in the current release of NetBox
---

<!--
NOTE: This form is only for reproducible bugs. If you need assistance with
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.

This form is only for reproducible bugs. If you need assistance with
NetBox installation, or if you have a general question, DO NOT open an
issue. Instead, post to our mailing list:

Expand All @@ -16,8 +18,8 @@ about: Report a reproducible bug in the current release of NetBox
before submitting a bug report.
-->
### Environment
* Python version: <!-- Example: 3.5.4 -->
* NetBox version: <!-- Example: 2.5.2 -->
* Python version: <!-- Example: 3.6.9 -->
* NetBox version: <!-- Example: 2.7.3 -->

<!--
Describe in detail the exact steps that someone else can take to reproduce
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ about: Suggest an addition or modification to the NetBox documentation
---

<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.

Please indicate the nature of the change by placing an X in one of the
boxes below.
-->
Expand All @@ -14,5 +16,13 @@ about: Suggest an addition or modification to the NetBox documentation
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

### Area
[ ] Installation instructions
[ ] Configuration parameters
[ ] Functionality/features
[ ] REST API
[ ] Administration/development
[ ] Other

<!-- Describe the proposed change(s). -->
### Proposed Changes
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ about: Propose a new NetBox feature or enhancement
---

<!--
NOTE: This form is only for proposing specific new features or enhancements.
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.

This form is only for proposing specific new features or enhancements.
If you have a general idea or question, please post to our mailing list
instead of opening an issue:

Expand All @@ -19,8 +21,8 @@ about: Propose a new NetBox feature or enhancement
before submitting a bug report.
-->
### Environment
* Python version: <!-- Example: 3.5.4 -->
* NetBox version: <!-- Example: 2.3.6 -->
* Python version: <!-- Example: 3.6.9 -->
* NetBox version: <!-- Example: 2.7.3 -->

<!--
Describe in detail the new functionality you are proposing. Include any
Expand Down
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/housekeeping.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: 🏡 Housekeeping
about: A change pertaining to the codebase itself
about: A change pertaining to the codebase itself (developers only)

---

<!--
NOTE: This type of issue should be opened only by those reasonably familiar
with NetBox's code base and interested in contributing to its development.

Describe the proposed change(s) in detail.
NOTE: This template is for use by maintainers only. Please do not submit
an issue using this template unless you have been specifically asked to
do so.
-->
### Proposed Changes

Expand Down
10 changes: 9 additions & 1 deletion docs/configuration/optional-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ This setting enables debugging. This should be done only during development or t

---

## DEVELOPER

Default: False

This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. Set this to `True` **only** if you are actively developing the NetBox code base.

---

## EMAIL

In order to send email, NetBox needs an email server configured. The following items can be defined within the `EMAIL` setting:
Expand Down Expand Up @@ -127,7 +135,7 @@ EXEMPT_VIEW_PERMISSIONS = ['*']

---

# ENFORCE_GLOBAL_UNIQUE
## ENFORCE_GLOBAL_UNIQUE

Default: False

Expand Down
5 changes: 3 additions & 2 deletions docs/installation/3-http-daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ server {

location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
Expand Down Expand Up @@ -107,9 +107,10 @@ Install gunicorn:
# pip3 install gunicorn
```

Copy `contrib/gunicorn.py` to `/opt/netbox/gunicorn.py`. We make a copy of this file to ensure that any changes to it do not get overwritten by a future upgrade.
Copy `/opt/netbox/contrib/gunicorn.py` to `/opt/netbox/gunicorn.py`. We make a copy of this file to ensure that any changes to it do not get overwritten by a future upgrade.

```no-highlight
# cd /opt/netbox
# cp contrib/gunicorn.py /opt/netbox/gunicorn.py
```

Expand Down
4 changes: 2 additions & 2 deletions docs/installation/4-ldap.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ AUTH_LDAP_USER_FLAGS_BY_GROUP = {
AUTH_LDAP_FIND_GROUP_PERMS = True

# Cache groups for one hour to reduce LDAP traffic
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
AUTH_LDAP_CACHE_TIMEOUT = 3600

```

* `is_active` - All users must be mapped to at least this group to enable authentication. Without this, users cannot log in.
Expand Down
99 changes: 28 additions & 71 deletions docs/installation/migrating-to-systemd.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,89 +12,46 @@ Migration is not required, as supervisord will still continue to function.

### systemd configuration:

Copy or link contrib/netbox.service and contrib/netbox-rq.service to /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service
We'll use systemd to control the daemonization of NetBox services. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory:

```no-highlight
# cp contrib/netbox.service /etc/systemd/system/netbox.service
# cp contrib/netbox-rq.service /etc/systemd/system/netbox-rq.service
# cp contrib/*.service /etc/systemd/system/
```

Edit /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service. Be sure to verify the location of the gunicorn executable on your server (e.g. `which gunicorn`). If using CentOS/RHEL. Change the username from `www-data` to `nginx` or `apache`:
!!! note
These service files assume that gunicorn is installed at `/usr/local/bin/gunicorn`. If the output of `which gunicorn` indicates a different path, you'll need to correct the `ExecStart` path in both files.

```no-highlight
/usr/local/bin/gunicorn --pid ${PidPath} --pythonpath ${WorkingDirectory}/netbox --config ${ConfigPath} netbox.wsgi
```

```no-highlight
User=www-data
Group=www-data
```

Copy contrib/netbox.env to /etc/sysconfig/netbox.env

```no-highlight
# cp contrib/netbox.env /etc/sysconfig/netbox.env
```

Edit /etc/sysconfig/netbox.env and change the settings as required. Update the `WorkingDirectory` variable if needed.

```no-highlight
# Name is the Process Name
#
Name = 'Netbox'

# ConfigPath is the path to the gunicorn config file.
#
ConfigPath=/opt/netbox/gunicorn.conf

# WorkingDirectory is the Working Directory for Netbox.
#
WorkingDirectory=/opt/netbox/

# PidPath is the path to the pid for the netbox WSGI
#
PidPath=/var/run/netbox.pid
```
!!! note
You may need to modify the user that the systemd service runs as. Please verify the user for httpd on your specific release and edit both files to match your httpd service under user and group. The username could be "nobody", "nginx", "apache", "www-data" or any number of other usernames.

Copy contrib/gunicorn.conf to gunicorn.conf
Then, start the `netbox` and `netbox-rq` services and enable them to initiate at boot time:

```no-highlight
# cp contrib/gunicorn.conf to gunicorn.conf
# systemctl daemon-reload
# systemctl start netbox.service
# systemctl start netbox-rq.service
# systemctl enable netbox.service
# systemctl enable netbox-rq.service
```

Edit gunicorn.conf and change the settings as required.
You can use the command `systemctl status netbox` to verify that the WSGI service is running:

```
# Bind is the ip and port that the Netbox WSGI should bind to
#
bind='127.0.0.1:8001'

# Workers is the number of workers that GUnicorn should spawn.
# Workers should be: cores * 2 + 1. So if you have 8 cores, it would be 17.
#
workers=3

# Threads
# The number of threads for handling requests
#
threads=3

# Timeout is the timeout between gunicorn receiving a request and returning a response (or failing with a 500 error)
#
timeout=120

# ErrorLog
# ErrorLog is the logfile for the ErrorLog
#
errorlog='/opt/netbox/netbox.log'
# systemctl status netbox.service
● netbox.service - NetBox WSGI Service
Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-12-12 19:23:40 UTC; 25s ago
Docs: https://netbox.readthedocs.io/en/stable/
Main PID: 11993 (gunicorn)
Tasks: 6 (limit: 2362)
CGroup: /system.slice/netbox.service
├─11993 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
├─12015 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
├─12016 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
...
```

Finally, start the `netbox` and `netbox-rq` services and enable them to initiate at boot time:
At this point, you should be able to connect to the HTTP service at the server name or IP address you provided. If you are unable to connect, check that the nginx service is running and properly configured. If you receive a 502 (bad gateway) error, this indicates that gunicorn is misconfigured or not running.

```no-highlight
# systemctl daemon-reload
# systemctl start netbox.service
# systemctl start netbox-rq.service
# systemctl enable netbox.service
# systemctl enable netbox-rq.service
```
!!! info
Please keep in mind that the configurations provided here are bare minimums required to get NetBox up and running. You may want to make adjustments to better suit your production environment.
24 changes: 24 additions & 0 deletions docs/release-notes/version-2.7.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# v2.7.4 (2020-02-04)

## Enhancements

* [#568](https://github.com/netbox-community/netbox/issues/568) - Allow custom fields to be imported and exported using CSV
* [#2921](https://github.com/netbox-community/netbox/issues/2921) - Replace tags filter with Select2 widget
* [#3313](https://github.com/netbox-community/netbox/issues/3313) - Toggle config context display between JSON and YAML
* [#3886](https://github.com/netbox-community/netbox/issues/3886) - Enable assigning config contexts by cluster and cluster group
* [#4051](https://github.com/netbox-community/netbox/issues/4051) - Disable the `makemigrations` management command

## Bug Fixes

* [#4030](https://github.com/netbox-community/netbox/issues/4030) - Fix exception when bulk editing interfaces (revised)
* [#4043](https://github.com/netbox-community/netbox/issues/4043) - Fix toggling of required fields in custom scripts
* [#4049](https://github.com/netbox-community/netbox/issues/4049) - Restore missing `tags` field in IPAM service serializer
* [#4052](https://github.com/netbox-community/netbox/issues/4052) - Fix error when bulk importing interfaces to virtual machines
* [#4056](https://github.com/netbox-community/netbox/issues/4056) - Repair schema migration for Rack.outer_unit (from #3569)
* [#4067](https://github.com/netbox-community/netbox/issues/4067) - Correct permission checked when creating a rack (vs. editing)
* [#4071](https://github.com/netbox-community/netbox/issues/4071) - Enforce "view tag" permission on individual tag view
* [#4079](https://github.com/netbox-community/netbox/issues/4079) - Fix assignment of power panel when bulk editing power feeds
* [#4084](https://github.com/netbox-community/netbox/issues/4084) - Fix exception when creating an interface with tagged VLANs

---

# v2.7.3 (2020-01-28)

## Enhancements
Expand Down
18 changes: 11 additions & 7 deletions netbox/circuits/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
from taggit.forms import TagField

from dcim.models import Region, Site
from extras.forms import AddRemoveTagsForm, CustomFieldForm, CustomFieldBulkEditForm, CustomFieldFilterForm
from extras.forms import (
AddRemoveTagsForm, CustomFieldBulkEditForm, CustomFieldFilterForm, CustomFieldModelForm, CustomFieldModelCSVForm,
)
from tenancy.forms import TenancyFilterForm, TenancyForm
from tenancy.models import Tenant
from utilities.forms import (
APISelect, APISelectMultiple, add_blank_choice, BootstrapMixin, CommentField, CSVChoiceField,
DatePicker, FilterChoiceField, SmallTextarea, SlugField, StaticSelect2, StaticSelect2Multiple
APISelect, APISelectMultiple, add_blank_choice, BootstrapMixin, CommentField, CSVChoiceField, DatePicker,
FilterChoiceField, SmallTextarea, SlugField, StaticSelect2, StaticSelect2Multiple, TagFilterField
)
from .choices import CircuitStatusChoices
from .models import Circuit, CircuitTermination, CircuitType, Provider
Expand All @@ -17,7 +19,7 @@
# Providers
#

class ProviderForm(BootstrapMixin, CustomFieldForm):
class ProviderForm(BootstrapMixin, CustomFieldModelForm):
slug = SlugField()
comments = CommentField()
tags = TagField(
Expand Down Expand Up @@ -46,7 +48,7 @@ class Meta:
}


class ProviderCSVForm(forms.ModelForm):
class ProviderCSVForm(CustomFieldModelCSVForm):
slug = SlugField()

class Meta:
Expand Down Expand Up @@ -129,6 +131,7 @@ class ProviderFilterForm(BootstrapMixin, CustomFieldFilterForm):
required=False,
label='ASN'
)
tag = TagFilterField(model)


#
Expand Down Expand Up @@ -160,7 +163,7 @@ class Meta:
# Circuits
#

class CircuitForm(BootstrapMixin, TenancyForm, CustomFieldForm):
class CircuitForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
comments = CommentField()
tags = TagField(
required=False
Expand Down Expand Up @@ -188,7 +191,7 @@ class Meta:
}


class CircuitCSVForm(forms.ModelForm):
class CircuitCSVForm(CustomFieldModelCSVForm):
provider = forms.ModelChoiceField(
queryset=Provider.objects.all(),
to_field_name='name',
Expand Down Expand Up @@ -333,6 +336,7 @@ class CircuitFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm
min_value=0,
label='Commit rate (Kbps)'
)
tag = TagFilterField(model)


#
Expand Down
Loading