Skip to content

Release v2.7.3 #4035

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 67 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
b06bed3
Post-release version bump
jeremystretch Jan 21, 2020
1091712
Add tests for cable tracing endpoints
jeremystretch Jan 21, 2020
d123664
Add tests for front/rear port API endpoints
jeremystretch Jan 21, 2020
03436b7
Add test for device graphs API endpoint
jeremystretch Jan 21, 2020
1c13a79
Suppress extraneous test output
jeremystretch Jan 21, 2020
ddd9f86
Add tests for rack elevation API endpoint
jeremystretch Jan 21, 2020
b7dea5a
Fixes #3983: Permit the creation of multiple unnamed devices
jeremystretch Jan 22, 2020
f826e15
Closes #3310: Pre-select site/rack for B side when creating a new cable
jeremystretch Jan 22, 2020
5e7fbc4
Merge pull request #3987 from netbox-community/3310-cableform-initial…
jeremystretch Jan 22, 2020
ba6df87
Move min/max prefix length validators to ipam.validators
jeremystretch Jan 22, 2020
aa56c02
Move prefix_validator() to ipam.validators
jeremystretch Jan 22, 2020
f41564b
Introduce IPAddressVar and IPAddressWithMaskVar
jeremystretch Jan 22, 2020
b7e71f9
Add tests for IP address vars
jeremystretch Jan 22, 2020
72d1fe0
Changelog for #3509
jeremystretch Jan 22, 2020
2445d18
Merge pull request #3988 from netbox-community/3509-ipaddress-script-…
jeremystretch Jan 22, 2020
7b517ab
Fixes #3989: Correct HTTP content type assignment for webhooks
jeremystretch Jan 23, 2020
1b26afd
Fixes #3935: Swagger DEFAULT_INFO
hSaria Jan 23, 2020
2e69037
Closes #3952: Add test for webhooks_worker; introduce generate_signat…
jeremystretch Jan 23, 2020
fcbbb36
Add tests for home and search views
jeremystretch Jan 23, 2020
fe40233
Handle grouped choices when returning ChoiceSet values
jeremystretch Jan 23, 2020
cdecf93
Add tests for ChoiceSet
jeremystretch Jan 23, 2020
6297121
Fixes #3999: Do not filter child results by null if non-required pare…
jeremystretch Jan 23, 2020
fcba2ba
dcim: fix #3982 by readding reserved tooltip
hellerve Jan 24, 2020
9694bac
3950 not retain device type
kobayashi Jan 18, 2020
66d5cc4
Fixes #3950: Cloned Device Form does not retain device type
kobayashi Jan 24, 2020
d3463b5
Closes #4005: Include timezone context in webhook timestamps
jeremystretch Jan 24, 2020
9f58c27
Merge pull request #4002 from hellerve/veit/fix-3982
jeremystretch Jan 24, 2020
f24e765
Add changelog for #3982
jeremystretch Jan 24, 2020
0ec091f
Merge branch 'develop' into 3950-not-retain-device-type
jeremystretch Jan 24, 2020
45b66b1
Merge pull request #3955 from kobayashi/3950-not-retain-device-type
jeremystretch Jan 24, 2020
096814d
#3880: Define constants for arbitrary values
jeremystretch Jan 24, 2020
c6473d6
Add explanatory text for constants
jeremystretch Jan 24, 2020
35cbee5
Fixes #4008: Toggle rack elevation face using front/rear strings
jeremystretch Jan 24, 2020
151943b
Merge pull request #4007 from netbox-community/3880-use-constants
jeremystretch Jan 24, 2020
6633041
Remove obsolete IP_FAMILY_CHOICES constant
jeremystretch Jan 24, 2020
a13bddd
Refactor prefix and IP mask length choice generation to reference con…
jeremystretch Jan 24, 2020
eb4c2e5
Remove obsolete fixtures files
jeremystretch Jan 24, 2020
47962ea
Adapt form tests to work without fixture data
jeremystretch Jan 24, 2020
7a548e8
Merge pull request #4009 from netbox-community/4006-remove-fixtures
jeremystretch Jan 24, 2020
4e4a05d
Fixes #4016: Removed duplicate tenant field for cluster edit form
hSaria Jan 26, 2020
011280b
dcim: add borders on the rear of devices as well
hellerve Jan 27, 2020
27d70b6
Merge pull request #4021 from hellerve/veit/fix-4019
jeremystretch Jan 27, 2020
2662bd0
Merge pull request #4017 from hSaria/4016-duplicate-tenant-field
jeremystretch Jan 27, 2020
1901f63
Update changelog
jeremystretch Jan 27, 2020
46d0e88
Fixes #4010: Fixes IP addresses table when filtering interfaces
hSaria Jan 27, 2020
00b50f9
Remove obsolete constants
jeremystretch Jan 27, 2020
d0f127e
Fixes #3338: Added termination A and Z to the circuit
hSaria Jan 27, 2020
7abcc7a
Merge pull request #3993 from hSaria/3935-swagger-default-info
jeremystretch Jan 27, 2020
5c5b9c9
Interface selector restricted to only interface
hSaria Jan 27, 2020
49a6332
Merge pull request #4012 from hSaria/3338-api-circuit-term
jeremystretch Jan 27, 2020
93fa00b
#3338: Prefetch termination devices to avoid extra database queries
jeremystretch Jan 27, 2020
9c4f1d5
Changelog for #3338
jeremystretch Jan 27, 2020
3bce8e9
Fixes #4025: Cable status class
hSaria Jan 27, 2020
8306976
Removed erroneous double-space
hSaria Jan 27, 2020
720bd87
Fixed interface mark connected/planned buttons
hSaria Jan 27, 2020
8d547e9
Fixes #4028: Correct URL patterns to match Unicode characters in tag …
jeremystretch Jan 28, 2020
3c5346f
Fixes #3978: VRF filtering for NAT IP search
kobayashi Jan 28, 2020
9b9e568
Fixes #4027: Repair schema migration for #3569 to convert IP addresse…
jeremystretch Jan 28, 2020
07d8476
Merge pull request #4032 from netbox-community/4027-ipaddress-migration
jeremystretch Jan 28, 2020
e7ef142
Merge pull request #4026 from hSaria/4025-cable-status-class
jeremystretch Jan 28, 2020
7729205
Changelog for #4025
jeremystretch Jan 28, 2020
2a4ccae
Merge pull request #4031 from kobayashi/3978-add-vrf-filter
jeremystretch Jan 28, 2020
12cf69f
Merge pull request #4022 from hSaria/4010-interface-ip-filter
jeremystretch Jan 28, 2020
ede576a
Changelog for #4022
jeremystretch Jan 28, 2020
0a11fc1
Fixes #4030: Fix exception when setting interfaces to tagged mode in …
jeremystretch Jan 28, 2020
8de9f52
Fixes #4033: Restore missing comments field label of various bulk edi…
jeremystretch Jan 28, 2020
be716a3
Release v2.7.3
jeremystretch Jan 28, 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
15 changes: 13 additions & 2 deletions docs/additional-features/custom-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Arbitrary text of any length. Renders as multi-line text input field.

