]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
support for distro Mint which is based on ubuntu 307/head
authorHong Zhiguo <zhiguohong@tencent.com>
Tue, 2 Jun 2015 08:43:15 +0000 (16:43 +0800)
committerHong Zhiguo <zhiguohong@tencent.com>
Tue, 2 Jun 2015 08:43:15 +0000 (16:43 +0800)
Signed-off-by: Hong Zhiguo <zhiguohong@tencent.com>
ceph_deploy/hosts/__init__.py
ceph_deploy/tests/unit/hosts/test_hosts.py

index 6762664f7962eeda7d0e5aea496ddec03591cf30..7699a1c277b70025217394a2cc8efb13acf1e8dd 100644 (file)
@@ -103,6 +103,8 @@ def _normalized_distro_name(distro):
         return 'suse'
     elif distro.startswith('centos'):
         return 'centos'
+    elif distro.startswith('linuxmint'):
+        return 'ubuntu'
     return distro
 
 
index 4229ec6581bcfbadea44d970a21671bc43207168..c9d9c63e48880a2b84280b3fca0cd32502b787bb 100644 (file)
@@ -19,6 +19,10 @@ class TestNormalized(object):
         result = hosts._normalized_distro_name('Ubuntu')
         assert result == 'ubuntu'
 
+    def test_get_mint(self):
+        result = hosts._normalized_distro_name('LinuxMint')
+        assert result == 'ubuntu'
+
     def test_get_suse(self):
         result = hosts._normalized_distro_name('SUSE LINUX')
         assert result == 'suse'
@@ -399,3 +403,7 @@ class TestGetDistro(object):
     def test_get_fallback(self):
         result = hosts._get_distro('Solaris', 'Debian')
         assert result.__name__.endswith('debian')
+
+    def test_get_mint(self):
+        result = hosts._get_distro('LinuxMint')
+        assert result.__name__.endswith('debian')