remove domain and hostname type a rename *_strict types
This commit is contained in:
@ -29,7 +29,7 @@ from lxml.etree import Element, SubElement # pylint: disable=E0611
|
||||
from .i18n import _
|
||||
from .xmlreflector import XMLReflector
|
||||
from .annotator import ERASED_ATTRIBUTES, SpaceAnnotator
|
||||
from .loader import PopulateTiramisuObjects
|
||||
from .tiramisureflector import TiramisuReflector
|
||||
from .utils import normalize_family
|
||||
from .error import OperationError, SpaceObjShallNotBeUpdated, DictConsistencyError
|
||||
from .path import Path
|
||||
@ -525,7 +525,7 @@ class CreoleObjSpace:
|
||||
def save(self,
|
||||
filename,
|
||||
):
|
||||
tiramisu_objects = PopulateTiramisuObjects(self.space,
|
||||
self.funcs_path,
|
||||
)
|
||||
tiramisu_objects = TiramisuReflector(self.space,
|
||||
self.funcs_path,
|
||||
)
|
||||
return tiramisu_objects.get_text() + '\n'
|
||||
|
@ -31,10 +31,8 @@ CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
|
||||
'network': dict(opttype="NetworkOption"),
|
||||
'broadcast': dict(opttype="BroadcastOption"),
|
||||
'netbios': dict(opttype="DomainnameOption", initkwargs={'type': 'netbios', 'warnings_only': True}),
|
||||
'domain': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname', 'allow_ip': True, 'allow_without_dot': True}),
|
||||
'domain_strict': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname', 'allow_ip': False}),
|
||||
'hostname': dict(opttype="DomainnameOption", initkwargs={'type': 'hostname', 'allow_ip': True}),
|
||||
'hostname_strict': dict(opttype="DomainnameOption", initkwargs={'type': 'hostname', 'allow_ip': False}),
|
||||
'domain': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname', 'allow_ip': False}),
|
||||
'hostname': dict(opttype="DomainnameOption", initkwargs={'type': 'hostname', 'allow_ip': False}),
|
||||
'web_address': dict(opttype="URLOption", initkwargs={'allow_ip': True, 'allow_without_dot': True}),
|
||||
'port': dict(opttype="PortOption", initkwargs={'allow_private': True}),
|
||||
'mac': dict(opttype="MACOption"),
|
||||
@ -43,7 +41,7 @@ CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
|
||||
}
|
||||
|
||||
|
||||
class PopulateTiramisuObjects:
|
||||
class TiramisuReflector:
|
||||
def __init__(self,
|
||||
xmlroot,
|
||||
funcs_path,
|
Reference in New Issue
Block a user