Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MediaType #400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions redfish/virtualmedia.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ type VirtualMedia struct {
ImageName string
// Inserted shall indicate whether media is present in the virtual media device.
Inserted bool
// Сonnection MediaType used
MediaType VirtualMediaType
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a property of the VirtualMedia object. Can you explain why this is needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course, look, I'll give you an example from a server where this is:
{
"@odata.id": "/redfish/v1/Managers/bmc/VirtualMedia/USB1",
"@odata.type": "#VirtualMedia.v1_3_0.VirtualMedia",
"Actions": {
"#VirtualMedia.EjectMedia": {
"target": "/redfish/v1/Managers/bmc/VirtualMedia/USB1/Actions/VirtualMedia.EjectMedia"
},
"#VirtualMedia.InsertMedia": {
"target": "/redfish/v1/Managers/bmc/VirtualMedia/USB1/Actions/VirtualMedia.InsertMedia"
}
},
"Id": "USB1",
"MediaType": "USBStick",
"MediaTypes": [
"CD",
"USBStick",
"HDD"
],
"Name": "Virtual Removable Media",
"Oem": {
"OpenBMC": {
"@odata.type": "#OemVirtualMedia.v1_0_0.VirtualMedia"
}
},
"TransferMethod": "Stream",
"WriteProtected": true
}
in https://redfish.dmtf.org/schemas/v1/VirtualMedia.v1_3_0.json

// MediaTypes shall be the supported media types for this connection.
MediaTypes []VirtualMediaType
// Password shall represent the password to access the
Expand Down
Loading