add support for attach api call using websockets.

This commit is contained in:
Miguel Angel Rasero 2017-04-18 11:25:26 +02:00
parent 84fdbd7609
commit 5a590f8b55
2 changed files with 2 additions and 2 deletions

View File

@ -346,7 +346,7 @@ class ApiClient(object):
"""
# FIXME(dims) : We need a better way to figure out which
# calls end up using web sockets
if url.endswith('/exec') and (method == "GET" or method == "POST"):
if (url.endswith('/exec') or url.endswith('/attach')) and (method == "GET" or method == "POST"):
return ws_client.websocket_call(self.config,
url,
query_params=query_params,

View File

@ -234,7 +234,7 @@ def websocket_call(configuration, url, query_params, _request_timeout,
if isinstance(commands, list):
for command in commands:
url += "&command=%s&" % quote_plus(command)
else:
elif commands is not None:
url += '&command=' + quote_plus(commands)
try: