VMware: Simplify logic get_network_with_the_name

Bug #1185083 reported by Shawn Hartsock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

The method get_network_with_the_name features several points of repeated code that does not need to be repeated.
* network._type is always a unique and valid argument for get_dynamic_property
* networks will usually have 0 or 1 result, more results will be due to networks sharing the same name which will make them indistinguishable (this should be considered an exceptional case)
* multiple return points should not be necessary particularly since we are working with 0 or 1 valid values.

See:

https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/network_util.py#L32

Tags: vmware
Changed in nova:
importance: Undecided → Wishlist
description: updated
Changed in nova:
status: New → Confirmed
summary: - Simplify logic get_network_with_the_name
+ VMware: Simplify logic get_network_with_the_name
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

This wishlist bug has been open a year without any activity. I'm going to move it to "Opinion / Wishlist", which is an easily-obtainable queue of older requests that have come on. This bug can be reopened (set back to "New") if someone decides to work on this.

Changed in nova:
status: Confirmed → Opinion
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.