]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc: get_pkg_type to infer the package time from the os_type 718/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 14 Nov 2015 15:09:59 +0000 (16:09 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 27 Nov 2015 21:28:47 +0000 (22:28 +0100)
Signed-off-by: Loic Dachary <loic@dachary.org>
teuthology/misc.py

index f4043c7680db47a80a119fb64c40d1fa9bacde29..8393a0467dd66316e6e01421136dc0a2c1a14742 100644 (file)
@@ -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):
     """