From 6d77b4abba09ee871142108d26e1df48bcd4aba8 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 14 Nov 2015 16:09:59 +0100 Subject: [PATCH] misc: get_pkg_type to infer the package time from the os_type Signed-off-by: Loic Dachary --- teuthology/misc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/misc.py b/teuthology/misc.py index f4043c7680..8393a0467d 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -1218,6 +1218,11 @@ def get_system_type(remote, distro=False, version=False): return "rpm" return system_value +def get_pkg_type(os_type): + if os_type in ('centos', 'fedora', 'opensuse', 'rhel', 'sles'): + return 'rpm' + else: + return 'deb' def get_distro(ctx): """ -- 2.39.5