Idoit-Tests 01

This commit is contained in:
Sven Riwoldt
2024-12-15 14:38:48 +01:00
parent 16d9b8bd2c
commit e06c448a46
51 changed files with 1181 additions and 0 deletions

20
idoit_scaleup/cat_vlan.py Executable file
View File

@@ -0,0 +1,20 @@
from .consts import C__CATS__LAYER2_NET
from .category import IDoitCategory
from pprint import pprint
class IDoitVlan(IDoitCategory):
CATEGORY = C__CATS__LAYER2_NET
def __init__(self, cfg):
super().__init__(cfg, self.CATEGORY)
def convert_field_with_name_standard(self, data):
return int(data['standard']['value'])
def convert_field_with_name_layer3_assignments(self, data):
rtn = []
for ele in data['layer3_assignments']:
rtn.append(int(ele['id']))
return rtn