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 v1.7.0 #666

Merged
merged 29 commits into from
Nov 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6018700
Post-release version bump
jeremystretch Oct 19, 2016
9986081
Fix path to find configuration.py on migration
kryskool Oct 20, 2016
35c207e
Merge pull request #627 from kryskool/patch-1
jeremystretch Oct 20, 2016
1324378
Closes #87: Added status field to IP addresses
jeremystretch Oct 21, 2016
fc2ac8a
Attributed all model ValidationErrors to specific fields (where appro…
jeremystretch Oct 21, 2016
f44a322
Closes #630: Added a custom 404 page
jeremystretch Oct 24, 2016
e22eafc
Closes #211: Allow device assignment and removal from IP address view
jeremystretch Oct 24, 2016
198674f
Fixed "Power Port" column name
jsenecal Oct 24, 2016
f8f5d68
Merge pull request #634 from jsenecal/patch-2
jeremystretch Oct 24, 2016
5cd9c11
gitignore static folder, concretize configuration.py location
flokli Oct 28, 2016
2db50dd
Closes #191: Support for racks numbered top-to-bottom
jeremystretch Oct 28, 2016
28b4f6b
#181: Added ExpandableIPAddressField
jeremystretch Oct 28, 2016
fd38daf
Standardized device component edit views to use ObjectEditView()
jeremystretch Oct 28, 2016
df9a6a0
Standardized device component deletion views to use ObjectDeleteView()
jeremystretch Oct 28, 2016
d97dd26
Cleaned up message strings
jeremystretch Oct 31, 2016
dc186a5
Closes #661: Display relevant IP addressing when viewing a circuit
jeremystretch Oct 31, 2016
c525939
Closes #654: Added Cisco FlexStack and FlexStack Plus form factors
jeremystretch Oct 31, 2016
a37d2ff
Closes #652: Use password input controls when editing secrets
jeremystretch Oct 31, 2016
4af3072
Fix typo in c525939b13a24220584166db790b04973c19b034
jeremystretch Oct 31, 2016
2d58cfa
Add is_full_depth and instance count columns to DeviceType table
jeremystretch Oct 31, 2016
41af9c8
Fixes #660: Correct calculation of utilized space for rack list display
jeremystretch Oct 31, 2016
084b86c
Tweaked Aggregate get_utilization for table display
jeremystretch Oct 31, 2016
f213768
Closes #647: Extend form used when assigning an IP to a device
jeremystretch Nov 1, 2016
ad1c3d4
Fixed typo in error message
jeremystretch Nov 1, 2016
76c6fbb
Merge pull request #653 from flokli/gitignore
jeremystretch Nov 1, 2016
bbac6e2
Fixes #664: Re-implemented view for bulk creation of interfaces acros…
jeremystretch Nov 2, 2016
96eaea7
Miscellaneous cleanup
jeremystretch Nov 3, 2016
ea92e92
Fixes #632: Use semicolons instead of commas to separate regexes in t…
jeremystretch Nov 3, 2016
6c1fb1b
Release v1.7.0
jeremystretch Nov 3, 2016
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.pyc
configuration.py
/netbox/netbox/configuration.py
/netbox/static
.idea
/*.sh
!upgrade.sh
Expand Down
2 changes: 1 addition & 1 deletion docs/data-model/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ dist-switch\d
access-switch\d+,oob-switch\d+
```

Note that you can combine multiple regexes onto one line using commas. (Commas can only be used for separating regexes; they will not be processed as part of a regex.) The order in which regexes are listed on a line is significant: devices matching the first regex will be rendered first, and subsequent groups will be rendered to the right of those.
Note that you can combine multiple regexes onto one line using semicolons. The order in which regexes are listed on a line is significant: devices matching the first regex will be rendered first, and subsequent groups will be rendered to the right of those.
2 changes: 1 addition & 1 deletion docs/installation/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Download and extract the latest version:
Copy the 'configuration.py' you created when first installing to the new version:

```
# cp /opt/netbox-X.Y.Z/configuration.py /opt/netbox/configuration.py
# cp /opt/netbox-X.Y.Z/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/configuration.py
```

If you followed the original installation guide to set up gunicorn, be sure to copy its configuration as well:
Expand Down
4 changes: 2 additions & 2 deletions netbox/dcim/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class RackSerializer(CustomFieldSerializer, serializers.ModelSerializer):
class Meta:
model = Rack
fields = ['id', 'name', 'facility_id', 'display_name', 'site', 'group', 'tenant', 'role', 'type', 'width',
'u_height', 'comments', 'custom_fields']
'u_height', 'desc_units', 'comments', 'custom_fields']


class RackNestedSerializer(RackSerializer):
Expand All @@ -94,7 +94,7 @@ class RackDetailSerializer(RackSerializer):

class Meta(RackSerializer.Meta):
fields = ['id', 'name', 'facility_id', 'display_name', 'site', 'group', 'tenant', 'role', 'type', 'width',
'u_height', 'comments', 'custom_fields', 'front_units', 'rear_units']
'u_height', 'desc_units', 'comments', 'custom_fields', 'front_units', 'rear_units']

def get_front_units(self, obj):
units = obj.get_rack_units(face=RACK_FACE_FRONT)
Expand Down
33 changes: 20 additions & 13 deletions netbox/dcim/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ class RackForm(BootstrapMixin, CustomFieldForm):

class Meta:
model = Rack
fields = ['site', 'group', 'name', 'facility_id', 'tenant', 'role', 'type', 'width', 'u_height', 'comments']
fields = ['site', 'group', 'name', 'facility_id', 'tenant', 'role', 'type', 'width', 'u_height', 'desc_units',
'comments']
help_texts = {
'site': "The site at which the rack exists",
'name': "Organizational rack name",
Expand Down Expand Up @@ -178,7 +179,8 @@ class RackFromCSVForm(forms.ModelForm):

class Meta:
model = Rack
fields = ['site', 'group_name', 'name', 'facility_id', 'tenant', 'role', 'type', 'width', 'u_height']
fields = ['site', 'group_name', 'name', 'facility_id', 'tenant', 'role', 'type', 'width', 'u_height',
'desc_units']

def clean(self):

Expand Down Expand Up @@ -368,7 +370,7 @@ class DeviceForm(BootstrapMixin, CustomFieldForm):
attrs={'filter-for': 'position'}
))
position = forms.TypedChoiceField(required=False, empty_value=None,
help_text="For multi-U devices, this is the lowest occupied rack unit.",
help_text="The lowest-numbered unit occupied by the device",
widget=APISelect(api_url='/api/dcim/racks/{{rack}}/rack-units/?face={{face}}',
disabled_indicator='device'))
manufacturer = forms.ModelChoiceField(queryset=Manufacturer.objects.all(),
Expand Down Expand Up @@ -582,6 +584,18 @@ class Meta:
nullable_fields = ['tenant', 'platform']


class DeviceBulkAddComponentForm(forms.Form, BootstrapMixin):
pk = forms.ModelMultipleChoiceField(queryset=Device.objects.all(), widget=forms.MultipleHiddenInput)
name_pattern = ExpandableNameField(label='Name')


class DeviceBulkAddInterfaceForm(forms.ModelForm, DeviceBulkAddComponentForm):

class Meta:
model = Interface
fields = ['name_pattern', 'form_factor', 'mgmt_only', 'description']


class DeviceFilterForm(BootstrapMixin, CustomFieldFilterForm):
model = Device
site = FilterChoiceField(queryset=Site.objects.annotate(filter_count=Count('racks__devices')), to_field_name='slug')
Expand Down Expand Up @@ -1012,10 +1026,6 @@ class Meta:
fields = ['name_pattern', 'form_factor', 'mac_address', 'mgmt_only', 'description']


class InterfaceBulkCreateForm(InterfaceCreateForm, BootstrapMixin):
pk = forms.ModelMultipleChoiceField(queryset=Device.objects.all(), widget=forms.MultipleHiddenInput)


class InterfaceBulkEditForm(BootstrapMixin, BulkEditForm):
pk = forms.ModelMultipleChoiceField(queryset=Interface.objects.all(), widget=forms.MultipleHiddenInput)
form_factor = forms.ChoiceField(choices=add_blank_choice(IFACE_FF_CHOICES), required=False)
Expand Down Expand Up @@ -1226,15 +1236,12 @@ class InterfaceConnectionFilterForm(forms.Form, BootstrapMixin):
# IP addresses
#

class IPAddressForm(forms.ModelForm, BootstrapMixin):
class IPAddressForm(BootstrapMixin, CustomFieldForm):
set_as_primary = forms.BooleanField(label='Set as primary IP for device', required=False)

class Meta:
model = IPAddress
fields = ['address', 'vrf', 'interface', 'set_as_primary']
help_texts = {
'address': 'IPv4 or IPv6 address (with mask)'
}
fields = ['address', 'vrf', 'tenant', 'status', 'interface', 'description']

def __init__(self, device, *args, **kwargs):

Expand All @@ -1251,7 +1258,7 @@ def __init__(self, device, *args, **kwargs):


#
# Interfaces
# Modules
#

class ModuleForm(forms.ModelForm, BootstrapMixin):
Expand Down
20 changes: 20 additions & 0 deletions netbox/dcim/migrations/0020_rack_desc_units.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-28 15:01
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dcim', '0019_new_iface_form_factors'),
]

operations = [
migrations.AddField(
model_name='rack',
name='desc_units',
field=models.BooleanField(default=False, help_text=b'Units are numbered top-to-bottom', verbose_name=b'Descending units'),
),
]
31 changes: 31 additions & 0 deletions netbox/dcim/migrations/0021_add_ff_flexstack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-31 18:47
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dcim', '0020_rack_desc_units'),
]

operations = [
migrations.AlterField(
model_name='device',
name='position',
field=models.PositiveSmallIntegerField(blank=True, help_text=b'The lowest-numbered unit occupied by the device', null=True, validators=[django.core.validators.MinValueValidator(1)], verbose_name=b'Position (U)'),
),
migrations.AlterField(
model_name='interface',
name='form_factor',
field=models.PositiveSmallIntegerField(choices=[[b'Virtual interfaces', [[0, b'Virtual']]], [b'Ethernet (fixed)', [[800, b'100BASE-TX (10/100ME)'], [1000, b'1000BASE-T (1GE)'], [1150, b'10GBASE-T (10GE)']]], [b'Ethernet (modular)', [[1050, b'GBIC (1GE)'], [1100, b'SFP (1GE)'], [1200, b'SFP+ (10GE)'], [1300, b'XFP (10GE)'], [1310, b'XENPAK (10GE)'], [1320, b'X2 (10GE)'], [1350, b'SFP28 (25GE)'], [1400, b'QSFP+ (40GE)'], [1500, b'CFP (100GE)'], [1600, b'QSFP28 (100GE)']]], [b'FibreChannel', [[3010, b'SFP (1GFC)'], [3020, b'SFP (2GFC)'], [3040, b'SFP (4GFC)'], [3080, b'SFP+ (8GFC)'], [3160, b'SFP+ (16GFC)']]], [b'Serial', [[4000, b'T1 (1.544 Mbps)'], [4010, b'E1 (2.048 Mbps)'], [4040, b'T3 (45 Mbps)'], [4050, b'E3 (34 Mbps)']]], [b'Stacking', [[5000, b'Cisco StackWise'], [5050, b'Cisco StackWise Plus'], [5100, b'Cisco FlexStack'], [5150, b'Cisco FlexStack Plus']]], [b'Other', [[32767, b'Other']]]], default=1200),
),
migrations.AlterField(
model_name='interfacetemplate',
name='form_factor',
field=models.PositiveSmallIntegerField(choices=[[b'Virtual interfaces', [[0, b'Virtual']]], [b'Ethernet (fixed)', [[800, b'100BASE-TX (10/100ME)'], [1000, b'1000BASE-T (1GE)'], [1150, b'10GBASE-T (10GE)']]], [b'Ethernet (modular)', [[1050, b'GBIC (1GE)'], [1100, b'SFP (1GE)'], [1200, b'SFP+ (10GE)'], [1300, b'XFP (10GE)'], [1310, b'XENPAK (10GE)'], [1320, b'X2 (10GE)'], [1350, b'SFP28 (25GE)'], [1400, b'QSFP+ (40GE)'], [1500, b'CFP (100GE)'], [1600, b'QSFP28 (100GE)']]], [b'FibreChannel', [[3010, b'SFP (1GFC)'], [3020, b'SFP (2GFC)'], [3040, b'SFP (4GFC)'], [3080, b'SFP+ (8GFC)'], [3160, b'SFP+ (16GFC)']]], [b'Serial', [[4000, b'T1 (1.544 Mbps)'], [4010, b'E1 (2.048 Mbps)'], [4040, b'T3 (45 Mbps)'], [4050, b'E3 (34 Mbps)']]], [b'Stacking', [[5000, b'Cisco StackWise'], [5050, b'Cisco StackWise Plus'], [5100, b'Cisco FlexStack'], [5150, b'Cisco FlexStack Plus']]], [b'Other', [[32767, b'Other']]]], default=1200),
),
]
Loading