class iBaseDiscovery(object): def __init__(self, registry): # TODO: Pass srcdir so we can add it to entitytype self.ref = registry self.protofactory = ProtocolFactory() def is_entitytype(self, pinfra, ipaddr, creds, protopref, driver_en, pOptions): protofactory = self.protofactory.clone() if not protopref is None: protofactory.copy(protopref) entity = self.my_entitytype(pinfra, ipaddr, creds, protofactory) if not entity is None: entity.driver_en = driver_en entity.pOptions = pOptions if entity.connect(): return entity return None def _get(self, pinfra): protofactory = self.protofactory.clone() return self.my_entitytype(pinfra, "ip", None, protofactory) def my_entitytype(self, pinfra, ipaddr, creds, pFactory): return None def my_aliases(self): return []
def __init__(self, registry): # TODO: Pass srcdir so we can add it to entitytype self.ref = registry self.protofactory = ProtocolFactory()