tenable / pyTenable

Python Library for interfacing into Tenable's platform APIs
https://pytenable.readthedocs.io
MIT License
343 stars 172 forks source link

agent_groups.create() in TenableIO doesn't work #699

Closed yaabdala closed 2 months ago

yaabdala commented 1 year ago

Describe the bug Using a TIO client and the method agent_groups.create() fails to create an agent group and returns nothing. No error is thrown

To Reproduce Steps to reproduce the behavior:

def create_new_group(tio_client, prefix, number_of_groups_to_create, current_count):
    new_groups = []

    # for each group, create, name, and add to array.
    for n in range(number_of_groups_to_create - 1):
        group = tio_client.agent_groups.create(prefix + "_" + str(current_count + n))
        new_groups.append(group)

    return new_groups

Fails to create a new group in TIO and the returned group is nil

Expected behavior New group is created in TIO and the function returns the new group as an object

System Information (please complete the following information):

aseemsavio commented 1 year ago

I could not reproduce this. The function tio_client.agent_groups.create seems to work as expected independently. Could the caller code have a bug?