ShareSnapshotInstance model share_id property returns share instance id

Bug #1600784 reported by Tom Barron on 2016-07-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Manila
Low
Tom Barron

Bug Description

class ShareSnapshotInstance(BASE, ManilaBase):
    """Represents a snapshot of a share."""
    __tablename__ = 'share_snapshot_instances'
    _extra_keys = ['name', 'share_id', 'share_name']

    @property
    def name(self):
        return CONF.share_snapshot_name_template % self.id

    @property
    def share_name(self):
        return CONF.share_name_template % self.share_instance_id

    @property
    def share_id(self):
        # NOTE(u_glide): This property required for compatibility
        # with share drivers
        return self.share_instance_id <<<<<<<<--------------------- returns share_instance_id

    id = Column(String(36), primary_key=True)
    deleted = Column(String(36), default='False')
    snapshot_id = Column(
        String(36), ForeignKey('share_snapshots.id'), nullable=False)
    share_instance_id = Column(
        String(36), ForeignKey('share_instances.id'), nullable=False)
    status = Column(String(255))
    progress = Column(String(255))
    provider_location = Column(String(255))
    share_instance = orm.relationship(
        ShareInstance, backref="snapshot_instances",
        lazy='immediate',
        primaryjoin=(
            'and_('
            'ShareSnapshotInstance.share_instance_id == ShareInstance.id,'
            'ShareSnapshotInstance.deleted == "False")')
    )

Fix proposed to branch: master
Review: https://review.openstack.org/340315

Changed in manila:
assignee: nobody → Tom Barron (tpb)
status: New → In Progress

Change abandoned by Tom Barron (<email address hidden>) on branch: master
Review: https://review.openstack.org/340315

Jason Grosso (jgrosso) wrote :

Hey Tom can you let me know if this is still occurring and needs some attention?

Jason Grosso (jgrosso) on 2019-07-15
Changed in manila:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers