Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-occi
Commits
8fbffa6b
Commit
8fbffa6b
authored
Apr 19, 2012
by
John Giannelos
Browse files
Succesfully created first VM / no input checking
parent
f882a314
Changes
1
Show whitespace changes
Inline
Side-by-side
snf-occi-server.py
View file @
8fbffa6b
...
@@ -100,6 +100,8 @@ class MyAPP(Application):
...
@@ -100,6 +100,8 @@ class MyAPP(Application):
def
__call__
(
self
,
environ
,
response
):
def
__call__
(
self
,
environ
,
response
):
sec_obj
=
{
'username'
:
'password'
}
sec_obj
=
{
'username'
:
'password'
}
#Refresh registry entries with current Cyclades state
snf
=
ComputeClient
(
Config
())
snf
=
ComputeClient
(
Config
())
images
=
snf
.
list_images
()
images
=
snf
.
list_images
()
...
@@ -116,6 +118,7 @@ class MyAPP(Application):
...
@@ -116,6 +118,7 @@ class MyAPP(Application):
FLAVOR
=
Mixin
(
"http://schemas.ogf.org/occi/infrastructure#"
,
str
(
flavor
[
'name'
]),
[
RESOURCE_TEMPLATE
],
attributes
=
FLAVOR_ATTRIBUTES
)
FLAVOR
=
Mixin
(
"http://schemas.ogf.org/occi/infrastructure#"
,
str
(
flavor
[
'name'
]),
[
RESOURCE_TEMPLATE
],
attributes
=
FLAVOR_ATTRIBUTES
)
self
.
register_backend
(
FLAVOR
,
MixinBackend
())
self
.
register_backend
(
FLAVOR
,
MixinBackend
())
#TODO show only current VM instances
return
self
.
_call_occi
(
environ
,
response
,
security
=
sec_obj
,
foo
=
None
)
return
self
.
_call_occi
(
environ
,
response
,
security
=
sec_obj
,
foo
=
None
)
...
...
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