Skip to content

Commit 6933915

Browse files
feat(ipam): add support for listing by ip_address and mac_address (#4899)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent a836e2c commit 6933915

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USAGE:
66
scw ipam ip list [arg=value ...]
77

88
ARGS:
9-
[order-by] Sort order of the returned IPs (created_at_desc | created_at_asc | updated_at_desc | updated_at_asc | attached_at_desc | attached_at_asc)
9+
[order-by] Sort order of the returned IPs (created_at_desc | created_at_asc | updated_at_desc | updated_at_asc | attached_at_desc | attached_at_asc | ip_address_desc | ip_address_asc | mac_address_desc | mac_address_asc)
1010
[project-id] Project ID to filter for. Only IPs belonging to this Project will be returned
1111
[zonal] Zone to filter for. Only IPs that are zonal, and in this zone, will be returned
1212
[private-network-id] Private Network to filter for.

docs/commands/ipam.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ scw ipam ip list [arg=value ...]
101101

102102
| Name | | Description |
103103
|------|---|-------------|
104-
| order-by | One of: `created_at_desc`, `created_at_asc`, `updated_at_desc`, `updated_at_asc`, `attached_at_desc`, `attached_at_asc` | Sort order of the returned IPs |
104+
| order-by | One of: `created_at_desc`, `created_at_asc`, `updated_at_desc`, `updated_at_asc`, `attached_at_desc`, `attached_at_asc`, `ip_address_desc`, `ip_address_asc`, `mac_address_desc`, `mac_address_asc` | Sort order of the returned IPs |
105105
| project-id | | Project ID to filter for. Only IPs belonging to this Project will be returned |
106106
| zonal | | Zone to filter for. Only IPs that are zonal, and in this zone, will be returned |
107107
| private-network-id | | Private Network to filter for. |

internal/namespaces/ipam/v1/ipam_cli.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@ func ipamIPList() *core.Command {
340340
"updated_at_asc",
341341
"attached_at_desc",
342342
"attached_at_asc",
343+
"ip_address_desc",
344+
"ip_address_asc",
345+
"mac_address_desc",
346+
"mac_address_asc",
343347
},
344348
},
345349
{

0 commit comments

Comments
 (0)