Skip to content

Commit

Permalink
Removed rootfs_name instance creation field (#112)
Browse files Browse the repository at this point in the history
* Fix: Removed useless instance creation fields.

* Fix: Removed field from abstract class

* Fix: Solve test issues
  • Loading branch information
nesitor authored Mar 13, 2024
1 parent 04a053a commit 7e452fa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/aleph/sdk/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ async def create_instance(
self,
rootfs: str,
rootfs_size: int,
rootfs_name: str,
payment: Optional[Payment] = None,
environment_variables: Optional[Mapping[str, str]] = None,
storage_engine: StorageEnum = StorageEnum.storage,
Expand All @@ -385,7 +384,6 @@ async def create_instance(
:param rootfs: Root filesystem to use
:param rootfs_size: Size of root filesystem
:param rootfs_name: Name of root filesystem
:param payment: Payment method used to pay for the instance
:param environment_variables: Environment variables to pass to the program
:param storage_engine: Storage engine to use (Default: "storage")
Expand Down
7 changes: 0 additions & 7 deletions src/aleph/sdk/client/authenticated_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ async def create_instance(
self,
rootfs: str,
rootfs_size: int,
rootfs_name: str,
payment: Optional[Payment] = None,
environment_variables: Optional[Mapping[str, str]] = None,
storage_engine: StorageEnum = StorageEnum.storage,
Expand Down Expand Up @@ -557,15 +556,9 @@ async def create_instance(
ref=rootfs,
use_latest=True,
),
name=rootfs_name,
size_mib=rootfs_size,
persistence="host",
use_latest=True,
comment=(
"Official Aleph Debian root filesystem"
if rootfs == settings.DEFAULT_RUNTIME_ID
else ""
),
),
volumes=[parse_volume(volume) for volume in volumes],
time=time.time(),
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/test_asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ async def test_create_instance(mock_session_with_post_success):
instance_message, message_status = await session.create_instance(
rootfs="cafecafecafecafecafecafecafecafecafecafecafecafecafecafecafecafe",
rootfs_size=1,
rootfs_name="rootfs",
channel="TEST",
metadata={"tags": ["test"]},
payment=Payment(
Expand All @@ -132,7 +131,6 @@ async def test_create_instance_no_payment(mock_session_with_post_success):
instance_message, message_status = await session.create_instance(
rootfs="cafecafecafecafecafecafecafecafecafecafecafecafecafecafecafecafe",
rootfs_size=1,
rootfs_name="rootfs",
channel="TEST",
metadata={"tags": ["test"]},
payment=None,
Expand All @@ -154,7 +152,6 @@ async def test_create_instance_no_hypervisor(mock_session_with_post_success):
instance_message, message_status = await session.create_instance(
rootfs="cafecafecafecafecafecafecafecafecafecafecafecafecafecafecafecafe",
rootfs_size=1,
rootfs_name="rootfs",
channel="TEST",
metadata={"tags": ["test"]},
hypervisor=None,
Expand Down Expand Up @@ -248,7 +245,6 @@ async def test_create_instance_insufficient_funds_error(
await session.create_instance(
rootfs="cafecafecafecafecafecafecafecafecafecafecafecafecafecafecafecafe",
rootfs_size=1,
rootfs_name="rootfs",
channel="TEST",
metadata={"tags": ["test"]},
payment=Payment(
Expand Down

0 comments on commit 7e452fa

Please sign in to comment.