module documentation

Interactively create a new basic configuration file.

Function buildUserConfigFile Build a new user configuration file interactively. If the zookeeper host, port, and root path are provided, the configuration will be stored in the ZooKeeper service instead of a local file.
Variable configParser The configuration parser to use for creating the configuration file.
Variable console The console to use for printing messages.
Variable cseEnvironment The selected CSE environment. This is used to determine which features to enable and which default values to use for the configuration file.
Variable currentStep The current step in the onboarding process. This is used to update the progress bar.
Variable progressBar The progress bar to use for showing the progress of the onboarding process.
Variable totalSteps The total number of steps in the onboarding process. This is used to calculate the progress bar.
Function _containsVariable Check if the value contains an interpolation variable.
Function _incrementStep Increment the current step and update the progress bar.
Function _optimizeConfig Remove default values from the configuration to optimize it. This is done to reduce the size of the configuration file and to make it easier to read.
Function _print Print a message to the console.
Function _printHeader Print a header with the given title.
Function _printRule Print a header with the given title and extras, and update the progress bar.
Function _setOption Set an option in the configuration if it is not already set, and return the value to use for the option. If the value is None, return None.
Variable _iniValues Default values for the configuration file.
Variable _interpolationVariable Regular expression to match interpolation variables.
def buildUserConfigFile(configFile: str | None, zkConfiguration: tuple[str, int, str | None] | None = None, overwrite: bool = False) -> tuple[bool, str | None, str | None]:

Build a new user configuration file interactively. If the zookeeper host, port, and root path are provided, the configuration will be stored in the ZooKeeper service instead of a local file.

Parameters
configFile:str | NoneThe configuration file to create.
zkConfiguration:tuple[str, int, str | None] | NoneA tuple containing the ZooKeeper host, port, and root path.
overwrite:boolIf True, overwrite the configuration or configuration file if it already exists.
Returns
A tuple with three elements
  • True if the configuration was created, False otherwise.
  • The configuration file name if created, None otherwise.
  • The error message if the configuration file could not be created, None otherwise.
configParser =

The configuration parser to use for creating the configuration file.

console =

The console to use for printing messages.

cseEnvironment: str =

The selected CSE environment. This is used to determine which features to enable and which default values to use for the configuration file.

currentStep: int =

The current step in the onboarding process. This is used to update the progress bar.

progressBar =

The progress bar to use for showing the progress of the onboarding process.

totalSteps: int =

The total number of steps in the onboarding process. This is used to calculate the progress bar.

def _containsVariable(value: str) -> bool:

Check if the value contains an interpolation variable.

Parameters
value:strThe value to check.
Returns
boolTrue if the value contains an interpolation variable, False otherwise.
def _incrementStep(count: int = 1):

Increment the current step and update the progress bar.

def _optimizeConfig(config: ACMEConfiguration.ACMEConfiguration):

Remove default values from the configuration to optimize it. This is done to reduce the size of the configuration file and to make it easier to read.

def _print(msg: str | Rule | Syntax = '\n', clearScreen: bool | None = True):

Print a message to the console.

Parameters
msg:str | Rule | SyntaxThe message to print. Could be a string, a Rule, or a Syntax object.
clearScreen:bool | NoneIf True, clear the console before printing the message.
def _printHeader(title: str):

Print a header with the given title.

Parameters
title:strThe title to print.
def _printRule(title: str, extras: str | None = None):

Print a header with the given title and extras, and update the progress bar.

Parameters
title:strThe title to print.
extras:str | NoneAdditional information to print.
def _setOption(config: ACMEConfiguration.ACMEConfiguration, section: str, option: str, value: str, toLower: bool | None = False) -> str:

Set an option in the configuration if it is not already set, and return the value to use for the option. If the value is None, return None.

Parameters
config:ACMEConfiguration.ACMEConfigurationThe configuration to set the option in.
section:strThe section of the option.
option:strThe name of the option.
value:strThe value to set for the option.
toLower:bool | NoneIf True, convert the value to lower case before setting it.
Returns
strUndocumented
_iniValues: dict[str, dict] =

Default values for the configuration file.

_interpolationVariable =

Regular expression to match interpolation variables.