Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Domain fallback to config #2

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions OMADA_respondd.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ logging_config:
- console
level: DEBUG
version: 1
fallback_domain: "omada_respondd_fallback" # optional
1 change: 1 addition & 0 deletions omada_respondd/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def from_dict(cls, cfg: Dict[str, str]) -> "Config":
unicast_port=cfg["unicast_port"],
interface=cfg["interface"],
verbose=cfg["verbose"],
fallback_domain=cfg.get("fallback_domain", "omada_respondd_fallback"),
)


Expand Down
4 changes: 1 addition & 3 deletions omada_respondd/omada_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ def get_infos():
gateway6=offloader.get("gateway6", None),
gateway_nexthop=offloader_id,
neighbour_macs=neighbour_macs,
domain_code=offloader.get(
"domain", "ffmuc_omada_respondd_fallback"
),
domain_code=offloader.get("domain", cfg.fallback_domain),
# autoupdater=autoupgrade,
)
)
Expand Down
Loading