mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
This commit is contained in:
parent
243bc11d90
commit
052a06d5f7
@ -37,12 +37,13 @@ require 'base64'
|
||||
base64_temp = ARGV[1]
|
||||
template = OpenNebula::XMLElement.new
|
||||
template.initialize_xml(Base64.decode64(base64_temp), 'VNET')
|
||||
managed = template["TEMPLATE/OPENNEBULA_MANAGED"] != "NO"
|
||||
error = template["TEMPLATE/VCENTER_NET_STATE"] == "ERROR"
|
||||
managed = template["TEMPLATE/OPENNEBULA_MANAGED"] != "NO"
|
||||
imported = template["TEMPLATE/VCENTER_IMPORTED"]
|
||||
error = template["TEMPLATE/VCENTER_NET_STATE"] == "ERROR"
|
||||
|
||||
begin
|
||||
# Step 0. Only execute for vcenter network driver
|
||||
if template["VN_MAD"] == "vcenter" && managed && !error
|
||||
if template["VN_MAD"] == "vcenter" && managed && !error && imported.nil?
|
||||
# Step 1. Extract vnet settings
|
||||
host_id = template["TEMPLATE/VCENTER_ONE_HOST_ID"]
|
||||
raise "We require the ID of the OpenNebula host representing a vCenter cluster" if !host_id
|
||||
|
@ -164,7 +164,7 @@ class Network
|
||||
"VCENTER_PORTGROUP_TYPE=\"#{network_type}\"\n"\
|
||||
"VCENTER_NET_REF=\"#{network_ref}\"\n"\
|
||||
"VCENTER_INSTANCE_ID=\"#{vcenter_uuid}\"\n"\
|
||||
"OPENNEBULA_MANAGED=\"NO\"\n"
|
||||
"VCENTER_IMPORTED=\"YES\"\n"
|
||||
|
||||
if unmanaged == "wild"
|
||||
template += "VCENTER_FROM_WILD=\"#{template_id}\"\n"
|
||||
|
Loading…
Reference in New Issue
Block a user