diff --git a/infrared_plugin/plugin.spec b/infrared_plugin/plugin.spec index 55d9cb327..c8dfed24f 100644 --- a/infrared_plugin/plugin.spec +++ b/infrared_plugin/plugin.spec @@ -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: diff --git a/roles/tobiko-configure/defaults/main.yaml b/roles/tobiko-configure/defaults/main.yaml index ecf18ec9b..e3ed2cee1 100644 --- a/roles/tobiko-configure/defaults/main.yaml +++ b/roles/tobiko-configure/defaults/main.yaml @@ -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: '' diff --git a/tobiko/openstack/glance/config.py b/tobiko/openstack/glance/config.py index a96eef3f8..d30a2aa50 100644 --- a/tobiko/openstack/glance/config.py +++ b/tobiko/openstack/glance/config.py @@ -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 + diff --git a/tobiko/openstack/stacks/_ubuntu.py b/tobiko/openstack/stacks/_ubuntu.py index a2e01e964..177eb6e14 100644 --- a/tobiko/openstack/stacks/_ubuntu.py +++ b/tobiko/openstack/stacks/_ubuntu.py @@ -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}'