Enasis Network Orchestrations#
Configuration Container#
- class orchestro.orche.OrcheConfig(sargs: dict[str, Any] | None = None, files: str | Path | list[str | Path] | tuple[str | Path] | set[str] | None = None, paths: str | Path | list[str | Path] | tuple[str | Path] | set[str] | None = None, cargs: dict[str, Any] | None = None)[source]
Bases:
Config
Contain the configurations from the arguments and files.
- Parameters:
sargs – Additional arguments on the command line.
files – Complete or relative path to config files.
paths – Complete or relative path to config paths.
cargs – Configuration arguments in dictionary form, which will override contents from the config files.
- property params: OrcheParams
Return the Pydantic model containing the configuration.
Warning
This method completely overrides the parent but is based on that code, would be unfortunate if upstream changes meant this breaks or breaks something else.
- Returns:
Pydantic model containing the configuration.
Parameters Container#
- pydantic model orchestro.orche.params.OrcheParams[source]
Bases:
Params
Process and validate the core configuration parameters.
Show JSON schema
{ "title": "OrcheParams", "description": "Process and validate the core configuration parameters.", "type": "object", "properties": { "enconfig": { "anyOf": [ { "$ref": "#/$defs/ConfigParams" }, { "type": "null" } ], "default": null, "description": "Parameters for Config instance" }, "enlogger": { "anyOf": [ { "$ref": "#/$defs/LoggerParams" }, { "type": "null" } ], "default": null, "description": "Parameters for Logger instance" }, "encrypts": { "anyOf": [ { "$ref": "#/$defs/CryptsParams" }, { "type": "null" } ], "default": null, "description": "Parameters for Crypts instance" }, "database": { "default": "sqlite:///:memory:", "description": "Database connection string", "minLength": 1, "title": "Database", "type": "string" }, "dryrun": { "default": false, "description": "Determine if changes applied", "title": "Dryrun", "type": "boolean" }, "systems": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/OrcheSystemParams" }, "minProperties": 1, "type": "object" }, { "type": "null" } ], "default": null, "description": "Parameters for Orche systems", "title": "Systems" }, "persons": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/OrchePersonParams" }, "minProperties": 1, "type": "object" }, { "type": "null" } ], "default": null, "description": "Parameters for Orche persons", "title": "Persons" }, "subnets": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/OrcheSubnetParams" }, "minProperties": 1, "type": "object" }, { "type": "null" } ], "default": null, "description": "Parameters for Orche subnets", "title": "Subnets" }, "groups": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/OrcheGroupParams" }, "minProperties": 1, "type": "object" }, { "type": "null" } ], "default": null, "description": "Parameters for Orche groups", "title": "Groups" } }, "$defs": { "ConfigParams": { "additionalProperties": false, "description": "Process and validate the core configuration parameters.", "properties": { "paths": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Location of configuration files", "title": "Paths" } }, "title": "ConfigParams", "type": "object" }, "CryptParams": { "additionalProperties": false, "description": "Process and validate the core configuration parameters.", "properties": { "phrase": { "description": "Passphrase for the operations", "minLength": 1, "title": "Phrase", "type": "string" } }, "required": [ "phrase" ], "title": "CryptParams", "type": "object" }, "CryptsParams": { "additionalProperties": false, "description": "Process and validate the core configuration parameters.", "properties": { "phrases": { "additionalProperties": { "$ref": "#/$defs/CryptParams" }, "description": "Passphrases for the operations", "minProperties": 0, "title": "Phrases", "type": "object" } }, "required": [ "phrases" ], "title": "CryptsParams", "type": "object" }, "LoggerParams": { "additionalProperties": false, "description": "Process and validate the core configuration parameters.", "properties": { "stdo_level": { "anyOf": [ { "enum": [ "critical", "debug", "error", "info", "warning" ], "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Minimum logging message level", "title": "Stdo Level" }, "file_level": { "anyOf": [ { "enum": [ "critical", "debug", "error", "info", "warning" ], "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Minimum logging message level", "title": "File Level" }, "file_path": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Enable output to the log file", "title": "File Path" } }, "title": "LoggerParams", "type": "object" }, "OrcheGroupAnsibleParams": { "additionalProperties": true, "description": "Process and validate the Orche configuration parameters.", "properties": {}, "title": "OrcheGroupAnsibleParams", "type": "object" }, "OrcheGroupParams": { "additionalProperties": false, "description": "Process and validate the Orche configuration parameters.", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "realm": { "default": "ansible", "description": "Logical realm for the object", "enum": [ "domain", "local", "site", "zone", "ansible", "psuedo" ], "title": "Realm", "type": "string" }, "ansible": { "anyOf": [ { "$ref": "#/$defs/OrcheGroupAnsibleParams" }, { "type": "null" } ], "default": null, "description": "Variables provided to Ansible" } }, "title": "OrcheGroupParams", "type": "object" }, "OrchePersonParams": { "additionalProperties": false, "description": "Process and validate the Orche configuration parameters.", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "realm": { "default": "psuedo", "description": "Logical realm for the object", "enum": [ "domain", "local", "psuedo" ], "title": "Realm", "type": "string" }, "domain": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Domain to which child belongs", "title": "Domain" }, "first": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "First name for person account", "title": "First" }, "last": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Last name for person account", "title": "Last" } }, "title": "OrchePersonParams", "type": "object" }, "OrcheSubnetParams": { "additionalProperties": false, "description": "Process and validate the Orche configuration parameters.", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "subnet": { "description": "IPv4 or IPv6 network subnet", "minLength": 1, "title": "Subnet", "type": "string" } }, "required": [ "subnet" ], "title": "OrcheSubnetParams", "type": "object" }, "OrcheSystemAnsibleParams": { "additionalProperties": true, "description": "Process and validate the Orche configuration parameters.", "properties": {}, "title": "OrcheSystemAnsibleParams", "type": "object" }, "OrcheSystemParams": { "additionalProperties": false, "description": "Process and validate the Orche configuration parameters.", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "realm": { "default": "ansible", "description": "Logical realm for the object", "enum": [ "ansible", "psuedo" ], "title": "Realm", "type": "string" }, "domain": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Domain to which child belongs", "title": "Domain" }, "ansible": { "anyOf": [ { "$ref": "#/$defs/OrcheSystemAnsibleParams" }, { "type": "null" } ], "default": null, "description": "Variables provided to Ansible" } }, "title": "OrcheSystemParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
groups (dict[str, orchestro.orche.params.group.OrcheGroupParams] | None)
persons (dict[str, orchestro.orche.params.person.OrchePersonParams] | None)
subnets (dict[str, orchestro.orche.params.subnet.OrcheSubnetParams] | None)
systems (dict[str, orchestro.orche.params.system.OrcheSystemParams] | None)
- field database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])] = 'sqlite:///:memory:'
Database connection string
- Constraints:
min_length = 1
- field dryrun: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Determine if changes applied')] = False
Determine if changes applied
- field groups: Annotated[dict[str, OrcheGroupParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche groups', metadata=[MinLen(min_length=1)])] = None
Parameters for Orche groups
- Constraints:
min_length = 1
- field persons: Annotated[dict[str, OrchePersonParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche persons', metadata=[MinLen(min_length=1)])] = None
Parameters for Orche persons
- Constraints:
min_length = 1
Orche Children#
- pydantic model orchestro.orche.params.OrcheSystemParams[source]
Bases:
OrcheChildParams
Process and validate the Orche configuration parameters.
Show JSON schema
{ "title": "OrcheSystemParams", "description": "Process and validate the Orche configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "realm": { "default": "ansible", "description": "Logical realm for the object", "enum": [ "ansible", "psuedo" ], "title": "Realm", "type": "string" }, "domain": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Domain to which child belongs", "title": "Domain" }, "ansible": { "anyOf": [ { "$ref": "#/$defs/OrcheSystemAnsibleParams" }, { "type": "null" } ], "default": null, "description": "Variables provided to Ansible" } }, "$defs": { "OrcheSystemAnsibleParams": { "additionalProperties": true, "description": "Process and validate the Orche configuration parameters.", "properties": {}, "title": "OrcheSystemAnsibleParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field ansible: Annotated[OrcheSystemAnsibleParams | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Variables provided to Ansible')] = None
Variables provided to Ansible
- pydantic model orchestro.orche.params.OrchePersonParams[source]
Bases:
OrcheChildParams
Process and validate the Orche configuration parameters.
Show JSON schema
{ "title": "OrchePersonParams", "description": "Process and validate the Orche configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "realm": { "default": "psuedo", "description": "Logical realm for the object", "enum": [ "domain", "local", "psuedo" ], "title": "Realm", "type": "string" }, "domain": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Domain to which child belongs", "title": "Domain" }, "first": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "First name for person account", "title": "First" }, "last": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Last name for person account", "title": "Last" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field domain: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Domain to which child belongs', metadata=[MinLen(min_length=1)])] = None
Domain to which child belongs
- Constraints:
min_length = 1
- field first: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='First name for person account', metadata=[MinLen(min_length=1)])] = None
First name for person account
- Constraints:
min_length = 1
- pydantic model orchestro.orche.params.OrcheSubnetParams[source]
Bases:
OrcheChildParams
Process and validate the Orche configuration parameters.
Show JSON schema
{ "title": "OrcheSubnetParams", "description": "Process and validate the Orche configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "subnet": { "description": "IPv4 or IPv6 network subnet", "minLength": 1, "title": "Subnet", "type": "string" } }, "additionalProperties": false, "required": [ "subnet" ] }
- Config:
extra: str = forbid
- Fields:
- pydantic model orchestro.orche.params.OrcheGroupParams[source]
Bases:
OrcheChildParams
Process and validate the Orche configuration parameters.
Show JSON schema
{ "title": "OrcheGroupParams", "description": "Process and validate the Orche configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "inherits": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Other configuration to inherit", "title": "Inherits" }, "display": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Friendly name value for child", "title": "Display" }, "memberof": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Groups child is a member of", "title": "Memberof" }, "realm": { "default": "ansible", "description": "Logical realm for the object", "enum": [ "domain", "local", "site", "zone", "ansible", "psuedo" ], "title": "Realm", "type": "string" }, "ansible": { "anyOf": [ { "$ref": "#/$defs/OrcheGroupAnsibleParams" }, { "type": "null" } ], "default": null, "description": "Variables provided to Ansible" } }, "$defs": { "OrcheGroupAnsibleParams": { "additionalProperties": true, "description": "Process and validate the Orche configuration parameters.", "properties": {}, "title": "OrcheGroupAnsibleParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field ansible: Annotated[OrcheGroupAnsibleParams | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Variables provided to Ansible')] = None
Variables provided to Ansible