1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #2348: Error when creating a virtual network from Sunstone using advanced mode

This commit is contained in:
Abel Coronado 2018-10-16 10:34:37 +02:00 committed by Tino Vazquez
parent 9538d0baf0
commit ee9f14f0d3

View File

@ -26,16 +26,17 @@ module OpenNebulaJSON
return vnet_hash
end
cluster_id = parse_json(template_json, 'cluster_id')
if vnet_hash['vnet_raw']
template = vnet_hash['vnet_raw']
else
template = template_to_str(vnet_hash)
end
cluster_id = parse_json(template_json, 'cluster_id')
if !OpenNebula.is_error?(cluster_id)
self.allocate(template, cluster_id.to_i)
else
self.allocate(template)
end
end