Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Conversation

frisky-dis
Copy link
Contributor

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

@coveralls
Copy link

coveralls commented Jul 5, 2018

Pull Request Test Coverage Report for Build 158

  • 121 of 168 (72.02%) changed or added relevant lines in 4 files are covered.
  • 169 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.5%) to 65.805%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openstack/deh/v1/hosts/results.go 48 52 92.31%
openstack/client.go 0 8 0.0%
openstack/deh/v1/hosts/requests.go 64 99 64.65%
Files with Coverage Reduction New Missed Lines %
openstack/identity/v3/tokens/requests.go 1 97.66%
openstack/client.go 79 35.11%
auth_options.go 89 0.0%
Totals Coverage Status
Change from base Build 150: -0.5%
Covered Lines: 3335
Relevant Lines: 5068

💛 - Coveralls

Copy link
Contributor

@freesky-edward freesky-edward left a 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 + "/"
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

any update?

Copy link
Contributor

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")

Cores int `json:"cores"`
Sockets int `json:"sockets"`
Memory int `json:"memory"`
AvailableInstanceCapacities []AvailableInstanceCapacitiesOpts `json:"available_instance_capacities"`
Copy link
Contributor

Choose a reason for hiding this comment

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

can shorten the words?

Copy link
Contributor

@freesky-edward freesky-edward left a comment

Choose a reason for hiding this comment

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

inline comments


// 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) {
Copy link
Contributor

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 + "/"
Copy link
Contributor

Choose a reason for hiding this comment

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

any update?

@Savasw
Copy link
Contributor

Savasw commented Jul 12, 2018

Closing this PR due to bad commits

1 similar comment
@Savasw
Copy link
Contributor

Savasw commented Jul 12, 2018

Closing this PR due to bad commits

@frisky-dis frisky-dis closed this Jul 12, 2018
@simrannagra simrannagra deleted the deh-dev branch August 6, 2018 06:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants