]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/rgw/rgw_multi/zone_az.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / rgw / rgw_multi / zone_az.py
CommitLineData
9f95a23c
TL
1import logging
2
3from .multisite import Zone
4
5
6log = logging.getLogger('rgw_multi.tests')
7
8
9class AZone(Zone): # pylint: disable=too-many-ancestors
10 """ archive zone class """
11 def __init__(self, name, zonegroup=None, cluster=None, data=None, zone_id=None, gateways=None):
12 super(AZone, self).__init__(name, zonegroup, cluster, data, zone_id, gateways)
13
14 def is_read_only(self):
15 return False
16
17 def tier_type(self):
18 return "archive"
19
20 def create(self, cluster, args=None, **kwargs):
21 if args is None:
22 args = ''
23 args += ['--tier-type', self.tier_type()]
24 return self.json_command(cluster, 'create', args)
25
26 def has_buckets(self):
27 return False
28
1e59de90
TL
29 def has_roles(self):
30 return True
9f95a23c
TL
31
32class AZoneConfig:
33 """ archive zone configuration """
34 def __init__(self, cfg, section):
35 pass
36
37
38def print_connection_info(conn):
39 """print info of connection"""
40 print("Host: " + conn.host+':'+str(conn.port))
41 print("AWS Secret Key: " + conn.aws_secret_access_key)
42 print("AWS Access Key: " + conn.aws_access_key_id)