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
30b9fcd7
authored
Aug 16, 2015
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: fix add_rule command
parent
aa12028e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
circle/firewall/management/commands/add_rule.py
+9
-9
No files found.
circle/firewall/management/commands/add_rule.py
View file @
30b9fcd7
...
...
@@ -107,16 +107,16 @@ class Command(BaseCommand):
rule
=
Rule
(
direction
=
dir
,
dport
=
port
,
proto
=
proto
,
action
=
action
,
vlan
=
vlan
,
foreign_network
=
fnet
,
owner
=
owner
)
rule
.
full_clean
()
rule
.
save
()
def
is_exist
(
self
,
port
,
proto
,
action
,
dir
,
owner
,
vlan
,
fnet
):
try
:
Rule
.
objects
.
get
(
direction
=
dir
,
dport
=
port
,
proto
=
proto
,
action
=
action
,
vlan
=
vlan
,
foreign_network
=
fnet
,
owner
=
owner
)
except
Rule
.
DoesNotExist
:
return
False
else
:
return
True
rules
=
Rule
.
objects
.
filter
(
direction
=
dir
,
dport
=
port
,
proto
=
proto
,
action
=
action
,
vlan
=
vlan
,
foreign_network
=
fnet
,
owner
=
owner
)
return
rules
.
exists
()
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