if self.int_br and new_controller:
LOG.debug("info_update received. New controller"
"is to be set to: %s", new_controller)
- self.int_br.run_vsctl(["set-controller",
- self.int_bridge_name,
- "tcp:" + new_controller])
+ self.int_br.set_controller(["tcp:" + new_controller])
if out_of_band:
LOG.debug("info_update received. New controller"
"is set to be out of band")
# set the controller
if controller_ip:
- int_br.run_vsctl(
- ["set-controller", bridge_name, "tcp:" + controller_ip])
+ int_br.set_controller(["tcp:" + controller_ip])
if out_of_band:
int_br.set_db_attribute("controller", bridge_name,
"connection-mode", "out-of-band")
def test_get_info_set_controller(self):
with mock.patch.object(self.agent.int_br,
- 'run_vsctl') as run_vsctl_func:
+ 'set_controller') as set_controller_func:
kwargs = {}
kwargs['info'] = {'new_controller': '10.10.10.1'}
self.agent.info_update('dummy', **kwargs)
- run_vsctl_func.assert_called_once_with(['set-controller',
- 'br_int',
- 'tcp:10.10.10.1'])
+ set_controller_func.assert_called_once_with(['tcp:10.10.10.1'])
def test_get_info(self):
with mock.patch.object(self.agent.int_br,