Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
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
Hide 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):
...
@@ -43,6 +43,7 @@ class Level(Model):
return
"<
%
s/
%
s>"
%
(
unicode
(
self
.
content_type
),
self
.
name
)
return
"<
%
s/
%
s>"
%
(
unicode
(
self
.
content_type
),
self
.
name
)
class
Meta
:
class
Meta
:
app_label
=
'acl'
unique_together
=
((
'content_type'
,
'codename'
),
unique_together
=
((
'content_type'
,
'codename'
),
# ('content_type', 'weight'),
# ('content_type', 'weight'),
# TODO find a way of temp. disabling this constr.
# TODO find a way of temp. disabling this constr.
...
@@ -63,6 +64,7 @@ class ObjectLevel(Model):
...
@@ -63,6 +64,7 @@ class ObjectLevel(Model):
return
"<
%
s:
%
s>"
%
(
unicode
(
self
.
content_object
),
unicode
(
self
.
level
))
return
"<
%
s:
%
s>"
%
(
unicode
(
self
.
content_object
),
unicode
(
self
.
level
))
class
Meta
:
class
Meta
:
app_label
=
'acl'
unique_together
=
((
'content_type'
,
'object_id'
,
'level'
),)
unique_together
=
((
'content_type'
,
'object_id'
,
'level'
),)
...
...
circle/firewall/models.py
View file @
417a7ca5
...
@@ -255,6 +255,7 @@ class Rule(models.Model):
...
@@ -255,6 +255,7 @@ class Rule(models.Model):
return
qs
return
qs
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"rule"
)
verbose_name
=
_
(
"rule"
)
verbose_name_plural
=
_
(
"rules"
)
verbose_name_plural
=
_
(
"rules"
)
ordering
=
(
ordering
=
(
...
@@ -392,6 +393,7 @@ class Vlan(AclBase, models.Model):
...
@@ -392,6 +393,7 @@ class Vlan(AclBase, models.Model):
verbose_name
=
_
(
'modified at'
))
verbose_name
=
_
(
'modified at'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"vlan"
)
verbose_name
=
_
(
"vlan"
)
verbose_name_plural
=
_
(
"vlans"
)
verbose_name_plural
=
_
(
"vlans"
)
ordering
=
(
'vid'
,
)
ordering
=
(
'vid'
,
)
...
@@ -546,6 +548,7 @@ class VlanGroup(models.Model):
...
@@ -546,6 +548,7 @@ class VlanGroup(models.Model):
verbose_name
=
_
(
'modified at'
))
verbose_name
=
_
(
'modified at'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"vlan group"
)
verbose_name
=
_
(
"vlan group"
)
verbose_name_plural
=
_
(
"vlan groups"
)
verbose_name_plural
=
_
(
"vlan groups"
)
ordering
=
(
'id'
,
)
ordering
=
(
'id'
,
)
...
@@ -573,6 +576,7 @@ class Group(models.Model):
...
@@ -573,6 +576,7 @@ class Group(models.Model):
verbose_name
=
_
(
'modified at'
))
verbose_name
=
_
(
'modified at'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"host group"
)
verbose_name
=
_
(
"host group"
)
verbose_name_plural
=
_
(
"host groups"
)
verbose_name_plural
=
_
(
"host groups"
)
ordering
=
(
'id'
,
)
ordering
=
(
'id'
,
)
...
@@ -648,6 +652,7 @@ class Host(models.Model):
...
@@ -648,6 +652,7 @@ class Host(models.Model):
verbose_name
=
_
(
'modified at'
))
verbose_name
=
_
(
'modified at'
))
class
Meta
(
object
):
class
Meta
(
object
):
app_label
=
'firewall'
unique_together
=
(
'hostname'
,
'vlan'
)
unique_together
=
(
'hostname'
,
'vlan'
)
ordering
=
(
'normalized_hostname'
,
'vlan'
)
ordering
=
(
'normalized_hostname'
,
'vlan'
)
...
@@ -951,6 +956,7 @@ class Firewall(models.Model):
...
@@ -951,6 +956,7 @@ class Firewall(models.Model):
verbose_name
=
_
(
'name'
))
verbose_name
=
_
(
'name'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"firewall"
)
verbose_name
=
_
(
"firewall"
)
verbose_name_plural
=
_
(
"firewalls"
)
verbose_name_plural
=
_
(
"firewalls"
)
ordering
=
(
'id'
,
)
ordering
=
(
'id'
,
)
...
@@ -1002,6 +1008,7 @@ class Domain(models.Model):
...
@@ -1002,6 +1008,7 @@ class Domain(models.Model):
description
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'description'
))
description
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'description'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"domain"
)
verbose_name
=
_
(
"domain"
)
verbose_name_plural
=
_
(
"domains"
)
verbose_name_plural
=
_
(
"domains"
)
ordering
=
(
'id'
,
)
ordering
=
(
'id'
,
)
...
@@ -1083,6 +1090,7 @@ class Record(models.Model):
...
@@ -1083,6 +1090,7 @@ class Record(models.Model):
return
reverse
(
'network.record'
,
kwargs
=
{
'pk'
:
self
.
pk
})
return
reverse
(
'network.record'
,
kwargs
=
{
'pk'
:
self
.
pk
})
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"record"
)
verbose_name
=
_
(
"record"
)
verbose_name_plural
=
_
(
"records"
)
verbose_name_plural
=
_
(
"records"
)
ordering
=
(
ordering
=
(
...
@@ -1105,6 +1113,7 @@ class SwitchPort(models.Model):
...
@@ -1105,6 +1113,7 @@ class SwitchPort(models.Model):
verbose_name
=
_
(
'modified_at'
))
verbose_name
=
_
(
'modified_at'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"switch port"
)
verbose_name
=
_
(
"switch port"
)
verbose_name_plural
=
_
(
"switch ports"
)
verbose_name_plural
=
_
(
"switch ports"
)
ordering
=
(
'id'
,
)
ordering
=
(
'id'
,
)
...
@@ -1137,6 +1146,7 @@ class EthernetDevice(models.Model):
...
@@ -1137,6 +1146,7 @@ class EthernetDevice(models.Model):
verbose_name
=
_
(
'modified_at'
))
verbose_name
=
_
(
'modified_at'
))
class
Meta
:
class
Meta
:
app_label
=
'firewall'
verbose_name
=
_
(
"ethernet device"
)
verbose_name
=
_
(
"ethernet device"
)
verbose_name_plural
=
_
(
"ethernet devices"
)
verbose_name_plural
=
_
(
"ethernet devices"
)
ordering
=
(
'id'
,
)
ordering
=
(
'id'
,
)
...
@@ -1172,6 +1182,7 @@ class BlacklistItem(models.Model):
...
@@ -1172,6 +1182,7 @@ class BlacklistItem(models.Model):
return
self
.
ipv4
return
self
.
ipv4
class
Meta
(
object
):
class
Meta
(
object
):
app_label
=
'firewall'
verbose_name
=
_
(
'blacklist item'
)
verbose_name
=
_
(
'blacklist item'
)
verbose_name_plural
=
_
(
'blacklist items'
)
verbose_name_plural
=
_
(
'blacklist items'
)
ordering
=
(
'id'
,
)
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