Petr Horáček has uploaded a new change for review.

Change subject: network: caps vlan vlanid property has to be int
......................................................................

network: caps vlan vlanid property has to be int

Engine expects caps vlan vlanid property to be integer.

Assert this condition in networkTests and fix ovs hook.

Change-Id: I737ae75e066ee27d5ecba0aa86118b94fd1ea62d
Signed-off-by: Petr Horáček <[email protected]>
---
M tests/functional/networkTests.py
M vdsm_hooks/ovs/ovs_after_get_caps.py
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/50729/1

diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 9bd58ce..fb6dd33 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -258,6 +258,8 @@
             expected_iface = physical_iface
         self.assertEquals(netinfo.networks[networkName]['iface'],
                           expected_iface)
+        if network_config.get('vlan') is not None:
+            self.assertTrue(isinstance(network_config.get('vlan'), int))
 
     def assertNetworkDoesntExist(self, networkName):
         netinfo = self.vdsm_net.netinfo
diff --git a/vdsm_hooks/ovs/ovs_after_get_caps.py 
b/vdsm_hooks/ovs/ovs_after_get_caps.py
index ea674b7..7b6f397 100755
--- a/vdsm_hooks/ovs/ovs_after_get_caps.py
+++ b/vdsm_hooks/ovs/ovs_after_get_caps.py
@@ -118,7 +118,7 @@
             iface = attrs.get('bonding') or attrs.get('nic')
             net_info['iface'] = iface
             net_info['bridged'] = True
-            net_info['vlanid'] = vlan
+            net_info['vlanid'] = int(vlan)
             ovs_vlans_caps['%s.%s' % (iface, vlan)] = net_info
     return ovs_vlans_caps
 


-- 
To view, visit https://gerrit.ovirt.org/50729
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I737ae75e066ee27d5ecba0aa86118b94fd1ea62d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to