Clean up ML2 Manager

Bug #1259646 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Hua Zhang

Bug Description

Some things need cleanup in the ML2Manager.

1.) In the current ML2 Manager, we are using sys.exit(1) if the network_type isn't found in self.drivers:

https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/managers.py#L70

Here we should probably throw an exception. When running unit test, if we hit this condition the unit tests will exit as well.

2.) We should also be mindful of using the reserved keyword 'type' and rename type in this case to something else:

https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/managers.py#L49

Tags: ml2
description: updated
tags: added: ml2
Mathew Odden (locke105)
Changed in neutron:
status: New → Confirmed
Hua Zhang (zhhuabj)
Changed in neutron:
assignee: nobody → Hua Zhang (zhhuabj)
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/61351

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

Reviewed: https://review.openstack.org/61351
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ca668a0b9ec5f6412cd842b89d523ba1a8369782
Submitter: Jenkins
Branch: master

commit ca668a0b9ec5f6412cd842b89d523ba1a8369782
Author: zhhuabj <email address hidden>
Date: Thu Jan 16 14:34:14 2014 +0800

    Clean up ML2 Manager

    Some things need cleanup in the ML2Manager.

    1) Replace sys.exit(1) with raise SystemExit(1)
    2) Replace reserved keyword type with network_type

    Change-Id: I921bfaec7d3e31503942b3ca4a1b2218c44b14ac
    Closes-Bug: #1259646

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-2 → 2014.1
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.