예제 #1
0
파일: cli.py 프로젝트: ccaputo/peeringdb-py
def sync(config):
    """ synchronize to a local database """
    # import here until the db is properly abstracted
    from peeringdb.localdb import LocalDB

    cfg = peeringdb.config.get_config(config)
    db = LocalDB(cfg)
    db.sync()
    return 0
예제 #2
0
def sync(config):
    """ synchronize to a local database """
    # import here until the db is properly abstracted
    from peeringdb.localdb import LocalDB

    cfg = peeringdb.config.get_config(config)
    db = LocalDB(cfg)
    db.sync()
    return 0
예제 #3
0
def drop_tables(config):
    """ drop all peeringdb tables NOTE this will delete data """
    # import here until the db is properly abstracted
    from peeringdb.localdb import LocalDB

    cfg = peeringdb.config.get_config(config)
    db = LocalDB(cfg)
    db.drop_tables()
    return 0
예제 #4
0
파일: cli.py 프로젝트: mahtin/peeringdb-py
def drop_tables(config):
    """ drop all peeringdb tables NOTE this will delete data """
    # import here until the db is properly abstracted
    from peeringdb.localdb import LocalDB

    cfg = peeringdb.config.get_config(config)
    db = LocalDB(cfg)
    db.drop_tables()
    return 0