diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/__init__.py b/scaleway-async/scaleway_async/interlink/v1beta1/__init__.py index a0d90f5c1..9baa0d135 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/__init__.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/__init__.py @@ -12,6 +12,7 @@ from .types import ListPopsRequestOrderBy from .types import ListRoutingPoliciesRequestOrderBy from .types import BgpConfig +from .types import Range from .types import PartnerHost from .types import SelfHost from .types import DedicatedConnection @@ -62,6 +63,7 @@ "ListPopsRequestOrderBy", "ListRoutingPoliciesRequestOrderBy", "BgpConfig", + "Range", "PartnerHost", "SelfHost", "DedicatedConnection", diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py b/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py index 8f182ca44..9653cbfe6 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py @@ -13,6 +13,7 @@ BgpStatus, DedicatedConnectionStatus, LinkStatus, + Range, DedicatedConnection, BgpConfig, PartnerHost, @@ -37,6 +38,29 @@ ) +def unmarshal_Range(data: Any) -> Range: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'Range' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("start", None) + if field is not None: + args["start"] = field + else: + args["start"] = None + + field = data.get("end", None) + if field is not None: + args["end"] = field + else: + args["end"] = None + + return Range(**args) + + def unmarshal_DedicatedConnection(data: Any) -> DedicatedConnection: if not isinstance(data, dict): raise TypeError( @@ -123,6 +147,12 @@ def unmarshal_DedicatedConnection(data: Any) -> DedicatedConnection: else: args["demarcation_info"] = None + field = data.get("vlan_range", None) + if field is not None: + args["vlan_range"] = unmarshal_Range(field) + else: + args["vlan_range"] = None + return DedicatedConnection(**args) diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/types.py b/scaleway-async/scaleway_async/interlink/v1beta1/types.py index fea4eb7cd..35e61f952 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/types.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/types.py @@ -137,6 +137,12 @@ class BgpConfig: """ +@dataclass +class Range: + start: int + end: int + + @dataclass class PartnerHost: partner_id: str @@ -230,6 +236,11 @@ class DedicatedConnection: Demarcation details required by the data center to set up the supporting Cross Connect. This generally includes the physical space in the facility, the cabinet or rack the connection should land in, the patch panel to go in, the port designation, and the media type. """ + vlan_range: Optional[Range] = None + """ + Range in which to pick vlan for self-hosted links on this dedicated connection. Both start & end are included. Any range defined here must be itself included in the greater allowed range of vlans from 1500 to 3899 (this range is hardware dependent and can change over time, but actual range will be enforced). + """ + @dataclass class Link: diff --git a/scaleway/scaleway/interlink/v1beta1/__init__.py b/scaleway/scaleway/interlink/v1beta1/__init__.py index a0d90f5c1..9baa0d135 100644 --- a/scaleway/scaleway/interlink/v1beta1/__init__.py +++ b/scaleway/scaleway/interlink/v1beta1/__init__.py @@ -12,6 +12,7 @@ from .types import ListPopsRequestOrderBy from .types import ListRoutingPoliciesRequestOrderBy from .types import BgpConfig +from .types import Range from .types import PartnerHost from .types import SelfHost from .types import DedicatedConnection @@ -62,6 +63,7 @@ "ListPopsRequestOrderBy", "ListRoutingPoliciesRequestOrderBy", "BgpConfig", + "Range", "PartnerHost", "SelfHost", "DedicatedConnection", diff --git a/scaleway/scaleway/interlink/v1beta1/marshalling.py b/scaleway/scaleway/interlink/v1beta1/marshalling.py index 8f182ca44..9653cbfe6 100644 --- a/scaleway/scaleway/interlink/v1beta1/marshalling.py +++ b/scaleway/scaleway/interlink/v1beta1/marshalling.py @@ -13,6 +13,7 @@ BgpStatus, DedicatedConnectionStatus, LinkStatus, + Range, DedicatedConnection, BgpConfig, PartnerHost, @@ -37,6 +38,29 @@ ) +def unmarshal_Range(data: Any) -> Range: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'Range' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("start", None) + if field is not None: + args["start"] = field + else: + args["start"] = None + + field = data.get("end", None) + if field is not None: + args["end"] = field + else: + args["end"] = None + + return Range(**args) + + def unmarshal_DedicatedConnection(data: Any) -> DedicatedConnection: if not isinstance(data, dict): raise TypeError( @@ -123,6 +147,12 @@ def unmarshal_DedicatedConnection(data: Any) -> DedicatedConnection: else: args["demarcation_info"] = None + field = data.get("vlan_range", None) + if field is not None: + args["vlan_range"] = unmarshal_Range(field) + else: + args["vlan_range"] = None + return DedicatedConnection(**args) diff --git a/scaleway/scaleway/interlink/v1beta1/types.py b/scaleway/scaleway/interlink/v1beta1/types.py index fea4eb7cd..35e61f952 100644 --- a/scaleway/scaleway/interlink/v1beta1/types.py +++ b/scaleway/scaleway/interlink/v1beta1/types.py @@ -137,6 +137,12 @@ class BgpConfig: """ +@dataclass +class Range: + start: int + end: int + + @dataclass class PartnerHost: partner_id: str @@ -230,6 +236,11 @@ class DedicatedConnection: Demarcation details required by the data center to set up the supporting Cross Connect. This generally includes the physical space in the facility, the cabinet or rack the connection should land in, the patch panel to go in, the port designation, and the media type. """ + vlan_range: Optional[Range] = None + """ + Range in which to pick vlan for self-hosted links on this dedicated connection. Both start & end are included. Any range defined here must be itself included in the greater allowed range of vlans from 1500 to 3899 (this range is hardware dependent and can change over time, but actual range will be enforced). + """ + @dataclass class Link: