aboutsummaryrefslogtreecommitdiffstats
path: root/rados
diff options
context:
space:
mode:
Diffstat (limited to 'rados')
-rw-r--r--rados/__init__.py4
-rw-r--r--rados/rgwa_client.py66
-rw-r--r--rados/rgwa_client_factory.py8
3 files changed, 55 insertions, 23 deletions
diff --git a/rados/__init__.py b/rados/__init__.py
index 30d7152..32b601a 100644
--- a/rados/__init__.py
+++ b/rados/__init__.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
diff --git a/rados/rgwa_client.py b/rados/rgwa_client.py
index 1f10a98..23715ec 100644
--- a/rados/rgwa_client.py
+++ b/rados/rgwa_client.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -94,12 +94,17 @@ class RGWAClient(object):
"""
valid_args = {
- 'quota_type': ['user', 'bucket'],
- 'key_type': ['s3', 'swift'],
- },
-
- def __init__(self, base_url, access_key=None, secret_key=None, verify='/opt/secrets/site-crt/site.crt',
- return_raw_response=False):
+ 'quota_type': ['user', 'bucket'],
+ 'key_type': ['s3', 'swift'],
+ },
+
+ def __init__(
+ self,
+ base_url,
+ access_key=None,
+ secret_key=None,
+ verify='/opt/secrets/site-crt/site.crt',
+ return_raw_response=False):
"""
base_url (string):
@@ -259,7 +264,13 @@ class RGWAClient(object):
# http://docs.ceph.com/docs/master/radosgw/adminops/
#
- def get_usage(self, uid=None, start=None, end=None, show_entries=False, show_summary=False):
+ def get_usage(
+ self,
+ uid=None,
+ start=None,
+ end=None,
+ show_entries=False,
+ show_summary=False):
"""Request bandwidth usage information.
Note: this feature is disabled by default, can be enabled by setting
@@ -353,8 +364,15 @@ class RGWAClient(object):
purge_data=purge_data,
)
- def create_subuser(self, uid, subuser=None, secret_key=None, access_key=None,
- key_type=None, access=None, generate_secret=False):
+ def create_subuser(
+ self,
+ uid,
+ subuser=None,
+ secret_key=None,
+ access_key=None,
+ key_type=None,
+ access=None,
+ generate_secret=False):
"""Create a new subuser.
(Primarily useful for clients using the Swift API). Note that in
@@ -374,8 +392,14 @@ class RGWAClient(object):
generate_secret=generate_secret,
)
- def modify_subuser(self, uid, subuser, secret=None, key_type='swift', access=None,
- generate_secret=False):
+ def modify_subuser(
+ self,
+ uid,
+ subuser,
+ secret=None,
+ key_type='swift',
+ access=None,
+ generate_secret=False):
"""Modify an existing subuser."""
return self._request(
'post', 'user', 'subuser',
@@ -569,7 +593,12 @@ class RGWAClient(object):
def get_user_quota(self, uid):
return self.get_quota(uid=uid, quota_type='user')
- def set_user_quota(self, uid, max_size_kb=None, max_objects=None, enabled=None):
+ def set_user_quota(
+ self,
+ uid,
+ max_size_kb=None,
+ max_objects=None,
+ enabled=None):
return self.set_quota(
uid=uid,
quota_type='user',
@@ -581,8 +610,13 @@ class RGWAClient(object):
def get_user_bucket_quota(self, uid):
return self.get_quota(uid=uid, quota_type='bucket')
- def set_user_bucket_quota(self, uid, bucket, max_size_kb=None, max_objects=None,
- enabled=None):
+ def set_user_bucket_quota(
+ self,
+ uid,
+ bucket,
+ max_size_kb=None,
+ max_objects=None,
+ enabled=None):
return self.set_quota(
uid=uid,
bucket=bucket,
diff --git a/rados/rgwa_client_factory.py b/rados/rgwa_client_factory.py
index b53aa4d..6df2366 100644
--- a/rados/rgwa_client_factory.py
+++ b/rados/rgwa_client_factory.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -63,7 +63,6 @@ class RGWAClientFactory(object):
calling_format=OrdinaryCallingFormat(),
is_secure=True)
cls.__standard_client.num_retries = 0
-
@classmethod
def __set_admin_client(cls):
@@ -78,8 +77,7 @@ class RGWAClientFactory(object):
if cls.__standard_client is None:
cls.__set_standard_client()
return cls.__standard_client
-
-
+
@classmethod
def admin(cls):
if cls.__admin_client is None: