X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=apex.git;a=blobdiff_plain;f=apex%2Fcommon%2Futils.py;fp=apex%2Fcommon%2Futils.py;h=72a66d10f7445b2d3ec9ebdb7b51971a8d478332;hp=aae821efb9dd3d5cf34283ab7b901dde3bc9d468;hb=4cbad53ea9293fd51c5ffc368ca01787549472f7;hpb=e1c6f92cdac07949b00c758bab5c79ff20639dd9 diff --git a/apex/common/utils.py b/apex/common/utils.py index aae821ef..72a66d10 100644 --- a/apex/common/utils.py +++ b/apex/common/utils.py @@ -310,3 +310,15 @@ def fetch_properties(url): logging.warning('Unable to fetch properties for: {}'.format(url)) raise exc.FetchException('Unable determine properties location: ' '{}'.format(url)) + + +def find_container_client(os_version): + """ + Determines whether to use docker or podman client + :param os_version: openstack version + :return: client name as string + """ + if os_version == 'rocky' or os_version == 'queens': + return 'docker' + else: + return 'podman'