Logical error in flavors unset_keys method

Bug #1324077 reported by zhangjialong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
zhangjialong

Bug Description

In novaclient/v1_1/flavors.py unset_keys method,

    def unset_keys(self, keys):
        """
        Unset extra specs on a flavor.

        :param flavor: The :class:`Flavor` to unset extra spec on
        :param keys: A list of keys to be unset
        """
        for k in keys:
            return self.manager._delete(
                            "/flavors/%s/os-extra_specs/%s" % (
                            base.getid(self), k))

Only first key could be remove and unset because of the key word return.

zhangjialong (zhangjl)
Changed in python-novaclient:
assignee: nobody → zhangjialong (zhangjl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/96141
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=abd4e8986bca481a562096da61f2b243f4d16718
Submitter: Jenkins
Branch: master

commit abd4e8986bca481a562096da61f2b243f4d16718
Author: zhangjl <email address hidden>
Date: Wed May 28 19:24:35 2014 +0800

    Logical error in flavors unset_keys method

    When we want to unset multi keys of flavor
    extra data, only first key can be removed
    because of the key word named 'return'.
    To fix it, remove the return key word

    Change-Id: I70d1f2e84a2bfcea1db60b26138f84421f9a7309
    Closes-bug: #1324077

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → 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.