Neutron v2: ScheduleBGPSpeakerOpts, RemoveBGPSpeaker, Lis…#2417
Neutron v2: ScheduleBGPSpeakerOpts, RemoveBGPSpeaker, Lis…#2417mandre merged 4 commits intogophercloud:masterfrom
Conversation
|
mandre
left a comment
There was a problem hiding this comment.
Aside from the small comments I had in the acceptance tests, this LGTM.
For anyone looking for the documentation, it's missing from https://docs.openstack.org/api-ref/network/v2/index.html#bgp-dynamic-routing, however it's still on https://docs.openstack.org/neutron-dynamic-routing/wallaby/reference/index.html and the API seemingly has not changed.
acceptance/openstack/networking/v2/extensions/agents/agents_test.go
Outdated
Show resolved
Hide resolved
acceptance/openstack/networking/v2/extensions/agents/agents_test.go
Outdated
Show resolved
Hide resolved
acceptance/openstack/networking/v2/extensions/agents/agents_test.go
Outdated
Show resolved
Hide resolved
acceptance/openstack/networking/v2/extensions/agents/agents_test.go
Outdated
Show resolved
Hide resolved
184af9e to
e663c99
Compare
1fce9ba to
65556ca
Compare
|
|
||
| // return /v2.0/bgp-speakers/{bgp-speaker-id}/bgp-dragents | ||
| func listDRAgentHostingBGPSpeakersURL(c *gophercloud.ServiceClient, speakerID string) string { | ||
| return c.ServiceURL("bgp-speakers", speakerID, "bgp-dragents") |
There was a problem hiding this comment.
We should make "bgp-speakers" and "bgp-dragents" constants.
| } | ||
|
|
||
| func TestBGPAgentRUD(t *testing.T) { | ||
| waitTime := 30 * time.Second |
There was a problem hiding this comment.
There's a WaitFor() helper function if you need to wait for a certain condition to be satisfied. You can use it instead of the time.Sleep() calls you've added to this test.
There was a problem hiding this comment.
This is really tricky. waitFor can only wait 10 minutes, that's too much. On the other hand, waitForTimeout might be better, however this is not a timeout problem.
There was a problem hiding this comment.
waitFor waits for a maximum of 10 min, and errors out if the predicate couldn't be satisfied in these 10 mins. Hopefully it returns much faster than the 30 seconds you initially had in the test.
3f456b6 to
43e329d
Compare
Neutron V2: BGP Dynamic Routing
For #2208