Ondřej Svoboda has posted comments on this change. Change subject: netinfo: report a gateway for statically configured networks ......................................................................
Patch Set 1: Verified+1 How to reproduce and test (with the patch applied): vdsClient -s 0 setupNetworks 'networks={gwtest:{nic:dummy_gwtest,bootproto:none,bridged:true,ipv6addr:fdb3:84e5:4ff4:55e3::1/64,ipv6gateway:fdb3:84e5:4ff4:55e3::ff,ipaddr:240.0.0.1,netmask:255.255.255.0,gateway:240.0.0.254}}' ip -o route show table all | grep default (the gw is be there indeed; but note there is no metric, does it hurt? is it, as implied, 1024?) import json from vdsm import netinfo netinfo._get_gateway() # must not print "Multiple default gateways …"! netinfo._get_gateway(dev='gwtest') routes = netinfo._get_routes() # for more information (also note that we will probably have to fix our netlink library to read routing table IDs as unsigned integers!) print json.dumps(routes['gwtest'],indent=4,separators=[',', ': ']) -- To view, visit http://gerrit.ovirt.org/37440 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65b8c789cf393fbb9aa9d040c38d2c9d9f281864 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ondřej Svoboda <osvob...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <t...@midokura.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Ido Barkan <ibar...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Ondřej Svoboda <osvob...@redhat.com> Gerrit-Reviewer: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches