Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9915793a
authored
Jun 20, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: documenting models.VlanGroup+Group
parent
12c384a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
12 deletions
+31
-12
firewall/models.py
+31
-12
No files found.
firewall/models.py
View file @
9915793a
...
@@ -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 bel
l
ow '
'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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment