Skip to content

Add plural delete_agents alias to agent groups - #1022

Open
rksharma-owg wants to merge 1 commit into
tenable:mainfrom
rksharma-owg:fix/agent-groups-plural-alias
Open

rksharma-owg wants to merge 1 commit into
tenable:mainfrom
rksharma-owg:fix/agent-groups-plural-alias

Conversation

@rksharma-owg

Copy link
Copy Markdown

Description

TenableIO.agent_groups.delete_agent() already supports removing either one agent or multiple agents, but the plural delete_agents() spelling used by the Nessus interface is unavailable. This adds a thin compatibility alias that delegates to the existing implementation, preserving its validation, single-agent behavior, bulk behavior, and return values.

No dependencies are required.

Fixes #684

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The regression test was first run against the unmodified implementation and failed with AttributeError. It now verifies that delete_agents() forwards the group ID, all agent IDs, keyword arguments, and return value to delete_agent().

  • Focused regression test: uv run --python 3.12 --isolated --group dev pytest -q tests/io/test_agent_groups.py -k delete_agents_alias
  • Full local suite: 2,117 passed, 34 skipped, 6 xfailed, 3 xpassed; 95.50% coverage
  • Ruff: uv run --python 3.12 --isolated --group dev ruff check tenable
  • Fork preflight: Python 3.11, 3.12, 3.13, and 3.14 lint/tests/coverage plus code audit (run)

Test Configuration:

  • Python Version(s) Tested: 3.11, 3.12, 3.13, 3.14 on Ubuntu; 3.12.13 on macOS
  • Tenable.sc version (if necessary): N/A

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

@rksharma-owg
rksharma-owg requested a review from a team as a code owner September 20, 2026 01:42
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.

tenable.nessus agent_groups.{add,delete}_agents() not consistently available in tenable.io

1 participant