~ubuntu-branches/ubuntu/natty/nova/natty

« back to all changes in this revision

Viewing changes to nova/db/sqlalchemy/models.py

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Chuck Short, Soren Hansen, Thierry Carrez
  • Date: 2011-02-18 09:36:22 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110218093622-w13dzywbd7vq2qh7
Tags: 2011.2~bzr700-0ubuntu1
[ Chuck Short ]
* New upstream version.

[ Soren Hansen ]
* Rely on --logdir to find and use the correct logfile.
* Remove the postrotate magic for all but nova-objectstore. It is not
  needed anymore due to using RotatingFileHandler for logging.

[ Thierry Carrez ]
* Ship adminclient in a separate package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
                                              "vpn_public_port"),
374
374
                      {'mysql_engine': 'InnoDB'})
375
375
    id = Column(Integer, primary_key=True)
 
376
    label = Column(String(255))
376
377
 
377
378
    injected = Column(Boolean, default=False)
378
379
    cidr = Column(String(255), unique=True)
535
536
    pool = relationship(ConsolePool, backref=backref('consoles'))
536
537
 
537
538
 
 
539
class Zone(BASE, NovaBase):
 
540
    """Represents a child zone of this zone."""
 
541
    __tablename__ = 'zones'
 
542
    id = Column(Integer, primary_key=True)
 
543
    api_url = Column(String(255))
 
544
    username = Column(String(255))
 
545
    password = Column(String(255))
 
546
 
 
547
 
538
548
def register_models():
539
549
    """Register Models and create metadata.
540
550
 
547
557
              Volume, ExportDevice, IscsiTarget, FixedIp, FloatingIp,
548
558
              Network, SecurityGroup, SecurityGroupIngressRule,
549
559
              SecurityGroupInstanceAssociation, AuthToken, User,
550
 
              Project, Certificate, ConsolePool, Console)  # , Image, Host
 
560
              Project, Certificate, ConsolePool, Console, Zone)
551
561
    engine = create_engine(FLAGS.sql_connection, echo=False)
552
562
    for model in models:
553
563
        model.metadata.create_all(engine)