Router
Helper methods for Router subscriptions that make database interactions easier.
router_site_has_another_amt_router(subscription_id)
Get the site a router is located at, and determine whether this site also houses another AMT router.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subscription_id
|
UUIDstr
|
The subscription ID of a Router subscription. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A boolean whether the router's site also houses an AMT router. |
Source code in gso/services/subscriptions/router.py
get_active_layer_3_services_on_router(subscription_id)
Get all active Layer 3 services that insist on a given router subscription_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subscription_id
|
UUID
|
Subscription ID of a Router. |
required |
Returns:
| Type | Description |
|---|---|
list[SubscriptionModel]
|
A list of Router subscriptions. |
Source code in gso/services/subscriptions/router.py
get_active_vrfs_linked_to_router(router_id)
Retrieve all active VRFs that are linked to the router.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
router_id
|
UUID
|
The ID of the router. |
required |
Returns:
| Type | Description |
|---|---|
list[SubscriptionModel]
|
A list of active VRFs that are linked to the router. |
Source code in gso/services/subscriptions/router.py
get_active_ip_trunks_linked_to_router(router_id)
Retrieve all active IP trunks that are linked to the router.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
router_id
|
UUID
|
The ID of the router. |
required |
Returns:
| Type | Description |
|---|---|
list[SubscriptionModel]
|
A list of active IP trunks that are linked to the router. |
Source code in gso/services/subscriptions/router.py
get_router_subscriptions(includes=None, lifecycles=None)
Retrieve subscriptions specifically for routers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
includes
|
list[str] | None
|
The fields to be included in the returned Subscription objects. |
None
|
lifecycles
|
list[SubscriptionLifecycle] | None
|
The subscription lifecycle states that should be included in the results. |
None
|
Returns:
| Type | Description |
|---|---|
list[SubscriptionType]
|
A list of Subscription objects for routers. |
Source code in gso/services/subscriptions/router.py
get_active_router_subscriptions(includes=None)
Retrieve active subscriptions specifically for routers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
includes
|
list[str] | None
|
The fields to be included in the returned Subscription objects. |
None
|
Returns:
| Type | Description |
|---|---|
list[SubscriptionType]
|
A list of Subscription objects for routers. |
Source code in gso/services/subscriptions/router.py
get_provisioning_router_subscriptions(includes=None)
Retrieve provisioning subscriptions specifically for routers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
includes
|
list[str] | None
|
The fields to be included in the returned Subscription objects. |
None
|
Returns:
| Type | Description |
|---|---|
list[SubscriptionType]
|
A list of router Subscription objects. |
Source code in gso/services/subscriptions/router.py
get_trunks_that_terminate_on_router(subscription_id, lifecycle_state)
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 IP trunk subscriptions that
terminate on this Router. The given lifecycle state dictates the state of trunk subscriptions that are counted as
terminating on this router.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subscription_id
|
UUID
|
Subscription ID of a Router |
required |
lifecycle_state
|
SubscriptionLifecycle
|
Required lifecycle state of the IP trunk |
required |
Returns:
| Type | Description |
|---|---|
list[SubscriptionTable]
|
A list of IP trunk subscriptions |
Source code in gso/services/subscriptions/router.py
get_active_pe_routers(includes=None, exclude_subscription_ids=None, vendor=None)
Retrieve active PE routers.
Source code in gso/services/subscriptions/router.py
get_active_nokia_router_subscriptions(includes=None)
Retrieve active subscriptions specifically for routers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
includes
|
list[str] | None
|
The fields to be included in the returned Subscription objects. |
None
|
Returns:
| Type | Description |
|---|---|
list[SubscriptionType]
|
A list of Subscription objects for routers. |