-
Notifications
You must be signed in to change notification settings - Fork 33
Add DeH service interfaces #39
Conversation
Pull Request Test Coverage Report for Build 158
💛 - Coveralls |
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.
some inline comments.
func NewDCSServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) { | ||
sc, err := initClientOpts(client, eo, "network") | ||
sc.Endpoint = strings.Replace(sc.Endpoint, "vpc", "dcs", 1) | ||
sc.ResourceBase = sc.Endpoint + "v1.0/" + client.ProjectID + "/" |
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 am not sure whether this change can work well or not. that will require this service endpoint is registered into catalog on all clouds. @edisonxiang could you please 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.
Done
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 update?
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.
@disha-wani @freesky-edward Currently huawei cloud has no endpoint about dms and dcs.
So please keep these codes, because the following codes will not work.
sc, err := initClientOpts(client, eo, "dms")
sc, err := initClientOpts(client, eo, "dcs")
openstack/deh/v1/hosts/results.go
Outdated
Cores int `json:"cores"` | ||
Sockets int `json:"sockets"` | ||
Memory int `json:"memory"` | ||
AvailableInstanceCapacities []AvailableInstanceCapacitiesOpts `json:"available_instance_capacities"` |
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.
can shorten the words?
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.
inline comments
openstack/client.go
Outdated
|
||
// NewDeHServiceV1 creates a ServiceClient that may be used to access the v1 Dedicated Hosts service. | ||
func NewDeHServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) { | ||
func NewDeHOTCServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) { |
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 think there should be something misunderstanding here. as you may know, now there are several clouds with only one SDK repo, so we would prefer not to define any specific method here
func NewDCSServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) { | ||
sc, err := initClientOpts(client, eo, "network") | ||
sc.Endpoint = strings.Replace(sc.Endpoint, "vpc", "dcs", 1) | ||
sc.ResourceBase = sc.Endpoint + "v1.0/" + client.ProjectID + "/" |
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 update?
Closing this PR due to bad commits |
1 similar comment
Closing this PR due to bad commits |
What this PR does / why we need it: This PR adds Dedicated Host 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