]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/rgw/rgw_multi/multisite.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / rgw / rgw_multi / multisite.py
index dfcde085ed0a0636943f9b93f9a35324ccf7b810..5d4dcd1aa7ae1480c038f2d33088b027ede9aa93 100644 (file)
@@ -3,7 +3,7 @@ from io import StringIO
 
 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 """
@@ -26,6 +26,7 @@ class Gateway:
         self.connection = None
         self.secure_connection = None
         self.ssl_port = ssl_port
+        self.iam_connection = None
 
     @abstractmethod
     def start(self, args = []):
@@ -168,6 +169,9 @@ class Zone(SystemObject, SystemObject.CreateDelete, SystemObject.GetSet, SystemO
     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
 
@@ -184,15 +188,23 @@ class ZoneConn(object):
         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