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:
parent
a1af3ec165
commit
226844a996
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user