Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
417a7ca5
authored
May 20, 2015
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: fix warnings v2
parent
1d934739
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
circle/acl/models.py
+2
-0
circle/firewall/models.py
+11
-0
No files found.
circle/acl/models.py
View file @
417a7ca5
...
...
@@ -43,6 +43,7 @@ class Level(Model):
return
"<
%
s/
%
s>"
%
(
unicode
(
self
.
content_type
),
self
.
name
)
class
Meta
:
app_label
=
'acl'
unique_together
=
((
'content_type'
,
'codename'
),
# ('content_type', 'weight'),
# TODO find a way of temp. disabling this constr.
...
...
@@ -63,6 +64,7 @@ class ObjectLevel(Model):
return
"<
%
s:
%
s>"
%
(
unicode
(
self
.
content_object
),
unicode
(
self
.
level
))
class
Meta
:
app_label
=
'acl'
unique_together
=
((
'content_type'
,
'object_id'
,
'level'
),)
...
...
circle/firewall/models.py
View file @
417a7ca5
...
...
@@ -255,6 +255,7 @@ class Rule(models.Model):
return
qs
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"rule"
)
verbose_name_plural
=
_
(
"rules"
)
ordering
=
(
...
...
@@ -392,6 +393,7 @@ class Vlan(AclBase, models.Model):
verbose_name
=
_
(
'modified at'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"vlan"
)
verbose_name_plural
=
_
(
"vlans"
)
ordering
=
(
'vid'
,
)
...
...
@@ -546,6 +548,7 @@ class VlanGroup(models.Model):
verbose_name
=
_
(
'modified at'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"vlan group"
)
verbose_name_plural
=
_
(
"vlan groups"
)
ordering
=
(
'id'
,
)
...
...
@@ -573,6 +576,7 @@ class Group(models.Model):
verbose_name
=
_
(
'modified at'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"host group"
)
verbose_name_plural
=
_
(
"host groups"
)
ordering
=
(
'id'
,
)
...
...
@@ -648,6 +652,7 @@ class Host(models.Model):
verbose_name
=
_
(
'modified at'
))
class
Meta
(
object
):
app_label
=
'firewall'
unique_together
=
(
'hostname'
,
'vlan'
)
ordering
=
(
'normalized_hostname'
,
'vlan'
)
...
...
@@ -951,6 +956,7 @@ class Firewall(models.Model):
verbose_name
=
_
(
'name'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"firewall"
)
verbose_name_plural
=
_
(
"firewalls"
)
ordering
=
(
'id'
,
)
...
...
@@ -1002,6 +1008,7 @@ class Domain(models.Model):
description
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'description'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"domain"
)
verbose_name_plural
=
_
(
"domains"
)
ordering
=
(
'id'
,
)
...
...
@@ -1083,6 +1090,7 @@ class Record(models.Model):
return
reverse
(
'network.record'
,
kwargs
=
{
'pk'
:
self
.
pk
})
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"record"
)
verbose_name_plural
=
_
(
"records"
)
ordering
=
(
...
...
@@ -1105,6 +1113,7 @@ class SwitchPort(models.Model):
verbose_name
=
_
(
'modified_at'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"switch port"
)
verbose_name_plural
=
_
(
"switch ports"
)
ordering
=
(
'id'
,
)
...
...
@@ -1137,6 +1146,7 @@ class EthernetDevice(models.Model):
verbose_name
=
_
(
'modified_at'
))
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"ethernet device"
)
verbose_name_plural
=
_
(
"ethernet devices"
)
ordering
=
(
'id'
,
)
...
...
@@ -1172,6 +1182,7 @@ class BlacklistItem(models.Model):
return
self
.
ipv4
class
Meta
(
object
):
app_label
=
'firewall'
verbose_name
=
_
(
'blacklist item'
)
verbose_name_plural
=
_
(
'blacklist items'
)
ordering
=
(
'id'
,
)
...
...
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