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
30b9fcd7
authored
9 years ago
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
()
This diff is collapsed.
Click to expand it.
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