# Path: toughwlan/models.py
# def get_metadata(db_engine):
# class SystemSession(DeclarativeBase):
# class SystemCache(DeclarativeBase):
# class TrwOperator(DeclarativeBase):
# class TrwOperatorRule(DeclarativeBase):
# class TrwParam(DeclarativeBase):
# class TrwIsp(DeclarativeBase):
# class TrwIspService(DeclarativeBase):
# class TrwBas(DeclarativeBase):
# class TrwDomain(DeclarativeBase):
# class TrwDomainAttr(DeclarativeBase):
# class TrwSsid(DeclarativeBase):
# class TrwRadius(DeclarativeBase):
# class TrwTemplate(DeclarativeBase):
# class TrwOperateLog(DeclarativeBase):
# class TrwOSTypes(DeclarativeBase):


import sys
import os
import time
        import traceback
from toughlib import utils
from toughwlan import models
from sqlalchemy.orm import scoped_session, sessionmaker
from toughlib.dbengine import get_engine
from hashlib import md5
    nas.time_type = 0
    nas.vendor_id = 3902
    db.add(nas)

    radius = models.TrwRadius()
    radius.ip_addr = "127.0.0.1"
    radius.name = "local radius"
    radius.secret = "secret"
    radius.acct_port = 1813
    radius.auth_port = 1812
    radius.serv_type = 1
    radius.api_url = "http://127.0.0.1:1816/api"
    radius.api_secret = "0BOTrVO6WRtkRnKTmM52nKfQpvCGY8vD"
    radius.last_check = utils.get_currtime()
    db.add(radius)



    ssid = models.TrwSsid()
    ssid.domain_code = domain.domain_code
    ssid.isp_code = 'default'
    ssid.ssid = 'default'
    ssid.ssid_desc = u'默认SSID'
    db.add(ssid)

    tpl = models.TrwTemplate()
    tpl.isp_code = 'default'
    tpl.id = 1
    tpl.tpl_name = 'default'
    tpl.tpl_desc = u'默认模版'

# Path: toughwlan/models.py
# def get_metadata(db_engine):
# class SystemSession(DeclarativeBase):
# class SystemCache(DeclarativeBase):
# class TrwOperator(DeclarativeBase):
# class TrwOperatorRule(DeclarativeBase):
# class TrwParam(DeclarativeBase):
# class TrwIsp(DeclarativeBase):
# class TrwIspService(DeclarativeBase):
# class TrwBas(DeclarativeBase):
# class TrwDomain(DeclarativeBase):
# class TrwDomainAttr(DeclarativeBase):
# class TrwSsid(DeclarativeBase):
# class TrwRadius(DeclarativeBase):
# class TrwTemplate(DeclarativeBase):
# class TrwOperateLog(DeclarativeBase):
# class TrwOSTypes(DeclarativeBase):


# Path: toughwlan/common/initdb.py
import sys
import os
import time
        import traceback
from toughlib import utils
from toughwlan import models
from sqlalchemy.orm import scoped_session, sessionmaker
from toughlib.dbengine import get_engine
from hashlib import md5

    nas.time_type = 0
    nas.vendor_id = 3902
    db.add(nas)

    radius = models.TrwRadius()
    radius.ip_addr = "127.0.0.1"
    radius.name = "local radius"
    radius.secret = "secret"
    radius.acct_port = 1813
    radius.auth_port = 1812
    radius.serv_type = 1
    radius.api_url = "http://127.0.0.1:1816/api"
    radius.api_secret = "0BOTrVO6WRtkRnKTmM52nKfQpvCGY8vD"
    radius.last_check = utils.get_currtime()
    db.add(radius)



    ssid = models.TrwSsid()
    ssid.domain_code = domain.domain_code
    ssid.isp_code = 'default'
    ssid.ssid = 'default'
    ssid.ssid_desc = u'默认SSID'
    db.add(ssid)

    tpl = models.TrwTemplate()
    tpl.isp_code = 'default'
    tpl.id = 1
    tpl.tpl_name = 'default'
    tpl.tpl_desc = u'默认模版'

    db.add(tpl)