From 7149aafa0d99b46fe4ed615914ada77d1a7ee971 Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Thu, 26 May 2016 11:54:34 -0400 Subject: [PATCH] cleanup --- README.ex | 65 ----------------------------------------- lib/charms/ceph_base.py | 10 ++++--- 2 files changed, 6 insertions(+), 69 deletions(-) delete mode 100644 README.ex diff --git a/README.ex b/README.ex deleted file mode 100644 index b6816b2..0000000 --- a/README.ex +++ /dev/null @@ -1,65 +0,0 @@ -# Overview - -Describe the intended usage of this charm and anything unique about how this -charm relates to others here. - -This README will be displayed in the Charm Store, it should be either Markdown -or RST. Ideal READMEs include instructions on how to use the charm, expected -usage, and charm features that your audience might be interested in. For an -example of a well written README check out Hadoop: -http://jujucharms.com/charms/precise/hadoop - -Use this as a Markdown reference if you need help with the formatting of this -README: http://askubuntu.com/editing-help - -This charm provides [service][]. Add a description here of what the service -itself actually does. - -Also remember to check the [icon guidelines][] so that your charm looks good -in the Juju GUI. - -# Usage - -Step by step instructions on using the charm: - -juju deploy servicename - -and so on. If you're providing a web service or something that the end user -needs to go to, tell them here, especially if you're deploying a service that -might listen to a non-default port. - -You can then browse to http://ip-address to configure the service. - -## Scale out Usage - -If the charm has any recommendations for running at scale, outline them in -examples here. For example if you have a memcached relation that improves -performance, mention it here. - -## Known Limitations and Issues - -This not only helps users but gives people a place to start if they want to help -you add features to your charm. - -# Configuration - -The configuration options will be listed on the charm store, however If you're -making assumptions or opinionated decisions in the charm (like setting a default -administrator password), you should detail that here so the user knows how to -change it immediately, etc. - -# Contact Information - -Though this will be listed in the charm store itself don't assume a user will -know that, so include that information here: - -## Upstream Project Name - - - Upstream website - - Upstream bug tracker - - Upstream mailing list or contact information - - Feel free to add things if it's useful for users - - -[service]: http://example.com -[icon guidelines]: https://jujucharms.com/docs/stable/authors-charm-icon diff --git a/lib/charms/ceph_base.py b/lib/charms/ceph_base.py index 847423a..e4ce661 100644 --- a/lib/charms/ceph_base.py +++ b/lib/charms/ceph_base.py @@ -535,7 +535,8 @@ def replace_osd(dead_osd_number, def is_osd_disk(dev): try: - info = subprocess.check_output(['sgdisk', '-i', '1', dev]).decode('utf-8') + info = subprocess.check_output(['sgdisk', '-i', '1', dev]) \ + .decode('utf-8') info = info.split("\n") # IGNORE:E1103 for line in info: for ptype in CEPH_PARTITIONS: @@ -735,12 +736,13 @@ def get_named_key(name, caps=None): 'auth', 'get-or-create', 'client.{}'.format(name), ] # Add capabilities - for subsystem, subcaps in caps.iteritems(): + for subsystem, subcaps in caps.items(): cmd.extend([ subsystem, '; '.join(subcaps), ]) - return parse_key(subprocess.check_output(cmd).decode('utf-8').strip()) # IGNORE:E1103 + return parse_key(subprocess.check_output(cmd) + .decode('utf-8').strip()) # IGNORE:E1103 def upgrade_key_caps(key, caps): @@ -751,7 +753,7 @@ def upgrade_key_caps(key, caps): cmd = [ "sudo", "-u", ceph_user(), 'ceph', 'auth', 'caps', key ] - for subsystem, subcaps in caps.iteritems(): + for subsystem, subcaps in caps.items(): cmd.extend([subsystem, '; '.join(subcaps)]) subprocess.check_call(cmd)