Petr Horáček has uploaded a new change for review. Change subject: hooks: ovs: convert 'bridge' attr to boolean ......................................................................
hooks: ovs: convert 'bridge' attr to boolean There is no canonicalization in ovirt 3.6. Engine passes 'bridge' parameter as String and therefore we have to convert it to bool explicitly. On master we canonicalize incoming parameters and this special handling is not needed. Change-Id: I09eb7c92a2952e18828a3f0f9887b1b2c5457c91 Bug-Url: https://bugzilla.redhat.com/1234867 Label: ovirt-3.6-only Signed-off-by: Petr Horáček <[email protected]> --- M vdsm_hooks/ovs/ovs_after_get_caps.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/55890/1 diff --git a/vdsm_hooks/ovs/ovs_after_get_caps.py b/vdsm_hooks/ovs/ovs_after_get_caps.py index 4432d4f..47755ee 100755 --- a/vdsm_hooks/ovs/ovs_after_get_caps.py +++ b/vdsm_hooks/ovs/ovs_after_get_caps.py @@ -23,6 +23,7 @@ from vdsm.netconfpersistence import RunningConfig from vdsm import netinfo +from vdsm.utils import tobool from hooking import execCmd import hooking @@ -98,7 +99,7 @@ routes) net_info['iface'] = network # report the network to be bridgeless if this is what Engine expects - net_info['bridged'] = attrs.get('bridged', True) + net_info['bridged'] = tobool(attrs.get('bridged', True)) net_info['ports'] = _get_ports(network, attrs) net_info['stp'] = _get_stp(interface) ovs_networks_caps[network] = net_info @@ -111,7 +112,7 @@ routes = netinfo._get_routes() for network, attrs in iter_ovs_nets(running_config.networks): # report the network to be bridgeless if this is what Engine expects - if attrs.get('bridged', True): + if tobool(attrs.get('bridged', True)): interface = network if 'vlan' in attrs else BRIDGE_NAME net_info = _get_net_info(attrs, interface, dhcpv4ifaces, dhcpv6ifaces, routes) @@ -135,7 +136,7 @@ dhcpv6ifaces, routes) iface = attrs.get('bonding') or attrs.get('nic') net_info['iface'] = iface - net_info['bridged'] = attrs.get('bridged', True) + net_info['bridged'] = tobool(attrs.get('bridged', True)) 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/55890 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09eb7c92a2952e18828a3f0f9887b1b2c5457c91 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Petr Horáček <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
