Skip to content

zone edit command to change zone source and policy - #906

Open
tertsdiepraam wants to merge 2 commits into
mainfrom
zone-edit
Open

zone edit command to change zone source and policy#906
tertsdiepraam wants to merge 2 commits into
mainfrom
zone-edit

Conversation

@tertsdiepraam

@tertsdiepraam tertsdiepraam commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Allows for the following controls:

cascade zone edit se --source ~/data/zones/se.zone.txt
cascade zone edit se --policy my-policy

It's also possible to pass both.

The output could be improved if for example the new policy is the same policy that is already in use.

Closes #903
Closes #868
Closes #846

Comment thread src/units/http_server.rs Outdated

if let Some(policy) = policy {
let mut handle = zone.write_handle(center);
let old = handle.state.policy.replace(policy.latest.clone());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also need to un-link the zone from the policy here...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, how?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I got it now, please take a look.

@bal-e bal-e self-assigned this Aug 20, 2026
@bal-e

bal-e commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

I'll continue this work.

@bal-e

bal-e commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Note: the CLI command should wait until all policy changes (including keyset stuff; note there are some tokio::spawn()s to watch out for) to finish before it returns.

@ximon18 ximon18 added the cli Relating to the `cascade` CLI tool, which talks to the daemon. label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Relating to the `cascade` CLI tool, which talks to the daemon.

Projects

None yet

3 participants