Skip to content
Snippets Groups Projects
Commit d27d1e42 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

BGPPeers: reorder fields in accordance to the `create_nren_l3_core_service` BGPPeers classes.

parent 6d626147
No related branches found
No related tags found
1 merge request!298Add BFD configuration to Service binding ports
Pipeline #90563 passed
......@@ -67,38 +67,44 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
class IPv4BGPPeer(BaseModel):
peer_address: IPv4AddressType
add_v4_multicast: bool = Field(default=False, exclude=True)
ip_type: IPTypes = IPTypes.IPV4
bfd_enabled: bool = False
has_custom_policies: bool = False
authentication_key: str | None
has_custom_policies: bool = False
bfd_enabled: bool = False
multipath_enabled: bool = False
send_default_route: bool = False
is_passive: bool = False
add_v4_multicast: bool = Field(default=False, exclude=True)
send_default_route: bool = False
@computed_field # type: ignore[misc]
@property
def families(self) -> list[IPFamily]:
return [IPFamily.V4UNICAST, IPFamily.V4MULTICAST] if self.add_v4_multicast else [IPFamily.V4UNICAST]
@computed_field # type: ignore[misc]
@property
def ip_type(self) -> IPTypes:
return IPTypes.IPV4
class IPv6BGPPeer(BaseModel):
peer_address: IPv6AddressType
add_v6_multicast: bool = Field(default=False, exclude=True)
ip_type: IPTypes = IPTypes.IPV6
bfd_enabled: bool = False
has_custom_policies: bool = False
authentication_key: str | None
has_custom_policies: bool = False
bfd_enabled: bool = False
multipath_enabled: bool = False
send_default_route: bool = False
is_passive: bool = False
add_v6_multicast: bool = Field(default=False, exclude=True)
send_default_route: bool = False
@computed_field # type: ignore[misc]
@property
def families(self) -> list[IPFamily]:
return [IPFamily.V6UNICAST, IPFamily.V6MULTICAST] if self.add_v6_multicast else [IPFamily.V6UNICAST]
@computed_field # type: ignore[misc]
@property
def ip_type(self) -> IPTypes:
return IPTypes.IPV6
# There are three possible scenarios for Edge Ports. They can be added, removed, or their relevant SBP can be
# modified.
removed_ap_list = [
......
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