mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-15 19:52:52 -06:00
Tests pass now
This commit is contained in:
parent
0ce92cb2ee
commit
9da4c28cd5
@ -334,7 +334,7 @@ class InterfaceSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Interface
|
model = Interface
|
||||||
fields = ['id', 'device', 'name', 'form_factor', 'mgmt_only', 'description', 'is_connected']
|
fields = ['id', 'device', 'name', 'form_factor', 'mac_address', 'mgmt_only', 'description', 'is_connected']
|
||||||
|
|
||||||
|
|
||||||
class InterfaceNestedSerializer(InterfaceSerializer):
|
class InterfaceNestedSerializer(InterfaceSerializer):
|
||||||
@ -348,7 +348,7 @@ class InterfaceDetailSerializer(InterfaceSerializer):
|
|||||||
connected_interface = InterfaceSerializer(source='get_connected_interface')
|
connected_interface = InterfaceSerializer(source='get_connected_interface')
|
||||||
|
|
||||||
class Meta(InterfaceSerializer.Meta):
|
class Meta(InterfaceSerializer.Meta):
|
||||||
fields = ['id', 'device', 'name', 'form_factor', 'mgmt_only', 'description', 'is_connected',
|
fields = ['id', 'device', 'name', 'form_factor', 'mac_address', 'mgmt_only', 'description', 'is_connected',
|
||||||
'connected_interface']
|
'connected_interface']
|
||||||
|
|
||||||
|
|
||||||
|
@ -1252,6 +1252,7 @@ def interface_add(request, pk):
|
|||||||
'device': device.pk,
|
'device': device.pk,
|
||||||
'name': name,
|
'name': name,
|
||||||
'form_factor': form.cleaned_data['form_factor'],
|
'form_factor': form.cleaned_data['form_factor'],
|
||||||
|
'mac_address': form.cleaned_data['mac_address'],
|
||||||
'mgmt_only': form.cleaned_data['mgmt_only'],
|
'mgmt_only': form.cleaned_data['mgmt_only'],
|
||||||
'description': form.cleaned_data['description'],
|
'description': form.cleaned_data['description'],
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user