aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/compass_conf/os_metadata/general.conf
blob: e6e6431dcea6192214526d6cedd645a0f204f9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
OS = 'general'
METADATA = {
    'general': {
        '_self': {
            'required_in_whole_config': True
        },
        'language': {
            '_self': {
                'field': 'general',
                'is_required': True,
                'default_value': 'EN',
                'options': ['EN', 'CN'],
                'mapping_to': 'language'
            }
        },
        'timezone': {
            '_self': {
                'field': 'general',
                'is_required': True,
                'default_value': 'UTC',
                'options': [
                    'America/New_York', 'America/Chicago',
                    'America/Los_Angeles', 'Asia/Shanghai',
                    'Asia/Tokyo', 'Europe/Paris',
                    'Europe/London', 'Europe/Moscow',
                    'Europe/Rome', 'Europe/Madrid',
                    'Europe/Berlin', 'UTC'
                ],
                'mapping_to': 'timezone'
            }
        },
        'http_proxy': {
            '_self': {
                'field': 'url',
                'default_callback': default_proxy,
                'options_callback': proxy_options,
                'mapping_to': 'http_proxy'
            }
        },
        'https_proxy': {
            '_self': {
                'field': 'url',
                'default_callback': default_proxy,
                'options_callback': proxy_options,
                'mapping_to': 'https_proxy'
            }
        },
        'no_proxy': {
            '_self': {
                'field': 'general_list',
		'default_callback': default_noproxy,
		'options_callback': noproxy_options,
                'autofill_callback': autofill_no_proxy,
                'mapping_to': 'no_proxy'
            }
        },
        'ntp_server': {
            '_self': {
                'is_required': True,
                'field': 'string',
		'default_callback': default_ntp_server,
                'options_callback': ntp_server_options,
                'mapping_to': 'ntp_server'
            }
        },
        'dns_servers': {
            '_self': {
                'is_required': True,
                'field': 'ip_list',
		'default_callback': default_dns_servers,
                'options_callback': dns_servers_options,
                'mapping_to': 'nameservers'
            }
        },
        'domain': {
            '_self': {
                'field': 'domain',
                'is_required' : True,
		'default_callback': default_domain,
                'options_callback': domain_options,
            }
        },
        'search_path': {
            '_self': {
                'field': 'general_list',
                'default_callback': default_search_path,
                'options_callback': search_path_options,
                'mapping_to': 'search_path'
            }
        },
        'default_gateway': {
            '_self': {
                'is_required': True,
                'field': 'ip',
                'default_callback': default_gateway,
                'mapping_to': 'gateway'
            }
        },
        'local_repo': {
            '_self': {
                'field': 'url',
                'default_callback': default_localrepo,
                'mapping_to': 'local_repo'
            }
        },
        'repo_name': {
            '_self': {
                'field': 'string',
                'mapping_to': 'repo_name'
            }
        },
        'deploy_type': {
            '_self': {
                'field': 'general',
                'is_required': True,
                'default_value': 'baremetal',
                'options': [
                    'baremetal', 'virtual'
                 ],
                'mapping_to': 'deploy_type'
            }
        },
    },
    'server_credentials': {
        '_self': {
            'required_in_whole_config': True,
            'mapping_to': 'server_credentials'
        },
        'username': {
            '_self': {
                'is_required': True,
		'default_value': 'root',
                'field': 'username',
                'mapping_to': 'username'
            }
        },
        'password': {
            '_self': {
                'is_required': True,
		'default_value': 'root',
                'field': 'password',
                'mapping_to': 'password'
            }
        }
    },
    'partition': {
        '_self': {
            'required_in_whole_config': True,
            'options': ['/boot', 'swap', '/var', '/home'],
            'mapping_to': 'partition'
        },
        '$partition': {
            '_self': {
                'validator': is_valid_partition,
		'mapping_to': '$partition'
            },
            'max_size': {
                '_self': {
                    'field': 'size',
                    'mapping_to': 'max_vol_size'
                },
            },
            'percentage': {
                '_self': {
                    'field': 'percentage',
                    'default_value': 10,
                    'mapping_to': 'vol_percentage'
                }
            },
            'size': {
                '_self': {
                    'field': 'size',
		    'default_value': '1G',
                    'mapping_to': 'vol_size'
                },
            }
        }
    }
}