management.management.commands.tls_cred

This module defines a Django management command to generate a TLS credential for use in the dev environment.

Classes

Command

[DEV ONLY]: A Django management command to create and store tls credential in dev env.

Module Contents

class management.management.commands.tls_cred.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand, trustpoint.logger.LoggerMixin

[DEV ONLY]: A Django management command to create and store tls credential in dev env.

help = 'Creates TLS cert'[source]
add_arguments(parser)[source]

Adds command arguments/options.

Parameters:

parser (django.core.management.base.CommandParser)

Return type:

None

handle(**options)[source]

Entrypoint for the command.

Parameters:

**options (dict[str, str]) – A variable-length argument.

Return type:

None

log_and_stdout(message, level='info')[source]

Log a message and write it to stdout.

Parameters:
  • message (str) – The message to log and print.

  • level (str) – The logging level (‘info’, ‘warning’, ‘error’, etc.).

Return type:

None

tls_cred(**options)[source]

Generate a new TLS Server Credential and set it as the active credential in Trustpoint.

For use in the non-NGINX development environment.

Parameters:

options (dict[str, str])

Return type:

None