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

Update create VRF WF to add AS number.

parent 00e2a539
No related branches found
No related tags found
1 merge request!314Feature/vrf
......@@ -26,10 +26,11 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
vrf_name: str
route_distinguisher: str
route_target: str
vrf_as_number: int
user_input = yield CreateVRFForm
user_input = user_input.model_dump()
summary_fields = ["vrf_name", "route_distinguisher", "route_target"]
summary_fields = ["vrf_name", "route_distinguisher", "route_target", "vrf_as_number"]
yield from create_summary_form(user_input, product_name, summary_fields)
return user_input
......@@ -52,11 +53,13 @@ def initialize_subscription(
vrf_name: str,
route_distinguisher: str,
route_target: str,
vrf_as_number: int,
) -> State:
"""Initialise the subscription object in the service database."""
subscription.vrf.vrf_name = vrf_name
subscription.vrf.route_distinguisher = route_distinguisher
subscription.vrf.route_target = route_target
subscription.vrf.vrf_as_number = vrf_as_number
subscription.description = f"VRF {vrf_name}"
return {"subscription": subscription}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment