Skip to content

Neutron v2: BGP Peer list / get#2241

Merged
EmilienM merged 1 commit intogophercloud:masterfrom
shhgs:20211024
Apr 19, 2022
Merged

Neutron v2: BGP Peer list / get#2241
EmilienM merged 1 commit intogophercloud:masterfrom
shhgs:20211024

Conversation

@shhgs
Copy link
Copy Markdown
Contributor

@shhgs shhgs commented Oct 24, 2021

Neutron V2: BGP VPNs
For #2209

Add List/Get method for bgp/peers

[CL-DESKTOP] 09:51:44 ~/src/github.com/shhgs/gophercloud $ git diff --stat official/master                                                                                                                         
 openstack/networking/v2/extensions/bgp/peers/doc.go                   | 32 ++++++++++++++++++++++++++++++++                                                                                                       
 openstack/networking/v2/extensions/bgp/peers/requests.go              | 21 +++++++++++++++++++++
 openstack/networking/v2/extensions/bgp/peers/results.go               | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 openstack/networking/v2/extensions/bgp/peers/testing/doc.go           |  2 ++
 openstack/networking/v2/extensions/bgp/peers/testing/fixture.go       | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 openstack/networking/v2/extensions/bgp/peers/testing/requests_test.go | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 openstack/networking/v2/extensions/bgp/peers/urls.go                  | 25 +++++++++++++++++++++++++
 7 files changed, 279 insertions(+)

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 24, 2021

Build failed.

@shhgs
Copy link
Copy Markdown
Contributor Author

shhgs commented Oct 25, 2021

I am speechless.

[CL-DESKTOP] 08:14:55 ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing $ go version                                                                                         
go version go1.15.15 linux/amd64                                                                                                                                                                                   
✔  ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing [20211024|⚑ 1]                                                                                                          
[CL-DESKTOP] 08:14:59 ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing $ diff -u requests_test.go <(gofmt requests_test.go)                                                 
✔  ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing [20211024|⚑ 1]                                                                                                          
[CL-DESKTOP] 08:15:05 ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing $ git stash pop                                                                                      
On branch 20211024                                                                                                                                                                                                 
Your branch is up to date with 'shhgs/20211024'.                                                                                                                                                                   

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   requests_test.go

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (0f2e787566ed8ab3b6aff97885af0f3921a04f97)                                                                                                                                                  
✔  ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing [20211024|✚ 1]                                                                                                          
[CL-DESKTOP] 08:15:09 ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing $ git diff                                                                                           
diff --git a/openstack/networking/v2/extensions/bgp/peers/testing/requests_test.go b/openstack/networking/v2/extensions/bgp/peers/testing/requests_test.go                                                         
index f818e997..980ecaae 100644
--- a/openstack/networking/v2/extensions/bgp/peers/testing/requests_test.go
+++ b/openstack/networking/v2/extensions/bgp/peers/testing/requests_test.go
@@ -2,12 +2,13 @@ package testing
 
 import (
        "fmt"
+       "net/http"
+       "testing"
+
        fake "github.com/gophercloud/gophercloud/openstack/networking/v2/common"
        "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/bgp/peers"
        "github.com/gophercloud/gophercloud/pagination"
        th "github.com/gophercloud/gophercloud/testhelper"
-       "net/http"
-       "testing"
 )
 
 func TestList(t *testing.T) {
✔  ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing [20211024|✚ 1]                                                                                                          
[CL-DESKTOP] 08:15:13 ~/src/github.com/shhgs/gophercloud/openstack/networking/v2/extensions/bgp/peers/testing $ diff -u requests_test.go <(gofmt requests_test.go)                 

Anyway I am fixing the import per CI/CD's opinion.

@coveralls
Copy link
Copy Markdown

coveralls commented Oct 25, 2021

Coverage Status

Coverage increased (+0.03%) to 79.938% when pulling 7c294a0 on shhgs:20211024 into 528e5b3 on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 25, 2021

Build failed.

@EmilienM
Copy link
Copy Markdown
Contributor

EmilienM commented Nov 3, 2021

This looks good to me. @shhgs would you mind to wait a little before we merge this one? Once we restore stability in CI, I want to enable this extension in Neutron and then enable functional testing on this patch.

Thanks

@EmilienM
Copy link
Copy Markdown
Contributor

recheck

@EmilienM
Copy link
Copy Markdown
Contributor

Could you please add acceptance tests? I'll work on adding BGP extension into our devstack config for CI.

Thanks

@EmilienM
Copy link
Copy Markdown
Contributor

I've added dynamic routing service here: #2271
we'll see if it pass CI, then we'll land it. Then here I would like to see acceptance tests so we can have functional testing for that nice feature.

Please let us know if you need help writing it.

Thanks!

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Nov 10, 2021

Build failed.

@shhgs
Copy link
Copy Markdown
Contributor Author

shhgs commented Nov 17, 2021

Hi @EmilienM

Sorry for the late reply.

So far I am implementing GET APIs. Therefore I think it is not applicable to the acceptance tests. Once I am implementing the PUT/POST/DELETE resources, I would write acceptance test.

Regards
-Jon

@EmilienM
Copy link
Copy Markdown
Contributor

@shhgs FYI we now have the service enabled in the networking CI job, so acceptance tests can be written for PUT/POST/DELETE, etc.

@EmilienM
Copy link
Copy Markdown
Contributor

recheck

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Nov 26, 2021

Build succeeded.

@shhgs
Copy link
Copy Markdown
Contributor Author

shhgs commented Dec 20, 2021

Hi @EmilienM,

This PR is only related to GET requests, therefore no acceptance test. I am separating PR-2271 into a small PRs and I am choosing the easy thing to implement first. Can you please let me know if there's anything in this PR that block it from being merged?

Regards
-Jon

@EmilienM
Copy link
Copy Markdown
Contributor

Hi @EmilienM,

This PR is only related to GET requests, therefore no acceptance test. I am separating PR-2271 into a small PRs and I am choosing the easy thing to implement first. Can you please let me know if there's anything in this PR that block it from being merged?

Regards -Jon

I'll review it as soon as I can, I added it to my backlog. Sorry for the lag.

@EmilienM
Copy link
Copy Markdown
Contributor

@shhgs Hey Jon,

I think your PR is ready to be merged (even if it doesn't have acceptance tests yet but you said you would push it next). However please update the PR description (example here: #584) which will make it easier to review (check the OpenStack API side, etc).

Also do you have ongoing PRs to push for other API calls as well?

Thanks and let me know any question or if you need help

@shhgs shhgs changed the title Add List/Get method for bgp/peers Neutron v2: BGP Peer list / get Apr 19, 2022
@shhgs
Copy link
Copy Markdown
Contributor Author

shhgs commented Apr 19, 2022

Hi @EmilienM,

Sorry for the delay. I have rebase the PR and updated PR description. Please check it out

@EmilienM EmilienM merged commit 614ab7b into gophercloud:master Apr 19, 2022
@shhgs shhgs deleted the 20211024 branch April 20, 2022 02:43
mdelord pushed a commit to ovh/gophercloud that referenced this pull request Oct 7, 2022
It'll be useful when we'll start testing
gophercloud#2241.

This patch will install devstack with dynamic routing on the networking
job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants