diff --git a/gso/workflows/l2_circuit/create_layer_2_circuit.py b/gso/workflows/l2_circuit/create_layer_2_circuit.py index c93e6df39693ee8e93edf7c8eaff763aea0bfa70..aa2726020a4922aa98b4b2d94d7236f71be54bd3 100644 --- a/gso/workflows/l2_circuit/create_layer_2_circuit.py +++ b/gso/workflows/l2_circuit/create_layer_2_circuit.py @@ -55,16 +55,14 @@ def initial_input_generator(product_name: str) -> FormGenerator: vlan_range_label: Label = Field("Please set a VLAN range, bounds including.", exclude=True) vlan_range_lower_bound: VLAN_ID vlan_range_upper_bound: VLAN_ID - else: - vlan_range_lower_bound: ReadOnlyField(int) = None - vlan_range_upper_bound: ReadOnlyField(int) = None + vlan_range_lower_bound: ReadOnlyField(None, default_type=int) + vlan_range_upper_bound: ReadOnlyField(None, default_type=int) vlan_divider: Divider = Field(None, exclude=True) if initial_user_input.policer_enabled: policer_bandwidth: BandwidthString - else: - policer_bandwidth: ReadOnlyField(str) = None + policer_bandwidth: ReadOnlyField(None, default_type=str) policer_divider: Divider = Field(None, exclude=True) @@ -87,15 +85,15 @@ def create_subscription(product: UUIDstr, partner: str) -> State: @step("Initialize subscription") def initialize_subscription( - subscription: Layer2CircuitInactive, - layer_2_circuit_side_a: dict[str, Any], - layer_2_circuit_side_b: dict[str, Any], - virtual_circuit_id: VC_ID | None, - layer_2_circuit_type: Layer2CircuitType, - vlan_range_lower_bound: VLAN_ID | None, - vlan_range_upper_bound: VLAN_ID | None, - policer_enabled: bool, # noqa: FBT001 - policer_bandwidth: BandwidthString | None, + subscription: Layer2CircuitInactive, + layer_2_circuit_side_a: dict[str, Any], + layer_2_circuit_side_b: dict[str, Any], + virtual_circuit_id: VC_ID | None, + layer_2_circuit_type: Layer2CircuitType, + vlan_range_lower_bound: VLAN_ID | None, + vlan_range_upper_bound: VLAN_ID | None, + policer_enabled: bool, # noqa: FBT001 + policer_bandwidth: BandwidthString | None, ) -> State: """Build a subscription object from all user input.""" subscription.layer_2_circuit.layer_2_circuit_sides = [