-
Notifications
You must be signed in to change notification settings - Fork 33
Add BMS service interfaces #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please confirm two inline questions?
|
||
func ServiceClient() *golangsdk.ServiceClient { | ||
sc := client.ServiceClient() | ||
e := strings.Replace(sc.Endpoint, "v2", "v2.1", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any case will check this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@freesky-edward can you please elaborate your question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean if any case will use the special endpoint
as a case to test, if not, why replace the version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@freesky-edward we have a fake client in testhelper, which came to my notice, which is directly used here so do not need this file, hence deleting this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, we are going to remove all the replacement code like this party. that is why I ask this question.
openstack/bms/v2/servers/requests.go
Outdated
// Get requests details on a single server, by ID. | ||
func Get(client *golangsdk.ServiceClient, id string) (r GetResult) { | ||
_, r.Err = client.Get(getURL(client, id), &r.Body, &golangsdk.RequestOpts{ | ||
OkCodes: []int{200}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default ok code of Get
is 200, it isn't necessary to list here. please refer to https://github.com/huaweicloud/golangsdk/blob/aef01041fa9cf1fa8844a490cac4ded3fceec9a7/provider_client.go#L356:2
LGTM |
What this PR does / why we need it: This PR adds BMS interfaces
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer: NONE
Release note: NONE