Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
a80bd8e7
authored
7 years ago
by
Fukász Rómeó Ervin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
occi: fix flake8 warnings
parent
5e3ad1e8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
circle/occi/views.py
+4
-4
No files found.
circle/occi/views.py
View file @
a80bd8e7
...
...
@@ -204,7 +204,7 @@ class OcciComputeView(OcciViewMixin, View):
try
:
vm
=
Instance
.
create_from_template
(
template
,
request
.
user
)
except
:
except
Exception
:
return
OcciResourceCreationError
()
.
response
compute
=
Compute
(
vm
)
return
occi_response
(
compute
.
as_dict
())
...
...
@@ -219,7 +219,7 @@ class OcciComputeView(OcciViewMixin, View):
return
e
.
response
try
:
compute
.
vm
.
destroy
(
user
=
request
.
user
)
except
:
except
Exception
:
return
OcciResourceDeletionError
()
.
response
return
occi_response
({
"result"
:
"Compute instance deleted."
})
...
...
@@ -407,7 +407,7 @@ class OcciNetworkInterfaceView(OcciViewMixin, View):
compute
=
self
.
get_compute_object
(
user
,
vmid
)
try
:
interface
=
compute
.
vm
.
interface_set
.
get
(
vlan__pk
=
vlanid
)
except
:
except
Exception
:
raise
OcciResourceInstanceNotExist
()
return
NetworkInterface
(
compute
,
Network
(
interface
.
vlan
))
...
...
@@ -454,7 +454,7 @@ class OcciNetworkInterfaceView(OcciViewMixin, View):
network
=
self
.
get_network_object
(
request
.
user
,
kwargs
[
"networkid"
])
try
:
interface
=
compute
.
vm
.
interface_set
.
get
(
vlan
=
network
.
vlan
)
except
:
except
Exception
:
return
OcciResourceInstanceNotExist
()
.
response
try
:
from
firewall.models
import
Host
...
...
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