The watcher.db.sqlalchemy.models Module

The watcher.db.sqlalchemy.models Module

SQLAlchemy models for watcher service

class watcher.db.sqlalchemy.models.APScheulerJob(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents apscheduler jobs

class watcher.db.sqlalchemy.models.Action(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents an action.

class watcher.db.sqlalchemy.models.ActionDescription(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents a action description

class watcher.db.sqlalchemy.models.ActionPlan(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents an action plan.

class watcher.db.sqlalchemy.models.Audit(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents an audit.

class watcher.db.sqlalchemy.models.AuditTemplate(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents an audit template.

class watcher.db.sqlalchemy.models.EfficacyIndicator(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents an efficacy indicator.

class watcher.db.sqlalchemy.models.Goal(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents a goal.

class watcher.db.sqlalchemy.models.JSONEncodedDict(*args, **kwargs)[source]

Bases: watcher.db.sqlalchemy.models.JsonEncodedType

Represents dict serialized as json-encoded string in db.

type

alias of __builtin__.dict

class watcher.db.sqlalchemy.models.JSONEncodedList(*args, **kwargs)[source]

Bases: watcher.db.sqlalchemy.models.JsonEncodedType

Represents list serialized as json-encoded string in db.

type

alias of __builtin__.list

class watcher.db.sqlalchemy.models.JsonEncodedType(*args, **kwargs)[source]

Bases: sqlalchemy.sql.type_api.TypeDecorator

Abstract base type serialized as json-encoded string in db.

impl

alias of sqlalchemy.sql.sqltypes.TEXT

process_bind_param(value, dialect)[source]

Receive a bound parameter value to be converted.

Subclasses override this method to return the value that should be passed along to the underlying TypeEngine object, and from there to the DBAPI execute() method.

The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.

This operation should be designed with the reverse operation in mind, which would be the process_result_value method of this class.

Parameters:
  • value – Data to operate upon, of any type expected by this method in the subclass. Can be None.
  • dialect – the Dialect in use.
process_result_value(value, dialect)[source]

Receive a result-row column value to be converted.

Subclasses should implement this method to operate on data fetched from the database.

Subclasses override this method to return the value that should be passed back to the application, given a value that is already processed by the underlying TypeEngine object, originally from the DBAPI cursor method fetchone() or similar.

The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.

Parameters:
  • value – Data to operate upon, of any type expected by this method in the subclass. Can be None.
  • dialect – the Dialect in use.

This operation should be designed to be reversible by the “process_bind_param” method of this class.

class watcher.db.sqlalchemy.models.ScoringEngine(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents a scoring engine.

class watcher.db.sqlalchemy.models.Service(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents a service entity

class watcher.db.sqlalchemy.models.Strategy(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Represents a strategy.

class watcher.db.sqlalchemy.models.WatcherBase[source]

Bases: oslo_db.sqlalchemy.models.SoftDeleteMixin, oslo_db.sqlalchemy.models.TimestampMixin, oslo_db.sqlalchemy.models.ModelBase

as_dict()[source]
save(session=None)[source]

Save this object.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.