Commit 747ee762 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Klaus Aehlig
Browse files

Export VLAN nicparam to NIC configuration scripts

The vlan nicparam is used in openvswitch mode. This patch
exports it as VLAN environment variable so that NIC
configuration scripts can later use it.
Signed-off-by: default avatarDimitris Aragiorgis <>
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarKlaus Aehlig <>
parent 3d97b399
......@@ -1094,6 +1094,9 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if nic.nicparams[constants.NIC_LINK]:
env["LINK"] = nic.nicparams[constants.NIC_LINK]
if nic.nicparams[constants.NIC_VLAN]:
env["VLAN"] = nic.nicparams[constants.NIC_VLAN]
n = objects.Network.FromDict(nic.netinfo)
......@@ -495,6 +495,7 @@ class XenHypervisor(hv_base.BaseHypervisor):
data.write("INTERFACE_UUID=%s\n" % nic.uuid)
data.write("MODE=%s\n" % nic.nicparams[constants.NIC_MODE])
data.write("LINK=%s\n" % nic.nicparams[constants.NIC_LINK])
data.write("VLAN=%s\n" % nic.nicparams[constants.NIC_VLAN])
utils.WriteFile(cfg_file, data=data.getvalue())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment