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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to change the policy of a zone? A zone cannot switch / change to a different profile / policy Add support for changing the source of a zone.

2 participants