looking at the test it appears that there are several factors hard coded into it.
def determine_underlay(self):
underlay = 'bogus'
cmd = 'ip address'
output = utils.system_output(cmd, retain_output=False)
for line in output.split('\n'):
m = re.search('inet (\d+\.\d+)\.\d+\.\d+\/\d+ brd \d+\.\d+\.\d+\.\d+ scope', line)
if m: underlay = '%s.0.0/16' % m.group(1) break
return underlay
This may be the problem overall and possibly not the right way to approach this, The underlay network should probably be the default routable network. Not every network is a /16 , will take a look to see if I can refactor this a bit.
looking at the test it appears that there are several factors hard coded into it.
def determine_ underlay( self): output( cmd, retain_ output= False) d+)\.\d+ \.\d+\/ \d+ brd \d+\.\d+\.\d+\.\d+ scope', line)
underlay = '%s.0.0/16' % m.group(1)
break
underlay = 'bogus'
cmd = 'ip address'
output = utils.system_
for line in output.split('\n'):
m = re.search('inet (\d+\.\
if m:
return underlay
This may be the problem overall and possibly not the right way to approach this, The underlay network should probably be the default routable network. Not every network is a /16 , will take a look to see if I can refactor this a bit.