Skip to content

Commit 0f21566

Browse files
committed
Adding support for version output that contains 'Server Version:'
1 parent f826b07 commit 0f21566

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

ansible/rebuild_module.digest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
79380cf9ababbd7680f5a271720f8883 -
1+
2d44f0cb1cab372ccfe30a3a72a8ca63 -

ansible/roles/openshift_client_python/library/openshift_client_python.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openshift/base_verbs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,10 @@ def get_server_version():
508508
for line in reversed(r.out().splitlines()):
509509
if line.startswith('openshift v'):
510510
return line.split()[1].strip().lstrip('v')
511+
elif line.startswith('Server Version: '):
512+
version_string = line.split()[2].strip().lstrip()
513+
if not version_string.startswith('version.Info{'):
514+
return version_string
511515

512516
# If not found, this is a 4.0 cluster where this output line was removed. The best
513517
# alternative is the version returned by the API.

0 commit comments

Comments
 (0)