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

Conversation

@niuzhenguo
Copy link
Member

What this PR does / why we need it:
In case of collisions with vpc resources, move eips and bandwidths
to networking from vpc.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Partially address #4

Special notes for your reviewer:

Release note:

NONE

In case of collisions with vpc resources, move eips and bandwidths
to networking from vpc.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 26

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 62.309%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openstack/client_extension.go 0 2 0.0%
Totals Coverage Status
Change from base Build 24: -0.02%
Covered Lines: 2412
Relevant Lines: 3871

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 26

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 62.309%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openstack/client_extension.go 0 2 0.0%
Totals Coverage Status
Change from base Build 24: -0.02%
Covered Lines: 2412
Relevant Lines: 3871

💛 - 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.

@Savasw could you please take a look at the inline comments.

func NewVpcServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) {
// NewNetworkV1 creates a ServiceClient that may be used with the v1 network
// package.
func NewNetworkV1(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.

we'd better bring this into correspondence with other VPC resource e.g. https://github.com/gator1/gophercloud/blob/master/openstack/client.go#L330:6

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, as we agreed to place all such resources under networking/v1 and the endpoint type is named 'network', so seems the client name here is better?

Copy link
Contributor

Choose a reason for hiding this comment

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

client name looks good to me, there are some difference of ResourceBase. how to deal with project id here?

Copy link
Member Author

Choose a reason for hiding this comment

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

If not all resources require a project id with the endpoint, we should just let themselves deal with it in their urls.go like https://github.com/huaweicloud/golangsdk/blob/master/openstack/vpc/v1/eips/urls.go#L9

Copy link
Contributor

Choose a reason for hiding this comment

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

agree

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.

LGTM

func NewVpcServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) {
// NewNetworkV1 creates a ServiceClient that may be used with the v1 network
// package.
func NewNetworkV1(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.

agree

@niuzhenguo niuzhenguo merged commit b30e335 into master Mar 15, 2018
@niuzhenguo niuzhenguo deleted the move-eip-to-networking branch March 15, 2018 11:10
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.

4 participants