From e9a9079a7d282dce43da36f982ef09e1246db705 Mon Sep 17 00:00:00 2001 From: Andy Balogh Date: Thu, 22 Feb 2018 17:42:44 -0800 Subject: [PATCH] reconnect existing sessions broken on Connection Manager #6 --- ixnetwork/IxnHttp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ixnetwork/IxnHttp.py b/ixnetwork/IxnHttp.py index 97380ba..ec69267 100644 --- a/ixnetwork/IxnHttp.py +++ b/ixnetwork/IxnHttp.py @@ -75,7 +75,7 @@ def auth(self, username, password): def sessions(self): """Get a list of sessions on the server """ - return self.get('/api/v1/sessions') + return self.get('/api/v1/sessions', links=False) def create_session(self): """Create and set a new IxNetwork session on the host specified in the constructor """ @@ -138,8 +138,8 @@ def _process_async_response(self, url, response): raise Exception('%s: %s - %s' % (response.state, response.message, response.result)) return response - def get(self, url, fid=None): - if str(url).find('links=true') == -1: + def get(self, url, fid=None, links=True): + if str(url).find('links=true') == -1 and links is True: if str(url).find('?') == -1: url += "?" else: @@ -215,7 +215,6 @@ def _send_recv(self, method, url, payload=None, fid=None, file_content=None): else: raise Exception('%s %s %s' % (response.status_code, response.reason, response.text)) - def _make_lambda(self, contentObject): if isinstance(contentObject, list): data_list = []