1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-27 03:21:29 +03:00

feature #1112: Add cluster and datastore support to OCCI

This commit is contained in:
Daniel Molina 2012-03-16 17:52:12 +01:00
parent a1af3ec165
commit 226844a996
2 changed files with 5 additions and 2 deletions

View File

@ -37,6 +37,9 @@
# 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG
:debug_level: 3
:cluster_id:
:datastore_id:
# VM types allowed and its template file (inside templates directory)
:instance_types:
:small:

View File

@ -342,7 +342,7 @@ class OCCIServer < CloudServer
template = network.to_one_template
return template, 500 if OpenNebula.is_error?(template)
rc = network.allocate(template)
rc = network.allocate(template, @config[:cluster_id]||ClusterPool::NONE_CLUSTER_ID)
if OpenNebula.is_error?(rc)
return rc, CloudServer::HTTP_ERROR_CODE[rc.errno]
end
@ -446,7 +446,7 @@ class OCCIServer < CloudServer
template = image.to_one_template
return template, 500 if OpenNebula.is_error?(template)
rc = image.allocate(template)
rc = image.allocate(template, @config[:datastore_id]||1t)
if OpenNebula.is_error?(rc)
return rc, CloudServer::HTTP_ERROR_CODE[rc.errno]
end