def clearAgentsCommandList(connection, sessionUrl, agentNameList): ''' This method clears all commands from the command list of the agent names provided. Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - sessionUrl is the address of the session that should run the test - agentNameList the list of agent names for which the command list will be cleared. ''' deleteParams = {} for agentName in agentNameList: commandListUrl = getCommandListUrlForAgentName(connection, sessionUrl, agentName) if commandListUrl: performGenericDelete(connection, commandListUrl, deleteParams)