Make ubuntu VM interface name configurable
Depending on the hypervisor/compute were the Ubuntu VM instances are spawned, their interface names are created following differnt conventions. Tobiko decides which is the expected name depending on the OSP version, but that is not a valid method to decide it in some cases. This patch allows to configure the expected Ubuntu interface name. Change-Id: I6d876c73d883dc588360d6f6bc54f952d0fa9e84
This commit is contained in:
parent
2e5a23e95c
commit
bb712907d4
@ -58,6 +58,9 @@ def get_images_options():
|
|||||||
help="Default " + name + " username"),
|
help="Default " + name + " username"),
|
||||||
cfg.StrOpt('password',
|
cfg.StrOpt('password',
|
||||||
help="Default " + name + " password"),
|
help="Default " + name + " password"),
|
||||||
|
cfg.StrOpt('interface_name',
|
||||||
|
default=None,
|
||||||
|
help="Default " + name + " interface name"),
|
||||||
cfg.FloatOpt('connection_timeout',
|
cfg.FloatOpt('connection_timeout',
|
||||||
default=None,
|
default=None,
|
||||||
help=("Default " + name +
|
help=("Default " + name +
|
||||||
|
@ -134,6 +134,9 @@ class UbuntuImageFixture(UbuntuMinimalImageFixture,
|
|||||||
"""From OSP17 and above, Ubuntu stack should use a different interface name.
|
"""From OSP17 and above, Ubuntu stack should use a different interface name.
|
||||||
This method returns the interface name, depending on the OSP version.
|
This method returns the interface name, depending on the OSP version.
|
||||||
"""
|
"""
|
||||||
|
if_name = CONF.tobiko.ubuntu.interface_name
|
||||||
|
if if_name is not None:
|
||||||
|
return if_name
|
||||||
from tobiko import tripleo
|
from tobiko import tripleo
|
||||||
if tripleo.has_overcloud(min_version='17.0'):
|
if tripleo.has_overcloud(min_version='17.0'):
|
||||||
return 'enp3s0'
|
return 'enp3s0'
|
||||||
|
Loading…
Reference in New Issue
Block a user