Beispiel #1
0
    async def remove(self, persisted_data: bool = True) -> None:
        await self.cleanup()

        self.debug('removing port')
        _ports_by_id.pop(self._id, None)

        if persisted_data:
            self.debug('removing persisted data')
            persist.remove(self.PERSIST_COLLECTION, filt={'id': self._id})

        self.trigger_remove()
Beispiel #2
0
def reset() -> None:
    logger.debug('clearing persisted data')
    persist.remove('webhooks')
Beispiel #3
0
def reset() -> None:
    logger.debug('clearing device persisted data')
    persist.remove('device')
Beispiel #4
0
def reset() -> None:
    logger.debug('clearing virtual ports persisted data')
    persist.remove('vports')
Beispiel #5
0
def remove(port_id: str) -> None:
    _vport_settings.pop(port_id, None)
    logger.debug('removing virtual port settings for %s', port_id)
    persist.remove('vports', filt={'id': port_id})
Beispiel #6
0
def reset() -> None:
    logger.debug('clearing persisted data')
    persist.remove('reverse')
Beispiel #7
0
def reset() -> None:
    logger.debug('clearing slaves persisted data')
    persist.remove('slaves')
    persist.remove('slave_ports')
Beispiel #8
0
def reset() -> None:
    logger.debug('clearing ports persisted data')
    persist.remove(BasePort.PERSIST_COLLECTION)