diff --git a/openstack/network/v2/bgpvpn.py b/openstack/network/v2/bgpvpn.py index 98de33208..03478c8e5 100644 --- a/openstack/network/v2/bgpvpn.py +++ b/openstack/network/v2/bgpvpn.py @@ -27,6 +27,19 @@ class BgpVpn(resource.Resource): allow_delete = True allow_list = True + _query_mapping = resource.QueryParameters( + 'name', + 'project_id', + 'local_pref', + 'vni', + 'type', + 'networks', + 'routers', + 'ports', + # NOTE(seba): (route|import|export) targets only support exact matches + # and have therefore been left out + ) + # Properties #: The Id of the BGPVPN id = resource.Body('id') diff --git a/openstack/tests/unit/network/v2/test_bgpvpn.py b/openstack/tests/unit/network/v2/test_bgpvpn.py index c6e4671e0..0aba1fefb 100644 --- a/openstack/tests/unit/network/v2/test_bgpvpn.py +++ b/openstack/tests/unit/network/v2/test_bgpvpn.py @@ -62,6 +62,14 @@ class TestBgpVpn(base.TestCase): { 'limit': 'limit', 'marker': 'marker', + 'local_pref': 'local_pref', + 'name': 'name', + 'networks': 'networks', + 'routers': 'routers', + 'ports': 'ports', + 'project_id': 'project_id', + 'type': 'type', + 'vni': 'vni', }, sot._query_mapping._mapping, ) diff --git a/releasenotes/notes/bgpvpn-list-filters-e76183a7008c0631.yaml b/releasenotes/notes/bgpvpn-list-filters-e76183a7008c0631.yaml new file mode 100644 index 000000000..4eb359e9b --- /dev/null +++ b/releasenotes/notes/bgpvpn-list-filters-e76183a7008c0631.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + ``openstack.network.v2.bgpvpn.BgpVpn`` can now be filtered by its + associations to `networks`, `routers` and `ports. Additionally, + filtering for the attributes `name`, `project_id`, `local_pref`, `vni` + and `type` is now done on server-side.