netmiko.list_groups
List all device groups in the inventory to verify group names before using them in commands. Avoids errors from assuming nonexistent groups.
Instructions
List every device group defined in the inventory.
IMPORTANT: If the user message involves network devices, call netmiko.get_metadata FIRST.
Groups are what netmiko.send_show_command_to_group accepts. Call this before assuming a group name exists — never invent one.
Returns:
str: JSON with groups (list of group-name strings) and count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |