Skip to content

feat: add policy lifecycle operations - #53

Merged
yashdotdev13 merged 2 commits into
yashdotdev13:mainfrom
AryanGupta833:feat/policy-lifecycle
Oct 19, 2026
Merged

yashdotdev13 merged 2 commits into
yashdotdev13:mainfrom
AryanGupta833:feat/policy-lifecycle

Conversation

@AryanGupta833

Copy link
Copy Markdown
Contributor

Summary

Adds dedicated endpoints to activate and deactivate existing traffic policies without requiring clients to resubmit policy configuration. Lifecycle transitions are idempotent, preserve existing policy details, and return appropriate HTTP responses for missing policies.

Changes

  • Added policy activation and deactivation operations to the service and controller.
  • Added PolicyNotFoundException to handle missing policies.
  • Ensured status changes preserve existing policy configuration.
  • Verified that inactive policies are rejected by the traffic decision engine.

Tests

  • Added service tests for status transitions, idempotency, and missing policies.
  • Added controller tests for successful transitions, invalid input, and missing policies.
  • Added a traffic decision engine regression test for deactivated policies.
  • All 131 tests pass.

Closes #21

@sonarqubecloud

Copy link
Copy Markdown

@yashdotdev13
yashdotdev13 merged commit b19af72 into yashdotdev13:main Oct 19, 2026
2 checks passed
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.

Add policy activation and deactivation endpoints

2 participants