Skip to content

Commit 58bead0

Browse files
committed
Revert "Merge branch 'main' into v1.5525.0"
This reverts commit 92c695c, reversing changes made to 7a6c8d4.
1 parent 92c695c commit 58bead0

File tree

23 files changed

+66
-441
lines changed

23 files changed

+66
-441
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install dependencies and library
3232
run: poetry install
3333
- name: Check format
34-
run: poetry run ruff format --check
34+
run: poetry run ruff format -q
3535

3636
typing:
3737
runs-on: ubuntu-latest

scaleway-async/poetry.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scaleway-async/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ scaleway-core = "*"
2828

2929
[tool.poetry.group.dev.dependencies]
3030
scaleway-core = { path = "../scaleway-core", develop = true }
31-
ruff = ">=0.5.0,<0.6.9"
31+
ruff = ">=0.5.0,<0.6.4"
3232
mypy = "^1.5.1"
3333

3434
[build-system]
3535
requires = ["poetry-core"]
3636
build-backend = "poetry.core.masonry.api"
3737

38-
[tool.ruff.lint]
38+
[tool.ruff]
3939
ignore = ["E501"]

scaleway-async/scaleway_async/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Scaleway SDK for Python - Async"""
22

3-
import importlib.metadata
3+
import pkg_resources
44

5-
__version__: str = importlib.metadata.version(__name__)
5+
__version__: str = pkg_resources.get_distribution(__name__).version
66

77
from scaleway_core.api import (
88
API,

scaleway-async/scaleway_async/baremetal/v1/api.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ async def install_server(
398398
password: Optional[str] = None,
399399
service_user: Optional[str] = None,
400400
service_password: Optional[str] = None,
401-
partitioning_schema: Optional[Schema] = None,
402401
) -> Server:
403402
"""
404403
Install an Elastic Metal server.
@@ -412,7 +411,6 @@ async def install_server(
412411
:param password: Password used for the installation.
413412
:param service_user: User used for the service to install.
414413
:param service_password: Password used for the service to install.
415-
:param partitioning_schema: Partitioning schema.
416414
:return: :class:`Server <Server>`
417415
418416
Usage:
@@ -443,7 +441,6 @@ async def install_server(
443441
password=password,
444442
service_user=service_user,
445443
service_password=service_password,
446-
partitioning_schema=partitioning_schema,
447444
),
448445
self.client,
449446
),

scaleway-async/scaleway_async/baremetal/v1/marshalling.py

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -894,12 +894,6 @@ def unmarshal_ServerInstall(data: Any) -> ServerInstall:
894894
if field is not None:
895895
args["service_url"] = field
896896

897-
field = data.get("partitioning_schema", None)
898-
if field is not None:
899-
args["partitioning_schema"] = unmarshal_Schema(field)
900-
else:
901-
args["partitioning_schema"] = None
902-
903897
return ServerInstall(**args)
904898

905899

