Skip to content
Snippets Groups Projects

Allow iBGP update on both provisioning and active trunks

Merged Karel van Klink requested to merge feature/update-ibgp-on-provisioning-trunk into develop
All threads resolved!
Files
3
@@ -129,14 +129,17 @@ def get_active_iptrunk_subscriptions(includes: list[str] | None = None) -> list[
@@ -129,14 +129,17 @@ def get_active_iptrunk_subscriptions(includes: list[str] | None = None) -> list[
)
)
def get_active_trunks_that_terminate_on_router(subscription_id: UUIDstr) -> list[SubscriptionTable]:
def get_trunks_that_terminate_on_router(
"""Get all IP trunk subscriptions that are active, and terminate on the given ``subscription_id`` of a Router.
subscription_id: UUIDstr, lifecycle_state: SubscriptionLifecycle
 
) -> list[SubscriptionTable]:
 
"""Get all IP trunk subscriptions that terminate on the given ``subscription_id`` of a Router.
Given a ``subscription_id`` of a Router subscription, this method gives a list of all active IP trunk subscriptions
Given a ``subscription_id`` of a Router subscription, this method gives a list of all IP trunk subscriptions that
that terminate on this Router.
terminate on this Router. The given lifecycle state dictates the state of trunk subscriptions that are counted as
 
terminating on this router.
:param subscription_id: Subscription ID of a Router
:param UUIDstr subscription_id: Subscription ID of a Router
:type subscription_id: UUIDstr
:param SubscriptionLifecycle lifecycle_state: Required lifecycle state of the IP trunk
:return: A list of IP trunk subscriptions
:return: A list of IP trunk subscriptions
:rtype: list[SubscriptionTable]
:rtype: list[SubscriptionTable]
@@ -146,7 +149,7 @@ def get_active_trunks_that_terminate_on_router(subscription_id: UUIDstr) -> list
@@ -146,7 +149,7 @@ def get_active_trunks_that_terminate_on_router(subscription_id: UUIDstr) -> list
.join(ProductTable)
.join(ProductTable)
.filter(
.filter(
ProductTable.product_type == ProductType.IP_TRUNK,
ProductTable.product_type == ProductType.IP_TRUNK,
SubscriptionTable.status == SubscriptionLifecycle.ACTIVE,
SubscriptionTable.status == lifecycle_state,
)
)
.all()
.all()
)
)
Loading