]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-19301] add Virtuozzo Linux support
authorAndrey1994 <a1994ndrey@gmail.com>
Wed, 22 Mar 2017 18:34:45 +0000 (21:34 +0300)
committerAndrey1994 <a1994ndrey@gmail.com>
Wed, 22 Mar 2017 18:34:45 +0000 (21:34 +0300)
Signed-off-by: Andrey1994 <a1994ndrey@gmail.com>
ceph_deploy/hosts/__init__.py
ceph_deploy/hosts/centos/install.py
ceph_deploy/hosts/remotes.py

index f5d8541e5ec7417b8fbabc500c5f1cffd656a6dc..a96e61466c9b720d3a3f5c585ef47f1056615ea0 100644 (file)
@@ -66,9 +66,9 @@ def get(hostname,
     module.normalized_name = _normalized_distro_name(distro_name)
     module.normalized_release = _normalized_release(release)
     module.distro = module.normalized_name
-    module.is_el = module.normalized_name in ['redhat', 'centos', 'fedora', 'scientific', 'oracle']
+    module.is_el = module.normalized_name in ['redhat', 'centos', 'fedora', 'scientific', 'oracle', 'virtuozzo']
     module.is_rpm = module.normalized_name in ['redhat', 'centos',
-                                               'fedora', 'scientific', 'suse', 'oracle']
+                                               'fedora', 'scientific', 'suse', 'oracle', 'virtuozzo']
     module.is_deb = not module.is_rpm
     module.release = release
     module.codename = codename
@@ -97,6 +97,7 @@ def _get_distro(distro, fallback=None, use_rhceph=False):
         'redhat': centos,
         'fedora': fedora,
         'suse': suse,
+        'virtuozzo' : centos
         }
 
     if distro == 'redhat' and use_rhceph:
@@ -119,6 +120,8 @@ def _normalized_distro_name(distro):
         return 'centos'
     elif distro.startswith('linuxmint'):
         return 'ubuntu'
+    elif distro.startswith('virtuozzo'):
+        return 'virtuozzo'
     return distro
 
 
index c95d746faf20ecee4c2f23fba2619f923c3ebd8b..49e9f8ab15831b6c2b4d658b4717c2727316e128 100644 (file)
@@ -11,7 +11,7 @@ NON_SPLIT_PACKAGES = ['ceph-osd', 'ceph-mon', 'ceph-mds']
 
 
 def rpm_dist(distro):
-    if distro.normalized_name in ['redhat', 'centos', 'scientific', 'oracle'] and distro.normalized_release.int_major >= 6:
+    if distro.normalized_name in ['redhat', 'centos', 'scientific', 'oracle', 'virtuozzo'] and distro.normalized_release.int_major >= 6:
         return 'el' + distro.normalized_release.major
     return 'el6'
 
@@ -35,7 +35,7 @@ def repository_url_part(distro):
     if distro.normalized_release.int_major >= 6:
         if distro.normalized_name == 'redhat':
             return 'rhel' + distro.normalized_release.major
-        if distro.normalized_name in ['centos', 'scientific', 'oracle']:
+        if distro.normalized_name in ['centos', 'scientific', 'oracle', 'virtuozzo']:
             return 'el' + distro.normalized_release.major
 
     return 'el6'
index d0b52f689acc634afbfce03596e9003735c1e3a0..2f3e4c893bc29c6764d904c098be6fa6b2a64cd2 100644 (file)
@@ -33,6 +33,8 @@ def platform_information(_linux_distribution=None):
                 codename = major
     if not codename and 'oracle' in distro.lower(): # this could be an empty string in Oracle linux
         codename = 'oracle'
+    if not codename and 'virtuozzo linux' in distro.lower(): # this could be an empty string in Virtuozzo linux
+        codename = 'virtuozzo'
 
     return (
         str(distro).rstrip(),