Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(k8s): align fields names with ones used in compute user-data #806

Merged
merged 1 commit into from
Dec 26, 2024
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
20 changes: 4 additions & 16 deletions scaleway-async/scaleway_async/k8s/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,13 @@ def unmarshal_ExternalNodeAuth(data: Any) -> ExternalNodeAuth:

args: Dict[str, Any] = {}

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

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

return ExternalNodeAuth(**args)

Expand Down Expand Up @@ -1023,18 +1023,6 @@ def unmarshal_NodeMetadata(data: Any) -> NodeMetadata:
else None
)

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

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

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

field = data.get("has_gpu", None)
if field is not None:
args["has_gpu"] = field
Expand Down
10 changes: 2 additions & 8 deletions scaleway-async/scaleway_async/k8s/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,9 +1414,9 @@ class ExternalNode:

@dataclass
class ExternalNodeAuth:
node_token: str
node_secret_key: str

api_url: str
metadata_url: str


@dataclass
Expand Down Expand Up @@ -1833,12 +1833,6 @@ class NodeMetadata:

node_taints: List[NodeMetadataCoreV1Taint]

private_network_mode: str

kapsule_iface_mac: str

full_isolation: bool

has_gpu: bool

external_ip: str
Expand Down
20 changes: 4 additions & 16 deletions scaleway/scaleway/k8s/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,13 @@ def unmarshal_ExternalNodeAuth(data: Any) -> ExternalNodeAuth:

args: Dict[str, Any] = {}

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

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

return ExternalNodeAuth(**args)

Expand Down Expand Up @@ -1023,18 +1023,6 @@ def unmarshal_NodeMetadata(data: Any) -> NodeMetadata:
else None
)

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

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

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

field = data.get("has_gpu", None)
if field is not None:
args["has_gpu"] = field
Expand Down
10 changes: 2 additions & 8 deletions scaleway/scaleway/k8s/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,9 +1414,9 @@ class ExternalNode:

@dataclass
class ExternalNodeAuth:
node_token: str
node_secret_key: str

api_url: str
metadata_url: str


@dataclass
Expand Down Expand Up @@ -1833,12 +1833,6 @@ class NodeMetadata:

node_taints: List[NodeMetadataCoreV1Taint]

private_network_mode: str

kapsule_iface_mac: str

full_isolation: bool

has_gpu: bool

external_ip: str
Expand Down
Loading