Skip to content

Commit 38d7b83

Browse files
committed
Merge v2.11.9
2 parents 65aaab5 + ec5ed17 commit 38d7b83

File tree

9 files changed

+24
-8
lines changed

9 files changed

+24
-8
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
What version of NetBox are you currently running? (If you don't have access to the most
1818
recent NetBox release, consider testing on our [demo instance](https://demo.netbox.dev/)
1919
before opening a bug report to see if your issue has already been addressed.)
20-
placeholder: v2.11.8
20+
placeholder: v2.11.9
2121
validations:
2222
required: true
2323
- type: dropdown

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v2.11.8
17+
placeholder: v2.11.9
1818
validations:
1919
required: true
2020
- type: dropdown

docs/release-notes/version-2.11.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# NetBox v2.11
22

3+
## v2.11.9 (2021-07-08)
4+
5+
### Bug Fixes
6+
7+
* [#6456](https://github.com/netbox-community/netbox/issues/6456) - API schema type should be boolean for `_occupied` on cable termination models
8+
* [#6710](https://github.com/netbox-community/netbox/issues/6710) - Fix assignment of VM interface parent via REST API
9+
* [#6714](https://github.com/netbox-community/netbox/issues/6714) - Fix rendering of device type component creation forms
10+
11+
---
12+
313
## v2.11.8 (2021-07-06)
414

515
### Enhancements

netbox/dcim/api/serializers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
class CableTerminationSerializer(serializers.ModelSerializer):
2626
cable_peer_type = serializers.SerializerMethodField(read_only=True)
2727
cable_peer = serializers.SerializerMethodField(read_only=True)
28+
_occupied = serializers.SerializerMethodField(read_only=True)
2829

2930
def get_cable_peer_type(self, obj):
3031
if obj._cable_peer is not None:
@@ -42,6 +43,10 @@ def get_cable_peer(self, obj):
4243
return serializer(obj._cable_peer, context=context).data
4344
return None
4445

46+
@swagger_serializer_method(serializer_or_field=serializers.BooleanField)
47+
def get__occupied(self, obj):
48+
return obj._occupied
49+
4550

4651
class ConnectedEndpointSerializer(serializers.ModelSerializer):
4752
connected_endpoint_type = serializers.SerializerMethodField(read_only=True)

netbox/dcim/tests/test_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,9 @@ def setUpTestData(cls):
12111211
{
12121212
'device': device.pk,
12131213
'name': 'Interface 6',
1214-
'type': '1000base-t',
1214+
'type': 'virtual',
12151215
'mode': InterfaceModeChoices.MODE_TAGGED,
1216+
'parent': interfaces[0].pk,
12161217
'tagged_vlans': [vlans[0].pk, vlans[1].pk],
12171218
'untagged_vlan': vlans[2].pk,
12181219
},

netbox/templates/dcim/device_component_add.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h4>{{ component_type|title }}</h4>
3030
{{ field }}
3131
{% endfor %}
3232
{% for field in form.visible_fields %}
33-
{% if field.name not in form.custom_fields %}
33+
{% if not form.custom_fields or field.name not in form.custom_fields %}
3434
{% render_field field %}
3535
{% endif %}
3636
{% endfor %}

netbox/virtualization/api/nested_serializers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from rest_framework import serializers
22

3-
from dcim.models import Interface
43
from netbox.api import WritableNestedSerializer
5-
from virtualization.models import Cluster, ClusterGroup, ClusterType, VirtualMachine
4+
from virtualization.models import Cluster, ClusterGroup, ClusterType, VirtualMachine, VMInterface
65

76
__all__ = [
87
'NestedClusterGroupSerializer',
@@ -61,5 +60,5 @@ class NestedVMInterfaceSerializer(WritableNestedSerializer):
6160
virtual_machine = NestedVirtualMachineSerializer(read_only=True)
6261

6362
class Meta:
64-
model = Interface
63+
model = VMInterface
6564
fields = ['id', 'url', 'display', 'virtual_machine', 'name']

netbox/virtualization/tests/test_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ def setUpTestData(cls):
252252
{
253253
'virtual_machine': virtualmachine.pk,
254254
'name': 'Interface 6',
255+
'parent': interfaces[0].pk,
255256
'mode': InterfaceModeChoices.MODE_TAGGED,
256257
'tagged_vlans': [vlans[0].pk, vlans[1].pk],
257258
'untagged_vlan': vlans[2].pk,

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ gunicorn==20.1.0
1818
Jinja2==3.0.1
1919
Markdown==3.3.4
2020
netaddr==0.8.0
21-
Pillow==8.3.0
21+
Pillow==8.3.1
2222
psycopg2-binary==2.9.1
2323
pycryptodome==3.10.1
2424
PyYAML==5.4.1

0 commit comments

Comments
 (0)