跳转到主要内容

未提供项目描述

项目描述

aiohttp为Idem提供程序

开发

克隆idem-aiohttp存储库并使用pip安装。

git clone git@gitlab.com:saltstack/idem/idem-aiohttp.git
pip install -e idem-aiohttp

ACCT

安装aiohttp Idem Provider后,执行和状态模块将对pop hub可用。为了使用它们,我们需要设置我们的凭据。

创建一个名为credentials.yaml的新文件,并用配置文件填充它。除非您在cli上使用–acct-profile=profile_name指定一个,否则默认配置文件将被idem自动使用。

acct backends”提供存储配置文件的备用方法。

配置文件需要指定aiohttp的认证参数。所有参数都是可选的。这里显示了所有可用选项及其默认值

credentials.yaml

request.basic_auth:
  default:
    auth:
      # aiohttp.BasicAuth options
      login:
      password:
      encoding: latin1
    connector:
      # aiohttp.connector.TCPConnector options
      verify_ssl: True,
      fingerprint:
      use_dns_cache: True
      ttl_dns_cache: 10
      family: 0
      ssl_context:
      ssl:
      local_addr:
      keepalive_timeout:
      force_close: False
      limit: 100
      limit_per_host: 0
      enable_cleanup_closed: False
    resolver:
      # aiodns.DNSResolver options
      nameservers:
      # pycares.Channel options
      flags:
      timeout:
      tries:
      ndots:
      tcp_port:
      udp_port:
      servers:
      domains:
      lookups:
      sock_state_cb:
      socket_send_buffer_size:
      socket_receive_buffer_size:
      rotate:
      local_ip:
      local_dev:
      resolvconf_path:
    session:
      # aiohttp.ClientSession options
      cookies:
      headers:
      skip_auto_headers:
      version: http_version
      connector_owner: True
      raise_for_status: False
      conn_timeout:
      auto_decompress: True
      trust_env: False
      requote_redirect_url: True
      trace_configs:
      read_bufsize: 65536
    cookie_jar:
      quote_cookie=False
      unsafe=True

现在加密凭证文件,并将加密密钥和加密文件路径添加到ENVIRONMENT。

“acct”命令应该是可用的,因为它是“idem”和“idem_aiohttp”的必要条件。加密凭证文件。

acct encrypt credentials.yaml

输出

-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI=

将这些添加到您的环境中

export ACCT_KEY="-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI="
export ACCT_FILE=$PWD/credentials.yaml.fernet

用法

如果没有指定配置文件,如果存在名为“default”的配置文件,则将使用该配置文件。可以在直接调用exec模块时通过命令行指定配置文件。

idem exec --acct-profile my-staging-env request.raw.get https://my-url.com

项目详情


下载文件

下载您平台上的文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。

源分布

idem-aiohttp-3.0.1.tar.gz (12.7 kB 查看哈希值)

上传时间

构建分布

idem_aiohttp-3.0.1-py3-none-any.whl (13.4 kB 查看哈希值)

上传时间 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面