Skip to main content

No project description provided

Project description

aiohttp provider for Idem

DEVELOPMENT

Clone the idem-aiohttp repository and install with pip.

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

ACCT

After installation aiohttp Idem Provider execution and state modules will be accessible to the pop hub. In order to use them we need to set up our credentials.

Create a new file called credentials.yaml and populate it with profiles. The default profile will be used automatically by idem unless you specify one with –acct-profile=profile_name on the cli.

acct backends provide alternate methods for storing profiles.

A profile needs to specify the authentication parameters for aiohttp. Every one of the parameters is optional. Here, all available options are shown with their defaults:

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

Now encrypt the credentials file and add the encryption key and encrypted file path to the ENVIRONMENT.

The acct command should be available as it is a requisite of idem and idem_aiohttp. Encrypt the the credential file.

acct encrypt credentials.yaml

output:

-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI=

Add these to your environment:

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

USAGE

If no profile is specified, the profile called “default”, if one exists, will be used. A profile can be specified from the command line when calling an exec module directly.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idem-aiohttp-3.0.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

idem_aiohttp-3.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file idem-aiohttp-3.0.0.tar.gz.

File metadata

  • Download URL: idem-aiohttp-3.0.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for idem-aiohttp-3.0.0.tar.gz
Algorithm Hash digest
SHA256 80955bb94801e0ba1f7db1ab541e5f4d4ffe4d9d3953c9d5233be4b9c580e75f
MD5 c55e94525031d05f923d7969be36a05a
BLAKE2b-256 9ff2d6d0b67fe35b3865210231ea00520ddcc5406b7e059aea7e9ee969211fd3

See more details on using hashes here.

File details

Details for the file idem_aiohttp-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: idem_aiohttp-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for idem_aiohttp-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80fa3e467524bad1a3db328b52d7db40248c88c71235602fc4f672a3c7ad1faf
MD5 2721ed3c82bda7ce3aac05c914e2db86
BLAKE2b-256 26384791b8b0f084cf6a93188b24d7aa9145351cb5e987997f1e7b4930c1f18d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page