mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 20:37:39 -02:30
simplify awxkit dependencies
- remove flake8 as an install requirements (it's only used for tests) - vendor toposort, which is Apache 2.0 licensed (and very small) - change websocket-client to a setuptools optional dependency, which you can install via: pip install "./awxkit[websockets]" - add `jq` and `tabulate` under an additional optional setuptools dependency: pip install "./awxkit[formatting]" - remove `cryptography`, which is only used for random RSA generation (unused by the CLI)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
from collections import defaultdict
|
||||
import inspect
|
||||
|
||||
from toposort import toposort
|
||||
|
||||
from awxkit.utils import get_class_if_instance, class_name_to_kw_arg, is_proper_subclass, super_dir_set
|
||||
from awxkit.utils.toposort import toposort
|
||||
|
||||
|
||||
# HasCreate dependency resolution and creation utilities
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import logging
|
||||
|
||||
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
from awxkit.utils import (
|
||||
cloud_types,
|
||||
filter_by_class,
|
||||
@@ -47,6 +43,10 @@ credential_input_fields = (
|
||||
|
||||
|
||||
def generate_private_key():
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
key = rsa.generate_private_key(
|
||||
public_exponent=65537,
|
||||
key_size=4096,
|
||||
|
||||
Reference in New Issue
Block a user