Skip to content

List Port Forwardings#1688

Merged
jtopjian merged 8 commits intogophercloud:masterfrom
simonre:portforwardinglist
Sep 11, 2019
Merged

List Port Forwardings#1688
jtopjian merged 8 commits intogophercloud:masterfrom
simonre:portforwardinglist

Conversation

@simonre
Copy link
Copy Markdown
Contributor

@simonre simonre commented Sep 6, 2019

Prior to a PR being reviewed, there needs to be a Github issue that the PR
addresses. Replace the brackets and text below with that issue number.

For #1637

Links to the line numbers/files in the OpenStack source code that support the
code in this PR:

Source:
https://github.com/openstack/neutron/blob/f21444f247108212dc835036c98e354d6e6f7ace/neutron/services/portforwarding/pf_plugin.py#L487

API:
https://docs.openstack.org/api-ref/network/v2/?expanded=create-port-forwarding-detail#list-floating-ip-port-forwardings

@coveralls
Copy link
Copy Markdown

coveralls commented Sep 6, 2019

Coverage Status

Coverage increased (+0.02%) to 76.852% when pulling e5b9c33 on simonre:portforwardinglist into a84f8b3 on gophercloud:master.

@simonre simonre changed the title Portforwardinglist List Port Forwardings Sep 6, 2019
@simonre
Copy link
Copy Markdown
Contributor Author

simonre commented Sep 6, 2019

@jtopjian This is ready for review

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Sep 6, 2019

Build succeeded.

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

@simonre Everything looks good - I've confirmed the links and paging work correctly. Just two fields to add to ListOpts and this is good to go.

Thanks!

// the port forwarding attributes you want to see returned. SortKey allows you to
// sort by a particular network attribute. SortDir sets the direction, and is
// either `asc' or `desc'. Marker and Limit are used for pagination.
type ListOpts struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to add limit (int) and marker (string) here.

Gophercloud's paging automatically sets limit and marker when paging internally, but if the user wanted to limit the results themselves, we need that in ListOpts.

@simonre
Copy link
Copy Markdown
Contributor Author

simonre commented Sep 9, 2019

@jtopjian I added the limit and marker fields

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Sep 9, 2019

Build succeeded.

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

LGTM - thank you!

@jtopjian
Copy link
Copy Markdown
Contributor

@simonre sorry for the delay - I'm out of the office. Thank you!

@jtopjian jtopjian merged commit 8460541 into gophercloud:master Sep 11, 2019
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