for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# coding: utf-8
from schematics.models import Model
from schematics.types import StringType, IntType, BooleanType
from schematics.types.compound import ListType, ModelType
class Connection(Model):
port = IntType(
min_value=0,
max_value=65000,
default=0,
required=True,
)
allowed_hosts = ListType(
field=StringType,
min_size=0,
min_length=1,
class Logging(Model):
is_enabled = BooleanType(
default=False,
file_name = StringType(
default="log.lst",
keep = BooleanType(
default=True,
log_time = BooleanType(
class HistorySize(Model):
commands = IntType(
max_value=10000,
default=128,
records = IntType(
class Console(Model):
connection = ModelType(
model_spec=Connection,
logging = ModelType(
model_spec=Logging,
history_size = ModelType(
model_spec=HistorySize,