2013-06-04 18:03:54 |
Shawn Hartsock |
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. |
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 |
|