Browse Source

Merge "Remove duplicated get_osp_version method"

changes/39/774639/1
Zuul 6 months ago
committed by Gerrit Code Review
parent
commit
8a6752d621
  1. 12
      tobiko/openstack/tests/_neutron.py
  2. 1
      tobiko/openstack/topology/__init__.py

12
tobiko/openstack/tests/_neutron.py

@ -10,24 +10,16 @@ from tobiko.openstack import neutron
from tobiko.openstack import topology
from tobiko.shell import sh
from tobiko.tripleo import containers
from tobiko.tripleo import has_undercloud
from tobiko.tripleo import pacemaker
LOG = log.getLogger(__name__)
def get_osp_version():
if not has_undercloud():
return None
from tobiko.tripleo import undercloud_ssh_client
try:
result = sh.execute("awk '{print $6}' /etc/rhosp-release",
ssh_client=undercloud_ssh_client())
except (sh.ShellCommandFailed, sh.ShellTimeoutExpired):
LOG.debug("File /etc/rhosp-release not found")
return topology.get_openstack_version()
except Exception:
return None
else:
return result.stdout.splitlines()[0]
def is_ovn_configured():

1
tobiko/openstack/topology/__init__.py

@ -27,6 +27,7 @@ get_agent_container_name = _topology.get_agent_container_name
get_log_file_digger = _topology.get_log_file_digger
get_openstack_topology = _topology.get_openstack_topology
get_openstack_node = _topology.get_openstack_node
get_openstack_version = _topology.get_openstack_version
skip_unless_osp_version = _topology.skip_unless_osp_version
check_systemd_monitors_agent = _topology.check_systemd_monitors_agent
find_openstack_node = _topology.find_openstack_node

Loading…
Cancel
Save