diff options
| author | Yun Mao <yunmao@gmail.com> | 2012-05-24 15:42:46 -0400 |
|---|---|---|
| committer | Yun Mao <yunmao@gmail.com> | 2012-05-24 15:44:56 -0400 |
| commit | 6b4012de9fef7b1f6695bca26f67c31a5f69617d (patch) | |
| tree | 7e5ce290c1ca102a03c561d306f84ac64fc3f36a | |
| parent | d7eef34fdea8f94068dd2d745cba1ae493af61a9 (diff) | |
removed a dead db function register_models()
The actual models are created by the migration modules.
register_models() are no longer used and raises some confusions.
Change-Id: Id418917f3bbcf9a951b89bec01499a53cc92f57b
| -rw-r--r-- | nova/db/sqlalchemy/models.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 78fcaa7e5..fa10356a6 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -1049,51 +1049,3 @@ class InstanceFault(BASE, NovaBase): code = Column(Integer(), nullable=False) message = Column(String(255)) details = Column(Text) - - -def register_models(): - """Register Models and create metadata. - - Called from nova.db.sqlalchemy.__init__ as part of loading the driver, - it will never need to be called explicitly elsewhere unless the - connection is lost and needs to be reestablished. - """ - from sqlalchemy import create_engine - models = (AgentBuild, - Aggregate, - AggregateHost, - AggregateMetadata, - AuthToken, - Certificate, - Cell, - Console, - ConsolePool, - FixedIp, - FloatingIp, - Instance, - InstanceFault, - InstanceMetadata, - InstanceTypeExtraSpecs, - InstanceTypes, - IscsiTarget, - Migration, - Network, - Project, - SecurityGroup, - SecurityGroupIngressRule, - SecurityGroupInstanceAssociation, - Service, - SMBackendConf, - SMFlavors, - SMVolume, - User, - Volume, - VolumeMetadata, - VolumeTypeExtraSpecs, - VolumeTypes, - VolumeIdMapping, - SnapshotIdMapping, - ) - engine = create_engine(FLAGS.sql_connection, echo=False) - for model in models: - model.metadata.create_all(engine) |
