Change neutronclient extension to use execute()

Bug #1554717 reported by Paul Michali
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-cisco
Fix Committed
Critical
Paul Michali
Liberty
Fix Committed
Critical
Paul Michali
Mitaka
Fix Committed
Critical
Paul Michali

Bug Description

A recent change to neutronclient has caused a failure in tests for Liberty, where the networking-cisco LIberty code defines the get_data() method, and the neutronclient now uses take_action(). This is not an issue on Mitaka, where networking-cisco has been updated to work with the latest neutronclient take_action() method (a latent bug though).

The issue stems from the fact that neutron and neutronclient versions are independent, and there is no constraint on the neutronclient version (for good or bad). The neutronclient is backward compatible and the newer version works with current and older neutron versions.

However the client extension in networking-cisco is not using the public execute() method, and instead is using get_data(), which is a private method. Switching to take_action() will resolve the issue, but this too is a private method and would cause problems if an older neutronclient is used, or changes are made in the future.

The suggestion from Akihiro Mokoto is to use the public execute() method, instead, for both Liberty and Mitaka (master).

Sam Betts (sambetts)
Changed in networking-cisco:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-cisco (master)

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

Changed in networking-cisco:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-cisco (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/290708

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-cisco (stable/liberty)

Reviewed: https://review.openstack.org/290708
Committed: https://git.openstack.org/cgit/openstack/networking-cisco/commit/?id=61937780c7586d22f0a1708afe996ee62fac0de8
Submitter: Jenkins
Branch: stable/liberty

commit 61937780c7586d22f0a1708afe996ee62fac0de8
Author: Paul Michali <email address hidden>
Date: Wed Mar 9 10:33:56 2016 -0500

    Use public method execute() for client extension

    This fixes breakage on Liberty, due to updated neutronclient.

    The client extension was using take_action(), which is really a
    private method (and caused problems recently, when it changed from
    get_data to take_action).

    Instead, this commit uses execute(), which is the public method for
    client extension purposes. This will prevent issues from occurring,
    if/when the neutronclient changes.

    Cherry-pick of I48ef59f10e741aa95a1f75e569ff9660e3ec5819 to Liberty.
    Had to manually perform, because, on Liberty, the method used is
    get_data() and not take_action().

    Also, needed to cherry-pick I7f94bf62710af51291f36a23c3ff0ea4feb52591
    so that tests pass.

    Change-Id: I2c3daba7a72a5d81774e58e62bc962494c1342f5
    Closes-Bug: #1554717
    Partial-Bug: #1546138

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-cisco (master)

Reviewed: https://review.openstack.org/290513
Committed: https://git.openstack.org/cgit/openstack/networking-cisco/commit/?id=bb6cb804fa218a5d26f64833cf5511ecad6fc42e
Submitter: Jenkins
Branch: master

commit bb6cb804fa218a5d26f64833cf5511ecad6fc42e
Author: Paul Michali <email address hidden>
Date: Wed Mar 9 08:54:59 2016 -0500

    Use public method execute() for client extension

    The client extension was using take_action(), which is really a
    private method (and caused problems recently, when it changed from
    get_data to take_action).

    Instead, this commit uses execute(), which is the public method for
    client extension purposes. This will prevent issues from occurring,
    if/when the neutronclient changes.

    This needs to be (manually) backported to Liberty as well.

    Change-Id: I48ef59f10e741aa95a1f75e569ff9660e3ec5819
    Partial-Bug: #1554717

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.