Use new TextType
+ fix Property usage in tcp.py Change-Id: I254ddfe30605298ce419667e9b1985df48ef824a Reviewed-on: https://forge.frm2.tum.de/review/20952 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
c7c9403d1f
commit
125f0d83e9
@ -28,7 +28,7 @@ import time
|
||||
from collections import OrderedDict
|
||||
|
||||
from secop.datatypes import EnumType, FloatRange, BoolType, IntRange, \
|
||||
StringType, TupleOf, get_datatype, ArrayOf
|
||||
StringType, TupleOf, get_datatype, ArrayOf, TextType
|
||||
from secop.errors import ConfigError, ProgrammingError
|
||||
from secop.lib import formatException, \
|
||||
formatExtendedStack, mkthread, unset_value
|
||||
@ -70,7 +70,7 @@ class Module(HasProperties):
|
||||
properties = {
|
||||
'export': Property('Flag if this Module is to be exported', BoolType(), default=True, export=False),
|
||||
'group': Property('Optional group the Module belongs to', StringType(), default='', extname='group'),
|
||||
'description': Property('Description of the module', StringType(), extname='description', mandatory=True),
|
||||
'description': Property('Description of the module', TextType(), extname='description', mandatory=True),
|
||||
'meaning': Property('Optional Meaning indicator', TupleOf(StringType(),IntRange(0,50)),
|
||||
default=('',0), extname='meaning'),
|
||||
'visibility': Property('Optional visibility hint', EnumType('visibility', user=1, advanced=2, expert=3),
|
||||
|
@ -26,7 +26,7 @@ from __future__ import division, print_function
|
||||
from collections import OrderedDict
|
||||
|
||||
from secop.datatypes import CommandType, DataType, StringType, BoolType, EnumType, DataTypeType, ValueType, OrType, \
|
||||
NoneOr
|
||||
NoneOr, TextType
|
||||
from secop.errors import ProgrammingError
|
||||
from secop.properties import HasProperties, Property
|
||||
|
||||
@ -92,7 +92,7 @@ class Parameter(Accessible):
|
||||
"""
|
||||
|
||||
properties = {
|
||||
u'description': Property('Description of the Parameter', StringType(),
|
||||
u'description': Property('Description of the Parameter', TextType(),
|
||||
extname=u'description', mandatory=True),
|
||||
u'datatype': Property('Datatype of the Parameter', DataTypeType(),
|
||||
extname=u'datatype', mandatory=True),
|
||||
@ -251,7 +251,7 @@ class Command(Accessible):
|
||||
"""
|
||||
# datatype is not listed (handled separately)
|
||||
properties = {
|
||||
u'description': Property('Description of the Command', StringType(),
|
||||
u'description': Property('Description of the Command', TextType(),
|
||||
extname=u'description', export=True, mandatory=True),
|
||||
u'group': Property('Optional command group of the command.', StringType(),
|
||||
extname=u'group', export=True, default=''),
|
||||
|
@ -187,9 +187,12 @@ class TCPServer(HasProperties, socketserver.ThreadingTCPServer):
|
||||
allow_reuse_address = True
|
||||
|
||||
properties = {
|
||||
'bindto' : Property(StringType(), default='localhost:%d' % DEF_PORT, export=False),
|
||||
'bindport' : Property(IntRange(1,65535), default=DEF_PORT, export=False),
|
||||
'detailed_errors': Property(BoolType(), default=False, export=False),
|
||||
'bindto' : Property('hostname or ip address for binding',StringType(),
|
||||
default='localhost:%d' % DEF_PORT, export=False),
|
||||
'bindport' : Property('port number to bind',IntRange(1,65535),
|
||||
default=DEF_PORT, export=False),
|
||||
'detailed_errors': Property('Flag to enable detailed Errorreporting.', BoolType(),
|
||||
default=False, export=False),
|
||||
}
|
||||
|
||||
# XXX: create configurables from Metaclass!
|
||||
|
Loading…
x
Reference in New Issue
Block a user