orchestro.orche.params package#

Submodules#

orchestro.orche.params.child module#

class orchestro.orche.params.child.OrcheChildParams[source]#

Bases: OrcheParamsModel

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

display

str | None

No

None

min_length=1

enable

bool

No

False

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

memberof

list[str] | None

No

None

min_length=1

enable: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Determine whether child enabled')]#
inherits: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Other configuration to inherit', metadata=[MinLen(min_length=1)])]#
display: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Friendly name value for child', metadata=[MinLen(min_length=1)])]#
about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Additional optional information', metadata=[MinLen(min_length=1)])]#
memberof: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Groups child is a member of', metadata=[MinLen(min_length=1)])]#
kvparsed: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and before Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#
kvopaque: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and when Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#

orchestro.orche.params.common module#

Functions and routines associated with Enasis Network Homie Automate.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class orchestro.orche.params.common.OrcheParamsModel[source]#

Bases: BaseModel

Process and validate the Homie configuration parameters.

orchestro.orche.params.group module#

class orchestro.orche.params.group.OrcheGroupAnsibleParams[source]#

Bases: OrcheParamsModel

Process and validate the Orche configuration parameters.

class orchestro.orche.params.group.OrcheGroupParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

ansible

OrcheGroupAnsibleParams | None

No

None

display

str | None

No

None

min_length=1

enable

bool

No

False

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

memberof

list[str] | None

No

None

min_length=1

realm

Literal[‘domain’, ‘local’, ‘site’, ‘zone’, ‘ansible’, ‘psuedo’]

No

'ansible'

