Commit 6b47261a 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 <dimara@grnet.gr>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>

Cherry-picked from 747ee762

.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 2243b133
......@@ -1081,6 +1081,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]
if nic.network:
n = objects.Network.FromDict(nic.netinfo)
env.update(n.HooksDict())
......
......@@ -458,6 +458,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])
try:
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