~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandleman
  • Date: 2012-01-13 09:51:10 UTC
  • mfrom: (1.1.40)
  • Revision ID: package-import@ubuntu.com-20120113095110-ffd6163drcg77wez
Tags: 2012.1~e3~20120113.12049-0ubuntu1
[Chuck Short]
* New upstream version.
* debian/nova_sudoers, debian/nova-common.install, 
  Switch out to nova-rootwrap. (LP: #681774)
* Add "get-origsource-git" which allows developers to 
  generate a tarball from github, by doing:
  fakeroot debian/rules get-orig-source-git
* debian/debian/nova-objectstore.logrotate: Dont determine
  if we are running Debian or Ubuntu. (LP: #91379)

[Adam Gandleman]
* Removed python-nova.postinst, let dh_python2 generate instead since
  python-support is not a dependency. (LP: #907543)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
2
 
 
3
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
3
4
# Copyright 2010 United States Government as represented by the
4
5
# Administrator of the National Aeronautics and Space Administration.
5
6
# Copyright 2011 Piston Cloud Computing, Inc.
146
147
    # above, since it is copied from <cpu> tag of getCapabilities()
147
148
    # (See libvirt.virtConnection).
148
149
    cpu_info = Column(Text, nullable=True)
 
150
    disk_available_least = Column(Integer)
149
151
 
150
152
 
151
153
class Certificate(BASE, NovaBase):
256
258
    auto_disk_config = Column(Boolean())
257
259
    progress = Column(Integer)
258
260
 
 
261
    # EC2 instance_initiated_shutdown_teminate
 
262
    # True: -> 'terminate'
 
263
    # False: -> 'stop'
 
264
    shutdown_terminate = Column(Boolean(), default=True, nullable=False)
 
265
 
 
266
    # EC2 disable_api_termination
 
267
    disable_terminate = Column(Boolean(), default=False, nullable=False)
 
268
 
259
269
 
260
270
class InstanceInfoCache(BASE, NovaBase):
261
271
    """
262
272
    Represents a cache of information about an instance
263
273
    """
264
274
    __tablename__ = 'instance_info_caches'
265
 
    id = Column(String(36), primary_key=True)
 
275
    id = Column(Integer, primary_key=True, autoincrement=True)
266
276
 
267
277
    # text column used for storing a json object of network data for api
268
278
    network_info = Column(Text)
269
279
 
270
 
    # this is all uuid based, we have them might as well start using them
271
280
    instance_id = Column(String(36), ForeignKey('instances.uuid'),
272
281
                                     nullable=False, unique=True)
273
282
    instance = relationship(Instance,
711
720
    project_id = Column(String(255))
712
721
    host = Column(String(255))  # , ForeignKey('hosts.id'))
713
722
    auto_assigned = Column(Boolean, default=False, nullable=False)
 
723
    pool = Column(String(255))
 
724
    interface = Column(String(255))
714
725
 
715
726
 
716
727
class AuthToken(BASE, NovaBase):
931
942
    """
932
943
    from sqlalchemy import create_engine
933
944
    models = (Service, Instance, InstanceActions, InstanceTypes,
934
 
              Volume, ExportDevice, IscsiTarget, FixedIp, FloatingIp,
 
945
              Volume, IscsiTarget, FixedIp, FloatingIp,
935
946
              Network, SecurityGroup, SecurityGroupIngressRule,
936
947
              SecurityGroupInstanceAssociation, AuthToken, User,
937
948
              Project, Certificate, ConsolePool, Console, Zone,