Skip to content

Commit

Permalink
reconnect existing sessions broken on Connection Manager #6
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbalogh committed Feb 23, 2018
1 parent b802907 commit e9a9079
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ixnetwork/IxnHttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 = []
Expand Down

0 comments on commit e9a9079

Please sign in to comment.