Merge "Refactor Ubuntu image stack"
This commit is contained in:
commit
9878bbf39b
@ -153,10 +153,6 @@ subparsers:
|
||||
type: Value
|
||||
help: user name to be used to connect to TripleO Overcloud hosts
|
||||
ansible_variable: overcloud_ssh_username
|
||||
ubuntu-interface-name:
|
||||
type: Value
|
||||
help: primary interface name obtained from the ubuntu instances
|
||||
ansible_variable: ubuntu_interface_name
|
||||
|
||||
- title: Run stage
|
||||
options:
|
||||
|
@ -13,8 +13,6 @@ test_default_conf:
|
||||
tripleo:
|
||||
undercloud_ssh_hostname: "{{ undercloud_ssh_hostname }}"
|
||||
overcloud_ssh_username: "{{ overcloud_ssh_username }}"
|
||||
ubuntu:
|
||||
interface_name: "{{ ubuntu_interface_name }}"
|
||||
|
||||
test_log_debug: ''
|
||||
|
||||
@ -28,5 +26,3 @@ undercloud_hostname: '{{ groups.get("undercloud", []) | first | default("undercl
|
||||
undercloud_ssh_hostname: ''
|
||||
|
||||
overcloud_ssh_username: ''
|
||||
|
||||
ubuntu_interface_name: ''
|
||||
|
@ -62,8 +62,6 @@ def get_images_options():
|
||||
help="Default " + name + " username"),
|
||||
cfg.StrOpt('password',
|
||||
help="Default " + name + " password"),
|
||||
cfg.StrOpt('interface_name',
|
||||
help="Default " + name + " image interface name"),
|
||||
cfg.FloatOpt('connection_timeout',
|
||||
default=None,
|
||||
help=("Default " + name +
|
||||
|
@ -132,14 +132,14 @@ class UbuntuImageFixture(UbuntuMinimalImageFixture,
|
||||
|
||||
@staticmethod
|
||||
def _get_ethernet_device() -> str:
|
||||
ethernet_device = CONF.tobiko.ubuntu.interface_name
|
||||
if ethernet_device is None:
|
||||
from tobiko import tripleo
|
||||
if tripleo.has_overcloud(min_version='17.0'):
|
||||
ethernet_device = 'enp3s0'
|
||||
else:
|
||||
ethernet_device = 'ens3'
|
||||
return ethernet_device
|
||||
"""From OSP17 and above, Ubuntu stack should use a different interface name.
|
||||
This method returns the interface name, depending on the OSP version.
|
||||
"""
|
||||
from tobiko import tripleo
|
||||
if tripleo.has_overcloud(min_version='17.0'):
|
||||
return 'enp3s0'
|
||||
else:
|
||||
return 'ens3'
|
||||
|
||||
def _get_customized_suffix(self) -> str:
|
||||
return f'{super()._get_customized_suffix()}-{self.ethernet_device}'
|
||||
|
Loading…
Reference in New Issue
Block a user