Don't need to update flavor if only access projects changed

Bug #1718092 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mogan
Fix Released
Undecided
Liusheng

Bug Description

Currently, in the objects layer, it will always call flavor_update() even only the flavor access updated.

related code:

    def save(self, context=None):
        updates = self.obj_get_changes()
        projects = updates.pop('projects', None)

        # access projects
        if projects is not None:
            deleted_projects = set(self._orig_projects) - set(projects)
            added_projects = set(projects) - set(self._orig_projects)
        else:
            added_projects = deleted_projects = None

        if added_projects or deleted_projects:
            self.save_projects(context, added_projects, deleted_projects)

        self.dbapi.flavor_update(context, self.uuid, updates)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mogan (master)

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

Changed in mogan:
assignee: nobody → Liusheng (liusheng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mogan (master)

Reviewed: https://review.openstack.org/505004
Committed: https://git.openstack.org/cgit/openstack/mogan/commit/?id=f10c8e1c2ed9edbd3f97ac870ccd0721211c0ae9
Submitter: Jenkins
Branch: master

commit f10c8e1c2ed9edbd3f97ac870ccd0721211c0ae9
Author: liusheng <email address hidden>
Date: Tue Sep 19 11:28:48 2017 +0800

    Don't need to update flavor if only access projects changed

    Closes-Bug: #1718092
    Change-Id: I043ecb9087eb3e8425432c6e325b7f87eaf96028

Changed in mogan:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.