1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#7852: Extend VRF assignment to VM interfaces

This commit is contained in:
jeremystretch
2022-02-07 09:46:38 -05:00
parent 5fea012eab
commit 3651ef53e3
17 changed files with 137 additions and 22 deletions

View File

@ -384,6 +384,14 @@ class VMInterface(NetBoxModel, BaseInterface):
object_id_field='assigned_object_id',
related_query_name='vminterface'
)
vrf = models.ForeignKey(
to='ipam.VRF',
on_delete=models.SET_NULL,
related_name='vminterfaces',
null=True,
blank=True,
verbose_name='VRF'
)
fhrp_group_assignments = GenericRelation(
to='ipam.FHRPGroupAssignment',
content_type_field='interface_type',