initial implementation of LicenseAPI#7
Merged
Conversation
Signed-off-by: 卜部 昌平 <s-urabe@sakura.ad.jp>
repeatedly
reviewed
Sep 30, 2025
| } | ||
|
|
||
| type CloudHSMSoftwareLicenseCreateParams struct { | ||
| ServiceClass v1.CloudHSMSoftwareLicenseServiceClassEnum |
There was a problem hiding this comment.
ServiceClassをユーザが指定したいことはないと思うので、Paramsから削除してしまった方が混乱が少ないかと思います。Updateの方も同様です。
Member
Author
There was a problem hiding this comment.
- Create: 現状一種類しかないのでべつに指定してもしなくても同じ、という意味では、まあ不要かなとも思います。将来的にenumが増えた時にどうするか? は一考の余地ありか
- Update: 実はこのAPIには
PATCHがなくて全部PUTなのですね、なので差分更新みたいなことはできず、全部指定し直す必要がある。今はどうせ固定値だからどうでもいいとして、将来、可変になることを見越すのであれば、サービスクラスも指定できるようにしておかないと壊れてしまうなという感じです。
There was a problem hiding this comment.
ServiceClassはそもそもcloud-ctrlがサービスを分岐するためのものでユーザが指定するためのものではないと思うので、ユーザ側から指定することはないかなと思います(他のサービスだとそもそもこれと同等のフィールドがreadOnlyだったり)。
もしこれをユーザが指定する必要に迫られるのであれば、多分API自体が変更になっている可能性が高いと思われます。
| } else if e.StatusCode == http.StatusUnprocessableEntity { | ||
| return nil, NewAPIError("License.Update", e.StatusCode, errors.Wrap(err, "invalid parameter")) | ||
| } else { | ||
| return nil, NewAPIError("License.Update", 0, err) |
There was a problem hiding this comment.
他のアクションではここがinternal server errorになってますが、ここだけ違うのは意図的ですか?
Signed-off-by: 卜部 昌平 <s-urabe@sakura.ad.jp>
There is no alternative to the field. Signed-off-by: 卜部 昌平 <s-urabe@sakura.ad.jp>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/cloudhsm/licensesに関連する部分です。