summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hope-Morley <edward.hope-morley@canonical.com>2017-03-29 11:47:58 +0100
committerEdward Hope-Morley <edward.hope-morley@canonical.com>2017-03-29 11:47:58 +0100
commitb483fa2668e5190ffe803e7d06ab781510c9b317 (patch)
treee6f7fdd7fd1d8d6c2b1612bce29524499f852ca8
parent80c8256fb632e5f783b32ef662efeeffa7c51a53 (diff)
Fix pylint errors
Notes
Notes (review): Code-Review+2: Billy Olsen <billy.olsen@gmail.com> Workflow+1: Billy Olsen <billy.olsen@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 06 Apr 2017 16:00:07 +0000 Reviewed-on: https://review.openstack.org/451325 Project: openstack/charms.ceph Branch: refs/heads/master
-rw-r--r--ceph/__init__.py2
-rw-r--r--ceph/ceph_broker.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/ceph/__init__.py b/ceph/__init__.py
index 7acbc52..c30bfd5 100644
--- a/ceph/__init__.py
+++ b/ceph/__init__.py
@@ -1338,7 +1338,7 @@ def osdize_dir(path, encrypt=False):
1338 if cmp_pkgrevno('ceph', "0.56.6") < 0: 1338 if cmp_pkgrevno('ceph', "0.56.6") < 0:
1339 log('Unable to use directories for OSDs with ceph < 0.56.6', 1339 log('Unable to use directories for OSDs with ceph < 0.56.6',
1340 level=ERROR) 1340 level=ERROR)
1341 raise 1341 return
1342 1342
1343 mkdir(path, owner=ceph_user(), group=ceph_user(), perms=0o755) 1343 mkdir(path, owner=ceph_user(), group=ceph_user(), perms=0o755)
1344 chownr('/var/lib/ceph', ceph_user(), ceph_user()) 1344 chownr('/var/lib/ceph', ceph_user(), ceph_user())
diff --git a/ceph/ceph_broker.py b/ceph/ceph_broker.py
index f1e59da..1f6db8c 100644
--- a/ceph/ceph_broker.py
+++ b/ceph/ceph_broker.py
@@ -168,6 +168,8 @@ def handle_add_permissions_to_key(request, service):
168 A group can optionally have a namespace defined that will be used to 168 A group can optionally have a namespace defined that will be used to
169 further restrict pool access. 169 further restrict pool access.
170 """ 170 """
171 resp = {'exit-code': 0}
172
171 service_name = request.get('name') 173 service_name = request.get('name')
172 group_name = request.get('group') 174 group_name = request.get('group')
173 group_namespace = request.get('group-namespace') 175 group_namespace = request.get('group-namespace')
@@ -190,6 +192,8 @@ def handle_add_permissions_to_key(request, service):
190 group_namespace) 192 group_namespace)
191 update_service_permissions(service_name, service_obj, group_namespace) 193 update_service_permissions(service_name, service_obj, group_namespace)
192 194
195 return resp
196
193 197
194def update_service_permissions(service, service_obj=None, namespace=None): 198def update_service_permissions(service, service_obj=None, namespace=None):
195 """Update the key permissions for the named client in Ceph""" 199 """Update the key permissions for the named client in Ceph"""