示例#1
0
 def setUp(self):
     super(BgpvpnTests, self).setUp()
     self.l3plugin = directory.get_plugin(plugin_constants.L3)
     self.bgp_plugin = bgp_plugin.BgpPlugin()
     self.plugin = directory.get_plugin()
     self.bgpvpn_db = bgpvpn_db.BGPVPNPluginDb()
     get_bgpvpn_mock = mock.patch.object(self.bgp_plugin,
                                         '_get_bgpvpn_info')
     get_bgpvpn_mock.start()
     self.fake_bgpvpn = {
         'id': 'bgpvpn_id',
         'tenant_id': 'tenant1',
         'networks': [],
         'routers': [],
         'name': 'bgpvpn1',
         'type': 'l3',
         'route_distinguishers': '100:100',
         'import_rt': '100:100',
         'export_rt': '100:100'
     }
     get_bgpvpn_mock.return_value = self.fake_bgpvpn
     self.setup_bgpvpn()
示例#2
0
 def __init__(self, *args, **kwargs):
     super(BGPVPNDriverDBMixin, self).__init__(*args, **kwargs)
     self.bgpvpn_db = bgpvpn_db.BGPVPNPluginDb()
 def __init__(self, service_plugin):
     super(BGPVPNDriverDBMixin, self).__init__(service_plugin)
     self.bgpvpn_db = bgpvpn_db.BGPVPNPluginDb()