How to use asu - 10 common examples

To help you get started, we’ve selected a few asu 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 aparcar / attendedsysupgrade-server / tests / test_build.py View on Github external
def test_build_real(app, httpserver: HTTPServer):
    request_data = dict(
        version_data={
            "branch": "master",
            "path": "snapshots",
            "pubkey": "RWS1BD5w+adc3j2Hqg9+b66CvLR7NlHbsj7wjNVj0XGt/othDgIAOJS+",
        },
        target="ath79/generic",
        store_path=app.config["STORE_PATH"],
        cache_path=app.config["CACHE_PATH"],
        upstream_url="https://downloads.cdn.openwrt.org",
        version="SNAPSHOT",
        profile="tplink_tl-wdr4300-v1",
        packages={"tmux", "vim"},
    )
    result = build(request_data)
    assert result["id"] == "tplink_tl-wdr4300-v1"
github aparcar / attendedsysupgrade-server / tests / test_build.py View on Github external
request_data = dict(
        version_data={
            "branch": "master",
            "path": "snapshots",
            "pubkey": "RWSrHfFmlHslUcLbXFIRp+eEikWF9z1N77IJiX5Bt/nJd1a/x+L+SU89",
        },
        target="testtarget/testsubtarget",
        store_path=app.config["STORE_PATH"],
        cache_path=app.config["CACHE_PATH"],
        upstream_url="http://localhost:8001",
        version="SNAPSHOT",
        profile="testprofile",
        packages=["test1"],
    )
    with pytest.raises(Exception) as execinfo:
        result = build(request_data)
    assert str(execinfo.value) == "packages must be type set not list"
github aparcar / attendedsysupgrade-server / tests / test_build.py View on Github external
request_data = dict(
        version_data={
            "branch": "master",
            "path": "snapshots",
            "pubkey": "RWSrHfFmlHslUcLbXFIRp+eEikWF9z1N77IJiX5Bt/nJd1a/x+L+SU89",
        },
        target="testtarget/testsubtarget",
        store_path=app.config["STORE_PATH"],
        cache_path=app.config["CACHE_PATH"],
        upstream_url="http://localhost:8001",
        version="SNAPSHOT",
        profile="testprofile",
    )
    with pytest.raises(Exception) as execinfo:
        result = build(request_data)
    assert str(execinfo.value) == "store_path must be existing directory"
github aparcar / attendedsysupgrade-server / tests / test_build.py View on Github external
def test_build_fake(app, upstream):
    request_data = dict(
        version_data={
            "branch": "master",
            "path": "snapshots",
            "pubkey": "RWSrHfFmlHslUcLbXFIRp+eEikWF9z1N77IJiX5Bt/nJd1a/x+L+SU89",
        },
        target="testtarget/testsubtarget",
        store_path=app.config["STORE_PATH"],
        cache_path=app.config["CACHE_PATH"],
        upstream_url="http://localhost:8001",
        version="SNAPSHOT",
        profile="testprofile",
        packages={"test1", "test2"},
    )
    result = build(request_data)
    assert result["id"] == "testprofile"
github aparcar / attendedsysupgrade-server / tests / test_build.py View on Github external
def test_build_fake_no_packages(app, upstream):
    request_data = dict(
        version_data={
            "branch": "master",
            "path": "snapshots",
            "pubkey": "RWSrHfFmlHslUcLbXFIRp+eEikWF9z1N77IJiX5Bt/nJd1a/x+L+SU89",
        },
        target="testtarget/testsubtarget",
        store_path=app.config["STORE_PATH"],
        cache_path=app.config["CACHE_PATH"],
        upstream_url="http://localhost:8001",
        version="SNAPSHOT",
        profile="testprofile",
    )
    result = build(request_data)
    assert result["id"] == "testprofile"
github aparcar / attendedsysupgrade-server / tests / test_build.py View on Github external
request_data = dict(
        version_data={
            "branch": "master",
            "path": "snapshots",
            "pubkey": "RWSrHfFmlHslUcLbXFIRp+eEikWF9z1N77IJiX5Bt/nJd1a/x+L+SU89",
        },
        target="testtarget/testsubtarget",
        store_path=app.config["STORE_PATH"],
        cache_path=app.config["CACHE_PATH"],
        upstream_url="http://localhost:8001",
        version="SNAPSHOT",
        profile="testprofile",
        packages={"test1", "test2"},
        diff_packages=True,
    )
    result = build(request_data)
    assert result["id"] == "testprofile"
github aparcar / attendedsysupgrade-server / asu / views.py View on Github external
@app.route("/api/v1/stats/images_latest")
def api_stats_images_latest():
    return mime_json(database.get_images_latest())
github aparcar / attendedsysupgrade-server / asu / views.py View on Github external
@app.route("/api/manifest/")
def api_manifest(manifest_hash):
    return mime_json(database.get_manifest_info(manifest_hash))
github aparcar / attendedsysupgrade-server / asu / views.py View on Github external
@app.route("/api/v1/stats/popular_packages")
def api_stats_popular_packages():
    return mime_json(database.get_popular_packages())
github aparcar / attendedsysupgrade-server / asu / views.py View on Github external
@app.route("/api/v1/stats/popular_targets")
def api_stats_popular_targets():
    return mime_json(database.get_popular_targets())