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

Fix VirtualMediaConfig for Supermicro #212

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

feuerrot
Copy link
Contributor

The redfish implementation of Supermicro doesn't seem to like Inserted or WriteProtected as additional properties for the InsertMedia action target and rejects requests which include them:

{
  "error": {
    "code": "Base.v1_4_0.GeneralError",
    "Message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      {
        "MessageId": "Base.1.4.PropertyUnknown",
        "Severity": "Warning",
        "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed.",
        "Message": "The property Inserted is not in the list of valid properties for the resource.",
        "MessageArgs": [
          "Inserted"
        ],
        "RelatedProperties": [
          "Inserted"
        ]
      },
      {
        "MessageId": "Base.1.4.PropertyUnknown",
        "Severity": "Warning",
        "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed.",
        "Message": "The property WriteProtected is not in the list of valid properties for the resource.",
        "MessageArgs": [
          "WriteProtected"
        ],
        "RelatedProperties": [
          "WriteProtected"
        ]
      }
    ]
  }
}

This PR adds an omitempty attribute to the redfish.VirtualMediaConfig struct, so at least VirtualMedia.InsertMediaConfig() can be used for Supermicro systems. The same problem exists in the VirtualMedia.InsertMedia() function, but I didn't want to change the functions interface and am not sure if there is a good alternative.

The redfish implementation of Supermicro doesn't like "Inserted" or
"WriteProtected" as additional properties for the InsertMedia action and
rejects requests which include them.
Copy link
Owner

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

Should be good, thanks!

@stmcginnis stmcginnis merged commit c4c5d36 into stmcginnis:main Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants