Merge pull request #180 from skuda/master
add support for attach api call using websockets.
This commit is contained in:
commit
542facbf07
@ -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,
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user