Skip to content

Commit 3ef8586

Browse files
feat(api): aggregated API specs update
1 parent cd7152c commit 3ef8586

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 609
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-7bb076221b6b8c4e465291804fa37dfec95dc815c0670753eec9e02420aef8eb.yml
3-
openapi_spec_hash: 5c56fa55767a46498c083e3fa940c227
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-848b764e60807c1c1aedd39ebdbadd2ee63dcc6ae3910179cdfff3ef80429563.yml
3+
openapi_spec_hash: 04d6bac6704e464b0fa52af0cd0e18a2
44
config_hash: 25b1dd444559d26e51bf85892358c0bc

src/gcore/types/cloud/gpu_baremetal_cluster.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
__all__ = [
1212
"GPUBaremetalCluster",
1313
"ServersSettings",
14+
"ServersSettingsFileShare",
1415
"ServersSettingsInterface",
1516
"ServersSettingsInterfaceExternalInterfaceOutputSerializer",
1617
"ServersSettingsInterfaceSubnetInterfaceOutputSerializer",
@@ -21,6 +22,14 @@
2122
]
2223

2324

25+
class ServersSettingsFileShare(BaseModel):
26+
id: str
27+
"""Unique identifier of the file share in UUID format."""
28+
29+
mount_path: str
30+
"""Absolute mount path inside the system where the file share will be mounted."""
31+
32+
2433
class ServersSettingsInterfaceExternalInterfaceOutputSerializer(BaseModel):
2534
ip_family: Literal["dual", "ipv4", "ipv6"]
2635
"""Which subnets should be selected: IPv4, IPv6, or use dual stack."""
@@ -90,6 +99,9 @@ class ServersSettingsSecurityGroup(BaseModel):
9099

91100

92101
class ServersSettings(BaseModel):
102+
file_shares: List[ServersSettingsFileShare]
103+
"""List of file shares mounted across the cluster."""
104+
93105
interfaces: List[ServersSettingsInterface]
94106

95107
security_groups: List[ServersSettingsSecurityGroup]
@@ -99,7 +111,7 @@ class ServersSettings(BaseModel):
99111
"""SSH key name"""
100112

101113
user_data: Optional[str] = None
102-
"""Optional custom user data (Base64-encoded) Mutually exclusive with 'password'."""
114+
"""Optional custom user data"""
103115

104116

105117
class GPUBaremetalCluster(BaseModel):

src/gcore/types/cloud/gpu_baremetal_cluster_create_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"ServersSettingsInterfaceAnySubnetInterfaceInputSerializer",
1616
"ServersSettingsInterfaceAnySubnetInterfaceInputSerializerFloatingIP",
1717
"ServersSettingsCredentials",
18+
"ServersSettingsFileShare",
1819
"ServersSettingsSecurityGroup",
1920
]
2021

@@ -127,6 +128,14 @@ class ServersSettingsCredentials(TypedDict, total=False):
127128
"""The 'username' and 'password' fields create a new user on the system"""
128129

129130

131+
class ServersSettingsFileShare(TypedDict, total=False):
132+
id: Required[str]
133+
"""Unique identifier of the file share in UUID format."""
134+
135+
mount_path: Required[str]
136+
"""Absolute mount path inside the system where the file share will be mounted."""
137+
138+
130139
class ServersSettingsSecurityGroup(TypedDict, total=False):
131140
id: Required[str]
132141
"""Resource ID"""
@@ -139,6 +148,9 @@ class ServersSettings(TypedDict, total=False):
139148
credentials: ServersSettingsCredentials
140149
"""Optional server access credentials"""
141150

151+
file_shares: Iterable[ServersSettingsFileShare]
152+
"""List of file shares to be mounted across the cluster."""
153+
142154
security_groups: Iterable[ServersSettingsSecurityGroup]
143155
"""List of security groups UUIDs"""
144156

tests/api_resources/cloud/test_gpu_baremetal_clusters.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
5757
"ssh_key_name": "my-ssh-key",
5858
"username": "admin",
5959
},
60+
"file_shares": [
61+
{
62+
"id": "a3f2d1b8-45e6-4f8a-bb5d-19dbf2cd7e9a",
63+
"mount_path": "/mnt/vast",
64+
}
65+
],
6066
"security_groups": [{"id": "b4849ffa-89f2-45a1-951f-0ae5b7809d98"}],
6167
"user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
6268
},
@@ -549,6 +555,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
549555
"ssh_key_name": "my-ssh-key",
550556
"username": "admin",
551557
},
558+
"file_shares": [
559+
{
560+
"id": "a3f2d1b8-45e6-4f8a-bb5d-19dbf2cd7e9a",
561+
"mount_path": "/mnt/vast",
562+
}
563+
],
552564
"security_groups": [{"id": "b4849ffa-89f2-45a1-951f-0ae5b7809d98"}],
553565
"user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
554566
},

0 commit comments

Comments
 (0)