NeutronDbPluginV2 should accept network status in create_network().

Bug #1207167 reported by Ryota Mibu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Ryota Mibu

Bug Description

NeutronDbPluginV2 gets port status from input port dictionary at create_port() to allow other plugin to set port status while creating DB entry. But, network status is statically set to 'ACTIVE' at create_network().

If we made NeutronDbPluginV2 get network status from input in create_network(), plugins can set network status to 'DOWN' when admin_state_up is False in a single DB commit.

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

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

Changed in neutron:
assignee: nobody → Ryota Mibu (r-mibu)
status: New → In Progress
Revision history for this message
Mark McClain (markmcclain) wrote :

Seems like status should be tied to admin_state_up on create

Changed in neutron:
importance: Undecided → Wishlist
tags: added: api
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

API has left unchanged - it would have been weird to accept status as input on POST/PUT.
This is for allowing a plugin to tell the base class which status it should set for a resource instead of having to do another transaction, which makes sense in my opinion.

tags: added: db
removed: api
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/39636
Committed: http://github.com/openstack/neutron/commit/a7d18bbc56e4315e39d4dd82acfb3b058c21d2a6
Submitter: Jenkins
Branch: master

commit a7d18bbc56e4315e39d4dd82acfb3b058c21d2a6
Author: Ryota MIBU <email address hidden>
Date: Thu Aug 1 14:21:20 2013 +0900

    Make DbPlugin accept status in create_network().

    This commit makes NeutronDbPluginV2 get network status from input at
    create_network() to allow other plugins to set network status while
    creating DB entry.

    Now plugins can create network with any status in a single DB commit.
    (e.g. Set network status to 'DOWN' when admin_state_up is False.)

    This commit also changes NeutronDbPluginV2TestCase() to make default
    network status configurable in each plugin test case.

    Fixes: bug #1207167
    Change-Id: Id3ad26719036c631e4b268150407a2c69919203f

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → havana-3
tags: added: neutron-core
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
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.