diff --git a/RestApi/Python/Modules/IxL_RestApi.py b/RestApi/Python/Modules/IxL_RestApi.py index 7d38719..33bb5b4 100755 --- a/RestApi/Python/Modules/IxL_RestApi.py +++ b/RestApi/Python/Modules/IxL_RestApi.py @@ -16,6 +16,7 @@ import datetime import platform + class IxLoadRestApiException(Exception): def __init__(self, msg=None): showErrorMsg = '\nIxLoadRestApiException error: {0}\n\n'.format(msg) @@ -1241,7 +1242,12 @@ def abortActiveTest(self): def deleteSessionId(self): response = self.delete(self.sessionIdUrl) - + + def deleteAllSessions(self): + sessionUrl = '{}/api/{}/sessions'.format(self.httpHeader, self.apiVersion) + self.delete(sessionUrl) + print("All Ixia Sessions Deleted") + def getMaximumInstances(self): response = self.get(self.sessionIdUrl+'/ixLoad/preferences') maxInstances = response.json()['maximumInstances']