|
34 | 34 | CreateClusterRequestOpenIDConnectConfig, |
35 | 35 | CreateClusterRequestPoolConfig, |
36 | 36 | CreatePoolRequestUpgradePolicy, |
| 37 | + ExternalNode, |
37 | 38 | ListClusterAvailableVersionsResponse, |
38 | 39 | ListClustersResponse, |
39 | 40 | ListNodesResponse, |
|
69 | 70 | unmarshal_Node, |
70 | 71 | unmarshal_Pool, |
71 | 72 | unmarshal_Version, |
| 73 | + unmarshal_ExternalNode, |
72 | 74 | unmarshal_ListClusterAvailableVersionsResponse, |
73 | 75 | unmarshal_ListClustersResponse, |
74 | 76 | unmarshal_ListNodesResponse, |
@@ -992,6 +994,37 @@ async def delete_pool( |
992 | 994 | self._throw_on_error(res) |
993 | 995 | return unmarshal_Pool(res.json()) |
994 | 996 |
|
| 997 | + async def create_external_node( |
| 998 | + self, |
| 999 | + *, |
| 1000 | + pool_id: str, |
| 1001 | + region: Optional[Region] = None, |
| 1002 | + ) -> ExternalNode: |
| 1003 | + """ |
| 1004 | + This method returns metadata about a Kosmos node, it is not intended to be directly called by end users, rather by kapsule-node-agent. |
| 1005 | + :param region: Region to target. If none is passed will use default region from the config |
| 1006 | + :param pool_id: |
| 1007 | + :return: :class:`ExternalNode <ExternalNode>` |
| 1008 | +
|
| 1009 | + Usage: |
| 1010 | + :: |
| 1011 | +
|
| 1012 | + result = await api.create_external_node(pool_id="example") |
| 1013 | + """ |
| 1014 | + |
| 1015 | + param_region = validate_path_param( |
| 1016 | + "region", region or self.client.default_region |
| 1017 | + ) |
| 1018 | + param_pool_id = validate_path_param("pool_id", pool_id) |
| 1019 | + |
| 1020 | + res = self._request( |
| 1021 | + "POST", |
| 1022 | + f"/k8s/v1/regions/{param_region}/pools/{param_pool_id}/external-nodes", |
| 1023 | + ) |
| 1024 | + |
| 1025 | + self._throw_on_error(res) |
| 1026 | + return unmarshal_ExternalNode(res.json()) |
| 1027 | + |
995 | 1028 | async def list_nodes( |
996 | 1029 | self, |
997 | 1030 | *, |
|
0 commit comments