ipa-replica-manage list-ruvs: display FQDN in the output

The behavior of ipa-replica-manage list-ruv was modified with
the commit 544652a and now displays host short names instead
of FQDN:port.
Fix the regular expression in order to return the FQDN:port again.

Fixes: https://pagure.io/freeipa/issue/9598

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
This commit is contained in:
Florence Blanc-Renaud 2024-05-28 09:14:01 +02:00
parent 1223016ef2
commit 69c6a817ce

View File

@ -408,7 +408,7 @@ def get_ruv(realm, host, dirman_passwd, nolookup=False, ca=False,
# Attempt to extract ldap url from ruv (it's not always present)
netloc = "unknown host"
host_data = re.match(
r'(\{\w+\s+\d+\s+)ldap://(\w+)',
r'(\{\w+\s+\d+\s+)ldap://(.+:\d+)',
ruv
)
if host_data: