{{ _("HFS is for Mac OS, Joliet for Windows, and Rock Ridge for POSIX.") }}
@@ -394,8 +394,8 @@
-
-
@@ -476,7 +460,7 @@
- {{ _("Create Empty Disk Image File") }}
+ {{ _("Create Empty Disk Image") }}
{{ _("Please refer to wiki documentation to learn more about the supported image file types.", url="https://github.com/PiSCSI/piscsi/wiki/Supported-Device-Types#image-types") }}
diff --git a/python/web/src/web.py b/python/web/src/web.py
index ac256897..646f3dc9 100644
--- a/python/web/src/web.py
+++ b/python/web/src/web.py
@@ -892,7 +892,6 @@ def download_to_iso():
"""
Downloads a file and creates a CD-ROM image with the specified file system and the file
"""
- scsi_id = request.form.get("scsi_id")
url = request.form.get("url")
iso_type = request.form.get("type")
local_file = request.form.get("file")
@@ -933,31 +932,11 @@ def download_to_iso():
),
)
- process_attach = piscsi_cmd.attach_device(
- scsi_id,
- device_type="SCCD",
- params={"file": process["file_name"]},
- )
- process_attach = ReturnCodeMapper.add_msg(process_attach)
- if process_attach["status"]:
- return response(
- message=_(
- "CD-ROM image %(file_name)s with type %(iso_type)s was created "
- "and attached to SCSI ID %(id_number)s",
- file_name=process["file_name"],
- iso_type=iso_type,
- id_number=scsi_id,
- ),
- )
-
return response(
- error=True,
message=_(
- "CD-ROM image %(file_name)s with type %(iso_type)s was created "
- "but could not be attached: %(error)s",
+ "CD-ROM image %(file_name)s with type %(iso_type)s was created.",
file_name=process["file_name"],
iso_type=iso_type,
- error=process_attach["msg"],
),
)
diff --git a/python/web/tests/api/test_files.py b/python/web/tests/api/test_files.py
index 1fc4e919..fdb15243 100644
--- a/python/web/tests/api/test_files.py
+++ b/python/web/tests/api/test_files.py
@@ -3,7 +3,6 @@ import uuid
import os
from conftest import (
- SCSI_ID,
FILE_SIZE_1_MIB,
STATUS_SUCCESS,
)
@@ -333,8 +332,6 @@ def test_create_iso_from_url(
httpserver,
http_client,
list_files,
- list_attached_images,
- detach_devices,
delete_file,
):
test_file_name = str(uuid.uuid4())
@@ -355,7 +352,6 @@ def test_create_iso_from_url(
response = http_client.post(
"/files/create_iso",
data={
- "scsi_id": SCSI_ID,
"type": ISO_TYPE,
"url": url,
},
@@ -366,16 +362,13 @@ def test_create_iso_from_url(
assert response.status_code == 200
assert response_data["status"] == STATUS_SUCCESS
assert iso_file_name in list_files()
- assert iso_file_name in list_attached_images()
assert (
response_data["messages"][0]["message"]
- == f"CD-ROM image {iso_file_name} with type {ISO_TYPE} was created "
- f"and attached to SCSI ID {SCSI_ID}"
+ == f"CD-ROM image {iso_file_name} with type {ISO_TYPE} was created."
)
# Cleanup
- detach_devices()
delete_file(iso_file_name)
@@ -384,8 +377,6 @@ def test_create_iso_from_local_file(
http_client,
create_test_image,
list_files,
- list_attached_images,
- detach_devices,
delete_file,
):
test_file_name = create_test_image()
@@ -396,7 +387,6 @@ def test_create_iso_from_local_file(
response = http_client.post(
"/files/create_iso",
data={
- "scsi_id": SCSI_ID,
"type": ISO_TYPE,
"file": test_file_name,
},
@@ -407,16 +397,13 @@ def test_create_iso_from_local_file(
assert response.status_code == 200
assert response_data["status"] == STATUS_SUCCESS
assert iso_file_name in list_files()
- assert iso_file_name in list_attached_images()
assert (
response_data["messages"][0]["message"]
- == f"CD-ROM image {iso_file_name} with type {ISO_TYPE} was created "
- f"and attached to SCSI ID {SCSI_ID}"
+ == f"CD-ROM image {iso_file_name} with type {ISO_TYPE} was created."
)
# Cleanup
- detach_devices()
delete_file(iso_file_name)