Skip to content

Conversation

@ushiboy
Copy link
Owner

@ushiboy ushiboy commented Dec 14, 2025

Summary

Add nmcli.connection.show_all() method to get list of all connections using nmcli connection show command.

Motivation

Currently, nmcli.connection() executes nmcli connection to get the connection list.
This PR adds nmcli.connection.show_all() which uses nmcli connection show command, providing an explicit correspondence to the nmcli command and supporting the --active option to filter only active connections.

Changes

New API

Added nmcli.connection.show_all(active: bool = False) -> List[Connection]

Usage:

# Get all connections
connections = nmcli.connection.show_all()

# Get only active connections
active_connections = nmcli.connection.show_all(active=True)

@ushiboy ushiboy merged commit 27dc840 into main Dec 20, 2025
7 checks passed
@ushiboy ushiboy deleted the feat/connection-show-all branch December 20, 2025 05:08
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.

2 participants