Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/interlink/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ async def create_link(
tags: Optional[List[str]] = None,
connection_id: Optional[str] = None,
partner_id: Optional[str] = None,
peer_asn: Optional[int] = None,
) -> Link:
"""
Create a link.
Expand All @@ -778,6 +779,7 @@ async def create_link(
One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set.
:param partner_id: If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth.
One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set.
:param peer_asn: For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.
:return: :class:`Link <Link>`

Usage:
Expand Down Expand Up @@ -805,6 +807,7 @@ async def create_link(
region=region,
project_id=project_id,
tags=tags,
peer_asn=peer_asn,
connection_id=connection_id,
partner_id=partner_id,
),
Expand All @@ -822,6 +825,7 @@ async def update_link(
region: Optional[ScwRegion] = None,
name: Optional[str] = None,
tags: Optional[List[str]] = None,
peer_asn: Optional[int] = None,
) -> Link:
"""
Update a link.
Expand All @@ -830,6 +834,7 @@ async def update_link(
:param region: Region to target. If none is passed will use default region from the config.
:param name: Name of the link.
:param tags: List of tags to apply to the link.
:param peer_asn: For self-hosted links, AS Number to establish BGP session.
:return: :class:`Link <Link>`

Usage:
Expand All @@ -854,6 +859,7 @@ async def update_link(
region=region,
name=name,
tags=tags,
peer_asn=peer_asn,
),
self.client,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ def marshal_CreateLinkRequest(
if request.tags is not None:
output["tags"] = request.tags

if request.peer_asn is not None:
output["peer_asn"] = request.peer_asn

return output


Expand Down Expand Up @@ -615,6 +618,9 @@ def marshal_UpdateLinkRequest(
if request.tags is not None:
output["tags"] = request.tags

if request.peer_asn is not None:
output["peer_asn"] = request.peer_asn

return output


Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/interlink/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,11 @@ class CreateLinkRequest:
List of tags to apply to the link.
"""

peer_asn: Optional[int]
"""
For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.
"""

connection_id: Optional[str]

partner_id: Optional[str]
Expand Down Expand Up @@ -1070,6 +1075,11 @@ class UpdateLinkRequest:
List of tags to apply to the link.
"""

peer_asn: Optional[int]
"""
For self-hosted links, AS Number to establish BGP session.
"""


@dataclass
class UpdateRoutingPolicyRequest:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/interlink/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ def create_link(
tags: Optional[List[str]] = None,
connection_id: Optional[str] = None,
partner_id: Optional[str] = None,
peer_asn: Optional[int] = None,
) -> Link:
"""
Create a link.
Expand All @@ -776,6 +777,7 @@ def create_link(
One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set.
:param partner_id: If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth.
One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set.
:param peer_asn: For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.
:return: :class:`Link <Link>`

Usage:
Expand Down Expand Up @@ -803,6 +805,7 @@ def create_link(
region=region,
project_id=project_id,
tags=tags,
peer_asn=peer_asn,
connection_id=connection_id,
partner_id=partner_id,
),
Expand All @@ -820,6 +823,7 @@ def update_link(
region: Optional[ScwRegion] = None,
name: Optional[str] = None,
tags: Optional[List[str]] = None,
peer_asn: Optional[int] = None,
) -> Link:
"""
Update a link.
Expand All @@ -828,6 +832,7 @@ def update_link(
:param region: Region to target. If none is passed will use default region from the config.
:param name: Name of the link.
:param tags: List of tags to apply to the link.
:param peer_asn: For self-hosted links, AS Number to establish BGP session.
:return: :class:`Link <Link>`

Usage:
Expand All @@ -852,6 +857,7 @@ def update_link(
region=region,
name=name,
tags=tags,
peer_asn=peer_asn,
),
self.client,
),
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/interlink/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ def marshal_CreateLinkRequest(
if request.tags is not None:
output["tags"] = request.tags

if request.peer_asn is not None:
output["peer_asn"] = request.peer_asn

return output


Expand Down Expand Up @@ -615,6 +618,9 @@ def marshal_UpdateLinkRequest(
if request.tags is not None:
output["tags"] = request.tags

if request.peer_asn is not None:
output["peer_asn"] = request.peer_asn

return output


Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/interlink/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,11 @@ class CreateLinkRequest:
List of tags to apply to the link.
"""

peer_asn: Optional[int]
"""
For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.
"""

connection_id: Optional[str]

partner_id: Optional[str]
Expand Down Expand Up @@ -1070,6 +1075,11 @@ class UpdateLinkRequest:
List of tags to apply to the link.
"""

peer_asn: Optional[int]
"""
For self-hosted links, AS Number to establish BGP session.
"""


@dataclass
class UpdateRoutingPolicyRequest:
Expand Down