self.polling_interval = conf.polling_interval
- if (self.conf.external_network_bridge and
- not ip_lib.device_exists(self.conf.external_network_bridge)):
- raise Exception("external network bridge '%s' does not exist"
- % self.conf.external_network_bridge)
-
self.qclient = client.Client(
username=self.conf.admin_user,
password=self.conf.admin_password,
return ex_nets[0]['id']
def do_single_loop(self):
+
+ if (self.conf.external_network_bridge and
+ not ip_lib.device_exists(self.conf.external_network_bridge)):
+ LOG.error("external network bridge '%s' does not exist"
+ % self.conf.external_network_bridge)
+ return
+
prev_router_ids = set(self.router_info)
cur_router_ids = set()
def testAgentCreate(self):
agent = l3_agent.L3NATAgent(self.conf)
- self.device_exists.assert_has_calls(
- [mock.call(self.conf.external_network_bridge)])
-
def _test_internal_network_action(self, action):
port_id = _uuid()
router_id = _uuid()
# verify that remove is called
self.assertEquals(self.mock_ip.get_devices.call_count, 1)
+ self.device_exists.assert_has_calls(
+ [mock.call(self.conf.external_network_bridge)])
+
def testDaemonLoop(self):
# just take a pass through the loop, then raise on time.sleep()