@@ -186,68 +186,33 @@ def Name(self):
186186
187187 @property
188188 def Host (self ):
189- < << << << HEAD
190- < << << << HEAD
191189 if not self .orchestrator or self .orchestrator == "swarm" :
192190 endpoint = self .endpoints .get ("docker" , None )
193191 if endpoint :
194192 return endpoint .get ("Host" , None )
195193 return None
196194
197195 return self .endpoints [self .orchestrator ].get ("Host" , None )
198- == == == =
199- if self .orchestrator == "swarm" :
200- == == == =
201- if not self .orchestrator or self .orchestrator == "swarm" :
202- > >> >> >> 1e11 ece ... Make orchestrator field optional
203- return self .endpoints ["docker" ]["Host" ]
204- return self .endpoints [self .orchestrator ]["Host" ]
205- > >> >> >> 64 fdb32 ... Implement context management , lifecycle and unittests .
206196
207197 @property
208198 def Orchestrator (self ):
209199 return self .orchestrator
210200
211201 @property
212202 def Metadata (self ):
213- < << << << HEAD
214- < << << << HEAD
215- meta = {}
216- if self .orchestrator :
217- meta = {"StackOrchestrator" : self .orchestrator }
218- return {
219- "Name" : self .name ,
220- "Metadata" : meta ,
221- == == == =
222- return {
223- "Name" : self .name ,
224- "Metadata" : {
225- "StackOrchestrator" : self .orchestrator
226- },
227- >> >> >> > 64 fdb32 ... Implement context management , lifecycle and unittests .
228- == == == =
229203 meta = {}
230204 if self .orchestrator :
231205 meta = {"StackOrchestrator" : self .orchestrator }
232206 return {
233207 "Name" : self .name ,
234208 "Metadata" : meta ,
235- >> >> >> > 1e11 ece ... Make orchestrator field optional
236209 "Endpoints" : self .endpoints
237210 }
238211
239212 @property
240213 def TLSConfig (self ):
241214 key = self .orchestrator
242- << << < << HEAD
243- << < << << HEAD
244- if not key or key == "swarm" :
245- == == == =
246- if key == "swarm" :
247- >> >> >> > 64 fdb32 ... Implement context management , lifecycle and unittests .
248- == == == =
249215 if not key or key == "swarm" :
250- >> >> >> > 1e11 ece ... Make orchestrator field optional
251216 key = "docker"
252217 if key in self .tls_cfg .keys ():
253218 return self .tls_cfg [key ]
0 commit comments