awx_plugins.credentials.plugin module¶
- class awx_plugins.credentials.plugin.CertFiles(cert, key=None)¶
Bases:
objectA context manager used for writing a certificate and (optional) key to $TMPDIR, and cleaning up afterwards.
This is particularly useful as a shared resource for credential plugins that want to pull cert/key data out of the database and persist it temporarily to the file system so that it can loaded into the OpenSSL certificate chain (generally, for HTTPS requests plugins make via the Python requests library)
- with CertFiles(cert_data, key_data) as cert:
# cert is string representing a path to the certificate or PEM file # temporarily written to disk requests.post(…, cert=cert)
- class awx_plugins.credentials.plugin.CredentialPlugin(name: str, inputs: object, backend: object)¶
Bases:
NamedTupleSchema for credential plugins.
- _asdict()¶
Return a new dict which maps field names to their values.
- _field_defaults = {}¶
- _fields = ('name', 'inputs', 'backend')¶
- classmethod _make(iterable)¶
Make a new CredentialPlugin object from a sequence or iterable
- _replace(**kwds)¶
Return a new CredentialPlugin object replacing specified fields with new values
- awx_plugins.credentials.plugin.raise_for_status(resp)¶