MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / eject

Function eject

python/web/src/web.py:773–790  ·  view source on GitHub ↗

Ejects a specified removable device image, but keeps the device attached

()

Source from the content-addressed store, hash-verified

771@APP.route("/scsi/eject", methods=["POST"])
772@login_required
773def eject():
774 """
775 Ejects a specified removable device image, but keeps the device attached
776 """
777 scsi_id = request.form.get("scsi_id")
778 unit = request.form.get("unit")
779
780 process = piscsi_cmd.eject_by_id(scsi_id, unit)
781 if process["status"]:
782 return response(
783 message=_(
784 "Ejected SCSI ID %(id_number)s LUN %(unit_number)s",
785 id_number=scsi_id,
786 unit_number=unit,
787 )
788 )
789
790 return response(error=True, message=process["msg"])
791
792
793@APP.route("/scsi/info", methods=["POST"])

Callers

nothing calls this directly

Calls 2

responseFunction · 0.85
eject_by_idMethod · 0.80

Tested by

no test coverage detected