-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLINT-246] Add pagination support for network networks (#16930)
* adding limit=1 test files * modified get_network_networks() to use make_paginated_request() * added unit tests for networks pagination using rest api * added changelog * fixed linting error * fixing additional linting error * enable capability and added unit tests for networks pagination for sdk api * asserting that the proper network metrics are still submitted during a pagination call
- Loading branch information
1 parent
8308d55
commit b771ada
Showing
10 changed files
with
312 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[PLINT-246] Add pagination support for network networks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...37d4d55a50a62b63398ad15/limit=1/marker=f7b6adc8-24ea-490c-9537-5c4eae015cd8/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"networks": [ | ||
{ | ||
"id": "ec38babc-37e8-4bd7-9de0-03009304b2e4", | ||
"name": "public", | ||
"tenant_id": "c09ccb52462d49c89595d2194a367198", | ||
"admin_state_up": true, | ||
"mtu": 1500, | ||
"status": "ACTIVE", | ||
"subnets": [ | ||
"4bd0aa9b-bfef-4b64-96ec-4a3c29d694b4", | ||
"51b41dcb-ec03-4036-9845-9b819b1e301f" | ||
], | ||
"shared": false, | ||
"availability_zone_hints": [], | ||
"availability_zones": [], | ||
"ipv4_address_scope": null, | ||
"ipv6_address_scope": null, | ||
"router:external": true, | ||
"description": "", | ||
"port_security_enabled": true, | ||
"is_default": true, | ||
"tags": [], | ||
"created_at": "2023-10-18T15:01:59Z", | ||
"updated_at": "2023-10-18T15:02:14Z", | ||
"revision_number": 3, | ||
"project_id": "c09ccb52462d49c89595d2194a367198", | ||
"provider:network_type": "flat", | ||
"provider:physical_network": "public", | ||
"provider:segmentation_id": null | ||
} | ||
], | ||
"networks_links": [ | ||
{ | ||
"rel": "previous", | ||
"href": "http://34.91.117.188:9696/networking/v2.0/networks?limit=1&marker=ec38babc-37e8-4bd7-9de0-03009304b2e4&page_reverse=True" | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
...etworking/v2.0/networks/project_id=1e6e233e637d4d55a50a62b63398ad15/limit=1/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"networks": [ | ||
{ | ||
"id": "f7b6adc8-24ea-490c-9537-5c4eae015cd8", | ||
"name": "shared", | ||
"tenant_id": "1e6e233e637d4d55a50a62b63398ad15", | ||
"admin_state_up": true, | ||
"mtu": 1442, | ||
"status": "ACTIVE", | ||
"subnets": [ | ||
"60c84d5f-f884-4fcf-a2de-605662d52ba3" | ||
], | ||
"shared": true, | ||
"availability_zone_hints": [], | ||
"availability_zones": [], | ||
"ipv4_address_scope": null, | ||
"ipv6_address_scope": null, | ||
"router:external": false, | ||
"description": "", | ||
"port_security_enabled": true, | ||
"tags": [], | ||
"created_at": "2023-10-18T15:04:01Z", | ||
"updated_at": "2023-10-18T15:04:03Z", | ||
"revision_number": 2, | ||
"project_id": "1e6e233e637d4d55a50a62b63398ad15", | ||
"provider:network_type": "geneve", | ||
"provider:physical_network": null, | ||
"provider:segmentation_id": 16779 | ||
} | ||
], | ||
"networks_links": [ | ||
{ | ||
"rel": "next", | ||
"href": "http://127.0.0.1:9696/networking/v2.0/networks?limit=1&marker=f7b6adc8-24ea-490c-9537-5c4eae015cd8" | ||
}, | ||
{ | ||
"rel": "previous", | ||
"href": "http://127.0.0.1:9696/networking/v2.0/networks?limit=1&marker=f7b6adc8-24ea-490c-9537-5c4eae015cd8&page_reverse=True" | ||
} | ||
] | ||
} |
66 changes: 66 additions & 0 deletions
66
...orking/v2.0/networks/project_id=1e6e233e637d4d55a50a62b63398ad15/limit=1000/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"networks": [ | ||
{ | ||
"id": "ec38babc-37e8-4bd7-9de0-03009304b2e4", | ||
"name": "public", | ||
"tenant_id": "c09ccb52462d49c89595d2194a367198", | ||
"admin_state_up": true, | ||
"mtu": 1500, | ||
"status": "ACTIVE", | ||
"subnets": [ | ||
"4bd0aa9b-bfef-4b64-96ec-4a3c29d694b4", | ||
"51b41dcb-ec03-4036-9845-9b819b1e301f" | ||
], | ||
"shared": false, | ||
"availability_zone_hints": [], | ||
"availability_zones": [], | ||
"ipv4_address_scope": null, | ||
"ipv6_address_scope": null, | ||
"router:external": true, | ||
"description": "", | ||
"port_security_enabled": true, | ||
"is_default": true, | ||
"tags": [], | ||
"created_at": "2023-10-18T15:01:59Z", | ||
"updated_at": "2023-10-18T15:02:14Z", | ||
"revision_number": 3, | ||
"project_id": "c09ccb52462d49c89595d2194a367198", | ||
"provider:network_type": "flat", | ||
"provider:physical_network": "public", | ||
"provider:segmentation_id": null | ||
}, | ||
{ | ||
"id": "f7b6adc8-24ea-490c-9537-5c4eae015cd8", | ||
"name": "shared", | ||
"tenant_id": "1e6e233e637d4d55a50a62b63398ad15", | ||
"admin_state_up": true, | ||
"mtu": 1442, | ||
"status": "ACTIVE", | ||
"subnets": [ | ||
"60c84d5f-f884-4fcf-a2de-605662d52ba3" | ||
], | ||
"shared": true, | ||
"availability_zone_hints": [], | ||
"availability_zones": [], | ||
"ipv4_address_scope": null, | ||
"ipv6_address_scope": null, | ||
"router:external": false, | ||
"description": "", | ||
"port_security_enabled": true, | ||
"tags": [], | ||
"created_at": "2023-10-18T15:04:01Z", | ||
"updated_at": "2023-10-18T15:04:03Z", | ||
"revision_number": 2, | ||
"project_id": "1e6e233e637d4d55a50a62b63398ad15", | ||
"provider:network_type": "geneve", | ||
"provider:physical_network": null, | ||
"provider:segmentation_id": 16779 | ||
} | ||
], | ||
"networks_links": [ | ||
{ | ||
"rel": "previous", | ||
"href": "http://34.91.117.188:9696/networking/v2.0/networks?limit=1000&marker=ec38babc-37e8-4bd7-9de0-03009304b2e4&page_reverse=True" | ||
} | ||
] | ||
} |
38 changes: 38 additions & 0 deletions
38
...etworking/v2.0/networks/project_id=6e39099cccde4f809b003d9e0dd09304/limit=1/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"networks": [ | ||
{ | ||
"id": "ebdfddd9-14b8-46bd-98d6-10205d13038c", | ||
"name": "private", | ||
"tenant_id": "29b43a58176646e3870a9ea0b60fb7ad", | ||
"admin_state_up": true, | ||
"mtu": 1442, | ||
"status": "ACTIVE", | ||
"subnets": [ | ||
"5f1664c6-9b9b-475c-b0d4-95337a84f552", | ||
"ca392b80-175d-4d20-becc-aa2c6f984bd1" | ||
], | ||
"shared": false, | ||
"availability_zone_hints": [], | ||
"availability_zones": [], | ||
"ipv4_address_scope": null, | ||
"ipv6_address_scope": null, | ||
"router:external": false, | ||
"description": "", | ||
"port_security_enabled": true, | ||
"tags": [], | ||
"created_at": "2023-10-18T15:01:45Z", | ||
"updated_at": "2023-10-18T15:01:50Z", | ||
"revision_number": 3, | ||
"project_id": "29b43a58176646e3870a9ea0b60fb7ad", | ||
"provider:network_type": "geneve", | ||
"provider:physical_network": null, | ||
"provider:segmentation_id": 876 | ||
} | ||
], | ||
"networks_links": [ | ||
{ | ||
"rel": "previous", | ||
"href": "http://34.91.117.188:9696/networking/v2.0/networks?limit=1&marker=ebdfddd9-14b8-46bd-98d6-10205d13038c&page_reverse=True" | ||
} | ||
] | ||
} |
38 changes: 38 additions & 0 deletions
38
...orking/v2.0/networks/project_id=6e39099cccde4f809b003d9e0dd09304/limit=1000/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"networks": [ | ||
{ | ||
"id": "ebdfddd9-14b8-46bd-98d6-10205d13038c", | ||
"name": "private", | ||
"tenant_id": "29b43a58176646e3870a9ea0b60fb7ad", | ||
"admin_state_up": true, | ||
"mtu": 1442, | ||
"status": "ACTIVE", | ||
"subnets": [ | ||
"5f1664c6-9b9b-475c-b0d4-95337a84f552", | ||
"ca392b80-175d-4d20-becc-aa2c6f984bd1" | ||
], | ||
"shared": false, | ||
"availability_zone_hints": [], | ||
"availability_zones": [], | ||
"ipv4_address_scope": null, | ||
"ipv6_address_scope": null, | ||
"router:external": false, | ||
"description": "", | ||
"port_security_enabled": true, | ||
"tags": [], | ||
"created_at": "2023-10-18T15:01:45Z", | ||
"updated_at": "2023-10-18T15:01:50Z", | ||
"revision_number": 3, | ||
"project_id": "29b43a58176646e3870a9ea0b60fb7ad", | ||
"provider:network_type": "geneve", | ||
"provider:physical_network": null, | ||
"provider:segmentation_id": 876 | ||
} | ||
], | ||
"networks_links": [ | ||
{ | ||
"rel": "previous", | ||
"href": "http://34.91.117.188:9696/networking/v2.0/networks?limit=1000&marker=ebdfddd9-14b8-46bd-98d6-10205d13038c&page_reverse=True" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters