7e780fbc93
Previously list operations in ovs_lib returns an empty list if RuntimeError occurs and a caller cannot distinguish an error from normal results. This commit changes ovs_lib list operations (get_vif_port_set, get_vif_ports, get_bridges) to raise an exception when RuntimeError occurs. Note: callers of these commands are ovs/nec/ryu-agent and ovs_cleanup. - plugin agents: these commands are inside in try/except clause in daemon loop and there is no need to change. - ovs_cleanup: there is no error catch logic in main() at now and it calls commands other than ovs_lib, so it can be cleanup later if required. It also fixes the code to use excutils.save_and_reraise_exception when reraising an exception. Change-Id: I2aa3b51b8661c75846cb588c08c8f8ee00c37004 Closes-Bug: #1277029