import json
-from .conn import get_gateway_connection, get_gateway_secure_connection
+from .conn import get_gateway_connection, get_gateway_iam_connection, get_gateway_secure_connection
class Cluster:
""" interface to run commands against a distinct ceph cluster """
self.connection = None
self.secure_connection = None
self.ssl_port = ssl_port
+ self.iam_connection = None
@abstractmethod
def start(self, args = []):
def has_buckets(self):
return True
+ def has_roles(self):
+ return True
+
def get_conn(self, credentials):
return ZoneConn(self, credentials) # not implemented, but can be used
if self.zone.gateways is not None:
self.conn = get_gateway_connection(self.zone.gateways[0], self.credentials)
self.secure_conn = get_gateway_secure_connection(self.zone.gateways[0], self.credentials)
+
+ self.iam_conn = get_gateway_iam_connection(self.zone.gateways[0], self.credentials)
+
# create connections for the rest of the gateways (if exist)
for gw in list(self.zone.gateways):
get_gateway_connection(gw, self.credentials)
get_gateway_secure_connection(gw, self.credentials)
+ get_gateway_iam_connection(gw, self.credentials)
+
def get_connection(self):
return self.conn
+ def get_iam_connection(self):
+ return self.iam_conn
+
def get_bucket(self, bucket_name, credentials):
raise NotImplementedError