~soren/nova/lp658257

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Michael Gundlach
  • Date: 2010-10-05 18:58:37 UTC
  • mfrom: (295.1.22 servers_api)
  • Revision ID: hudson@openstack.org-20101005185837-wb2sq7zy5swxa9q7
Replace model.Instance.ec2_id with an integer internal_id so that both APIs can represent the ID to external users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
    __tablename__ = 'instances'
153
153
    __prefix__ = 'i'
154
154
    id = Column(Integer, primary_key=True)
155
 
    ec2_id = Column(String(10), unique=True)
 
155
    internal_id = Column(Integer, unique=True)
156
156
 
157
157
    admin_pass = Column(String(255))
158
158
 
169
169
 
170
170
    @property
171
171
    def name(self):
172
 
        return self.ec2_id
 
172
        return self.internal_id
173
173
 
174
174
    image_id = Column(String(255))
175
175
    kernel_id = Column(String(255))