]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge branch 'wip-yuval-pubsub_teuthology' of https://github.com/ceph/ceph-ci into...
authorYuval Lifshitz <yuvalif@yahoo.com>
Sun, 14 Apr 2019 15:48:24 +0000 (18:48 +0300)
committerYuval Lifshitz <yuvalif@yahoo.com>
Mon, 29 Apr 2019 06:42:32 +0000 (09:42 +0300)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
qa/suites/rgw/multisite/realms/three-zone.yaml
qa/tasks/rgw_multisite.py
src/test/rgw/rgw_multi/tests_ps.py
src/test/rgw/rgw_multi/zone_ps.py

index a8a7ca1d138b47593acb91ad8aa39e6056d6b6f6..018ed55ff3c21236894113f3e775691724cb08a4 100644 (file)
@@ -18,3 +18,4 @@ overrides:
             endpoints: [c2.client.0]
           - name: test-zone3
             endpoints: [c1.client.1]
+            is_pubsub: true
index c39cb935fb3ebb8cbc81bff1c92cff22e814c5e1..b97cb8e6e91323e9ef5a3b4271cf8c6921e07440 100644 (file)
@@ -11,6 +11,7 @@ from util.rgw import rgwadmin, wait_for_radosgw
 from util.rados import create_ec_pool, create_replicated_pool
 from rgw_multi import multisite
 from rgw_multi.zone_rados import RadosZone as RadosZone
+from rgw_multi.zone_ps import PSZone as PSZone
 
 from teuthology.orchestra import run
 from teuthology import misc
@@ -33,6 +34,7 @@ class RGWMultisite(Task):
 
     * 'is_master' is passed on the command line as --master
     * 'is_default' is passed on the command line as --default
+    * 'is_pubsub' is used to create a zone with tier-type=pubsub
     * 'endpoints' given as client names are replaced with actual endpoints
 
             zonegroups:
@@ -78,6 +80,9 @@ class RGWMultisite(Task):
                   - name: test-zone2
                     is_default: true
                     endpoints: [c2.client.0]
+                  - name: test-zone3
+                    is_pubsub: true
+                    endpoints: [c1.client.1]
 
     """
     def __init__(self, ctx, config):
@@ -369,7 +374,10 @@ def create_zonegroup(cluster, gateways, period, config):
 def create_zone(ctx, cluster, gateways, creds, zonegroup, config):
     """ create a zone with the given configuration """
     zone = multisite.Zone(config['name'], zonegroup, cluster)
-    zone = RadosZone(config['name'], zonegroup, cluster)
+    if config.pop('is_master', False):
+        zone = PSZone(config['name'], zonegroup, cluster)
+    else:
+        zone = RadosZone(config['name'], zonegroup, cluster)
 
     # collect Gateways for the zone's endpoints
     endpoints = config.get('endpoints')
index 8846f5a8008807a07382c86b5e3a207589fd5dc9..2304395a3f856347844d3e98767c8c1bdc5531dd 100644 (file)
@@ -129,7 +129,6 @@ NOTIFICATION_SUFFIX = "_notif"
 # pubsub tests
 ##############
 
-
 def test_ps_info():
     """ log information for manual testing """
     return SkipTest("only used in manual testing")
index ca97d4c57b6c6d7f07e811ce730ef8aaa2df75aa..006f4fc7baebdb3c0164c47b54c418b8c9930dd7 100644 (file)
@@ -74,6 +74,13 @@ def make_request(conn, method, resource, parameters=None, sign_parameters=False,
     return data, status
 
 
+def print_connection_info(conn):
+    """print info of connection"""
+    print("Host: " + conn.host+':'+str(conn.port))
+    print("AWS Secret Key: " + conn.aws_secret_access_key)
+    print("AWS Access Key: " + conn.aws_access_key_id)
+
+
 class PSTopic:
     """class to set/get/delete a topic
     PUT /topics/<topic name>[?push-endpoint=<endpoint>&[<arg1>=<value1>...]]