openbmc / phosphor-bmc-code-mgmt

Manage the BMC's code versions.
Apache License 2.0
15 stars 24 forks source link

VersionAlreadyExists error and throw back to client #7

Open gtmills opened 3 years ago

gtmills commented 3 years ago

Can we create a VersionAlreadyExists error?

And throw that back in bmcweb

Would add to file: https://github.com/openbmc/phosphor-bmc-code-mgmt/blob/ebcc194044d7c6635d9346cfa20348f541f9c21a/xyz/openbmc_project/Software/Image.errors.yaml#L11

https://github.com/openbmc/phosphor-bmc-code-mgmt/blob/d148b4f06b517485a99851f9b6bf4d2af8f0fda8/image_manager.cpp#L212

https://github.com/openbmc/bmcweb/blob/3a17e02873fdf53898a2cfce894dcb36223d76d4/redfish-core/lib/update_service.hpp#L352

@anoo1 FYI

gtmills commented 3 years ago

I'll push something for this :)