]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-disk: remove unused methods
authorKefu Chai <kchai@redhat.com>
Thu, 11 May 2017 06:32:33 +0000 (14:32 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 12 May 2017 06:11:09 +0000 (14:11 +0800)
this is a follow-up of aac89719881c2788941b74d385d95860e520ea78, which
replaced partx with partprobe. and we don't need to detect the platform
to decide if we need to use partx or not anymore with that commit
because we are dropping the support of distros w/o partprobe.

Fixes: http://tracker.ceph.com/issues/19884
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph-disk/ceph_disk/main.py

index a98350f99a0ce1836c91500cb897972504dc9272..0869b3c07c91a8354aafd0342dedf47fcfd4b8f5 100755 (executable)
@@ -546,53 +546,6 @@ def command_check_call(arguments, exit=False):
         raise
 
 
-def platform_distro():
-    """
-    Returns a normalized, lower case string without any leading nor trailing
-    whitespace that represents the distribution name of the current machine.
-    """
-    distro = platform_information()[0] or ''
-    return distro.strip().lower()
-
-
-def platform_information():
-    if FREEBSD:
-        distro = platform.system()
-        release = platform.version().split()[1]
-        codename = platform.version().split()[3]
-        version = platform.version().split('-')[0][:-1]
-        major_version = version.split('.')[0]
-        major, minor = release.split('.')
-    else:
-        distro, release, codename = platform.linux_distribution()
-        # this could be an empty string in Debian
-        if not codename and 'debian' in distro.lower():
-            debian_codenames = {
-                '8': 'jessie',
-                '7': 'wheezy',
-                '6': 'squeeze',
-            }
-            major_version = release.split('.')[0]
-            codename = debian_codenames.get(major_version, '')
-
-            # In order to support newer jessie/sid,  wheezy/sid strings we test
-            # this if sid is buried in the minor, we should use sid anyway.
-            if not codename and '/' in release:
-                major, minor = release.split('/')
-                if minor == 'sid':
-                    codename = minor
-                else:
-                    codename = major
-        # this could be an empty string in Virtuozzo linux
-        if not codename and 'virtuozzo linux' in distro.lower():
-            codename = 'virtuozzo'
-
-    return (
-        str(distro).strip(),
-        str(release).strip(),
-        str(codename).strip()
-    )
-
 #
 # An alternative block_path implementation would be
 #