add namespace to all apis
This commit is contained in:
parent
e9658aae73
commit
256de5d2cc
27 changed files with 248 additions and 204 deletions
|
|
@ -13,11 +13,14 @@ logger = logging.getLogger("python-dockercloud")
|
|||
|
||||
|
||||
class Events(StreamingAPI):
|
||||
def __init__(self):
|
||||
def __init__(self, namespace=""):
|
||||
endpoint = "events"
|
||||
if dockercloud.namespace:
|
||||
|
||||
if not namespace:
|
||||
namespace = dockercloud.namespace
|
||||
if namespace:
|
||||
url = "/".join([dockercloud.stream_host.rstrip("/"), "api", "audit", self._api_version,
|
||||
dockercloud.namespace, endpoint.lstrip("/")])
|
||||
namespace, endpoint.lstrip("/")])
|
||||
else:
|
||||
url = "/".join([dockercloud.stream_host.rstrip("/"), "api", "audit", self._api_version,
|
||||
endpoint.lstrip("/")])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue