ironic_python_agent.tls_utils module

class ironic_python_agent.tls_utils.TlsCertificate(text, path, private_key_path)

Bases: tuple

path

Alias for field number 1

private_key_path

Alias for field number 2

text

Alias for field number 0

ironic_python_agent.tls_utils.generate_tls_certificate(ip_address, common_name=None, valid_for_days=90)[source]

Generate a self-signed TLS certificate.

Parameters:
  • ip_address – IP address the certificate will be valid for.

  • common_name – Content for the common name field (e.g. host name). Defaults to the current host name.

  • valid_for_days – Number of days the certificate will be valid for.

Returns:

a TlsCertificate object.