Commit 9915793a by Őry Máté

firewall: documenting models.VlanGroup+Group

parent 12c384a8
...@@ -201,7 +201,7 @@ class Vlan(models.Model): ...@@ -201,7 +201,7 @@ class Vlan(models.Model):
'Common IPv4 address used for ' 'Common IPv4 address used for '
'address translation of ' 'address translation of '
'connections to the networks ' 'connections to the networks '
'selected bellow ' 'selected below '
'(typically to the internet).')) '(typically to the internet).'))
snat_to = models.ManyToManyField('self', symmetrical=False, blank=True, snat_to = models.ManyToManyField('self', symmetrical=False, blank=True,
null=True, verbose_name=_('NAT to'), null=True, verbose_name=_('NAT to'),
...@@ -259,24 +259,43 @@ class Vlan(models.Model): ...@@ -259,24 +259,43 @@ class Vlan(models.Model):
class VlanGroup(models.Model): class VlanGroup(models.Model):
name = models.CharField(max_length=20, unique=True) """
A group of Vlans.
"""
name = models.CharField(max_length=20, unique=True, verbose_name=_('name'),
help_text=_('The name of the group.'))
vlans = models.ManyToManyField('Vlan', symmetrical=False, blank=True, vlans = models.ManyToManyField('Vlan', symmetrical=False, blank=True,
null=True) null=True, verbose_name=_('vlans'),
description = models.TextField(blank=True) help_text=_('The vlans which are members '
owner = models.ForeignKey(User, blank=True, null=True) 'of the group.'))
created_at = models.DateTimeField(auto_now_add=True) description = models.TextField(blank=True, verbose_name=_('description'),
modified_at = models.DateTimeField(auto_now=True) help_text=_('The description of the group.'))
owner = models.ForeignKey(User, blank=True, null=True,
verbose_name=_('owner'))
created_at = models.DateTimeField(auto_now_add=True,
verbose_name=_('created at'))
modified_at = models.DateTimeField(auto_now=True,
verbose_name=_('modified at'))
def __unicode__(self): def __unicode__(self):
return self.name return self.name
class Group(models.Model): class Group(models.Model):
name = models.CharField(max_length=20, unique=True) """
description = models.TextField(blank=True) A group of hosts.
owner = models.ForeignKey(User, blank=True, null=True) """
created_at = models.DateTimeField(auto_now_add=True) name = models.CharField(max_length=20, unique=True, verbose_name=_('name'),
modified_at = models.DateTimeField(auto_now=True) help_text=_('The name of the group.'))
description = models.TextField(blank=True, verbose_name=_('description'),
help_text=_('The description of the group.'))
owner = models.ForeignKey(User, blank=True, null=True,
verbose_name=_('owner'))
created_at = models.DateTimeField(auto_now_add=True,
verbose_name=_('created at'))
modified_at = models.DateTimeField(auto_now=True,
verbose_name=_('modified at'))
def __unicode__(self): def __unicode__(self):
return self.name return self.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment