def setUp(self): super(TestHyperVTrunkDriver, self).setUp() self.trunk_driver = trunk_driver.HyperVTrunkDriver( mock.sentinel.context) self.trunk_driver._utils = mock.MagicMock( autospec=self.trunk_driver._utils)
def _setup(self): """Setup the layer two agent.""" super(HyperVNeutronAgent, self)._setup() self._sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN) self._sec_groups_agent = HyperVSecurityAgent(self._context, self._sg_plugin_rpc) self._vlan_driver = trunk_driver.HyperVTrunkDriver(self._context) if CONF.NVGRE.enable_support: self._consumers.append([h_constant.TUNNEL, topics.UPDATE]) self._consumers.append([h_constant.LOOKUP, h_constant.UPDATE])