def _disconnect(self, recursion=None): CIOMSClientFactory.destroy_instance(self._rsn_oms) self._rsn_oms = None log.debug("%r: CIOMSClient instance destroyed", self._platform_id) self._delete_scheduler() self._scheduler = None
def setUp(self): DVR_CONFIG['oms_uri'] = self._dispatch_simulator(oms_uri) log.debug("DVR_CONFIG['oms_uri'] = %s", DVR_CONFIG['oms_uri']) # Use the network definition provided by RSN OMS directly. rsn_oms = CIOMSClientFactory.create_instance(DVR_CONFIG['oms_uri']) CIOMSClientFactory.destroy_instance(rsn_oms) self._plat_driver = RSNPlatformDriver(self.evt_recv) self._configure() self._connect()
def _disconnect(self, recursion=None): """ Stops event dispatch and destroys the CIOMSClient instance. """ self._stop_event_dispatch() # self.event_subscriber.stop() # self.event_subscriber=None CIOMSClientFactory.destroy_instance(self._rsn_oms) self._rsn_oms = None log.debug("%r: CIOMSClient instance destroyed", self._platform_id) self._delete_scheduler(); self._scheduler = None
def setUp(self): DVR_CONFIG['oms_uri'] = self._dispatch_simulator(oms_uri) log.debug("DVR_CONFIG['oms_uri'] = %s", DVR_CONFIG['oms_uri']) # Use the network definition provided by RSN OMS directly. rsn_oms = CIOMSClientFactory.create_instance(DVR_CONFIG['oms_uri']) network_definition = RsnOmsUtil.build_network_definition(rsn_oms) CIOMSClientFactory.destroy_instance(rsn_oms) if log.isEnabledFor(logging.DEBUG): network_definition_ser = NetworkUtil.serialize_network_definition(network_definition) log.debug("NetworkDefinition serialization:\n%s", network_definition_ser) platform_id = self.PLATFORM_ID pnode = network_definition.pnodes[platform_id] self._plat_driver = RSNPlatformDriver(pnode, self.evt_recv)
def _disconnect(self, recursion=None): """ Stops event dispatch and destroys the CIOMSClient instance. """ self._stop_event_dispatch() self.event_subscriber.stop() self.event_subscriber=None # TODO(OOIION-1495) review the following. Only change is the use # of self._pnode.ports instead of self._active_ports, # while we address the "active ports" concept mentioned above. # Also, it is probably OK to turn off all ports in this "disconnect # driver" operation.fe # power off all ports with connected devices if recursion: for port in self._pnode.ports: log.debug('disconnect power port: %s', port) self.turn_off_port(port) CIOMSClientFactory.destroy_instance(self._rsn_oms) self._rsn_oms = None log.debug("%r: CIOMSClient instance destroyed", self._platform_id)
def _disconnect(self, recursion=None): """ Stops event dispatch and destroys the CIOMSClient instance. """ self._stop_event_dispatch() self.event_subscriber.stop() self.event_subscriber = None # TODO(OOIION-1495) review the following. Only change is the use # of self._pnode.ports instead of self._active_ports, # while we address the "active ports" concept mentioned above. # Also, it is probably OK to turn off all ports in this "disconnect # driver" operation.fe # power off all ports with connected devices if recursion: for port in self._pnode.ports: log.debug('disconnect power port: %s', port) self.turn_off_port(port) CIOMSClientFactory.destroy_instance(self._rsn_oms) self._rsn_oms = None log.debug("%r: CIOMSClient instance destroyed", self._platform_id)