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
* '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:
- 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):
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')
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>...]]