ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxmrlv <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #31: ARIA-30-SQL-based-storage-implementati...
Date Mon, 05 Dec 2016 15:15:48 GMT
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/31#discussion_r90880920
  
    --- Diff: aria/storage/models.py ---
    @@ -339,94 +324,100 @@ class Node(SQLModelBase):
         Node model representation.
         """
         __tablename__ = 'nodes'
    +    id = Column(Integer, primary_key=True)
     
         # See base class for an explanation on these properties
         is_id_unique = False
     
    -    _private_fields = ['deployment_fk']
    -    deployment_fk = foreign_key(Deployment.storage_id)
    -
    -    deployment_id = association_proxy('deployment', 'id')
    -    blueprint_id = association_proxy('blueprint', 'id')
    +    _private_fields = ['deployment_id', 'host_id']
    +    deployment_id = foreign_key(Deployment.id)
    +    host_id = foreign_key('nodes.id', nullable=True)
     
         @declared_attr
         def deployment(cls):
    -        return one_to_many_relationship(cls, Deployment, cls.deployment_fk)
    +        return one_to_many_relationship(cls, Deployment, cls.deployment_id)
     
         deploy_number_of_instances = Column(Integer, nullable=False)
         # TODO: This probably should be a foreign key, but there's no guarantee
         # in the code, currently, that the host will be created beforehand
    -    host_id = Column(Text)
    +    _host_id = foreign_key('nodes.id', nullable=True)
    --- End diff --
    
    remove


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message