Stored a numeric integer. Options include:

* `min_value:` - Minimum value
* `min_value` - Minimum value
* `max_value` - Maximum value

### BooleanVar
Expand Down Expand Up @@ -158,9 +158,20 @@ A NetBox object. The list of available objects is defined by the queryset parame

An uploaded file. Note that uploaded files are present in memory only for the duration of the script's execution: They will not be save for future use.

### IPAddressVar

An IPv4 or IPv6 address, without a mask. Returns a `netaddr.IPAddress` object.

### IPAddressWithMaskVar

An IPv4 or IPv6 address with a mask. Returns a `netaddr.IPNetwork` object which includes the mask.

### IPNetworkVar

An IPv4 or IPv6 network with a mask.
An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two attributes are available to validate the provided mask:

* `min_prefix_length` - Minimum length of the mask (default: none)
* `max_prefix_length` - Maximum length of the mask (default: none)

### Default Options

Expand Down
29 changes: 29 additions & 0 deletions docs/release-notes/version-2.7.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# v2.7.3 (2020-01-28)

## Enhancements

* [#3310](https://github.com/netbox-community/netbox/issues/3310) - Pre-select site/rack for B side when creating a new cable
* [#3338](https://github.com/netbox-community/netbox/issues/3338) - Include circuit terminations in API representation of circuits
* [#3509](https://github.com/netbox-community/netbox/issues/3509) - Add IP address variables for custom scripts
* [#3978](https://github.com/netbox-community/netbox/issues/3978) - Add VRF filtering to search NAT IP
* [#4005](https://github.com/netbox-community/netbox/issues/4005) - Include timezone context in webhook timestamps

## Bug Fixes

* [#3950](https://github.com/netbox-community/netbox/issues/3950) - Automatically select parent manufacturer when specifying initial device type during device creation
* [#3982](https://github.com/netbox-community/netbox/issues/3982) - Restore tooltip for reservations on rack elevations
* [#3983](https://github.com/netbox-community/netbox/issues/3983) - Permit the creation of multiple unnamed devices
* [#3989](https://github.com/netbox-community/netbox/issues/3989) - Correct HTTP content type assignment for webhooks
* [#3999](https://github.com/netbox-community/netbox/issues/3999) - Do not filter child results by null if non-required parent fields are blank
* [#4008](https://github.com/netbox-community/netbox/issues/4008) - Toggle rack elevation face using front/rear strings
* [#4017](https://github.com/netbox-community/netbox/issues/4017) - Remove redundant tenant field from cluster form
* [#4019](https://github.com/netbox-community/netbox/issues/4019) - Restore border around background devices in rack elevations
* [#4022](https://github.com/netbox-community/netbox/issues/4022) - Fix display of assigned IPs when filtering device interfaces
* [#4025](https://github.com/netbox-community/netbox/issues/4025) - Correct display of cable status (various places)
* [#4027](https://github.com/netbox-community/netbox/issues/4027) - Repair schema migration for #3569 to convert IP addresses with DHCP status
* [#4028](https://github.com/netbox-community/netbox/issues/4028) - Correct URL patterns to match Unicode characters in tag slugs
* [#4030](https://github.com/netbox-community/netbox/issues/4030) - Fix exception when setting interfaces to tagged mode in bulk
* [#4033](https://github.com/netbox-community/netbox/issues/4033) - Restore missing comments field label of various bulk edit forms

---

# v2.7.2 (2020-01-21)

## Enhancements
Expand Down
18 changes: 15 additions & 3 deletions netbox/circuits/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

from circuits.choices import CircuitStatusChoices
from circuits.models import Provider, Circuit, CircuitTermination, CircuitType
from dcim.api.nested_serializers import NestedCableSerializer, NestedSiteSerializer
from dcim.api.nested_serializers import NestedCableSerializer, NestedInterfaceSerializer, NestedSiteSerializer
from dcim.api.serializers import ConnectedEndpointSerializer
from extras.api.customfields import CustomFieldModelSerializer
from tenancy.api.nested_serializers import NestedTenantSerializer
from utilities.api import ChoiceField, ValidatedModelSerializer
from utilities.api import ChoiceField, ValidatedModelSerializer, WritableNestedSerializer
from .nested_serializers import *


Expand Down Expand Up @@ -39,18 +39,30 @@ class Meta:
fields = ['id', 'name', 'slug', 'description', 'circuit_count']


class CircuitCircuitTerminationSerializer(WritableNestedSerializer):
url = serializers.HyperlinkedIdentityField(view_name='circuits-api:circuittermination-detail')
site = NestedSiteSerializer()
connected_endpoint = NestedInterfaceSerializer()

class Meta:
model = CircuitTermination
fields = ['id', 'url', 'site', 'connected_endpoint', 'port_speed', 'upstream_speed', 'xconnect_id']


class CircuitSerializer(TaggitSerializer, CustomFieldModelSerializer):
provider = NestedProviderSerializer()
status = ChoiceField(choices=CircuitStatusChoices, required=False)
type = NestedCircuitTypeSerializer()
tenant = NestedTenantSerializer(required=False, allow_null=True)
termination_a = CircuitCircuitTerminationSerializer(read_only=True)
termination_z = CircuitCircuitTerminationSerializer(read_only=True)
tags = TagListSerializerField(required=False)

class Meta:
model = Circuit
fields = [
'id', 'cid', 'provider', 'type', 'status', 'tenant', 'install_date', 'commit_rate', 'description',
'comments', 'tags', 'custom_fields', 'created', 'last_updated',
'termination_a', 'termination_z', 'comments', 'tags', 'custom_fields', 'created', 'last_updated',
]


Expand Down
4 changes: 3 additions & 1 deletion netbox/circuits/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class CircuitTypeViewSet(ModelViewSet):
#

class CircuitViewSet(CustomFieldModelViewSet):
queryset = Circuit.objects.prefetch_related('type', 'tenant', 'provider').prefetch_related('tags')
queryset = Circuit.objects.prefetch_related(
'type', 'tenant', 'provider', 'terminations__site', 'terminations__connected_endpoint__device'
).prefetch_related('tags')
serializer_class = serializers.CircuitSerializer
filterset_class = filters.CircuitFilterSet

Expand Down
3 changes: 2 additions & 1 deletion netbox/circuits/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ class ProviderBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEdi
label='Admin contact'
)
comments = CommentField(
widget=SmallTextarea()
widget=SmallTextarea,
label='Comments'
)

class Meta:
Expand Down
28 changes: 26 additions & 2 deletions netbox/dcim/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@


#
# Rack elevation rendering
# Racks
#

RACK_U_HEIGHT_DEFAULT = 42

RACK_ELEVATION_UNIT_WIDTH_DEFAULT = 230
RACK_ELEVATION_UNIT_HEIGHT_DEFAULT = 20


#
# Interface type groups
# RearPorts
#

REARPORT_POSITIONS_MIN = 1
REARPORT_POSITIONS_MAX = 64


#
# Interfaces
#

INTERFACE_MTU_MIN = 1
INTERFACE_MTU_MAX = 32767 # Max value of a signed 16-bit integer

VIRTUAL_IFACE_TYPES = [
InterfaceTypeChoices.TYPE_VIRTUAL,
InterfaceTypeChoices.TYPE_LAG,
Expand All @@ -31,6 +44,17 @@
NONCONNECTABLE_IFACE_TYPES = VIRTUAL_IFACE_TYPES + WIRELESS_IFACE_TYPES


#
# PowerFeeds
#

POWERFEED_VOLTAGE_DEFAULT = 120

POWERFEED_AMPERAGE_DEFAULT = 20

POWERFEED_MAX_UTILIZATION_DEFAULT = 80 # Percentage


#
# Cabling and connections
#
Expand Down
Loading