blob: 400830b038a6441825dd3e36ee6a15bbf1218d1d [file] [log] [blame]
rootd8ab63c2017-07-25 07:19:31 +00001
2import base_section
3
4from runtest import conditions
5
6class Identity(base_section.BaseSection):
7
8 name = "identity"
9 options = [
10 'admin_domain_scope',
11 'admin_role',
12 'auth_version',
13 'ca_certificates_file',
14 'catalog_type',
15 'default_domain_id',
16 'disable_ssl_certificate_validation',
17 'region',
18 'uri',
19 'uri_v3',
20 'user_lockout_duration',
21 'user_lockout_failure_attempts',
22 'user_unique_last_password_count',
23 'v2_admin_endpoint_type',
24 'v2_public_endpoint_type',
25 'v3_endpoint_type',
26 ]
27
28
29 @property
30 def admin_domain_scope(self):
31 pass
32
33 @property
34 def admin_role(self):
35 pass
36
37 @property
38 def auth_version(self):
39 return 'v3'
40
41 @property
42 def ca_certificates_file(self):
43 c = conditions.BaseRule('keystone.server.enabled', 'eq', True)
44 return self.get_item_when_condition_match(
45 'keystone.server.cacert', c)
46
47 @property
48 def catalog_type(self):
49 pass
50
51 @property
52 def default_domain_id(self):
53 pass
54
55 @property
56 def disable_ssl_certificate_validation(self):
57 pass
58
59 @property
60 def region(self):
61 c = conditions.BaseRule('keystone.server.enabled', 'eq', True)
62 return self.get_item_when_condition_match(
63 'keystone.server.region', c)
64
65 @property
66 def uri(self):
67 c = conditions.BaseRule('keystone.server.enabled', 'eq', True)
Vasyl Saienko07a22c12018-01-25 15:53:19 +020068 protocol = self.get_item_when_condition_match(
69 'keystone.server.bind.private_protocol', c) or 'http'
rootd8ab63c2017-07-25 07:19:31 +000070 vip = self.get_item_when_condition_match(
71 '_param.cluster_vip_address', c)
72 port = self.get_item_when_condition_match(
73 'keystone.server.bind.private_port', c)
Vasyl Saienko07a22c12018-01-25 15:53:19 +020074 return "{}://{}:{}/v2.0".format(protocol, vip, port)
rootd8ab63c2017-07-25 07:19:31 +000075
76 @property
77 def uri_v3(self):
78 c = conditions.BaseRule('keystone.server.enabled', 'eq', True)
Vasyl Saienko07a22c12018-01-25 15:53:19 +020079 protocol = self.get_item_when_condition_match(
80 'keystone.server.bind.private_protocol', c) or 'http'
rootd8ab63c2017-07-25 07:19:31 +000081 vip = self.get_item_when_condition_match(
82 '_param.cluster_vip_address', c)
83 port = self.get_item_when_condition_match(
84 'keystone.server.bind.private_port', c)
Vasyl Saienko07a22c12018-01-25 15:53:19 +020085 return "{}://{}:{}/v3".format(protocol, vip, port)
rootd8ab63c2017-07-25 07:19:31 +000086
87 @property
88 def user_lockout_duration(self):
89 pass
90
91 @property
92 def user_lockout_failure_attempts(self):
93 pass
94
95 @property
96 def user_unique_last_password_count(self):
97 pass
98
99 @property
100 def v2_admin_endpoint_type(self):
101 pass
102
103 @property
104 def v2_public_endpoint_type(self):
105 pass
106
107 @property
108 def v3_endpoint_type(self):
109 pass