Skip to content
Snippets Groups Projects
Commit a06e3f58 authored by Neda Moeini's avatar Neda Moeini
Browse files

Improved get device list query.

parent 7f385406
No related branches found
No related tags found
1 merge request!37Feature/dboard3 921
......@@ -43,8 +43,8 @@ def make_request(body: dict) -> dict:
def extract_router_info(device: dict) -> dict or None:
tag_to_key_map = {
"RTR": "router",
"OFFICE_ROUTER": "office_router",
"Super_POP_SWITCH": "super_pop_switch"
"OFFICE_ROUTER": "officeRouter",
"Super_POP_SWITCH": "superPopSwitch"
}
tag = device.get("product", {}).get("tag")
......@@ -95,7 +95,8 @@ def load_routers_from_orchestrator() -> dict:
query = """
{
subscriptions(
filterBy: {field: "status", value: "ACTIVE"},
filterBy: {field: "status", value: "PROVISIONING|ACTIVE"},
first: 500,
query: "tag:(RTR|OFFICE_ROUTER|Super_POP_SWITCH)"
) {
page {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment