ironicclient.osc.command module

Typed base command classes for ironicclient OSC commands.

These subclass osc-lib’s command classes and annotate app so that self.app.client_manager.baremetal is statically known to be ironicclient.v1.client.Client, removing the need for # type: ignore[attr-defined] throughout the command implementations.

See https://review.opendev.org/c/openstack/python-openstackclient/+/970681 for the equivalent pattern in python-openstackclient.

class ironicclient.osc.command.Command(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)[source]

Bases: Command

app: _App
log: logging.Logger = <Logger ironicclient.osc.command.Command (WARNING)>
class ironicclient.osc.command.Lister(app: App, app_args: Namespace | None, cmd_name: str | None = None)[source]

Bases: Command, Lister

log: logging.Logger = <Logger ironicclient.osc.command.Lister (WARNING)>
class ironicclient.osc.command.ShowOne(app: App, app_args: Namespace | None, cmd_name: str | None = None)[source]

Bases: Command, ShowOne

log: logging.Logger = <Logger ironicclient.osc.command.ShowOne (WARNING)>