incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1294418 - in /incubator/tashi/trunk: ./ src/tashi/nodemanager/vmcontrol/qemu.py src/tashi/nodemanager/vmcontrol/xenpv.py
Date Tue, 28 Feb 2012 00:32:26 GMT
Author: stroucki
Date: Tue Feb 28 00:32:26 2012
New Revision: 1294418

URL: http://svn.apache.org/viewvc?rev=1294418&view=rev
Log:
resolve TASHI-11

Modified:
    incubator/tashi/trunk/   (props changed)
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py

Propchange: incubator/tashi/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 00:32:26 2012
@@ -5,4 +5,5 @@
 /incubator/tashi/branches/stroucki-accounting/branches/stroucki-accounting:1221525-1235607
 /incubator/tashi/branches/stroucki-irpbugs:1245857-1292894
 /incubator/tashi/branches/stroucki-slotsbug:1244839-1245041
+/incubator/tashi/branches/stroucki-tashi11:1294393-1294415
 /incubator/tashi/branches/zoni-dev/trunk:1034098-1177646

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1294418&r1=1294417&r2=1294418&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Tue Feb 28 00:32:26 2012
@@ -504,8 +504,14 @@ class Qemu(VmControlInterface):
 		nicModel = self.__stripSpace(nicModel)
 
 		nicString = ""
+		nicNetworks = {}
 		for i in range(0, len(instance.nics)):
+			# Don't allow more than one interface per vlan
 			nic = instance.nics[i]
+			if nicNetworks.has_key(nic.network):
+				continue
+			nicNetworks[nic.network] = True
+
 			nicString = nicString + "-net nic,macaddr=%s,model=%s,vlan=%d -net tap,ifname=%s%d.%d,vlan=%d,script=/etc/qemu-ifup.%d
" % (nic.mac, nicModel, nic.network, self.ifPrefix, instance.id, i, nic.network, nic.network)
 
 		#  ACPI

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py?rev=1294418&r1=1294417&r2=1294418&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py Tue Feb 28 00:32:26 2012
@@ -346,6 +346,8 @@ extra='xencons=tty'
 				instance.disks[i].local = newdisk
 
 
+		# XXXstroucki if ever supporting multiple nics,
+		# ensure more than one isn't put on the same network.
 		fn = self.createXenConfig(name, 
 					  instance.disks[0].local, 
 					  instance.nics[0].mac, 



Mime
View raw message