mirror of https://github.com/docker/docker-py.git
Fix merge
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
2d219ff739
commit
7e967c9e80
|
|
@ -186,8 +186,6 @@ class Context:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def Host(self):
|
def Host(self):
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if not self.orchestrator or self.orchestrator == "swarm":
|
if not self.orchestrator or self.orchestrator == "swarm":
|
||||||
endpoint = self.endpoints.get("docker", None)
|
endpoint = self.endpoints.get("docker", None)
|
||||||
if endpoint:
|
if endpoint:
|
||||||
|
|
@ -195,14 +193,6 @@ class Context:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return self.endpoints[self.orchestrator].get("Host", None)
|
return self.endpoints[self.orchestrator].get("Host", None)
|
||||||
=======
|
|
||||||
if self.orchestrator == "swarm":
|
|
||||||
=======
|
|
||||||
if not self.orchestrator or self.orchestrator == "swarm":
|
|
||||||
>>>>>>> 1e11ece... Make orchestrator field optional
|
|
||||||
return self.endpoints["docker"]["Host"]
|
|
||||||
return self.endpoints[self.orchestrator]["Host"]
|
|
||||||
>>>>>>> 64fdb32... Implement context management, lifecycle and unittests.
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def Orchestrator(self):
|
def Orchestrator(self):
|
||||||
|
|
@ -210,44 +200,19 @@ class Context:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def Metadata(self):
|
def Metadata(self):
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
meta = {}
|
meta = {}
|
||||||
if self.orchestrator:
|
if self.orchestrator:
|
||||||
meta = {"StackOrchestrator": self.orchestrator}
|
meta = {"StackOrchestrator": self.orchestrator}
|
||||||
return {
|
return {
|
||||||
"Name": self.name,
|
"Name": self.name,
|
||||||
"Metadata": meta,
|
"Metadata": meta,
|
||||||
=======
|
|
||||||
return {
|
|
||||||
"Name": self.name,
|
|
||||||
"Metadata": {
|
|
||||||
"StackOrchestrator": self.orchestrator
|
|
||||||
},
|
|
||||||
>>>>>>> 64fdb32... Implement context management, lifecycle and unittests.
|
|
||||||
=======
|
|
||||||
meta = {}
|
|
||||||
if self.orchestrator:
|
|
||||||
meta = {"StackOrchestrator": self.orchestrator}
|
|
||||||
return {
|
|
||||||
"Name": self.name,
|
|
||||||
"Metadata": meta,
|
|
||||||
>>>>>>> 1e11ece... Make orchestrator field optional
|
|
||||||
"Endpoints": self.endpoints
|
"Endpoints": self.endpoints
|
||||||
}
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def TLSConfig(self):
|
def TLSConfig(self):
|
||||||
key = self.orchestrator
|
key = self.orchestrator
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if not key or key == "swarm":
|
if not key or key == "swarm":
|
||||||
=======
|
|
||||||
if key == "swarm":
|
|
||||||
>>>>>>> 64fdb32... Implement context management, lifecycle and unittests.
|
|
||||||
=======
|
|
||||||
if not key or key == "swarm":
|
|
||||||
>>>>>>> 1e11ece... Make orchestrator field optional
|
|
||||||
key = "docker"
|
key = "docker"
|
||||||
if key in self.tls_cfg.keys():
|
if key in self.tls_cfg.keys():
|
||||||
return self.tls_cfg[key]
|
return self.tls_cfg[key]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue