Files
VPNaaS-Migrator/ipsec_migrator/__pycache__/cli.cpython-311.pyc
T

48 lines
7.9 KiB
Plaintext
Raw Normal View History

2026-07-21 15:05:52 +03:00
§
¶$_jïãó”dZddlmZddlZddlZddlZddlmZmZm Z ddl
m Z m Z m
Z
ddlmZdd
Zdd Zdd ZddZddZdddZdS)Argument parsing and top-level orchestration of STAGE 1-4.
Mirrors the bash original's literal top-to-bottom execution order: banner
and the "STAGE 1: Collecting information" header print before anything
else, then argument parsing, then mode dispatch. The `openstack` CLI
binary check that used to run here is gone -- OpenStack access is now
direct Neutron/Keystone REST calls (`keystone_auth.py`, `neutron_client.py`),
so no external binary is required at all.
é)Ú annotationsNé)ÚauditÚ
keystone_authÚsync)ÚBANNERÚSPRUT_API_BASEÚUSAGE)Ú SprutClientÚreturnÚNonecó.tt¦«dS©N)Úprintr©óú*/root/vkcloud/vpnaas/ipsec_migrator/cli.pyÚ print_bannerrsÝ &M„M€M€M€Mrcó.tt¦«dSr)rr
rrrÚ print_usagersÝ %L„L€L€L€Lrcó$td¦«dS)NzV**************************************************************************************)rrrrÚ_rulersÝ ˆ(O„O€O€O€OrÚargvú list[str]úargparse.Namespacecó¦tjd¬¦«}| ddd¬¦«| ddd¬¦«| d d
d¬ ¦«| d d
dd¬¦«| dd¬¦«| |¦«}|jr"t ¦«t
jd¦«|j}|j du}|r1|r/tdt j ¬¦«t
jd¦«|rd}n|rd}nd}d}d}|dkr¡|j s=tdt j ¬¦«t ¦«t
jd¦«tj
 |j ¦«s8td|j dt j ¬¦«t
jd¦«nj|js1td¦«t ¦«t
jd¦«|jd}t!|j¦«dkr
|jd}tj||j|j ||¬¦«S)NF)Úadd_helpz --dry-runÚ
store_trueÚdry_run)ÚactionÚdestz --audit-onlyÚ
audit_onlyz --from-auditÚ
from_audit)r!Údefaultz-hz--helpÚhelpÚ
positionalÚ*)Únargsrz<Error: --audit-only and --from-audit are mutually exclusive.)Úfilerú
from-auditú
audit-onlyÚfullz:Error: --from-audit requires a path to an audit JSON file.zError: audit file 'z ' not found.zError: No input file provided.)Úmoderr#Ú input_csvÚ output_file)ÚargparseÚArgumentParserÚ add_argumentÚ
parse_argsr%rÚsysÚexitr"r#rÚstderrÚosÚpathÚisfiler&ÚlenÚ Namespacer)rÚparserÚargsÚaudit_only_seenÚfrom_audit_seenr-r.r/s rr3r3!sXÝ
Ô
$¨eÐ
4€FØ
×Ò˜ ¨L¸yÐÑ
×Ò˜¨|À,ÐÑ
×Ò˜¨\À4ÐÑ
×Ò˜˜h¨|À&ÐÑ
×Ò˜ ¨CÐÑ × Ò ˜ "€Dà „yðÝ
Œ
ˆ
Ý Œ Œ ˆ à”o€OØ”o¨TÐ1€Oàð˜?ðÝ
ÐLÕSVÔS]Ð Œ Œ ˆ àðØˆˆØ ðØˆˆàˆà€IØ€Kà ˆ|ÒÐØŒð Ý ÐNÕUXÔU_Ð ‰MŒMˆMÝ ŒHQ‰KŒKˆKÝŒw~Š~˜dœoÑ Ý Ð¬ÐEÍCÌJÐ ŒHQ‰KŒKˆKøàŒð Ý Ð ‰MŒMˆMÝ ŒHQ‰KŒKˆ”O &ˆ Ý ˆÑ Ô   œ/¨!Ô,ˆKå Ô Ø
Ø Ø”?ØØð  ñ ô ðrÚstrcódddlm}d| ¦« d¦«dS)Nr©ÚdatetimeÚ
vpnaas_audit_z