@@ -1368,136 +1362,6 @@ def marshal_AddOptionServerRequest(
13681362
return output
13691363

13701364

1371-
def marshal_SchemaPartition(
1372-
request: SchemaPartition,
1373-
defaults: ProfileDefaults,
1374-
) -> Dict[str, Any]:
1375-
output: Dict[str, Any] = {}
1376-
1377-
if request.label is not None:
1378-
output["label"] = str(request.label)
1379-
1380-
if request.number is not None:
1381-
output["number"] = request.number
1382-
1383-
if request.size is not None:
1384-
output["size"] = request.size
1385-
1386-
return output
1387-
1388-
1389-
def marshal_SchemaPool(
1390-
request: SchemaPool,
1391-
defaults: ProfileDefaults,
1392-
) -> Dict[str, Any]:
1393-
output: Dict[str, Any] = {}
1394-
1395-
if request.name is not None:
1396-
output["name"] = request.name
1397-
1398-
if request.type_ is not None:
1399-
output["type"] = str(request.type_)
1400-
1401-
if request.devices is not None:
1402-
output["devices"] = request.devices
1403-
1404-
if request.options is not None:
1405-
output["options"] = request.options
1406-
1407-
if request.filesystem_options is not None:
1408-
output["filesystem_options"] = request.filesystem_options
1409-
1410-
return output
1411-
1412-
1413-
def marshal_SchemaDisk(
1414-
request: SchemaDisk,
1415-
defaults: ProfileDefaults,
1416-
) -> Dict[str, Any]:
1417-
output: Dict[str, Any] = {}
1418-
1419-
if request.device is not None:
1420-
output["device"] = request.device
1421-
1422-
if request.partitions is not None:
1423-
output["partitions"] = [
1424-
marshal_SchemaPartition(item, defaults) for item in request.partitions
1425-
]
1426-
1427-
return output
1428-
1429-
1430-
def marshal_SchemaFilesystem(
1431-
request: SchemaFilesystem,
1432-
defaults: ProfileDefaults,
1433-
) -> Dict[str, Any]:
1434-
output: Dict[str, Any] = {}
1435-
1436-
if request.device is not None:
1437-
output["device"] = request.device
1438-
1439-
if request.format is not None:
1440-
output["format"] = str(request.format)
1441-
1442-
if request.mountpoint is not None:
1443-
output["mountpoint"] = request.mountpoint
1444-
1445-
return output
1446-
1447-
1448-
def marshal_SchemaRAID(
1449-
request: SchemaRAID,
1450-
defaults: ProfileDefaults,
1451-
) -> Dict[str, Any]:
1452-
output: Dict[str, Any] = {}
1453-
1454-
if request.name is not None:
1455-
output["name"] = request.name
1456-
1457-
if request.level is not None:
1458-
output["level"] = str(request.level)
1459-
1460-
if request.devices is not None:
1461-
output["devices"] = request.devices
1462-
1463-
return output
1464-
1465-
1466-
def marshal_SchemaZFS(
1467-
request: SchemaZFS,
1468-
defaults: ProfileDefaults,
1469-
) -> Dict[str, Any]:
1470-
output: Dict[str, Any] = {}
1471-
1472-
if request.pools is not None:
1473-
output["pools"] = [marshal_SchemaPool(item, defaults) for item in request.pools]
1474-
1475-
return output
1476-
1477-
1478-
def marshal_Schema(
1479-
request: Schema,
1480-
defaults: ProfileDefaults,
1481-
) -> Dict[str, Any]:
1482-
output: Dict[str, Any] = {}
1483-
1484-
if request.disks is not None:
1485-
output["disks"] = [marshal_SchemaDisk(item, defaults) for item in request.disks]
1486-
1487-
if request.raids is not None:
1488-
output["raids"] = [marshal_SchemaRAID(item, defaults) for item in request.raids]
1489-
1490-
if request.filesystems is not None:
1491-
output["filesystems"] = [
1492-
marshal_SchemaFilesystem(item, defaults) for item in request.filesystems
1493-
]
1494-
1495-
if request.zfs is not None:
1496-
output["zfs"] = marshal_SchemaZFS(request.zfs, defaults)
1497-
1498-
return output
1499-
1500-
15011365
def marshal_CreateServerRequestInstall(
15021366
request: CreateServerRequestInstall,
15031367
defaults: ProfileDefaults,
@@ -1525,11 +1389,6 @@ def marshal_CreateServerRequestInstall(
15251389
if request.service_password is not None:
15261390
output["service_password"] = request.service_password
15271391

1528-
if request.partitioning_schema is not None:
1529-
output["partitioning_schema"] = marshal_Schema(
1530-
request.partitioning_schema, defaults
1531-
)
1532-
15331392
return output
15341393

15351394

@@ -1603,11 +1462,6 @@ def marshal_InstallServerRequest(
16031462
if request.service_password is not None:
16041463
output["service_password"] = request.service_password
16051464

1606-
if request.partitioning_schema is not None:
1607-
output["partitioning_schema"] = marshal_Schema(
1608-
request.partitioning_schema, defaults
1609-
)
1610-
16111465
return output
16121466

16131467

@@ -1713,7 +1567,6 @@ def marshal_UpdateSettingRequest(
17131567
return output
17141568

17151569

1716-
17171570
def marshal_SchemaPartition(
17181571
request: SchemaPartition,
17191572
defaults: ProfileDefaults,
@@ -1844,7 +1697,6 @@ def marshal_Schema(
18441697
return output
18451698

18461699

1847-
18481700
def marshal_ValidatePartitioningSchemaRequest(
18491701
request: ValidatePartitioningSchemaRequest,
18501702
defaults: ProfileDefaults,

scaleway-async/scaleway_async/baremetal/v1/types.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,6 @@ class ServerInstall:
521521
Address of the installed service.
522522
"""
523523

524-
partitioning_schema: Optional[Schema]
525-
"""
526-
Partitioning schema.
527-
"""
528-
529524

530525
@dataclass
531526
class ServerOption:
@@ -615,11 +610,6 @@ class CreateServerRequestInstall:
615610
Password used for the service to install.
616611
"""
617612

618-
partitioning_schema: Optional[Schema]
619-
"""
620-
Partitioning schema.
621-
"""
622-
623613

624614
@dataclass
625615
class OS:
@@ -1292,11 +1282,6 @@ class InstallServerRequest:
12921282
Password used for the service to install.
12931283
"""
12941284

1295-
partitioning_schema: Optional[Schema]
1296-
"""
1297-
Partitioning schema.
1298-
"""
1299-
13001285

13011286
@dataclass
13021287
class ListOSRequest:

scaleway-async/scaleway_async/dedibox/v1/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ class MemoryType(str, Enum, metaclass=StrEnumMeta):
362362
DDR2 = "ddr2"
363363
DDR3 = "ddr3"
364364
DDR4 = "ddr4"
365-
DDR5 = "ddr5"
366365

367366
def __str__(self) -> str:
368367
return str(self.value)

scaleway-async/scaleway_async/instance/v1/api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,11 +931,12 @@ async def server_action(
931931
* `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor.
932932
* `reboot`: Stop the instance and restart it.
933933
* `backup`: Create an image with all the volumes of an Instance.
934-
* `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
934+
* `terminate`: Delete the Instance along with all attached volumes.
935935
* `enable_routed_ip`: Migrate the Instance to the new network stack.
936936
937-
Keep in mind that `terminate` an Instance will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
938-
If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
937+
Keep in mind that terminating an Instance will result in the deletion of all attached volumes, including local and block storage.
938+
If you want to preserve your local volumes, you should use the `archive` action instead of `terminate`. Similarly, if you want to keep your block storage volumes, you must first detach them before issuing the `terminate` command.
939+
For more information, read the [Volumes](#path-volumes-list-volumes) documentation.
939940
:param server_id: UUID of the Instance.
940941
:param zone: Zone to target. If none is passed will use default zone from the config.
941942
:param action: Action to perform on the Instance.

0 commit comments

Comments
 (0)