enrobie.plugins.status package#
Subpackages#
Submodules#
enrobie.plugins.status.common module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
enrobie.plugins.status.helpers module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- enrobie.plugins.status.helpers.composedsc(plugin: StatusPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.status.helpers.composeirc(plugin: StatusPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.status.helpers.composemtm(plugin: StatusPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.status.helpers.grouped(plugin: StatusPlugin) dict[str, list[StatusPluginItem]][source]#
Return the dictionary with status value stored by group.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- Returns:
Dictionary with status value stored by group.
- enrobie.plugins.status.helpers.reportdsc(plugin: StatusPlugin, client: RobieClient, status: StatusPluginItem, report: StatusPluginReportParams) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
client – Client class instance for Chatting Robie.
status – Object containing the status information.
report – Object containing the report information.
- enrobie.plugins.status.helpers.reportirc(plugin: StatusPlugin, client: RobieClient, status: StatusPluginItem, report: StatusPluginReportParams) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
client – Client class instance for Chatting Robie.
status – Object containing the status information.
report – Object containing the report information.
- enrobie.plugins.status.helpers.reportmtm(plugin: StatusPlugin, client: RobieClient, status: StatusPluginItem, report: StatusPluginReportParams) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
client – Client class instance for Chatting Robie.
status – Object containing the status information.
report – Object containing the report information.
enrobie.plugins.status.params module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.status.params.StatusPluginCommandParams(*, irc: Annotated[str, MinLen(min_length=2)] = '!status', dsc: Annotated[str, MinLen(min_length=2)] = '!status', mtm: Annotated[str, MinLen(min_length=2)] = '!status')[source]#
Bases:
RobieParamsModelProcess and validate the Robie configuration parameters.
- dsc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!status', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
- irc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!status', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.status.params.StatusPluginIconParams(*, irc: Annotated[str | None, MinLen(min_length=1)] = None, dsc: Annotated[str | None, MinLen(min_length=1)] = None, mtm: Annotated[str | None, MinLen(min_length=1)] = None)[source]#
Bases:
RobieParamsModelContain information for constructing the chat messages.
- dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
- irc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.status.params.StatusPluginIconsParams(*, pending: StatusPluginIconParams = <factory>, normal: StatusPluginIconParams = <factory>, failure: StatusPluginIconParams = <factory>, unknown: StatusPluginIconParams = <factory>)[source]#
Bases:
RobieParamsModelContain information for constructing the chat messages.
- failure: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- normal: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
- pending: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
- unknown: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
- class enrobie.plugins.status.params.StatusPluginParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, enable: bool = False, locate: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, trusted: ~typing.Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, reports: ~typing.Annotated[list[~enrobie.plugins.status.params.StatusPluginReportParams] | None, ~annotated_types.MinLen(min_length=1)] = None, command: ~enrobie.plugins.status.params.StatusPluginCommandParams = <factory>, icons: ~enrobie.plugins.status.params.StatusPluginIconsParams = <factory>)[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
- command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')]#
- icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.status.params.StatusPluginReportParams(*, client: Annotated[str, MinLen(min_length=1)], target: Annotated[str, MinLen(min_length=1)], states: Annotated[list[Literal['pending', 'normal', 'failure', 'unknown']] | None, MinLen(min_length=1)] = None, delay: Annotated[int, Ge(ge=0), Le(le=864000)] = 15)[source]#
Bases:
RobieParamsModelContain information for constructing the chat messages.
- client: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Client where channel exists', metadata=[MinLen(min_length=1)])]#
- delay: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=15, description='Period between status reports', metadata=[Ge(ge=0), Le(le=864000)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
enrobie.plugins.status.plugin module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.status.plugin.StatusPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin responds to inquiries about Robie status.
- property params: StatusPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[StatusPluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property status: StatusPluginItems#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- update(unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown']) None[source]#
Update or insert the status of the Robie child instance.
- Parameters:
unique – Unique identifier to use for the status.
group – Name for the group the status is membered.
title – Friendly name of the related unique entry.
icon – Optional icon object if supported platform.
state – One of several possible value for status.
Module contents#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.status.StatusPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin responds to inquiries about Robie status.
- property params: StatusPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[StatusPluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property status: StatusPluginItems#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- update(unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown']) None[source]#
Update or insert the status of the Robie child instance.
- Parameters:
unique – Unique identifier to use for the status.
group – Name for the group the status is membered.
title – Friendly name of the related unique entry.
icon – Optional icon object if supported platform.
state – One of several possible value for status.
- class enrobie.plugins.status.StatusPluginIconParams(*, irc: Annotated[str | None, MinLen(min_length=1)] = None, dsc: Annotated[str | None, MinLen(min_length=1)] = None, mtm: Annotated[str | None, MinLen(min_length=1)] = None)[source]#
Bases:
RobieParamsModelContain information for constructing the chat messages.
- dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
- irc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.status.StatusPluginItem(time: Time, unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown'])[source]#
Bases:
objectContain the relevant status information for the entry.
- icon: StatusPluginIconParams#
- class enrobie.plugins.status.StatusPluginParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, enable: bool = False, locate: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, trusted: ~typing.Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, reports: ~typing.Annotated[list[~enrobie.plugins.status.params.StatusPluginReportParams] | None, ~annotated_types.MinLen(min_length=1)] = None, command: ~enrobie.plugins.status.params.StatusPluginCommandParams = <factory>, icons: ~enrobie.plugins.status.params.StatusPluginIconsParams = <factory>)[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
- command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')]#
- icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].