python-rac 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyrac/web/__init__.py ADDED
File without changes
pyrac/web/__main__.py ADDED
@@ -0,0 +1,355 @@
1
+ import argparse
2
+ import secrets
3
+ from wsgiref.simple_server import make_server
4
+ from ..client import RacClient
5
+ from .app import create_app
6
+ from .workspace import create_workspace_app, startup_endpoints
7
+
8
+
9
+ def main(argv=None):
10
+ parser = argparse.ArgumentParser(description='Read-only RAC dashboard (loopback by default)')
11
+ parser.add_argument('--host', default='127.0.0.1')
12
+ parser.add_argument('--port', type=int, default=8080)
13
+ parser.add_argument('--ras-host', default='localhost')
14
+ parser.add_argument('--ras-port', type=int, default=1545)
15
+ parser.add_argument('--workspace', action='store_true',
16
+ help='Use local multi-RAS workspace (read-only, in-memory endpoints)')
17
+ parser.add_argument('--ras-server', action='append', default=[], metavar='HOST:PORT/PROTOCOL',
18
+ help='Additional workspace RAS endpoint (repeatable; 16.0, 10.0 or auto)')
19
+ parser.add_argument('--protocol', choices=['10.0', '16.0', 'auto'], default='16.0')
20
+ parser.add_argument('--agent-user', help='OS-authenticated agent administrator name')
21
+ parser.add_argument('--cluster-user', help='OS-authenticated cluster administrator name')
22
+ parser.add_argument('--allow-process-turn-off', action='store_true',
23
+ help='Enable destructive POST on loopback only (disabled by default)')
24
+ parser.add_argument('--allow-cluster-remove', action='store_true',
25
+ help='Enable guarded cluster removal on loopback only (disabled by default)')
26
+ parser.add_argument('--allow-cluster-insert', action='store_true',
27
+ help='Enable guarded cluster insertion on loopback only (disabled by default)')
28
+ parser.add_argument('--allow-agent-admin-register', action='store_true',
29
+ help='Enable guarded password-free agent admin registration on loopback only')
30
+ parser.add_argument('--allow-agent-admin-remove', action='store_true',
31
+ help='Enable guarded agent admin removal on loopback only')
32
+ parser.add_argument('--allow-cluster-admin-register', action='store_true',
33
+ help='Enable guarded password-free cluster admin registration on loopback only')
34
+ parser.add_argument('--allow-cluster-admin-remove', action='store_true',
35
+ help='Enable guarded cluster admin removal on loopback only')
36
+ parser.add_argument('--allow-rule-apply', action='store_true',
37
+ help='Enable guarded assignment rule apply on loopback only')
38
+ parser.add_argument('--allow-service-settings-apply', action='store_true',
39
+ help='Enable guarded service settings apply on loopback only')
40
+ parser.add_argument('--allow-service-setting-remove', action='store_true',
41
+ help='Enable guarded service setting removal on loopback only')
42
+ parser.add_argument('--allow-service-setting-update', action='store_true',
43
+ help='Enable guarded service setting path update on loopback only')
44
+ parser.add_argument('--allow-service-setting-insert', action='store_true',
45
+ help='Enable guarded service setting insertion on loopback only')
46
+ parser.add_argument('--allow-cluster-name-update', action='store_true',
47
+ help='Enable guarded cluster rename on loopback only (disabled by default)')
48
+ parser.add_argument('--allow-cluster-expiration-timeout-update', action='store_true',
49
+ help='Enable guarded cluster expiration timeout update on loopback only')
50
+ parser.add_argument('--allow-cluster-security-level-update', action='store_true',
51
+ help='Enable guarded cluster security level update on loopback only')
52
+ parser.add_argument('--allow-cluster-session-fault-tolerance-level-update', action='store_true',
53
+ help='Enable guarded cluster session fault tolerance update on loopback only')
54
+ parser.add_argument('--allow-cluster-load-balancing-mode-update', action='store_true',
55
+ help='Enable guarded cluster load balancing mode update on loopback only')
56
+ parser.add_argument('--allow-cluster-kill-problem-processes-update', action='store_true',
57
+ help='Enable guarded cluster problem-process policy update on loopback only')
58
+ parser.add_argument('--allow-cluster-kill-by-memory-with-dump-update', action='store_true',
59
+ help='Enable guarded cluster kill-by-memory dump update on loopback only')
60
+ parser.add_argument('--allow-cluster-audit-update', action='store_true',
61
+ help='Enable guarded cluster audit update on loopback only')
62
+ parser.add_argument('--allow-cluster-ping-update', action='store_true',
63
+ help='Enable guarded cluster ping pair update on loopback only')
64
+ parser.add_argument('--allow-cluster-restart-schedule-update', action='store_true',
65
+ help='Enable guarded cluster restart schedule update on loopback only')
66
+ parser.add_argument('--allow-server-restart-schedule-update', action='store_true',
67
+ help='Enable guarded working-server restart schedule update on loopback only')
68
+ parser.add_argument('--allow-server-infobases-limit-update', action='store_true',
69
+ help='Enable guarded working-server infobases limit update on loopback only')
70
+ parser.add_argument('--allow-server-connections-limit-update', action='store_true',
71
+ help='Enable guarded working-server connections limit update on loopback only')
72
+ parser.add_argument('--allow-server-safe-call-memory-limit-update', action='store_true',
73
+ help='Enable guarded working-server safe-call memory limit update on loopback only')
74
+ parser.add_argument('--allow-server-critical-total-memory-update', action='store_true',
75
+ help='Enable guarded working-server critical total memory update on loopback only')
76
+ parser.add_argument('--allow-server-temporary-total-memory-update', action='store_true',
77
+ help='Enable guarded working-server temporary allowed total memory update on loopback only')
78
+ parser.add_argument('--allow-server-temporary-memory-time-limit-update', action='store_true',
79
+ help='Enable guarded working-server temporary memory time limit update on loopback only')
80
+ parser.add_argument('--allow-server-spn-update', action='store_true',
81
+ help='Enable guarded working-server service principal name update on loopback only')
82
+ parser.add_argument('--allow-server-dedicate-managers-update', action='store_true',
83
+ help='Enable guarded working-server dedicated managers update on loopback only')
84
+ parser.add_argument('--allow-server-port-ranges-update', action='store_true',
85
+ help='Enable guarded working-server port ranges update on loopback only')
86
+ args = parser.parse_args(argv)
87
+ if args.ras_server and not args.workspace:
88
+ raise ValueError('--ras-server requires --workspace')
89
+ workspace_endpoints = (startup_endpoints(args.ras_host, args.ras_port,
90
+ args.protocol, args.ras_server)
91
+ if args.workspace else None)
92
+ if args.allow_agent_admin_register and args.host not in ('127.0.0.1', '::1', 'localhost'):
93
+ raise ValueError('Web agent administrator registration requires loopback bind')
94
+ if args.allow_agent_admin_register and args.protocol != '16.0':
95
+ raise ValueError('Web agent administrator registration requires protocol 16.0')
96
+ if args.allow_agent_admin_register and args.agent_user is not None:
97
+ raise ValueError('OS-authenticated agent administrator registration is not enabled')
98
+ if args.allow_agent_admin_remove and args.host not in ('127.0.0.1', '::1', 'localhost'):
99
+ raise ValueError('Web agent administrator removal requires loopback bind')
100
+ if args.allow_agent_admin_remove and args.protocol != '16.0':
101
+ raise ValueError('Web agent administrator removal requires protocol 16.0')
102
+ if args.allow_agent_admin_remove and args.agent_user is None:
103
+ raise ValueError('Agent administrator removal requires an authenticated administrator')
104
+ if args.allow_cluster_admin_register and args.host not in ('127.0.0.1', '::1', 'localhost'):
105
+ raise ValueError('Web cluster administrator registration requires loopback bind')
106
+ if args.allow_cluster_admin_register and args.protocol != '16.0':
107
+ raise ValueError('Web cluster administrator registration requires protocol 16.0')
108
+ if args.allow_cluster_admin_register and args.cluster_user is not None:
109
+ raise ValueError('OS-authenticated cluster administrator registration is not enabled')
110
+ if args.allow_cluster_admin_remove and args.host not in ('127.0.0.1', '::1', 'localhost'):
111
+ raise ValueError('Web cluster administrator removal requires loopback bind')
112
+ if args.allow_cluster_admin_remove and args.protocol != '16.0':
113
+ raise ValueError('Web cluster administrator removal requires protocol 16.0')
114
+ if args.allow_cluster_admin_remove and args.cluster_user is None:
115
+ raise ValueError('Cluster administrator removal requires an authenticated administrator')
116
+ if args.allow_rule_apply and args.host not in ('127.0.0.1', '::1', 'localhost'):
117
+ raise ValueError('Web rule apply requires loopback bind')
118
+ if args.allow_rule_apply and args.protocol != '16.0':
119
+ raise ValueError('Web rule apply requires protocol 16.0')
120
+ if args.allow_rule_apply and args.cluster_user is not None:
121
+ raise ValueError('OS-authenticated rule apply is not enabled in web')
122
+ if args.allow_service_settings_apply and args.host not in ('127.0.0.1', '::1', 'localhost'):
123
+ raise ValueError('Web service settings apply requires loopback bind')
124
+ if args.allow_service_settings_apply and args.protocol != '16.0':
125
+ raise ValueError('Web service settings apply requires protocol 16.0')
126
+ if args.allow_service_settings_apply and args.cluster_user is not None:
127
+ raise ValueError('OS-authenticated service settings apply is not enabled in web')
128
+ if args.allow_service_setting_remove and args.host not in ('127.0.0.1', '::1', 'localhost'):
129
+ raise ValueError('Web service setting removal requires loopback bind')
130
+ if args.allow_service_setting_remove and args.protocol != '16.0':
131
+ raise ValueError('Web service setting removal requires protocol 16.0')
132
+ if args.allow_service_setting_remove and args.cluster_user is not None:
133
+ raise ValueError('OS-authenticated service setting removal is not enabled in web')
134
+ if args.allow_service_setting_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
135
+ raise ValueError('Web service setting update requires loopback bind')
136
+ if args.allow_service_setting_update and args.protocol != '16.0':
137
+ raise ValueError('Web service setting update requires protocol 16.0')
138
+ if args.allow_service_setting_update and args.cluster_user is not None:
139
+ raise ValueError('OS-authenticated service setting update is not enabled in web')
140
+ if args.allow_service_setting_insert and args.host not in ('127.0.0.1', '::1', 'localhost'):
141
+ raise ValueError('Web service setting insert requires loopback bind')
142
+ if args.allow_service_setting_insert and args.protocol != '16.0':
143
+ raise ValueError('Web service setting insert requires protocol 16.0')
144
+ if args.allow_service_setting_insert and args.cluster_user is not None:
145
+ raise ValueError('OS-authenticated service setting insert is not enabled in web')
146
+ if args.allow_cluster_insert and args.host not in ('127.0.0.1', '::1', 'localhost'):
147
+ raise ValueError('Web cluster insertion requires loopback bind')
148
+ if args.allow_cluster_insert and args.protocol != '16.0':
149
+ raise ValueError('Web cluster insertion requires protocol 16.0')
150
+ if args.allow_cluster_insert and args.agent_user is not None:
151
+ raise ValueError('OS-authenticated cluster insertion is not enabled')
152
+ if args.allow_cluster_remove and args.host not in ('127.0.0.1', '::1', 'localhost'):
153
+ raise ValueError('Web cluster removal requires loopback bind')
154
+ if args.allow_cluster_remove and args.protocol != '16.0':
155
+ raise ValueError('Web cluster removal requires protocol 16.0')
156
+ if args.allow_cluster_remove and args.agent_user is not None:
157
+ raise ValueError('OS-authenticated cluster removal is not enabled')
158
+ if args.allow_process_turn_off and args.host not in ('127.0.0.1', '::1', 'localhost'):
159
+ raise ValueError('Web process turn-off requires loopback bind')
160
+ if args.allow_process_turn_off and args.protocol != '16.0':
161
+ raise ValueError('Web process turn-off requires protocol 16.0')
162
+ if args.allow_process_turn_off and args.cluster_user is not None:
163
+ raise ValueError('OS-authenticated process turn-off is not verified')
164
+ if args.allow_cluster_name_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
165
+ raise ValueError('Web cluster name update requires loopback bind')
166
+ if args.allow_cluster_name_update and args.protocol != '16.0':
167
+ raise ValueError('Web cluster name update requires protocol 16.0')
168
+ if args.allow_cluster_name_update and args.agent_user is not None:
169
+ raise ValueError('OS-authenticated cluster name update is not enabled')
170
+ if args.allow_cluster_expiration_timeout_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
171
+ raise ValueError('Web cluster timeout update requires loopback bind')
172
+ if args.allow_cluster_expiration_timeout_update and args.protocol != '16.0':
173
+ raise ValueError('Web cluster timeout update requires protocol 16.0')
174
+ if args.allow_cluster_expiration_timeout_update and args.agent_user is not None:
175
+ raise ValueError('OS-authenticated cluster timeout update is not enabled')
176
+ if args.allow_cluster_security_level_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
177
+ raise ValueError('Web cluster security level update requires loopback bind')
178
+ if args.allow_cluster_security_level_update and args.protocol != '16.0':
179
+ raise ValueError('Web cluster security level update requires protocol 16.0')
180
+ if args.allow_cluster_security_level_update and args.agent_user is not None:
181
+ raise ValueError('OS-authenticated cluster security level update is not enabled')
182
+ if args.allow_cluster_session_fault_tolerance_level_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
183
+ raise ValueError('Web cluster session fault tolerance update requires loopback bind')
184
+ if args.allow_cluster_session_fault_tolerance_level_update and args.protocol != '16.0':
185
+ raise ValueError('Web cluster session fault tolerance update requires protocol 16.0')
186
+ if args.allow_cluster_session_fault_tolerance_level_update and args.agent_user is not None:
187
+ raise ValueError('OS-authenticated cluster session fault tolerance update is not enabled')
188
+ if args.allow_cluster_load_balancing_mode_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
189
+ raise ValueError('Web cluster load balancing mode update requires loopback bind')
190
+ if args.allow_cluster_load_balancing_mode_update and args.protocol != '16.0':
191
+ raise ValueError('Web cluster load balancing mode update requires protocol 16.0')
192
+ if args.allow_cluster_load_balancing_mode_update and args.agent_user is not None:
193
+ raise ValueError('OS-authenticated cluster load balancing mode update is not enabled')
194
+ if args.allow_cluster_kill_problem_processes_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
195
+ raise ValueError('Web cluster problem-process policy update requires loopback bind')
196
+ if args.allow_cluster_kill_problem_processes_update and args.protocol != '16.0':
197
+ raise ValueError('Web cluster problem-process policy update requires protocol 16.0')
198
+ if args.allow_cluster_kill_problem_processes_update and args.agent_user is not None:
199
+ raise ValueError('OS-authenticated cluster problem-process policy update is not enabled')
200
+ if args.allow_cluster_kill_by_memory_with_dump_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
201
+ raise ValueError('Web cluster kill-by-memory dump update requires loopback bind')
202
+ if args.allow_cluster_kill_by_memory_with_dump_update and args.protocol != '16.0':
203
+ raise ValueError('Web cluster kill-by-memory dump update requires protocol 16.0')
204
+ if args.allow_cluster_kill_by_memory_with_dump_update and args.agent_user is not None:
205
+ raise ValueError('OS-authenticated cluster kill-by-memory dump update is not enabled')
206
+ if args.allow_cluster_audit_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
207
+ raise ValueError('Web cluster audit update requires loopback bind')
208
+ if args.allow_cluster_audit_update and args.protocol != '16.0':
209
+ raise ValueError('Web cluster audit update requires protocol 16.0')
210
+ if args.allow_cluster_audit_update and args.agent_user is not None:
211
+ raise ValueError('OS-authenticated cluster audit update is not enabled')
212
+ if args.allow_cluster_ping_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
213
+ raise ValueError('Web cluster ping update requires loopback bind')
214
+ if args.allow_cluster_ping_update and args.protocol != '16.0':
215
+ raise ValueError('Web cluster ping update requires protocol 16.0')
216
+ if args.allow_cluster_ping_update and args.agent_user is not None:
217
+ raise ValueError('OS-authenticated cluster ping update is not enabled')
218
+ if args.allow_cluster_restart_schedule_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
219
+ raise ValueError('Web cluster restart schedule update requires loopback bind')
220
+ if args.allow_cluster_restart_schedule_update and args.protocol != '16.0':
221
+ raise ValueError('Web cluster restart schedule update requires protocol 16.0')
222
+ if args.allow_cluster_restart_schedule_update and args.agent_user is not None:
223
+ raise ValueError('OS-authenticated cluster restart schedule update is not enabled')
224
+ if args.allow_server_restart_schedule_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
225
+ raise ValueError('Web server restart schedule update requires loopback bind')
226
+ if args.allow_server_restart_schedule_update and args.protocol != '16.0':
227
+ raise ValueError('Web server restart schedule update requires protocol 16.0')
228
+ if args.allow_server_restart_schedule_update and args.cluster_user is not None:
229
+ raise ValueError('OS-authenticated server restart schedule update is not enabled')
230
+ if args.allow_server_infobases_limit_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
231
+ raise ValueError('Web server infobases limit update requires loopback bind')
232
+ if args.allow_server_infobases_limit_update and args.protocol != '16.0':
233
+ raise ValueError('Web server infobases limit update requires protocol 16.0')
234
+ if args.allow_server_infobases_limit_update and args.cluster_user is not None:
235
+ raise ValueError('OS-authenticated server infobases limit update is not enabled')
236
+ if args.allow_server_connections_limit_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
237
+ raise ValueError('Web server connections limit update requires loopback bind')
238
+ if args.allow_server_connections_limit_update and args.protocol != '16.0':
239
+ raise ValueError('Web server connections limit update requires protocol 16.0')
240
+ if args.allow_server_connections_limit_update and args.cluster_user is not None:
241
+ raise ValueError('OS-authenticated server connections limit update is not enabled')
242
+ if args.allow_server_safe_call_memory_limit_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
243
+ raise ValueError('Web server safe-call memory limit update requires loopback bind')
244
+ if args.allow_server_safe_call_memory_limit_update and args.protocol != '16.0':
245
+ raise ValueError('Web server safe-call memory limit update requires protocol 16.0')
246
+ if args.allow_server_safe_call_memory_limit_update and args.cluster_user is not None:
247
+ raise ValueError('OS-authenticated server safe-call memory limit update is not enabled')
248
+ if args.allow_server_critical_total_memory_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
249
+ raise ValueError('Web server critical total memory update requires loopback bind')
250
+ if args.allow_server_critical_total_memory_update and args.protocol != '16.0':
251
+ raise ValueError('Web server critical total memory update requires protocol 16.0')
252
+ if args.allow_server_critical_total_memory_update and args.cluster_user is not None:
253
+ raise ValueError('OS-authenticated server critical total memory update is not enabled')
254
+ if args.allow_server_temporary_total_memory_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
255
+ raise ValueError('Web server temporary allowed total memory update requires loopback bind')
256
+ if args.allow_server_temporary_total_memory_update and args.protocol != '16.0':
257
+ raise ValueError('Web server temporary allowed total memory update requires protocol 16.0')
258
+ if args.allow_server_temporary_total_memory_update and args.cluster_user is not None:
259
+ raise ValueError('OS-authenticated server temporary allowed total memory update is not enabled')
260
+ if args.allow_server_temporary_memory_time_limit_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
261
+ raise ValueError('Web server temporary memory time limit update requires loopback bind')
262
+ if args.allow_server_temporary_memory_time_limit_update and args.protocol != '16.0':
263
+ raise ValueError('Web server temporary memory time limit update requires protocol 16.0')
264
+ if args.allow_server_temporary_memory_time_limit_update and args.cluster_user is not None:
265
+ raise ValueError('OS-authenticated server temporary memory time limit update is not enabled')
266
+ if args.allow_server_spn_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
267
+ raise ValueError('Web server SPN update requires loopback bind')
268
+ if args.allow_server_spn_update and args.protocol != '16.0':
269
+ raise ValueError('Web server SPN update requires protocol 16.0')
270
+ if args.allow_server_spn_update and args.cluster_user is not None:
271
+ raise ValueError('OS-authenticated server SPN update is not enabled')
272
+ if args.allow_server_dedicate_managers_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
273
+ raise ValueError('Web server dedicated managers update requires loopback bind')
274
+ if args.allow_server_dedicate_managers_update and args.protocol != '16.0':
275
+ raise ValueError('Web server dedicated managers update requires protocol 16.0')
276
+ if args.allow_server_dedicate_managers_update and args.cluster_user is not None:
277
+ raise ValueError('OS-authenticated server dedicated managers update is not enabled')
278
+ if args.allow_server_port_ranges_update and args.host not in ('127.0.0.1', '::1', 'localhost'):
279
+ raise ValueError('Web server port ranges update requires loopback bind')
280
+ if args.allow_server_port_ranges_update and args.protocol != '16.0':
281
+ raise ValueError('Web server port ranges update requires protocol 16.0')
282
+ if args.allow_server_port_ranges_update and args.cluster_user is not None:
283
+ raise ValueError('OS-authenticated server port ranges update is not enabled')
284
+ for name in (args.agent_user, args.cluster_user):
285
+ if name is not None and (not name or '\x00' in name or len(name.encode('utf-8')) > 1024):
286
+ raise ValueError('Invalid administrator name')
287
+ if args.workspace and (args.host not in ('127.0.0.1', '::1', 'localhost') or
288
+ any(value for name, value in vars(args).items()
289
+ if name.startswith('allow_')) or
290
+ args.agent_user is not None or args.cluster_user is not None):
291
+ raise ValueError('RAS workspace requires loopback and read-only unauthenticated mode')
292
+ factory = lambda: RacClient(args.ras_host, args.ras_port, args.protocol,
293
+ agent_user=args.agent_user, cluster_user=args.cluster_user)
294
+ app = (create_app(factory, allow_process_turn_off=args.allow_process_turn_off,
295
+ allow_cluster_remove=args.allow_cluster_remove,
296
+ allow_cluster_insert=args.allow_cluster_insert,
297
+ allow_agent_admin_register=args.allow_agent_admin_register,
298
+ allow_agent_admin_remove=args.allow_agent_admin_remove,
299
+ allow_cluster_admin_register=args.allow_cluster_admin_register,
300
+ allow_cluster_admin_remove=args.allow_cluster_admin_remove,
301
+ allow_rule_apply=args.allow_rule_apply,
302
+ allow_service_settings_apply=args.allow_service_settings_apply,
303
+ allow_service_setting_remove=args.allow_service_setting_remove,
304
+ allow_service_setting_update=args.allow_service_setting_update,
305
+ allow_service_setting_insert=args.allow_service_setting_insert,
306
+ allow_cluster_name_update=args.allow_cluster_name_update,
307
+ allow_cluster_expiration_timeout_update=args.allow_cluster_expiration_timeout_update,
308
+ allow_cluster_security_level_update=args.allow_cluster_security_level_update,
309
+ allow_cluster_session_fault_tolerance_level_update=args.allow_cluster_session_fault_tolerance_level_update,
310
+ allow_cluster_load_balancing_mode_update=args.allow_cluster_load_balancing_mode_update,
311
+ allow_cluster_kill_problem_processes_update=args.allow_cluster_kill_problem_processes_update,
312
+ allow_cluster_kill_by_memory_with_dump_update=args.allow_cluster_kill_by_memory_with_dump_update,
313
+ allow_cluster_audit_update=args.allow_cluster_audit_update,
314
+ allow_cluster_ping_update=args.allow_cluster_ping_update,
315
+ allow_cluster_restart_schedule_update=args.allow_cluster_restart_schedule_update,
316
+ allow_server_restart_schedule_update=args.allow_server_restart_schedule_update,
317
+ allow_server_infobases_limit_update=args.allow_server_infobases_limit_update,
318
+ allow_server_connections_limit_update=args.allow_server_connections_limit_update,
319
+ allow_server_safe_call_memory_limit_update=args.allow_server_safe_call_memory_limit_update,
320
+ allow_server_critical_total_memory_update=args.allow_server_critical_total_memory_update,
321
+ allow_server_temporary_total_memory_update=args.allow_server_temporary_total_memory_update,
322
+ allow_server_temporary_memory_time_limit_update=args.allow_server_temporary_memory_time_limit_update,
323
+ allow_server_spn_update=args.allow_server_spn_update,
324
+ allow_server_dedicate_managers_update=args.allow_server_dedicate_managers_update,
325
+ allow_server_port_ranges_update=args.allow_server_port_ranges_update,
326
+ csrf_token=secrets.token_urlsafe(32))
327
+ if (args.allow_process_turn_off or args.allow_cluster_remove or args.allow_cluster_insert or
328
+ args.allow_agent_admin_register or args.allow_agent_admin_remove or
329
+ args.allow_cluster_admin_register or args.allow_cluster_admin_remove or
330
+ args.allow_rule_apply or args.allow_service_settings_apply or
331
+ args.allow_service_setting_remove or args.allow_service_setting_update or
332
+ args.allow_service_setting_insert or
333
+ args.allow_cluster_name_update or
334
+ args.allow_cluster_expiration_timeout_update or args.allow_cluster_security_level_update or
335
+ args.allow_cluster_session_fault_tolerance_level_update or
336
+ args.allow_cluster_load_balancing_mode_update or
337
+ args.allow_cluster_kill_problem_processes_update or
338
+ args.allow_cluster_kill_by_memory_with_dump_update or
339
+ args.allow_cluster_audit_update or
340
+ args.allow_cluster_ping_update or args.allow_cluster_restart_schedule_update or
341
+ args.allow_server_restart_schedule_update or args.allow_server_infobases_limit_update or
342
+ args.allow_server_connections_limit_update or args.allow_server_safe_call_memory_limit_update or
343
+ args.allow_server_critical_total_memory_update or args.allow_server_temporary_total_memory_update or
344
+ args.allow_server_temporary_memory_time_limit_update or args.allow_server_spn_update or
345
+ args.allow_server_dedicate_managers_update or args.allow_server_port_ranges_update)
346
+ else create_app(factory))
347
+ if args.workspace:
348
+ app = create_workspace_app(workspace_endpoints,
349
+ csrf_token=secrets.token_urlsafe(32))
350
+ with make_server(args.host, args.port, app) as server:
351
+ server.serve_forever()
352
+
353
+
354
+ if __name__ == '__main__':
355
+ main()