def setUp(self, *mocks):
     # init the nsxv plugin, edge manager and fake vcns
     super(TestL2GatewayDriverRouter, self).setUp(plugin=CORE_PLUGIN,
                                                  ext_mgr=None)
     self.context = context.get_admin_context()
     # init the L2 gateway driver
     self.driver = nsx_v_driver.NsxvL2GatewayDriver(mock.MagicMock())
Beispiel #2
0
    def __init__(self, plugin):
        super(NsxTvdL2GatewayDriver, self).__init__()
        self._plugin = plugin

        # supported drivers:
        self.drivers = {}
        try:
            self.drivers[projectpluginmap.NsxPlugins.NSX_T] = (
                t_driver.NsxV3Driver(plugin))
        except Exception:
            LOG.warning("NsxTvdL2GatewayDriver failed to initialize the NSX-T "
                        "driver")
            self.drivers[projectpluginmap.NsxPlugins.NSX_T] = None
        try:
            self.drivers[projectpluginmap.NsxPlugins.NSX_V] = (
                v_driver.NsxvL2GatewayDriver(plugin))
        except Exception:
            LOG.warning("NsxTvdL2GatewayDriver failed to initialize the NSX-V "
                        "driver")
            self.drivers[projectpluginmap.NsxPlugins.NSX_V] = None
 def setUp(self):
     super(TestL2gatewayDriver, self).setUp()
     self.context = context.get_admin_context()
     self.plugin = nsx_v_driver.NsxvL2GatewayDriver(mock.MagicMock())