realm: Annotated[Literal['domain', 'local', 'site', 'zone', 'ansible', 'psuedo'], FieldInfo(annotation=NoneType, required=False, default='ansible', description='Logical realm for the object')]#
ansible: Annotated[OrcheGroupAnsibleParams | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Variables provided to Ansible')]#

orchestro.orche.params.orche module#

class orchestro.orche.params.orche.OrcheParams[source]#

Bases: Params

Process and validate the core configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

console

bool

No

False

database

str

No

'sqlite:///:memory:'

min_length=1

debug

bool

No

False

dryrun

bool

No

False

enconfig

ConfigParams | None

No

None

encrypts

CryptsParams | None

No

None

enlogger

LoggerParams | None

No

None

groups

dict[str, OrcheGroupParams] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

persons

dict[str, OrchePersonParams] | None

No

None

min_length=1

subnets

dict[str, OrcheSubnetParams] | None

No

None

min_length=1

systems

dict[str, OrcheSystemParams] | None

No

None

min_length=1

database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])]#
console: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Output console information; parameter is parsed by and used in low-level config')]#
debug: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Enable logging level debug; parameter is parsed by and used in low-level config')]#
dryrun: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Whether to allow changes')]#
systems: Annotated[dict[str, OrcheSystemParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche systems', metadata=[MinLen(min_length=1)])]#
persons: Annotated[dict[str, OrchePersonParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche persons', metadata=[MinLen(min_length=1)])]#
subnets: Annotated[dict[str, OrcheSubnetParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche subnets', metadata=[MinLen(min_length=1)])]#
groups: Annotated[dict[str, OrcheGroupParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche groups', metadata=[MinLen(min_length=1)])]#
kvparsed: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and before Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#
kvopaque: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and when Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#

orchestro.orche.params.person module#

class orchestro.orche.params.person.OrchePersonParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

display

str | None

No

None

min_length=1

domain

str | None

No

None

min_length=1

enable

bool

No

False

first

str | None

No

None

min_length=1

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

last

str | None

No

None

min_length=1

memberof

list[str] | None

No

None

min_length=1

realm

Literal[‘domain’, ‘local’, ‘psuedo’]

No

'psuedo'

realm: Annotated[Literal['domain', 'local', 'psuedo'], FieldInfo(annotation=NoneType, required=False, default='psuedo', description='Logical realm for the object')]#
domain: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Domain to which child belongs', metadata=[MinLen(min_length=1)])]#
first: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='First name for person account', metadata=[MinLen(min_length=1)])]#
last: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Last name for person account', metadata=[MinLen(min_length=1)])]#

orchestro.orche.params.subnet module#

class orchestro.orche.params.subnet.OrcheSubnetParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

display

str | None

No

None

min_length=1

enable

bool

No

False

gateway

str | None

No

None

min_length=1

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

macpref

str | None

No

None

min_length=2, max_length=2, pattern=``^[da-fA-F]+$``

memberof

list[str] | None

No

None

min_length=1

ntpsync

list[str] | None

No

None

min_length=1

resolve

list[str] | None

No

None

min_length=1

subnet

str

Yes

min_length=1

subnet: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='IPv4 or IPv6 network subnet', metadata=[MinLen(min_length=1)])]#
macpref: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional prefix for MAC address', metadata=[MinLen(min_length=2), MaxLen(max_length=2), _PydanticGeneralMetadata(pattern='^[\\da-fA-F]+$')])]#
gateway: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional gateway for the subnet', metadata=[MinLen(min_length=1)])]#
resolve: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional resolvers for subnet', metadata=[MinLen(min_length=1)])]#
ntpsync: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional NTP server for subnet', metadata=[MinLen(min_length=1)])]#

orchestro.orche.params.system module#

class orchestro.orche.params.system.OrcheSystemAnsibleParams[source]#

Bases: OrcheParamsModel

Process and validate the Orche configuration parameters.

class orchestro.orche.params.system.OrcheSystemParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

ansible

OrcheSystemAnsibleParams | None

No

None

display

str | None

No

None

min_length=1

domain

str | None

No

None

min_length=1

enable

bool

No

False

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

memberof

list[str] | None

No

None

min_length=1

realm

Literal[‘ansible’, ‘psuedo’]

No

'ansible'

realm: Annotated[Literal['ansible', 'psuedo'], FieldInfo(annotation=NoneType, required=False, default='ansible', description='Logical realm for the object')]#
domain: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Domain to which child belongs', metadata=[MinLen(min_length=1)])]#
ansible: Annotated[OrcheSystemAnsibleParams | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Variables provided to Ansible')]#

Module contents#

class orchestro.orche.params.OrcheParams[source]#

Bases: Params

Process and validate the core configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

console

bool

No

False

database

str

No

'sqlite:///:memory:'

min_length=1

debug

bool

No

False

dryrun

bool

No

False

enconfig

ConfigParams | None

No

None

encrypts

CryptsParams | None

No

None

enlogger

LoggerParams | None

No

None

groups

dict[str, OrcheGroupParams] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

persons

dict[str, OrchePersonParams] | None

No

None

min_length=1

subnets

dict[str, OrcheSubnetParams] | None

No

None

min_length=1

systems

dict[str, OrcheSystemParams] | None

No

None

min_length=1

database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])]#
console: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Output console information; parameter is parsed by and used in low-level config')]#
debug: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Enable logging level debug; parameter is parsed by and used in low-level config')]#
dryrun: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Whether to allow changes')]#
systems: Annotated[dict[str, OrcheSystemParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche systems', metadata=[MinLen(min_length=1)])]#
persons: Annotated[dict[str, OrchePersonParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche persons', metadata=[MinLen(min_length=1)])]#
subnets: Annotated[dict[str, OrcheSubnetParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche subnets', metadata=[MinLen(min_length=1)])]#
groups: Annotated[dict[str, OrcheGroupParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Parameters for Orche groups', metadata=[MinLen(min_length=1)])]#
kvparsed: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and before Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#
kvopaque: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and when Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#
class orchestro.orche.params.OrcheParamsModel[source]#

Bases: BaseModel

Process and validate the Homie configuration parameters.

class orchestro.orche.params.OrcheChildParams[source]#

Bases: OrcheParamsModel

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

display

str | None

No

None

min_length=1

enable

bool

No

False

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

memberof

list[str] | None

No

None

min_length=1

enable: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=False, description='Determine whether child enabled')]#
inherits: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Other configuration to inherit', metadata=[MinLen(min_length=1)])]#
display: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Friendly name value for child', metadata=[MinLen(min_length=1)])]#
about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Additional optional information', metadata=[MinLen(min_length=1)])]#
memberof: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Groups child is a member of', metadata=[MinLen(min_length=1)])]#
kvparsed: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and before Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#
kvopaque: Annotated[dict[str, Any], FieldInfo(annotation=NoneType, required=False, default_factory=dict, description='Additional metadata for child which is parsed after childs are instantiated and when Ansible consumes inventory', metadata=[MinLen(min_length=0)])]#
class orchestro.orche.params.OrcheGroupParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

ansible

OrcheGroupAnsibleParams | None

No

None

display

str | None

No

None

min_length=1

enable

bool

No

False

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

memberof

list[str] | None

No

None

min_length=1

realm

Literal[‘domain’, ‘local’, ‘site’, ‘zone’, ‘ansible’, ‘psuedo’]

No

'ansible'

realm: Annotated[Literal['domain', 'local', 'site', 'zone', 'ansible', 'psuedo'], FieldInfo(annotation=NoneType, required=False, default='ansible', description='Logical realm for the object')]#
ansible: Annotated[OrcheGroupAnsibleParams | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Variables provided to Ansible')]#
class orchestro.orche.params.OrchePersonParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

display

str | None

No

None

min_length=1

domain

str | None

No

None

min_length=1

enable

bool

No

False

first

str | None

No

None

min_length=1

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

last

str | None

No

None

min_length=1

memberof

list[str] | None

No

None

min_length=1

realm

Literal[‘domain’, ‘local’, ‘psuedo’]

No

'psuedo'

realm: Annotated[Literal['domain', 'local', 'psuedo'], FieldInfo(annotation=NoneType, required=False, default='psuedo', description='Logical realm for the object')]#
domain: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Domain to which child belongs', metadata=[MinLen(min_length=1)])]#
first: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='First name for person account', metadata=[MinLen(min_length=1)])]#
last: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Last name for person account', metadata=[MinLen(min_length=1)])]#
class orchestro.orche.params.OrcheSubnetParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

display

str | None

No

None

min_length=1

enable

bool

No

False

gateway

str | None

No

None

min_length=1

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

macpref

str | None

No

None

min_length=2, max_length=2, pattern=``^[da-fA-F]+$``

memberof

list[str] | None

No

None

min_length=1

ntpsync

list[str] | None

No

None

min_length=1

resolve

list[str] | None

No

None

min_length=1

subnet

str

Yes

min_length=1

subnet: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='IPv4 or IPv6 network subnet', metadata=[MinLen(min_length=1)])]#
macpref: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional prefix for MAC address', metadata=[MinLen(min_length=2), MaxLen(max_length=2), _PydanticGeneralMetadata(pattern='^[\\da-fA-F]+$')])]#
gateway: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional gateway for the subnet', metadata=[MinLen(min_length=1)])]#
resolve: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional resolvers for subnet', metadata=[MinLen(min_length=1)])]#
ntpsync: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional NTP server for subnet', metadata=[MinLen(min_length=1)])]#
class orchestro.orche.params.OrcheSystemParams[source]#

Bases: OrcheChildParams

Process and validate the Orche configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

about

str | None

No

None

min_length=1

ansible

OrcheSystemAnsibleParams | None

No

None

display

str | None

No

None

min_length=1

domain

str | None

No

None

min_length=1

enable

bool

No

False

inherits

list[str] | None

No

None

min_length=1

kvopaque

dict[str, Any]

No

factory

min_length=0

kvparsed

dict[str, Any]

No

factory

min_length=0

memberof

list[str] | None

No

None

min_length=1

realm

Literal[‘ansible’, ‘psuedo’]

No

'ansible'

realm: Annotated[Literal['ansible', 'psuedo'], FieldInfo(annotation=NoneType, required=False, default='ansible', description='Logical realm for the object')]#
domain: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Domain to which child belongs', metadata=[MinLen(min_length=1)])]#
ansible: Annotated[OrcheSystemAnsibleParams | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Variables provided to Ansible')]#