add oxiApi

This commit is contained in:
IluaAir
2025-06-25 10:32:51 +03:00
parent 009f007a38
commit 1eb0ff1eca
11 changed files with 129 additions and 33 deletions

View File

@@ -0,0 +1,16 @@
import re
from oxi.interface import register_parser
from oxi.interface.base import BaseDevice
@register_parser("QTECH")
class Qtech(BaseDevice):
def __init__(self, config):
self.config: str = self._fix_config(config)
def _fix_config(self, config):
pattern = r"Pending configurations.*"
cleaned_text = re.sub(pattern, "", config, flags=re.DOTALL)
return cleaned_text