diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_guestnetwork.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_guestnetwork.py index 55bca3dceed..f1e60d5c0ab 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs_guestnetwork.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_guestnetwork.py @@ -5,8 +5,8 @@ def merge(dbag, gn): for dev in dbag: if dev == "id": continue - if dev == n['device']: - dbag[dev].remove(dev) + if dbag[dev][0]['device'] == gn['device']: + dbag[dev].remove(dbag[dev][0]) if gn['add']: dbag.setdefault(gn['device'], []).append( gn ) return dbag diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py index 44f101448aa..fd9f2f3b074 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py @@ -1,18 +1,4 @@ from pprint import pprint -#[{u'accountId': 2, - #u'add': True, - #u'broadcastUri': u'vlan://untagged', - #u'firstIP': False, - #u'networkRate': 200, - #u'newNic': False, - #u'nicDevId': 1, - #u'oneToOneNat': False, - #u'publicIp': u'10.0.2.102', - #u'sourceNat': True, - #u'trafficType': u'Public', - #u'vifMacAddress': u'06:f6:5e:00:00:03', - #u'vlanGateway': u'10.0.2.1', - #u'vlanNetmask': u'255.255.255.0'}] def merge(dbag, ip): added = False diff --git a/systemvm/patches/debian/config/opt/cloud/bin/merge.py b/systemvm/patches/debian/config/opt/cloud/bin/merge.py index b42decc5486..d3e9ebb89ec 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/merge.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/merge.py @@ -58,7 +58,7 @@ class updateDataBag: self.save(dbag) def processGuestNetwork(self, dbag): - dbag = cs_guestnetwork.merge(dbag, self.qFile.data) + return cs_guestnetwork.merge(dbag, self.qFile.data) def processIP(self, dbag): for ip in self.qFile.data["ip_address"]: