Exemplo n.º 1
0
    def __init__(self, rpc=None):

        self.rpc = rpc or AristaRPCWrapper()
        self.db_nets = db.AristaProvisionedNets()
        self.db_vms = db.AristaProvisionedVms()
        self.db_tenants = db.AristaProvisionedTenants()
        self.ndb = db.NeutronNets()

        confg = cfg.CONF.ml2_arista
        self.segmentation_type = db.VLAN_SEGMENTATION
        self.timer = None
        self.eos = SyncService(self.rpc, self.ndb)
        self.sync_timeout = confg['sync_interval']
        self.eos_sync_lock = threading.Lock()
 def setUp(self):
     super(SyncServiceTest, self).setUp()
     self.rpc = mock.MagicMock()
     ndb = db.NeutronNets()
     self.sync_service = arista.SyncService(self.rpc, ndb)
     self.sync_service._force_sync = False