|
@@ -53,6 +53,12 @@ class Region(NestedGroupModel):
|
|
|
max_length=200,
|
|
max_length=200,
|
|
|
blank=True
|
|
blank=True
|
|
|
)
|
|
)
|
|
|
|
|
+ vlan_groups = GenericRelation(
|
|
|
|
|
+ to='ipam.VLANGroup',
|
|
|
|
|
+ content_type_field='scope_type',
|
|
|
|
|
+ object_id_field='scope_id',
|
|
|
|
|
+ related_query_name='region'
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
def get_absolute_url(self):
|
|
def get_absolute_url(self):
|
|
|
return reverse('dcim:region', args=[self.pk])
|
|
return reverse('dcim:region', args=[self.pk])
|
|
@@ -95,6 +101,12 @@ class SiteGroup(NestedGroupModel):
|
|
|
max_length=200,
|
|
max_length=200,
|
|
|
blank=True
|
|
blank=True
|
|
|
)
|
|
)
|
|
|
|
|
+ vlan_groups = GenericRelation(
|
|
|
|
|
+ to='ipam.VLANGroup',
|
|
|
|
|
+ content_type_field='scope_type',
|
|
|
|
|
+ object_id_field='scope_id',
|
|
|
|
|
+ related_query_name='site_group'
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
def get_absolute_url(self):
|
|
def get_absolute_url(self):
|
|
|
return reverse('dcim:sitegroup', args=[self.pk])
|
|
return reverse('dcim:sitegroup', args=[self.pk])
|
|
@@ -210,6 +222,12 @@ class Site(PrimaryModel):
|
|
|
comments = models.TextField(
|
|
comments = models.TextField(
|
|
|
blank=True
|
|
blank=True
|
|
|
)
|
|
)
|
|
|
|
|
+ vlan_groups = GenericRelation(
|
|
|
|
|
+ to='ipam.VLANGroup',
|
|
|
|
|
+ content_type_field='scope_type',
|
|
|
|
|
+ object_id_field='scope_id',
|
|
|
|
|
+ related_query_name='site'
|
|
|
|
|
+ )
|
|
|
images = GenericRelation(
|
|
images = GenericRelation(
|
|
|
to='extras.ImageAttachment'
|
|
to='extras.ImageAttachment'
|
|
|
)
|
|
)
|
|
@@ -267,6 +285,12 @@ class Location(NestedGroupModel):
|
|
|
max_length=200,
|
|
max_length=200,
|
|
|
blank=True
|
|
blank=True
|
|
|
)
|
|
)
|
|
|
|
|
+ vlan_groups = GenericRelation(
|
|
|
|
|
+ to='ipam.VLANGroup',
|
|
|
|
|
+ content_type_field='scope_type',
|
|
|
|
|
+ object_id_field='scope_id',
|
|
|
|
|
+ related_query_name='location'
|
|
|
|
|
+ )
|
|
|
images = GenericRelation(
|
|
images = GenericRelation(
|
|
|
to='extras.ImageAttachment'
|
|
to='extras.ImageAttachment'
|
|
|
)
|
|
)
|