How to use the peeringdb.PeeringDB function in peeringdb

To help you get started, we’ve selected a few peeringdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peeringdb / peeringdb-py / tests / test_sync.py View on Github external
def get_pclient():
    c = peeringdb.PeeringDB(helper.CONFIG)
    c._updater._ContextClass = _PartialEnabledContext
    return c
github peeringdb / peeringdb-py / tests / test_sync.py View on Github external
def get_client():
    return peeringdb.PeeringDB(helper.CONFIG)
github peeringdb / peeringdb-py / tests / test_sync.py View on Github external
def test_dry_run(client_empty):
    client = peeringdb.PeeringDB(helper.CONFIG, dry_run=True)
    rs = all_resources()
    client.update_all(rs)
    # still empty?
    with pytest.raises(peeringdb.get_backend().object_missing_error()):
        client.get(Network, FIRST_NET)