@@ -186,68 +186,33 @@ def Name(self):
186
186
187
187
@property
188
188
def Host (self ):
189
- < << << << HEAD
190
- < << << << HEAD
191
189
if not self .orchestrator or self .orchestrator == "swarm" :
192
190
endpoint = self .endpoints .get ("docker" , None )
193
191
if endpoint :
194
192
return endpoint .get ("Host" , None )
195
193
return None
196
194
197
195
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 .
206
196
207
197
@property
208
198
def Orchestrator (self ):
209
199
return self .orchestrator
210
200
211
201
@property
212
202
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
- == == == =
229
203
meta = {}
230
204
if self .orchestrator :
231
205
meta = {"StackOrchestrator" : self .orchestrator }
232
206
return {
233
207
"Name" : self .name ,
234
208
"Metadata" : meta ,
235
- >> >> >> > 1e11 ece ... Make orchestrator field optional
236
209
"Endpoints" : self .endpoints
237
210
}
238
211
239
212
@property
240
213
def TLSConfig (self ):
241
214
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
- == == == =
249
215
if not key or key == "swarm" :
250
- >> >> >> > 1e11 ece ... Make orchestrator field optional
251
216
key = "docker"
252
217
if key in self .tls_cfg .keys ():
253
218
return self .tls_cfg [key ]
0 commit comments