Skip to content

feat: add zone switch group link resource - #1

Merged
johanek merged 2 commits into
masterfrom
claude/zone-switch-group-links-21146e
Nov 19, 2026
Merged

johanek merged 2 commits into
masterfrom
claude/zone-switch-group-links-21146e

Conversation

@johanek

@johanek johanek commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds client.zone_switch_group_links, a wrapper for the public-API (wsg) /zoneSwitchGroupLinks endpoints, so a Switch Manager switch group can be linked to a zone.

  • list(*, zone_id=None, switch_group_id=None, domain_id=None): every page, at most one filter
  • get(id)
  • find(zone_id, switch_group_id): the record or None, whatever its link flag
  • create(zone_id, switch_group_id, link=True): returns {id}
  • update(id, fields): read-merge-PUT over zoneId / switchGroupId / link
  • delete(id)

ADR 0009, the README, docs/ and the repo memory are updated.

Live findings (read-only, production controller)

  • The list accepts at most one filter. zoneId together with switchGroupId returns HTTP 500 ("At most 1 parameter"). list() raises ValueError before sending, and find() filters by zone and matches the group client-side.
  • A switchGroupId filter naming an unknown group returns HTTP 500. An unknown zoneId returns an empty list.
  • get() for an unknown id returns None.

The controller held no link records, and create, update and delete were not run live.

Test plan

  • make tests (lint, mypy, 318 unit tests)
  • Live read-only list / find / get

🤖 Generated with Claude Code

client.zone_switch_group_links wraps the public-API /zoneSwitchGroupLinks
endpoints: list, get, find, create, update (read-merge-PUT) and delete.
The controller answers two list filters with HTTP 500 ("At most 1
parameter"), so list() refuses them and find() filters by zone and matches
the switch group client-side. ADR 0009 records the live read findings.
@johanek
johanek merged commit 0416939 into master Nov 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant