Skip to content
Snippets Groups Projects
Commit c0ff4217 authored by Neda Moeini's avatar Neda Moeini
Browse files

Make ruff happy

parent fd5dc619
Branches
Tags
1 merge request!314Feature/vrf
"""A workflow for terminating a VRF subscription.""" """A workflow for terminating a VRF subscription."""
from typing import Any from typing import Any
from orchestrator.forms import FormPage from orchestrator.forms import FormPage
...@@ -30,8 +31,10 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: ...@@ -30,8 +31,10 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
@model_validator(mode="before") @model_validator(mode="before")
def vrf_must_have_empty_router_list(cls, data: Any) -> Any: def vrf_must_have_empty_router_list(cls, data: Any) -> Any:
if vrf_subscription.vrf.vrf_router_list: if vrf_subscription.vrf.vrf_router_list:
msg = ("VRF must not have any routers assigned to it before it can be deleted. Please remove all" msg = (
" routers from the VRF first.") "VRF must not have any routers assigned to it before it can be deleted. Please remove all"
" routers from the VRF first."
)
raise ValueError(msg) raise ValueError(msg)
return data return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment