mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
B #5371: If it's wild the AR will only be 1 lease big
This commit is contained in:
1 parent
a56db4971e
commit
661bc3530e
1 file changed
+5
-3
@@ -410,8 +410,10 @@ class Template
|
||||
# or from a template
|
||||
if wild
|
||||
unmanaged = "wild"
|
||||
ar_size = 1
|
||||
else
|
||||
unmanaged = "template"
|
||||
ar_size = 255
|
||||
end
|
||||
|
||||
# Prepare the Virtual Network template
|
||||
@@ -435,8 +437,8 @@ class Template
|
||||
ar_str = ""
|
||||
ar_str << "AR=[\n"
|
||||
ar_str << "TYPE=\"ETHER\",\n"
|
||||
ar_str << "MAC=\"#{nic[:mac]}\",\n"
|
||||
ar_str << "SIZE=\"255\"\n"
|
||||
ar_str << "MAC=\"#{nic[:mac]}\",\n" if wild && nic[:mac]
|
||||
ar_str << "SIZE=\"#{ar_size}\"\n"
|
||||
ar_str << "]\n"
|
||||
one_vnet[:one] << ar_str
|
||||
|
||||
@@ -578,7 +580,7 @@ class Template
|
||||
network = device.backing.network
|
||||
end
|
||||
|
||||
nic[:mac] = device.macAddress
|
||||
nic[:mac] = device.macAddress rescue nil
|
||||
nic[:net_name] = network.name
|
||||
nic[:net_ref] = network._ref
|
||||
nic[:pg_type] = VCenterDriver::Network.get_network_type(device)
|
||||
|
||||
Reference in new issue
Block a user