Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
a648ac52
authored
Mar 07, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: guidelines, guidelines
parent
7aad8625
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
firewall/views.py
+5
-5
No files found.
firewall/views.py
View file @
a648ac52
...
@@ -65,7 +65,7 @@ def firewall_api(request):
...
@@ -65,7 +65,7 @@ def firewall_api(request):
if
not
(
data
[
"vlan"
]
==
"vm-net"
or
data
[
"vlan"
]
==
"war"
):
if
not
(
data
[
"vlan"
]
==
"vm-net"
or
data
[
"vlan"
]
==
"war"
):
raise
Exception
(
_
(
"Only vm-net and war can be used."
))
raise
Exception
(
_
(
"Only vm-net and war can be used."
))
data
[
"hostname"
]
=
re
.
sub
(
r' '
,
'_'
,
data
[
"hostname"
])
data
[
"hostname"
]
=
re
.
sub
(
r' '
,
'_'
,
data
[
"hostname"
])
if
command
==
"create"
:
if
command
==
"create"
:
data
[
"owner"
]
=
"opennebula"
data
[
"owner"
]
=
"opennebula"
...
@@ -98,8 +98,8 @@ def firewall_api(request):
...
@@ -98,8 +98,8 @@ def firewall_api(request):
raise
Exception
(
_
(
"Unknown command."
))
raise
Exception
(
_
(
"Unknown command."
))
except
(
ValidationError
,
IntegrityError
,
AttributeError
,
Exception
)
as
e
:
except
(
ValidationError
,
IntegrityError
,
AttributeError
,
Exception
)
as
e
:
return
HttpResponse
(
_
(
"Something went wrong!
\n
%
s
\n
"
)
%
e
)
;
return
HttpResponse
(
_
(
"Something went wrong!
\n
%
s
\n
"
)
%
e
)
except
:
except
:
return
HttpResponse
(
_
(
"Something went wrong!
\n
"
))
;
return
HttpResponse
(
_
(
"Something went wrong!
\n
"
))
return
HttpResponse
(
unicode
(
_
(
"OK"
)))
;
return
HttpResponse
(
unicode
(
_
(
"OK"
)))
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