__init__ is called for any __call__ on a class, no matter whether it is
a singleton. Meaning, client was reinitialized every time a caller
instantiated the ESwitchManager which break the SR-IOV agent when working
with agent qos extension.
Partially-Implements: blueprint ml2-sriov-qos-with-bwlimiting
Change-Id: I31f59e1ee3bbd6bdb039cd149d7a335c692d538d
# make it a singleton
if not hasattr(cls, '_instance'):
cls._instance = super(ESwitchManager, cls).__new__(cls)
+ cls.emb_switches_map = {}
+ cls.pci_slot_map = {}
return cls._instance
- def __init__(self):
- """Constructor.
-
- Create Embedded Switch logical entities for all given device mappings,
- using exclude devices.
- """
- self.emb_switches_map = {}
- self.pci_slot_map = {}
-
def device_exists(self, device_mac, pci_slot):
"""Verify if device exists.