diff --git a/.github/stale.yml b/.github/stale.yml
index 43401de8a..fdfb1d590 100644
--- a/.github/stale.yml
+++ b/.github/stale.yml
@@ -4,19 +4,19 @@
only: issues
# Number of days of inactivity before an issue becomes stale
-daysUntilStale: 14
+daysUntilStale: 45
# Number of days of inactivity before a stale issue is closed
-daysUntilClose: 7
+daysUntilClose: 15
# Issues with these labels will never be considered stale
exemptLabels:
- "status: accepted"
- - "status: gathering feedback"
- "status: blocked"
+ - "status: needs milestone"
# Label to use when marking an issue as stale
-staleLabel: wontfix
+staleLabel: "pending closure"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cceea27b6..4f448f5ee 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -99,6 +99,10 @@ help prevent wasting time on something that might we might not be able to
implement. When suggesting a new feature, also make sure it won't conflict with
any work that's already in progress.
+* Once you've opened or identified an issue you'd like to work on, ask that it
+be assigned to you so that others are aware it's being worked on. A maintainer
+will then mark the issue as "accepted."
+
* Any pull request which does _not_ relate to an accepted issue will be closed.
* All major new functionality must include relevant tests where applicable.
@@ -132,18 +136,17 @@ accumulating a large backlog of work.
The core maintainers group has chosen to make use of GitHub's [Stale bot](https://github.com/apps/stale)
to aid in issue management.
-* Issues will be marked as stale after 14 days of no activity.
-* Then after 7 more days of inactivity, the issue will be closed.
+* Issues will be marked as stale after 45 days of no activity.
+* Then after 15 more days of inactivity, the issue will be closed.
* Any issue bearing one of the following labels will be exempt from all Stale
bot actions:
* `status: accepted`
- * `status: gathering feedback`
* `status: blocked`
+ * `status: needs milestone`
-It is natural that some new issues get more attention than others. Often this
-is a metric of an issues's overall value to the project. In other cases in
-which issues merely get lost in the shuffle, notifications from Stale bot can
-bring renewed attention to potentially meaningful issues.
+It is natural that some new issues get more attention than others. Stale bot
+helps bring renewed attention to potentially valuable issues that may have been
+overlooked.
## Maintainer Guidance
diff --git a/docs/api/overview.md b/docs/api/overview.md
index 8eefae027..90372aa2a 100644
--- a/docs/api/overview.md
+++ b/docs/api/overview.md
@@ -279,6 +279,10 @@ http://localhost:8000/api/ipam/prefixes/ | jq ".actions.POST.status.choices"
For most fields, when a filter is passed multiple times, objects matching _any_ of the provided values will be returned. For example, `GET /api/dcim/sites/?name=Foo&name=Bar` will return all sites named "Foo" _or_ "Bar". The exception to this rule is ManyToManyFields which may have multiple values assigned. Tags are the most common example of a ManyToManyField. For example, `GET /api/dcim/sites/?tag=foo&tag=bar` will return only sites tagged with both "foo" _and_ "bar".
+### Excluding Config Contexts
+
+The rendered config context for devices and VMs is included by default in all API results (list and detail views). Users with large amounts of context data will most likely observe a performance drop when returning multiple objects, particularly with page sizes in the high hundreds or more. To combat this, in cases where the rendered config context is not needed, the query parameter `?exclude=config_context` may be appended to the request URL to exclude the config context data from the API response.
+
### Custom Fields
To filter on a custom field, prepend `cf_` to the field name. For example, the following query will return only sites where a custom field named `foo` is equal to 123:
diff --git a/docs/installation/upgrading.md b/docs/installation/upgrading.md
index c34fef954..807b9b1e6 100644
--- a/docs/installation/upgrading.md
+++ b/docs/installation/upgrading.md
@@ -30,6 +30,12 @@ Copy the 'configuration.py' you created when first installing to the new version
# cp netbox-X.Y.Z/netbox/netbox/configuration.py netbox/netbox/netbox/configuration.py
```
+Copy your local requirements file if used:
+
+```no-highlight
+# cp netbox-X.Y.Z/local_requirements.txt netbox/local_requirements.txt
+```
+
Also copy the LDAP configuration if using LDAP:
```no-highlight
diff --git a/docs/models/dcim/powerfeed.md b/docs/models/dcim/powerfeed.md
index ab8621e14..690e755d7 100644
--- a/docs/models/dcim/powerfeed.md
+++ b/docs/models/dcim/powerfeed.md
@@ -2,7 +2,7 @@
A power feed identifies the power outlet/drop that goes to a rack and is terminated to a power panel. Power feeds have a supply type (AC/DC), voltage, amperage, and phase type (single/three).
-Power feeds are optionally assigned to a rack. In addition, a power port – and only one – can connect to a power feed; in the context of a PDU, the power feed is analogous to the power outlet that a PDU's power port/inlet connects to.
+Power feeds are optionally assigned to a rack. In addition, a power port may be connected to a power feed. In the context of a PDU, the power feed is analogous to the power outlet that a PDU's power port/inlet connects to.
!!! info
The power usage of a rack is calculated when a power feed (or multiple) is assigned to that rack and connected to a power port.
diff --git a/docs/plugins/development.md b/docs/plugins/development.md
index ad7eef310..b704ad7fc 100644
--- a/docs/plugins/development.md
+++ b/docs/plugins/development.md
@@ -110,6 +110,8 @@ NetBox looks for the `config` variable within a plugin's `__init__.py` to load i
| `template_extensions` | The dotted path to the list of template extension classes (default: `template_content.template_extensions`) |
| `menu_items` | The dotted path to the list of menu items provided by the plugin (default: `navigation.menu_items`) |
+All required settings must be configured by the user. If a configuration parameter is listed in both `required_settings` and `default_settings`, the default setting will be ignored.
+
### Install the Plugin for Development
To ease development, it is recommended to go ahead and install the plugin at this point using setuptools' `develop` mode. This will create symbolic links within your Python environment to the plugin development directory. Call `setup.py` from the plugin's root directory with the `develop` argument (instead of `install`):
diff --git a/docs/release-notes/version-2.8.md b/docs/release-notes/version-2.8.md
index 774de491a..af758f928 100644
--- a/docs/release-notes/version-2.8.md
+++ b/docs/release-notes/version-2.8.md
@@ -1,13 +1,25 @@
# NetBox v2.8
-## v2.8.9 (FUTURE)
+## v2.8.9 (2020-08-04)
+
+### Enhancements
+
+* [#4898](https://github.com/netbox-community/netbox/issues/4898) - Add MAC address search field to interfaces list
+* [#4899](https://github.com/netbox-community/netbox/issues/4899) - Add MAC address column to interfaces table
### Bug Fixes
+* [#4455](https://github.com/netbox-community/netbox/issues/4455) - Fix ordering of prefixes beneath aggregate when available space is hidden
* [#4875](https://github.com/netbox-community/netbox/issues/4875) - Fix documentation for image attachments
* [#4876](https://github.com/netbox-community/netbox/issues/4876) - Fix labels for sites in staging or decommissioning status
-* [#4880](https://github.com/netbox-community/netbox/issues/4880) - Fix remove tagged vlans if not assigned in bulk interface editting
+* [#4880](https://github.com/netbox-community/netbox/issues/4880) - Fix removal of tagged VLANs if not assigned in bulk interface editing
* [#4887](https://github.com/netbox-community/netbox/issues/4887) - Don't disable NAPALM tabs when device has no primary IP
+* [#4894](https://github.com/netbox-community/netbox/issues/4894) - Fix display of device/VM counts on platforms list
+* [#4895](https://github.com/netbox-community/netbox/issues/4895) - Force UTF-8 encoding when embedding model documentation
+* [#4910](https://github.com/netbox-community/netbox/issues/4910) - Unpin redis dependency to fix exception in RQ worker
+* [#4926](https://github.com/netbox-community/netbox/issues/4926) - Fix ordering of VM interfaces in REST API endpoint
+* [#4927](https://github.com/netbox-community/netbox/issues/4927) - Fix validation error when updating an existing secret
+* [#4929](https://github.com/netbox-community/netbox/issues/4929) - Correct log message when creating a new object
---
diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py
index 47b19f267..febeeaa12 100644
--- a/netbox/dcim/forms.py
+++ b/netbox/dcim/forms.py
@@ -2703,6 +2703,10 @@ class InterfaceFilterForm(DeviceComponentFilterForm):
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
+ mac_address = forms.CharField(
+ required=False,
+ label='MAC address'
+ )
tag = TagFilterField(model)
diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py
index 6a6b680b8..e48eaedba 100644
--- a/netbox/dcim/tables.py
+++ b/netbox/dcim/tables.py
@@ -56,10 +56,49 @@ DEVICE_COUNT = """
{{ value|default:0 }}
"""
-VM_COUNT = """
+RACKRESERVATION_ACTIONS = """
+
+
+
+{% if perms.dcim.change_rackreservation %}
+
+{% endif %}
+"""
+
+MANUFACTURER_ACTIONS = """
+
+
+
+{% if perms.dcim.change_manufacturer %}
+
+{% endif %}
+"""
+
+DEVICEROLE_DEVICE_COUNT = """
+{{ value|default:0 }}
+"""
+
+DEVICEROLE_VM_COUNT = """
{{ value|default:0 }}
"""
+DEVICEROLE_ACTIONS = """
+
+
+
+{% if perms.dcim.change_devicerole %}
+
+{% endif %}
+"""
+
+PLATFORM_DEVICE_COUNT = """
+{{ value|default:0 }}
+"""
+
+PLATFORM_VM_COUNT = """
+{{ value|default:0 }}
+"""
+
STATUS_LABEL = """
{{ record.get_status_display }}
"""
@@ -495,11 +534,11 @@ class DeviceBayTemplateTable(ComponentTemplateTable):
class DeviceRoleTable(BaseTable):
pk = ToggleColumn()
device_count = tables.TemplateColumn(
- template_code=DEVICE_COUNT,
+ template_code=DEVICEROLE_DEVICE_COUNT,
verbose_name='Devices'
)
vm_count = tables.TemplateColumn(
- template_code=VM_COUNT,
+ template_code=DEVICEROLE_VM_COUNT,
verbose_name='VMs'
)
color = tables.TemplateColumn(
@@ -522,11 +561,11 @@ class DeviceRoleTable(BaseTable):
class PlatformTable(BaseTable):
pk = ToggleColumn()
device_count = tables.TemplateColumn(
- template_code=DEVICE_COUNT,
+ template_code=PLATFORM_DEVICE_COUNT,
verbose_name='Devices'
)
vm_count = tables.TemplateColumn(
- template_code=VM_COUNT,
+ template_code=PLATFORM_VM_COUNT,
verbose_name='VMs'
)
actions = ButtonsColumn(Platform, pk_field='slug')
@@ -718,8 +757,8 @@ class InterfaceTable(DeviceComponentTable, BaseInterfaceTable):
class Meta(DeviceComponentTable.Meta):
model = Interface
fields = (
- 'pk', 'device', 'name', 'label', 'enabled', 'type', 'mgmt_only', 'mtu', 'mode', 'description', 'cable',
- 'ip_addresses', 'untagged_vlan', 'tagged_vlans',
+ 'pk', 'device', 'name', 'label', 'enabled', 'type', 'mgmt_only', 'mtu', 'mode', 'mac_address',
+ 'description', 'cable', 'ip_addresses', 'untagged_vlan', 'tagged_vlans',
)
default_columns = ('pk', 'device', 'name', 'label', 'enabled', 'type', 'description')
diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py
index d37f39590..f3e4b204d 100644
--- a/netbox/dcim/views.py
+++ b/netbox/dcim/views.py
@@ -953,8 +953,8 @@ class DeviceRoleBulkDeleteView(BulkDeleteView):
class PlatformListView(ObjectListView):
queryset = Platform.objects.annotate(
- device_count=get_subquery(Device, 'device_role'),
- vm_count=get_subquery(VirtualMachine, 'role')
+ device_count=get_subquery(Device, 'platform'),
+ vm_count=get_subquery(VirtualMachine, 'platform')
)
table = tables.PlatformTable
diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py
index 6d0411866..ec067e705 100644
--- a/netbox/ipam/views.py
+++ b/netbox/ipam/views.py
@@ -219,6 +219,8 @@ class AggregateView(ObjectView):
prefix__net_contained_or_equal=str(aggregate.prefix)
).prefetch_related(
'site', 'role'
+ ).order_by(
+ 'prefix'
).annotate_depth(
limit=0
)
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index 200207672..a46709053 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -16,7 +16,7 @@ from django.core.validators import URLValidator
# Environment setup
#
-VERSION = '2.9-beta1'
+VERSION = '2.9-beta2'
# Hostname
HOSTNAME = platform.node()
diff --git a/netbox/secrets/forms.py b/netbox/secrets/forms.py
index f62c72293..e59819246 100644
--- a/netbox/secrets/forms.py
+++ b/netbox/secrets/forms.py
@@ -121,7 +121,7 @@ class SecretForm(BootstrapMixin, CustomFieldModelForm):
device=self.cleaned_data['device'],
role=self.cleaned_data['role'],
name=self.cleaned_data['name']
- ).exists():
+ ).exclude(pk=self.instance.pk).exists():
raise forms.ValidationError(
"Each secret assigned to a device must have a unique combination of role and name"
)
diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py
index ab44658b4..99dd0c65c 100644
--- a/netbox/utilities/templatetags/helpers.py
+++ b/netbox/utilities/templatetags/helpers.py
@@ -178,7 +178,7 @@ def get_docs(model):
model._meta.model_name
)
try:
- with open(path) as docfile:
+ with open(path, encoding='utf-8') as docfile:
content = docfile.read()
except FileNotFoundError:
return "Unable to load documentation, file not found: {}".format(path)
diff --git a/netbox/utilities/views.py b/netbox/utilities/views.py
index 50ac87e50..5f87ed1bf 100644
--- a/netbox/utilities/views.py
+++ b/netbox/utilities/views.py
@@ -418,13 +418,14 @@ class ObjectEditView(GetReturnURLMixin, ObjectPermissionRequiredMixin, View):
try:
with transaction.atomic():
+ object_created = form.instance.pk is None
obj = form.save()
# Check that the new object conforms with any assigned object-level permissions
self.queryset.get(pk=obj.pk)
msg = '{} {}'.format(
- 'Created' if not form.instance.pk else 'Modified',
+ 'Created' if object_created else 'Modified',
self.queryset.model._meta.verbose_name
)
logger.info(f"{msg} {obj} (PK: {obj.pk})")
diff --git a/netbox/virtualization/api/views.py b/netbox/virtualization/api/views.py
index dde5a8d3f..62a551df3 100644
--- a/netbox/virtualization/api/views.py
+++ b/netbox/virtualization/api/views.py
@@ -1,4 +1,4 @@
-from django.db.models import Count, Prefetch
+from django.db.models import Count
from django.shortcuts import get_object_or_404
from rest_framework.decorators import action
from rest_framework.response import Response
@@ -7,7 +7,6 @@ from dcim.models import Device
from extras.api.serializers import RenderedGraphSerializer
from extras.api.views import CustomFieldModelViewSet
from extras.models import Graph
-from ipam.models import VLAN
from utilities.api import ModelViewSet
from utilities.utils import get_subquery
from virtualization import filters
diff --git a/requirements.txt b/requirements.txt
index d7f215d12..0ab9ca3de 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -20,5 +20,4 @@ Pillow==7.2.0
psycopg2-binary==2.8.5
pycryptodome==3.9.8
PyYAML==5.3.1
-redis==3.5.3
svgwrite==1.4
diff --git a/upgrade.sh b/upgrade.sh
index 75afa1db4..66ba7b39f 100755
--- a/upgrade.sh
+++ b/upgrade.sh
@@ -40,11 +40,12 @@ echo "Installing core dependencies ($COMMAND)..."
eval $COMMAND || exit 1
# Install optional packages (if any)
-if [ -f "local_requirements.txt" ]
-then
+if [ -s "local_requirements.txt" ]; then
COMMAND="pip3 install -r local_requirements.txt"
echo "Installing local dependencies ($COMMAND)..."
eval $COMMAND || exit 1
+elif [ -f "local_requirements.txt" ]; then
+ echo "Skipping local dependencies (local_requirements.txt is empty)"
else
echo "Skipping local dependencies (local_requirements.txt not found)"
fi