Skip to content
Snippets Groups Projects
Verified Commit 53399210 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

fix linting errors

parent 86c18127
Branches
Tags
1 merge request!41Feature/migrate device to router
Pipeline #83834 passed
...@@ -5,7 +5,7 @@ from fastapi import FastAPI ...@@ -5,7 +5,7 @@ from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.cors import CORSMiddleware
from lso import config, environment from lso import config, environment
from lso.routes import default, router, ip_trunk from lso.routes import default, ip_trunk, router
def create_app() -> FastAPI: def create_app() -> FastAPI:
......
...@@ -18,10 +18,10 @@ def test_router_provisioning(client: TestClient) -> None: ...@@ -18,10 +18,10 @@ def test_router_provisioning(client: TestClient) -> None:
"dry_run": True, "dry_run": True,
"verb": "deploy", "verb": "deploy",
"subscription": { "subscription": {
"device": { "router": {
"ts_address": "127.0.0.1", "ts_address": "127.0.0.1",
"ts_port": "1234", "ts_port": "1234",
"device_fqdn": "bogus.fqdn.org", "router_fqdn": "bogus.fqdn.org",
"lo_address": {"v4": "1.2.3.4", "v6": "2001:db8::1"}, "lo_address": {"v4": "1.2.3.4", "v6": "2001:db8::1"},
"lo_iso_address": "1.2.3.4.5.6", "lo_iso_address": "1.2.3.4.5.6",
"snmp_location": "city,country[1.2,3.4]", "snmp_location": "city,country[1.2,3.4]",
...@@ -32,13 +32,13 @@ def test_router_provisioning(client: TestClient) -> None: ...@@ -32,13 +32,13 @@ def test_router_provisioning(client: TestClient) -> None:
"site_latitude": "0.000", "site_latitude": "0.000",
"site_longitude": "0.000", "site_longitude": "0.000",
}, },
"device_type": "router", "router_type": "router",
"device_vendor": "vendor", "router_vendor": "vendor",
}, },
} }
with patch("lso.playbook.ansible_runner.run", new=test_ansible_runner_run) as _: with patch("lso.playbook.ansible_runner.run", new=test_ansible_runner_run) as _:
rv = client.post("/api/device/", json=params) rv = client.post("/api/router/", json=params)
assert rv.status_code == 200 assert rv.status_code == 200
response = rv.json() response = rv.json()
# wait two seconds for the run thread to finish # wait two seconds for the run thread to finish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment