feat(bitdefender): complete Network module (build-out 3/N)
- Completed Network module for bitdefender skill (GravityZone Public API) - Added getEndpointTags (read), setEndpointLabel (gated), createReconfigureClientTask/reconfigure (gated) - Confirmed createUninstallTask, getEndpointsByPolicy, getManagedEndpointDetailsByIp, createScanTaskByMailboxes not found under /network - Fixed endpoint-tags renderer to handle list result (previously crashing _print_kv) - raw gates setEndpointLabel; reconfigure already gated - selftest 55 -> 60 passing Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -721,6 +721,33 @@ class GravityZoneClient:
|
||||
params["status"] = status
|
||||
return self._jsonrpc_request("network", "getScanTasksList", params) or {}
|
||||
|
||||
def get_endpoint_tags(self) -> Any:
|
||||
"""List endpoint tags defined in the tenant (network.getEndpointTags). Read."""
|
||||
return self._jsonrpc_request("network", "getEndpointTags", {})
|
||||
|
||||
def set_endpoint_label(self, endpoint_id: str, label: str) -> Any:
|
||||
"""Set an endpoint's label (network.setEndpointLabel). STATE-CHANGING.
|
||||
Requires `endpointId` and `label` (both verified). Gate at the call site."""
|
||||
return self._jsonrpc_request(
|
||||
"network", "setEndpointLabel",
|
||||
{"endpointId": endpoint_id, "label": label},
|
||||
)
|
||||
|
||||
def reconfigure_client(
|
||||
self, target_ids: list[str], extra: Optional[dict] = None
|
||||
) -> Any:
|
||||
"""Reconfigure installed agents (network.createReconfigureClientTask).
|
||||
STATE-CHANGING. Requires `targetIds` (verified); the reconfigure body
|
||||
(which modules/roles/scanMode to change) is documented and passed via
|
||||
`extra`. Gate at the call site behind --confirm.
|
||||
"""
|
||||
params: dict = {"targetIds": target_ids}
|
||||
if extra:
|
||||
params.update(extra)
|
||||
return self._jsonrpc_request(
|
||||
"network", "createReconfigureClientTask", params
|
||||
)
|
||||
|
||||
# ======================================================================
|
||||
# REPORTS (module `/reports`) — VERIFIED LIVE
|
||||
# ======================================================================
|
||||
|
||||
Reference in New Issue
Block a user