]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | import logging |
2 | ||
3 | from .multisite import Zone | |
4 | ||
5 | ||
6 | log = logging.getLogger('rgw_multi.tests') | |
7 | ||
8 | ||
9 | class 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 | ||
29 | ||
30 | class AZoneConfig: | |
31 | """ archive zone configuration """ | |
32 | def __init__(self, cfg, section): | |
33 | pass | |
34 | ||
35 | ||
36 | def print_connection_info(conn): | |
37 | """print info of connection""" | |
38 | print("Host: " + conn.host+':'+str(conn.port)) | |
39 | print("AWS Secret Key: " + conn.aws_secret_access_key) | |
40 | print("AWS Access Key: " + conn.aws_access_key_id) |