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
b5916e57
authored
Jan 22, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
occi: handle wrong templates
rOCCI actually checks for these
parent
0f34885e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
circle/occi/occi.py
+6
-1
No files found.
circle/occi/occi.py
View file @
b5916e57
...
...
@@ -160,6 +160,7 @@ class Compute(Resource):
@classmethod
def
create_object
(
cls
,
data
,
user
):
templates
=
InstanceTemplate
.
get_objects_with_level
(
"user"
,
user
)
template
=
None
attributes
=
{}
links
=
[]
...
...
@@ -168,7 +169,11 @@ class Compute(Resource):
tmpl
=
occi_os_tpl_regex
.
match
(
d
)
if
tmpl
:
pk
=
tmpl
.
group
(
"template_pk"
)
template
=
InstanceTemplate
.
objects
.
get
(
pk
=
pk
)
try
:
template
=
templates
.
get
(
pk
=
pk
)
except
InstanceTemplate
.
DoesNotExist
:
raise
humanize_exception
(
ugettext_noop
(
"Unknown template"
),
Exception
())
attr
=
occi_attribute_regex
.
match
(
d
)
if
attr
:
...
...
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