]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
remove another function in favor of new 'which' helper 140/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 25 Nov 2013 19:57:52 +0000 (13:57 -0600)
committerAlfredo Deza <alfredo.deza@inktank.com>
Mon, 25 Nov 2013 19:57:52 +0000 (13:57 -0600)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/install.py

index 1c296845d24b5378e3f1a4ac2c96070adb3cd873..bfd08fc31794032934381903793cbb48ec3ea67a 100644 (file)
@@ -11,18 +11,6 @@ from .lib.remoto import process
 LOG = logging.getLogger(__name__)
 
 
-def ceph_is_installed(conn):
-    """
-    Check if the ceph packages are installed by looking for the
-    presence of the ceph command.
-    """
-    stdout, stderr, return_code = process.check(
-        conn,
-        ['which', 'ceph'],
-    )
-    return not return_code
-
-
 def install(args):
     version = getattr(args, args.version_kind)
     version_str = args.version_kind
@@ -118,7 +106,8 @@ def purge_data(args):
     installed_hosts = []
     for hostname in args.host:
         distro = hosts.get(hostname, username=args.username)
-        if ceph_is_installed(distro.conn):
+        ceph_is_installed = distro.conn.remote_module.which('ceph')
+        if ceph_is_installed:
             installed_hosts.append(hostname)
         distro.conn.exit()