def __init__(self, core_proxy, adapter_proxy, config, device_handler_class, name, vendor, version, device_type, vendor_id, accepts_bulk_flow_update=True, accepts_add_remove_flow_updates=False): log.debug('Initializing adapter: {} {} {}'.format( vendor, name, version)) self.core_proxy = core_proxy self.adapter_proxy = adapter_proxy self.config = config self.name = name self.supported_device_types = [ DeviceType( id=device_type, vendor_id=vendor_id, adapter=name, accepts_bulk_flow_update=accepts_bulk_flow_update, accepts_add_remove_flow_updates=accepts_add_remove_flow_updates ) ] self.descriptor = Adapter( id=self.name, vendor=vendor, version=version, config=AdapterConfig(log_level=LogLevel.INFO)) self.devices_handlers = dict() # device_id -> Olt/OnuHandler() self.device_handler_class = device_handler_class
def __init__(self, id, core_proxy, adapter_proxy, config, build_info, current_replica, total_replicas, endpoint): self.log = structlog.get_logger() self.log.debug('starting-adapter', config=config) self.core_proxy = core_proxy self.adapter_proxy = adapter_proxy self.config = config self.descriptor = Adapter(id=id, vendor='VOLTHA OpenONU', version=build_info.version, config=AdapterConfig(), currentReplica=current_replica, totalReplicas=total_replicas, endpoint=endpoint, type=self.name) self.devices_handlers = dict() self.device_handler_class = BrcmOpenomciOnuHandler # Customize OpenOMCI for Broadcom ONUs self.broadcom_omci = deepcopy(OpenOmciAgentDefaults) self.broadcom_omci['mib-synchronizer'][ 'audit-delay'] = 0 # disable audits as brcm onu wont upload once provisioned self.broadcom_omci['mib-synchronizer']['database'] = MibDbLazyWriteDict self.broadcom_omci['alarm-synchronizer'][ 'database'] = MibDbVolatileDict self.broadcom_omci['omci-capabilities']['tasks'][ 'get-capabilities'] = BrcmCapabilitiesTask
def __init__(self, core_proxy, adapter_proxy, config): self.core_proxy = core_proxy self.adapter_proxy = adapter_proxy self.config = config self.descriptor = Adapter( id=self.name, vendor='OLT white box vendor', version='0.1', config=AdapterConfig(log_level=LogLevel.INFO) ) log.debug('openolt.__init__', core_proxy=core_proxy, adapter_proxy=adapter_proxy) self.devices = dict() # device_id -> OpenoltDevice() self.interface = registry('main').get_args().interface self.logical_device_id_to_root_device_id = dict() self.num_devices = 0
def __init__(self, core_proxy, adapter_proxy, config, device_handler_class, name, vendor, version, device_type, vendor_id, accepts_bulk_flow_update=True, accepts_add_remove_flow_updates=False, endpoint=None, current_replica=1, total_replicas=1, adapter_type=None): log.debug( 'Initializing adapter: {} {} {}'.format(vendor, name, version)) self.core_proxy = core_proxy self.adapter_proxy = adapter_proxy self.config = config self.name = name self.supported_device_types = [ DeviceType( id=device_type, vendor_id=vendor_id, adapter=name, accepts_bulk_flow_update=accepts_bulk_flow_update, accepts_add_remove_flow_updates=accepts_add_remove_flow_updates ) ] self.descriptor = Adapter( id=self.name, vendor=vendor, version=version, config=AdapterConfig(), currentReplica=current_replica, totalReplicas=total_replicas, endpoint=endpoint, type=adapter_type or name ) self.devices_handlers = dict() # device_id -> Olt/OnuHandler() self.device_handler_class = device_handler_class
def __init__(self, core_proxy, adapter_proxy, config): log.debug('function-entry', config=config) self.core_proxy = core_proxy self.adapter_proxy = adapter_proxy self.config = config self.descriptor = Adapter( id=self.name, vendor='Voltha project', version='2.0', config=AdapterConfig(log_level=LogLevel.INFO)) self.devices_handlers = dict() self.device_handler_class = BrcmOpenomciOnuHandler # Customize OpenOMCI for Broadcom ONUs self.broadcom_omci = deepcopy(OpenOmciAgentDefaults) self.broadcom_omci['mib-synchronizer'][ 'state-machine'] = BrcmMibSynchronizer self.broadcom_omci['omci-capabilities']['tasks'][ 'get-capabilities'] = BrcmCapabilitiesTask
def _get_adapter_config(self): cfg = AdapterConfig() return cfg