mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #565: Fix bugs in the template support.
This commit is contained in:
parent
9b63d5c3ac
commit
fbbb83fbb5
@ -21,7 +21,7 @@ module OpenNebulaJSON
|
||||
class VirtualMachinePoolJSON < OpenNebula::VirtualMachinePool; include JSONUtils; end
|
||||
class VirtualNetworkPoolJSON < OpenNebula::VirtualNetworkPool; include JSONUtils; end
|
||||
class ImagePoolJSON < OpenNebula::ImagePool; include JSONUtils; end
|
||||
class TemplatePoolJSON < OpenNebula::ImagePool; include JSONUtils; end
|
||||
class TemplatePoolJSON < OpenNebula::TemplatePool; include JSONUtils; end
|
||||
class ClusterPoolJSON < OpenNebula::ClusterPool; include JSONUtils; end
|
||||
class UserPoolJSON < OpenNebula::UserPool; include JSONUtils; end
|
||||
end
|
||||
|
@ -17,7 +17,7 @@
|
||||
require 'OpenNebulaJSON/JSONUtils'
|
||||
|
||||
module OpenNebulaJSON
|
||||
class TemplateJSON < OpenNebula::VirtualMachine
|
||||
class TemplateJSON < OpenNebula::Template
|
||||
include JSONUtils
|
||||
|
||||
def create(template_json)
|
||||
|
@ -142,7 +142,14 @@ var OpenNebula = {
|
||||
{
|
||||
return Error('Incorrect Pool');
|
||||
}
|
||||
|
||||
|
||||
|
||||
//HACK!!!
|
||||
if (pool_name == "TEMPLATE_POOL")
|
||||
{
|
||||
type = "VMTEMPLATE";
|
||||
}
|
||||
|
||||
var p_pool = [];
|
||||
|
||||
if (response[pool_name]) {
|
||||
@ -1934,7 +1941,7 @@ var OpenNebula = {
|
||||
},
|
||||
|
||||
"Template" : {
|
||||
"resource" : "TEMPLATE",
|
||||
"resource" : "VMTEMPLATE",
|
||||
|
||||
"create" : function(params)
|
||||
{
|
||||
@ -2157,7 +2164,7 @@ var OpenNebula = {
|
||||
{
|
||||
if (callback)
|
||||
{
|
||||
var template_pool = OpenNebula.Helper.pool(resource,response);
|
||||
var template_pool = OpenNebula.Helper.pool("TEMPLATE",response);
|
||||
callback(request, template_pool);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user