The ironic_inspector.db Module

SQLAlchemy models for inspection data and shared database code.

class ironic_inspector.db.Attribute(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

name
node_uuid
uuid
value
class ironic_inspector.db.IntrospectionData(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

data
processed
uuid
class ironic_inspector.db.ModelBase[source]

Bases: oslo_db.sqlalchemy.models.ModelBase

class ironic_inspector.db.Node(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

error
finished_at
manage_boot
started_at
state
uuid
version_id
class ironic_inspector.db.Option(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

name
uuid
value
class ironic_inspector.db.Rule(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

actions
conditions
created_at
description
disabled
uuid
class ironic_inspector.db.RuleAction(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

action
as_dict()[source]
id
params
rule
class ironic_inspector.db.RuleCondition(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

as_dict()[source]
field
id
invert
multiple
op
params
rule
ironic_inspector.db.ensure_transaction(session=None)[source]
ironic_inspector.db.get_context_manager()[source]

Create transaction context manager lazily.

Returns

The transaction context manager.

ironic_inspector.db.get_reader_session()[source]

Help method to get reader session.

Returns

The reader session.

ironic_inspector.db.get_writer_session()[source]

Help method to get writer session.

Returns

The writer session.

ironic_inspector.db.init()[source]

Initialize the database.

Method called on service start up, initialize transaction context manager and try to create db session.

ironic_inspector.db.model_query(model, *args, **kwargs)[source]

Query helper for simpler session usage.

Parameters

session – if present, the session to use