Exemplo n.º 1
0
class accounting(Model):
    id = Model.Uuid(default=uuid4, internal=True)
    acctsessionid = Model.String(max_length=64, null=False, default='',
                                 label='Session ID')
    acctuniqueid = Model.String(hidden=True, max_length=32, null=False,
                                default='')
    username = Model.String(max_length=64, null=False, default='')
    realm = Model.String(max_length=64, null=True, default='', hidden=True)
    nasipaddress = Model.String(max_length=15, null=False, default='',
                                label='NAS IP')
    nasportid = Model.String(max_length=15, null=True, default=None,
                             label='NAS Port ID')
    nasporttype = Model.String(max_length=32, null=True, default=None,
                               label='NAS Port Type')
    acctstarttime = Model.DateTime(label='Start Time')
    acctupdatetime = Model.DateTime(label='Update Time')
    acctstoptime = Model.DateTime(label='Stop Time')
    acctinterval = Model.Integer(null=True, default=None,
                                 label='Update Interval')
    acctsessiontime = Model.Integer(signed=False, null=True,
                                    default=None, label='Session Time')
    acctauthentic = Model.String(null=True, default=None, max_length=32,
                                 hidden=True)
    connectinfo_start = Model.String(max_length=50, null=True,
                                     default=None)
    connectinfo_stop = Model.String(max_length=50, null=True, default=None)
    acctinputoctets = Model.BigInt(null=True, default=None,
                                   label='Input Octets')
    acctoutputoctets = Model.BigInt(null=True, default=None,
                                    label='Output Octets')
    calledstationid = Model.String(max_length=50, null=False, default='',
                                   label='Called Station ID')
    callingstationid = Model.String(max_length=50, null=False, default='',
                                    label='Calling Station ID')
    acctterminatecause = Model.String(max_length=32, null=False, default='',
                                      label='Terminate Cause')
    servicetype = Model.String(max_length=32, default=None, null=True,
                               label='Service Type')
    framedprotocol = Model.String(max_length=32, default=None, null=True,
                                  label='Framed Protocol')
    framedipaddress = Model.String(max_length=15, default='', null=False,
                                   label='Framed IP')
Exemplo n.º 2
0
class tradius_subscriber(Model):
    id = Model.Uuid(default=uuid4, internal=True)
    virtual_id = Model.Uuid(readonly=True,
                            null=False,
                            data_endpoint='radius',
                            data_url='/v1/virtual')
    domain = Model.Fqdn(internal=True)
    tenant_id = Model.Uuid(internal=True)
    username = Model.Username(placeholder="john", max_length=100, null=False)
    password = Model.Password(max_length=100, null=True, ignore_null=True)
    email = Model.Email(placeholder="*****@*****.**", max_length=255)
    name = Model.String(placeholder="John Doe", max_length=100)
    phone_mobile = Model.Phone(placeholder="+1-202-555-0103")
    phone_office = Model.Phone(placeholder="+1-202-555-0105")
    designation = Model.Enum('', 'Mr', 'Mrs', 'Ms', 'Dr', 'Prof')
    user_class = Model.Word(max_length=32,
                            null=True,
                            label="User Class for DPI")
    logins = Model.Integer(null=False,
                           default=1,
                           label='Simultaneous Sessions')
    enabled = Model.Boolean(default=True)
    creation_time = Model.DateTime(default=now, readonly=True)
    primary_key = id