]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
thrashosds.py: fix line length
authorSamuel Just <sam.just@inktank.com>
Thu, 21 Mar 2013 21:10:13 +0000 (14:10 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 25 Mar 2013 22:39:11 +0000 (15:39 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
teuthology/task/thrashosds.py

index f8b74a900a58ca804a6c822e75f828d7ae07dd8c..9570078f4f696571378f4f9565c86946e2e39b8c 100644 (file)
@@ -95,20 +95,29 @@ def task(ctx, config):
                 host = t.split('@')[-1]
                 shortname = host.split('.')[0]
                 from ..orchestra import remote as oremote
-                console = oremote.RemoteConsole(name=host,
-                                           ipmiuser=ctx.teuthology_config['ipmi_user'],
-                                           ipmipass=ctx.teuthology_config['ipmi_password'],
-                                           ipmidomain=ctx.teuthology_config['ipmi_domain'])
-                cname = '{host}.{domain}'.format(host=shortname, domain=ctx.teuthology_config['ipmi_domain'])
+                console = oremote.RemoteConsole(
+                    name=host,
+                    ipmiuser=ctx.teuthology_config['ipmi_user'],
+                    ipmipass=ctx.teuthology_config['ipmi_password'],
+                    ipmidomain=ctx.teuthology_config['ipmi_domain'])
+                cname = '{host}.{domain}'.format(
+                    host=shortname,
+                    domain=ctx.teuthology_config['ipmi_domain'])
                 log.debug('checking console status of %s' % cname)
                 if not console.check_status():
-                    log.info('Failed to get console status for %s, disabling console...' % cname)
+                    log.info(
+                        'Failed to get console status for '
+                        '%s, disabling console...'
+                        % cname)
                     console=None
                 else:
                     # find the remote for this console and add it
-                    remotes = [r for r in ctx.cluster.remotes.keys() if r.name == t]
+                    remotes = [
+                        r for r in ctx.cluster.remotes.keys() if r.name == t]
                     if len(remotes) != 1:
-                        raise Exception('Too many (or too few) remotes found for target {t}'.format(t=t))
+                        raise Exception(
+                            'Too many (or too few) remotes '
+                            'found for target {t}'.format(t=t))
                     remotes[0].console = console
                     log.debug('console ready on %s' % cname)
 
@@ -116,7 +125,10 @@ def task(ctx, config):
             osds = ctx.cluster.only(teuthology.is_type('osd'))
             for remote, _ in osds.remotes.iteritems():
                 if not remote.console:
-                    raise Exception('IPMI console required for powercycling, but not available on osd role: {r}'.format(r=remote.name))
+                    raise Exception(
+                        'IPMI console required for powercycling, '
+                        'but not available on osd role: {r}'.format(
+                            r=remote.name))
 
     log.info('Beginning thrashosds...')
     first_mon = teuthology.get_first_mon(ctx, config)