ominfra 0.0.0.dev207__tar.gz → 0.0.0.dev209__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {ominfra-0.0.0.dev207/ominfra.egg-info → ominfra-0.0.0.dev209}/PKG-INFO +4 -4
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/gen/cli.py +7 -3
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/gen/gen.py +13 -5
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/services/ec2.py +701 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/services/services.toml +7 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209/ominfra.egg-info}/PKG-INFO +4 -4
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra.egg-info/requires.txt +3 -3
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/pyproject.toml +4 -4
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/LICENSE +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/MANIFEST.in +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/README.rst +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/.manifests.json +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/__about__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/__main__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/auth.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/cli.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/dataclasses.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/instancetypes/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/instancetypes/__main__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/instancetypes/cache.json.gz +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/instancetypes/cache.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/instancetypes/cli.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/journald2aws/__main__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/journald2aws/cursor.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/journald2aws/driver.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/journald2aws/main.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/journald2aws/poster.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/logs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/metadata.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/base.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/gen/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/gen/__main__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/services/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/services/lambda_.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/services/rds.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/aws/models/services/s3.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/gcp/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/clouds/gcp/auth.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/commands/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/commands/runners.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/commands/ssh.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/journald/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/journald/fields.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/journald/genmessages.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/journald/messages.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/journald/tailer.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/__main__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/bootstrap.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/bootstrap_.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/base.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/injection.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/local.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/marshal.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/ping.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/subprocess.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/commands/types.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/config.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/apps.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/commands.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/conf/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/conf/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/conf/manager.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/conf/specs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/config.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/deploy.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/git.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/injection.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/interp.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/nginx.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/manager.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/owners.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/paths.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/specs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/paths/types.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/specs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/systemd.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/tags.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/tmp.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/types.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/deploy/venvs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/main.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/marshal.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/_main.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/channel.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/config.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/connection.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/execution.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/payload.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/remote/spawning.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/system/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/system/commands.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/system/config.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/system/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/system/packages.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/system/platforms.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/targets/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/targets/bestpython.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/targets/bestpython.sh +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/targets/connection.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/targets/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/manage/targets/targets.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/pyremote.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/scripts/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/scripts/journald2aws.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/scripts/manage.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/scripts/supervisor.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/LICENSE.txt +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/__main__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/configs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/dispatchers.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/dispatchersimpl.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/events.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/exceptions.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/groups.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/groupsimpl.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/http.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/inject.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/io.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/main.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/pipes.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/privileges.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/process.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/processimpl.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/setup.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/setupimpl.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/signals.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/spawning.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/spawningimpl.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/states.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/supervisor.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/types.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/collections.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/diag.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/fds.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/fs.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/os.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/ostypes.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/signals.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/strings.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/supervisor/utils/users.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/systemd.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/tailscale/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/tailscale/api.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/tailscale/cli.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/threadworkers.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/tools/__init__.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra/tools/listresources.py +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra.egg-info/SOURCES.txt +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra.egg-info/dependency_links.txt +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra.egg-info/entry_points.txt +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/ominfra.egg-info/top_level.txt +0 -0
- {ominfra-0.0.0.dev207 → ominfra-0.0.0.dev209}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev209
|
4
4
|
Summary: ominfra
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,9 +12,9 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omdev==0.0.0.
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
17
|
-
Requires-Dist: omserv==0.0.0.
|
15
|
+
Requires-Dist: omdev==0.0.0.dev209
|
16
|
+
Requires-Dist: omlish==0.0.0.dev209
|
17
|
+
Requires-Dist: omserv==0.0.0.dev209
|
18
18
|
Provides-Extra: all
|
19
19
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
20
20
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -4,6 +4,7 @@ import os.path
|
|
4
4
|
import sys
|
5
5
|
import typing as ta
|
6
6
|
|
7
|
+
from omlish import check
|
7
8
|
from omlish import lang
|
8
9
|
from omlish import marshal as msh
|
9
10
|
from omlish.argparse import all as ap
|
@@ -30,14 +31,17 @@ class Cli(ap.Cli):
|
|
30
31
|
) -> str:
|
31
32
|
service_model = ModelGen.load_service_model(service_name)
|
32
33
|
|
34
|
+
shape_names_seq = check.unique(shape_names or ())
|
35
|
+
operation_names_seq = check.unique(operation_names or ())
|
36
|
+
|
33
37
|
bmg = ModelGen(
|
34
38
|
service_model,
|
35
39
|
shape_names=ModelGen.get_referenced_shape_names(
|
36
40
|
service_model,
|
37
|
-
shape_names=
|
38
|
-
operation_names=
|
41
|
+
shape_names=shape_names_seq,
|
42
|
+
operation_names=operation_names_seq,
|
39
43
|
),
|
40
|
-
operation_names=
|
44
|
+
operation_names=operation_names_seq,
|
41
45
|
)
|
42
46
|
|
43
47
|
return bmg.gen_module()
|
@@ -6,6 +6,7 @@ TODO:
|
|
6
6
|
import builtins
|
7
7
|
import dataclasses as dc
|
8
8
|
import io
|
9
|
+
import keyword
|
9
10
|
import typing as ta
|
10
11
|
|
11
12
|
from omlish import check
|
@@ -182,7 +183,7 @@ class ModelGen:
|
|
182
183
|
pass
|
183
184
|
|
184
185
|
if name in self._shape_names:
|
185
|
-
name = self.
|
186
|
+
name = self.sanitize_global_name(name, upper=True)
|
186
187
|
if not unquoted_names:
|
187
188
|
return f"'{name}'"
|
188
189
|
else:
|
@@ -249,10 +250,17 @@ class ModelGen:
|
|
249
250
|
|
250
251
|
#
|
251
252
|
|
252
|
-
def
|
253
|
+
def sanitize_local_name(self, n: str) -> str:
|
254
|
+
if n in keyword.kwlist:
|
255
|
+
n += '_'
|
256
|
+
return n
|
257
|
+
|
258
|
+
def sanitize_global_name(self, n: str, *, upper: bool = False) -> str:
|
253
259
|
if hasattr(builtins, n):
|
254
260
|
n += '_'
|
255
|
-
|
261
|
+
if upper:
|
262
|
+
n = n[0].upper() + n[1:]
|
263
|
+
return n
|
256
264
|
|
257
265
|
#
|
258
266
|
|
@@ -292,7 +300,7 @@ class ModelGen:
|
|
292
300
|
) -> ShapeSrc:
|
293
301
|
shape: botocore.model.Shape = self._service_model.shape_for(name)
|
294
302
|
|
295
|
-
san_name = self.
|
303
|
+
san_name = self.sanitize_global_name(shape.name, upper=True)
|
296
304
|
|
297
305
|
if isinstance(shape, botocore.model.StructureShape):
|
298
306
|
lines: list[str] = []
|
@@ -315,7 +323,7 @@ class ModelGen:
|
|
315
323
|
for i, (mn, ms) in enumerate(shape.members.items()):
|
316
324
|
if i:
|
317
325
|
lines.append('')
|
318
|
-
fn = self.demangle_name(mn)
|
326
|
+
fn = self.sanitize_local_name(self.demangle_name(mn))
|
319
327
|
mds = [
|
320
328
|
f'member_name={mn!r}',
|
321
329
|
]
|