On Thu, Oct 5, 2017 at 1:38 PM, Scott Moser <email address hidden> wrote:
>
>
> Diff comments:
>
> >
> > === modified file 'examples/tests/network_alias.yaml'
> > --- examples/tests/network_alias.yaml 2017-06-13 22:10:10 +0000
> > +++ examples/tests/network_alias.yaml 2017-10-05 16:35:19 +0000
> > @@ -9,11 +9,9 @@
> > subnets:
> > - type: static
> > address: 10.47.98.1/24
> > - mtu: 1501
> > - type: static
> > address: 2001:4800:78ff:1b:be76:4eff:fe06:ffac
> > netmask: 'ffff:ffff:ffff:ffff::'
> > - mtu: 1480
>
> you say "not needed" in your commit message, but why?
> and isnt it concerning that this diddnt have fallout in tests ?
>
It does have fallout for netplan which doesn;'t support ipv6 mtu;
however, the *scope* of this test is multiple ip address per interface
The mtu itself has no affect on assigning multiple addresses to a single
interface.
The failure to apply an ipv6 MTU in this test is not germane; we're
only testing if we can set multiple ips.
>
> > # multi_v4_alias: multiple v4 addrs on same interface
> > - type: physical
> > name: interface1
> >
> > === modified file 'tests/vmtests/test_network.py'
> > --- tests/vmtests/test_network.py 2017-08-02 15:46:35 +0000
> > +++ tests/vmtests/test_network.py 2017-10-05 16:35:19 +0000
> > @@ -285,14 +285,19 @@
> > ip_route_show = self.load_collect_file("ip_route_show")
> > logger.debug("ip route show:\n{}".format(ip_route_show))
> > for line in [line for line in ip_route_show.split('\n')
> > - if 'src' in line]:
> > + if 'src' in line and not
> line.startswith('default')]:
> > + print('ip_route_show: line: %s' % line)
> > m = re.search(r'^(?P<network>\S+)\sdev\s' +
> > r'(?P<devname>\S+)\s+' +
> > - r'proto kernel\s+scope link' +
> > - r'\s+src\s(?P<src_ip>\S+)',
> > + r'proto\s(?P<proto>\S+)\s+' +
> > + r'scope\s(?P<scope>\S+)\s+' +
> > + r'src\s(?P<src_ip>\S+)',
> > line)
> > - route_info = m.groupdict('')
> > - logger.debug(route_info)
> > + if m:
> > + route_info = m.groupdict('')
> > + logger.debug(route_info)
> > + else:
> > + raise ValueError('Failed match ip_route_show line: %s'
> % line)
>
> bikeshed: this is probably more of a RuntimeException
> kind of "got stuff i didnt expect".
> doesnt matter. take input or not.
>
Sure
>
> >
> > routes = {
> > '4': route_n,
> > @@ -390,7 +395,8 @@
> > gateways.append(subnet.get('gateway'))
> > for route in subnet.get('routes', []):
> > gateways += __find_gw_config(route)
> > - return gateways
> > + # drop duplicate gateways (static routes)
>
> this does have the side affect of sorting your list.
>
That's ok, we iterate through the whole list, each item is
checked if it's found in the entire output.
On Thu, Oct 5, 2017 at 1:38 PM, Scott Moser <email address hidden> wrote:
> tests/network_ alias.yaml' tests/network_ alias.yaml 2017-06-13 22:10:10 +0000 tests/network_ alias.yaml 2017-10-05 16:35:19 +0000 78ff:1b: be76:4eff: fe06:ffac ffff:ffff: :'
>
> Diff comments:
>
> >
> > === modified file 'examples/
> > --- examples/
> > +++ examples/
> > @@ -9,11 +9,9 @@
> > subnets:
> > - type: static
> > address: 10.47.98.1/24
> > - mtu: 1501
> > - type: static
> > address: 2001:4800:
> > netmask: 'ffff:ffff:
> > - mtu: 1480
>
> you say "not needed" in your commit message, but why?
> and isnt it concerning that this diddnt have fallout in tests ?
>
It does have fallout for netplan which doesn;'t support ipv6 mtu;
however, the *scope* of this test is multiple ip address per interface
The mtu itself has no affect on assigning multiple addresses to a single
interface.
The failure to apply an ipv6 MTU in this test is not germane; we're
only testing if we can set multiple ips.
> vmtests/ test_network. py' test_network. py 2017-08-02 15:46:35 +0000 test_network. py 2017-10-05 16:35:19 +0000 collect_ file("ip_ route_show" ) }".format( ip_route_ show)) show.split( '\n') ('default' )]: ip_route_ show: line: %s' % line) r'^(?P< network> \S+)\sdev\ s' + \S+)\s+ ' + s(?P<src_ ip>\S+) ', s(?P<proto> \S+)\s+ ' + s(?P<scope> \S+)\s+ ' + ?P<src_ ip>\S+) ', debug(route_ info) debug(route_ info)
> > # multi_v4_alias: multiple v4 addrs on same interface
> > - type: physical
> > name: interface1
> >
> > === modified file 'tests/
> > --- tests/vmtests/
> > +++ tests/vmtests/
> > @@ -285,14 +285,19 @@
> > ip_route_show = self.load_
> > logger.debug("ip route show:\n{
> > for line in [line for line in ip_route_
> > - if 'src' in line]:
> > + if 'src' in line and not
> line.startswith
> > + print('
> > m = re.search(
> > r'(?P<devname>
> > - r'proto kernel\s+scope link' +
> > - r'\s+src\
> > + r'proto\
> > + r'scope\
> > + r'src\s(
> > line)
> > - route_info = m.groupdict('')
> > - logger.
> > + if m:
> > + route_info = m.groupdict('')
> > + logger.
> > + else:
> > + raise ValueError('Failed match ip_route_show line: %s'
> % line)
>
> bikeshed: this is probably more of a RuntimeException
> kind of "got stuff i didnt expect".
> doesnt matter. take input or not.
>
Sure
> append( subnet. get('gateway' )) get('routes' , []): gw_config( route)
> >
> > routes = {
> > '4': route_n,
> > @@ -390,7 +395,8 @@
> > gateways.
> > for route in subnet.
> > gateways += __find_
> > - return gateways
> > + # drop duplicate gateways (static routes)
>
> this does have the side affect of sorting your list.
>
That's ok, we iterate through the whole list, each item is
checked if it's found in the entire output.
> > + return list(set(gateways)) gw_config( subnet) /code.launchpad .net/~raharper/ curtin/ trunk.vmtest- bug-timers/ +merge/ 331757
> >
> > # handle gateways by looking at routing table
> > configured_gws = __find_
>
>
> --
> https:/
> remove-
> You are the owner of lp:~raharper/curtin/trunk.vmtest-remove-bug-timers.
>