Skip to content

Commit 3275b76

Browse files
authored
feat(s2s_vpn): accept custom private interco IPs on connection creation (#1301)
1 parent 2dd30f3 commit 3275b76

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ def unmarshal_BgpSession(data: Any) -> BgpSession:
6666
else:
6767
args["private_ip"] = None
6868

69+
field = data.get("peer_private_ip", None)
70+
if field is not None:
71+
args["peer_private_ip"] = field
72+
else:
73+
args["peer_private_ip"] = None
74+
6975
return BgpSession(**args)
7076

7177

@@ -783,6 +789,12 @@ def marshal_CreateConnectionRequestBgpConfig(
783789
if request.routing_policy_id is not None:
784790
output["routing_policy_id"] = request.routing_policy_id
785791

792+
if request.private_ip is not None:
793+
output["private_ip"] = request.private_ip
794+
795+
if request.peer_private_ip is not None:
796+
output["peer_private_ip"] = request.peer_private_ip
797+
786798
return output
787799

788800

scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def __str__(self) -> str:
167167
class BgpSession:
168168
routing_policy_id: str
169169
private_ip: str
170+
peer_private_ip: str
170171

171172

172173
@dataclass
@@ -190,6 +191,8 @@ class VpnGatewayPublicConfig:
190191
@dataclass
191192
class CreateConnectionRequestBgpConfig:
192193
routing_policy_id: str
194+
private_ip: Optional[str] = None
195+
peer_private_ip: Optional[str] = None
193196

194197

195198
@dataclass

scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ def unmarshal_BgpSession(data: Any) -> BgpSession:
6666
else:
6767
args["private_ip"] = None
6868

69+
field = data.get("peer_private_ip", None)
70+
if field is not None:
71+
args["peer_private_ip"] = field
72+
else:
73+
args["peer_private_ip"] = None
74+
6975
return BgpSession(**args)
7076

7177

@@ -783,6 +789,12 @@ def marshal_CreateConnectionRequestBgpConfig(
783789
if request.routing_policy_id is not None:
784790
output["routing_policy_id"] = request.routing_policy_id
785791

792+
if request.private_ip is not None:
793+
output["private_ip"] = request.private_ip
794+
795+
if request.peer_private_ip is not None:
796+
output["peer_private_ip"] = request.peer_private_ip
797+
786798
return output
787799

788800

scaleway/scaleway/s2s_vpn/v1alpha1/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def __str__(self) -> str:
167167
class BgpSession:
168168
routing_policy_id: str
169169
private_ip: str
170+
peer_private_ip: str
170171

171172

172173
@dataclass
@@ -190,6 +191,8 @@ class VpnGatewayPublicConfig:
190191
@dataclass
191192
class CreateConnectionRequestBgpConfig:
192193
routing_policy_id: str
194+
private_ip: Optional[str] = None
195+
peer_private_ip: Optional[str] = None
193196

194197

195198
@dataclass

0 commit comments

Comments
 (0)