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 v2.3.2 #1987

Merged
merged 41 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3d91153
Add alphabetic variants to interface expansions
RyanBreaker Oct 24, 2017
c107f35
Merge letters and numbers into one function
RyanBreaker Oct 24, 2017
b295849
Prevent mismatch of types in ranges
RyanBreaker Oct 25, 2017
3df7e28
Prevent mismatch of cases in ranges
RyanBreaker Oct 25, 2017
33a9944
Update help text for ExpandableNameField
RyanBreaker Oct 25, 2017
1a6ee23
Update help text for ExpandableNameField (again)
RyanBreaker Oct 25, 2017
53f58d4
Update comment
RyanBreaker Oct 25, 2017
3d02312
Refactor pattern check
RyanBreaker Oct 25, 2017
e57b8aa
E226 fix
RyanBreaker Oct 25, 2017
57973f6
Fix bug with numbers >10
RyanBreaker Nov 1, 2017
e18b5f5
Add Ansible alternative installation to README
lae Feb 21, 2018
c823660
Post-release version bump
jeremystretch Mar 1, 2018
603b80d
Fixes #1948: Fix TypeError when attempting to add a member to an exis…
jeremystretch Mar 6, 2018
37eef0b
Fixes #1951: Fix TypeError exception when importing platforms
jeremystretch Mar 6, 2018
f5bb072
Fixes #1953: Ignore duplicate IPs when calculating prefix utilization
jeremystretch Mar 7, 2018
8ae13e2
Fixes #1955: Require a plaintext value when creating a new secret
jeremystretch Mar 7, 2018
1c9986e
Closes #1949: Added a button to view elevations on rack groups list
jeremystretch Mar 7, 2018
546f17a
Closes #1866: Introduced AnnotatedMultipleChoiceField for filter forms
jeremystretch Mar 7, 2018
7c043d9
Replaced tagged/untagged VLAN assignment widgets with a VLAN table; s…
jeremystretch Mar 7, 2018
70625a5
Improved validation and workflow
jeremystretch Mar 8, 2018
aa8442a
Removed VLAN assignments from interface bulk editing
jeremystretch Mar 8, 2018
a75d707
Fixed tests
jeremystretch Mar 8, 2018
b22744b
Removed validation constraint prohibitting a VLAN from being both tag…
jeremystretch Mar 9, 2018
ae6848b
Fixed Slack URL
jeremystretch Mar 14, 2018
8bd268d
Closes #1944: Enable assigning VLANs to virtual machine interfaces
jeremystretch Mar 14, 2018
debc852
Closes #1968: Link device type instance count to filtered device list
jeremystretch Mar 14, 2018
4acd8e1
Merge pull request #1902 from lae/feature/ansible-alt-install
jeremystretch Mar 14, 2018
38a2082
Closes #1945: Implemented a VLAN members view
jeremystretch Mar 15, 2018
b83de7e
Use drf_yasg to generate swagger
davcamer Feb 22, 2018
53e4e74
Differentiate better between boolean and 0, 1 choices
davcamer Mar 9, 2018
e071b7d
The id__in field is a csv-separated string of ids
davcamer Mar 15, 2018
b5f1d74
Definition for /dcim/connected-device/ endpoint
davcamer Mar 16, 2018
0b825ac
compare strings using "==" not "is", fixes #1980
luto Mar 21, 2018
6e2eb15
Fixes #1978: Include all virtual chassis member interfaces in LLDP ne…
jeremystretch Mar 21, 2018
7e92aeb
Merge pull request #1981 from luto/patch-1
jeremystretch Mar 21, 2018
05b5609
Merge pull request #1930 from davcamer/drf-yasg
jeremystretch Mar 21, 2018
1c5239a
added X-Forwarded-Proto header to apache config
lampwins Mar 22, 2018
720c5fa
Merge pull request #1643 from RyanBreaker/wildcard
jeremystretch Mar 22, 2018
6a4d17b
Merge pull request #1985 from lampwins/docs/apache-header
jeremystretch Mar 22, 2018
3aaca1c
Require validation dependencies when installing drf-yasg
jeremystretch Mar 22, 2018
223c95a
Release v2.3.2
jeremystretch Mar 22, 2018
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ complete list of requirements, see `requirements.txt`. The code is available [on
The complete documentation for NetBox can be found at [Read the Docs](http://netbox.readthedocs.io/en/stable/).

Questions? Comments? Please subscribe to [the netbox-discuss mailing list](https://groups.google.com/forum/#!forum/netbox-discuss),
or join us in the #netbox Slack channel on [NetworkToCode](https://slack.networktocode.com/)!
or join us in the #netbox Slack channel on [NetworkToCode](https://networktocode.slack.com/)!

### Build Status

Expand Down Expand Up @@ -41,3 +41,4 @@ and run `upgrade.sh`.

* [Docker container](https://github.com/ninech/netbox-docker) (via [@cimnine](https://github.com/cimnine))
* [Vagrant deployment](https://github.com/ryanmerolle/netbox-vagrant) (via [@ryanmerolle](https://github.com/ryanmerolle))
* [Ansible deployment](https://github.com/lae/ansible-role-netbox) (via [@lae](https://github.com/lae))
2 changes: 2 additions & 0 deletions docs/installation/web-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Once Apache is installed, proceed with the following configuration (Be sure to m
ProxyPass !
</Location>

RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/
</VirtualHost>
Expand All @@ -92,6 +93,7 @@ Save the contents of the above example in `/etc/apache2/sites-available/netbox.c
```no-highlight
# a2enmod proxy
# a2enmod proxy_http
# a2enmod headers
# a2ensite netbox
# service apache2 restart
```
Expand Down
18 changes: 8 additions & 10 deletions netbox/circuits/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from tenancy.forms import TenancyForm
from tenancy.models import Tenant
from utilities.forms import (
APISelect, add_blank_choice, BootstrapMixin, ChainedFieldsMixin, ChainedModelChoiceField, CommentField,
CSVChoiceField, FilterChoiceField, SmallTextarea, SlugField,
AnnotatedMultipleChoiceField, APISelect, add_blank_choice, BootstrapMixin, ChainedFieldsMixin,
ChainedModelChoiceField, CommentField, CSVChoiceField, FilterChoiceField, SmallTextarea, SlugField,
)
from .constants import CIRCUIT_STATUS_CHOICES
from .models import Circuit, CircuitTermination, CircuitType, Provider
Expand Down Expand Up @@ -169,13 +169,6 @@ class Meta:
nullable_fields = ['tenant', 'commit_rate', 'description', 'comments']


def circuit_status_choices():
status_counts = {}
for status in Circuit.objects.values('status').annotate(count=Count('status')).order_by('status'):
status_counts[status['status']] = status['count']
return [(s[0], '{} ({})'.format(s[1], status_counts.get(s[0], 0))) for s in CIRCUIT_STATUS_CHOICES]


class CircuitFilterForm(BootstrapMixin, CustomFieldFilterForm):
model = Circuit
q = forms.CharField(required=False, label='Search')
Expand All @@ -187,7 +180,12 @@ class CircuitFilterForm(BootstrapMixin, CustomFieldFilterForm):
queryset=Provider.objects.annotate(filter_count=Count('circuits')),
to_field_name='slug'
)
status = forms.MultipleChoiceField(choices=circuit_status_choices, required=False)
status = AnnotatedMultipleChoiceField(
choices=CIRCUIT_STATUS_CHOICES,
annotate=Circuit.objects.all(),
annotate_field='status',
required=False
)
tenant = FilterChoiceField(
queryset=Tenant.objects.annotate(filter_count=Count('circuits')),
to_field_name='slug',
Expand Down
13 changes: 11 additions & 2 deletions netbox/dcim/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
from django.db import transaction
from django.http import HttpResponseBadRequest, HttpResponseForbidden
from django.shortcuts import get_object_or_404
from drf_yasg import openapi
from drf_yasg.openapi import Parameter
from drf_yasg.utils import swagger_auto_schema
from rest_framework.decorators import detail_route
from rest_framework.mixins import ListModelMixin
from rest_framework.response import Response
Expand Down Expand Up @@ -418,14 +421,20 @@ class ConnectedDeviceViewSet(ViewSet):
* `peer-interface`: The name of the peer interface
"""
permission_classes = [IsAuthenticatedOrLoginNotRequired]
_device_param = Parameter('peer-device', 'query',
description='The name of the peer device', required=True, type=openapi.TYPE_STRING)
_interface_param = Parameter('peer-interface', 'query',
description='The name of the peer interface', required=True, type=openapi.TYPE_STRING)

def get_view_name(self):
return "Connected Device Locator"

@swagger_auto_schema(
manual_parameters=[_device_param, _interface_param], responses={'200': serializers.DeviceSerializer})
def list(self, request):

peer_device_name = request.query_params.get('peer-device')
peer_interface_name = request.query_params.get('peer-interface')
peer_device_name = request.query_params.get(self._device_param.name)
peer_interface_name = request.query_params.get(self._interface_param.name)
if not peer_device_name or not peer_interface_name:
raise MissingFilterException(detail='Request must include "peer-device" and "peer-interface" filters.')

Expand Down
Loading