]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
use the new args.username to get the connection
authorAlfredo Deza <alfredo.deza@inktank.com>
Thu, 17 Oct 2013 18:47:50 +0000 (14:47 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Thu, 17 Oct 2013 18:47:50 +0000 (14:47 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/admin.py
ceph_deploy/config.py
ceph_deploy/gatherkeys.py
ceph_deploy/install.py
ceph_deploy/mds.py
ceph_deploy/osd.py

index 36d2a4ddd036027c15ae409d6418b0228988d3ef..bc9a6fc1d82a8c66938939d3f9f0db86784ed525 100644 (file)
@@ -26,7 +26,7 @@ def admin(args):
     for hostname in args.client:
         LOG.debug('Pushing admin keys and conf to %s', hostname)
         try:
-            distro = hosts.get(hostname)
+            distro = hosts.get(hostname, username=args.username)
             hostname = distro.conn.remote_module.shortname()
 
             distro.conn.remote_module.write_conf(
index 697891cb086e6d783884ef9a44b10e856914c574..d34db672977513e1520403b36249e44aeb9d396f 100644 (file)
@@ -19,7 +19,7 @@ def config_push(args):
     for hostname in args.client:
         LOG.debug('Pushing config to %s', hostname)
         try:
-            distro = hosts.get(hostname)
+            distro = hosts.get(hostname, username=args.username)
 
             distro.conn.remote_module.write_conf(
                 args.cluster,
@@ -46,7 +46,7 @@ def config_pull(args):
     for hostname in args.client:
         try:
             LOG.debug('Checking %s for %s', hostname, frompath)
-            distro = hosts.get(hostname)
+            distro = hosts.get(hostname, username=args.username)
             conf_file_contents = distro.conn.remote_module.get_file(frompath)
 
             if conf_file_contents is not None:
index 9710f3a9c054900ee619de03cbbe10f259854474..eccbf7f386a7fb6585eaaa989f99dfa691b23b9d 100644 (file)
@@ -15,7 +15,7 @@ def fetch_file(args, frompath, topath, _hosts):
     else:
         for hostname in _hosts:
             LOG.debug('Checking %s for %s', hostname, frompath)
-            distro = hosts.get(hostname)
+            distro = hosts.get(hostname, username=args.username)
             key = distro.conn.remote_module.get_file(
                 frompath.format(hostname=hostname)
             )
index 14d095d3ebe24cc14a03156bf2f5ecf1b2be3957..4818188aa02d39afee9361a6ad552c48ff5e4170 100644 (file)
@@ -58,7 +58,7 @@ def uninstall(args):
         LOG.debug('Detecting platform for host %s ...', hostname)
 
         # TODO username
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename)
         rlogger = logging.getLogger(hostname)
         rlogger.info('uninstalling ceph on %s' % hostname)
@@ -77,7 +77,7 @@ def purge(args):
         LOG.debug('Detecting platform for host %s ...', hostname)
 
         # TODO username
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename)
         rlogger = logging.getLogger(hostname)
         rlogger.info('purging host ... %s' % hostname)
@@ -94,7 +94,7 @@ def purge_data(args):
 
     installed_hosts = []
     for hostname in args.host:
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         if ceph_is_installed(distro.conn):
             installed_hosts.append(hostname)
         distro.conn.exit()
@@ -107,7 +107,7 @@ def purge_data(args):
 
     for hostname in args.host:
         # TODO username
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename)
         rlogger = logging.getLogger(hostname)
         rlogger.info('purging data on %s' % hostname)
index e42872094de15ff62b47ca29d64bc40947e43126..9d2e22854e1a8fc83704f4597e567ae5458e3958 100644 (file)
@@ -126,7 +126,7 @@ def mds_create(args):
     for hostname, name in args.mds:
         try:
             # TODO username
-            distro = hosts.get(hostname)
+            distro = hosts.get(hostname, username=args.username)
             rlogger = distro.conn.logger
             LOG.info(
                 'Distro info: %s %s %s',
index 9b939ce9dbc7d1cfc41b71a72f6d9a2f06b719ad..88b794bfe01192418d9ba89463d835d79e278db9 100644 (file)
@@ -123,7 +123,7 @@ def prepare(args, cfg, activate_prepared_disk):
                 raise exc.NeedDiskError(hostname)
 
             # TODO username
-            distro = hosts.get(hostname)
+            distro = hosts.get(hostname, username=args.username)
             LOG.info(
                 'Distro info: %s %s %s',
                 distro.name,
@@ -183,7 +183,7 @@ def activate(args, cfg):
     for hostname, disk, journal in args.disk:
 
         # TODO username
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         LOG.info(
             'Distro info: %s %s %s',
             distro.name,
@@ -215,7 +215,7 @@ def disk_zap(args):
         if not disk or not hostname:
             raise RuntimeError('zap command needs both HOSTNAME and DISK but got "%s %s"' % (hostname, disk))
         LOG.debug('zapping %s on %s', disk, hostname)
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         LOG.info(
             'Distro info: %s %s %s',
             distro.name,
@@ -243,7 +243,7 @@ def disk_zap(args):
 
 def disk_list(args, cfg):
     for hostname, disk, journal in args.disk:
-        distro = hosts.get(hostname)
+        distro = hosts.get(hostname, username=args.username)
         LOG.info(
             'Distro info: %s %s %s',
             distro.name,