-
Notifications
You must be signed in to change notification settings - Fork 33
add vpc, subnet, route and peering connection interfaces #12
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.
it is pretty good, except some format issues. could you please fix the CI failure?
"github.com/huaweicloud/golangsdk/acceptance/clients" | ||
"github.com/huaweicloud/golangsdk/acceptance/tools" | ||
"github.com/huaweicloud/golangsdk/openstack/networking/v1/subnets" | ||
"testing" |
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.
format the import order, it should be :
import (
"testing"
"github.com/huaweicloud/golangsdk"
"github.com/huaweicloud/golangsdk/openstack/networking/v2/peerings"
"github.com/huaweicloud/golangsdk/openstack/networking/v2/routes"
)
"github.com/huaweicloud/golangsdk/acceptance/clients" | ||
"github.com/huaweicloud/golangsdk/acceptance/tools" | ||
"github.com/huaweicloud/golangsdk/openstack/networking/v1/vpcs" | ||
"testing" |
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.
fix the order issue the same as above
"github.com/huaweicloud/golangsdk/acceptance/tools" | ||
"github.com/huaweicloud/golangsdk/openstack/networking/v1/vpcs" | ||
"github.com/huaweicloud/golangsdk/openstack/networking/v2/peerings" | ||
"testing" |
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.
order issue
"github.com/huaweicloud/golangsdk/acceptance/clients" | ||
"github.com/huaweicloud/golangsdk/acceptance/tools" | ||
"github.com/huaweicloud/golangsdk/openstack/networking/v2/peerings" | ||
"testing" |
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.
order issue
Pull Request Test Coverage Report for Build 58
💛 - 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.
LGTM
@@ -0,0 +1,57 @@ | |||
/* | |||
Package Subnets enables management and retrieval of Subnets from the Open Telekom Cloud VPC service. |
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.
Nits: not only Open Telekom Cloud uses this golangsdk, better to not mention it here.
openstack/networking/v1/vpcs/doc.go
Outdated
@@ -0,0 +1,52 @@ | |||
/* | |||
Package vpcs enables management and retrieval of Vpcs from the Open Telekom Cloud |
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.
ditto
@@ -0,0 +1,87 @@ | |||
/* | |||
Package peerings enables management and retrieval of vpc peering connections from the Open Telekom Cloud VPC service. | |||
|
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.
ditto
if matched { | ||
refinedPeerings = append(refinedPeerings, peering) | ||
} | ||
}*/ |
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.
Is this still useful?
return c.ServiceURL(rootPath, resourcePath, id) | ||
} | ||
|
||
func deleteURL(c *golangsdk.ServiceClient, id string) string { |
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.
seems there's no difference between deleteURL and resourceURL, how about just using one resourceURL?
@niuzhenguo Updated comments and removed redundant code. Let me know if there is more feedback. |
@Savasw Thanks for the update, LGTM now! |
What this PR does / why we need it: This PR adds VPC, Subnet, Route, and Peering Connection interfaces
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #4Special notes for your reviewer: The acceptance tests for peering connection and routes require Peer's tenant id or name (OS_Peer_Tenant_ID or OS_Peer_Tenant_Name), hence acceptance tests for these two interfaces fail if peer tenant details not provided. Also they required Peer Network Client separately, hence two new client functions are part of acceptance clients.go file where Peer tenant id is validated individually with no impact on other modules.
Release note: