Skip to content

Commit

Permalink
feat(lb): add support for match_subdomains (scaleway#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Feb 28, 2025
1 parent 946c57a commit 14df9d2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,10 @@ def unmarshal_RouteMatch(data: Any) -> RouteMatch:

args: Dict[str, Any] = {}

field = data.get("match_subdomains", None)
if field is not None:
args["match_subdomains"] = field

field = data.get("sni", None)
if field is not None:
args["sni"] = field
Expand Down Expand Up @@ -2036,6 +2040,9 @@ def marshal_RouteMatch(
),
)

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

return output


Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,11 @@ class PrivateNetworkStaticConfig:

@dataclass
class RouteMatch:
match_subdomains: bool
"""
If true, all subdomains will match.
"""

sni: Optional[str]

host_header: Optional[str]
Expand Down
7 changes: 7 additions & 0 deletions scaleway/scaleway/lb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,10 @@ def unmarshal_RouteMatch(data: Any) -> RouteMatch:

args: Dict[str, Any] = {}

field = data.get("match_subdomains", None)
if field is not None:
args["match_subdomains"] = field

field = data.get("sni", None)
if field is not None:
args["sni"] = field
Expand Down Expand Up @@ -2036,6 +2040,9 @@ def marshal_RouteMatch(
),
)

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

return output


Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,11 @@ class PrivateNetworkStaticConfig:

@dataclass
class RouteMatch:
match_subdomains: bool
"""
If true, all subdomains will match.
"""

sni: Optional[str]

host_header: Optional[str]
Expand Down

0 comments on commit 14df9d2

Please sign in to comment.