fixed logging for started containers
This commit is contained in:
parent
8c9941b2ab
commit
61c627df91
@ -20,7 +20,7 @@ def process_cont_list(full_cont_list, start_cont_fn, req_obj, host, port, jwt, e
|
||||
if full_cont_list:
|
||||
for container in full_cont_list:
|
||||
start_cont_fn(req_obj, host, port, jwt, endpoint, container["Id"])
|
||||
return True
|
||||
return container["Names"][0].lstrip("/")
|
||||
|
||||
def process_cont_status(obj):
|
||||
if not obj:
|
||||
|
8
crane.py
8
crane.py
@ -45,14 +45,16 @@ class Crn:
|
||||
|
||||
#logging in
|
||||
try:
|
||||
self.tl.info('Authenticating.')
|
||||
self.tl.debug('Authenticating.')
|
||||
self.jwt = c_auth(self.cc, self.host, self.port, self.username, self.password)
|
||||
self.tl.info('Authenticated successfully.')
|
||||
self.cont_obj = c_get_containers(self.cc, self.host, self.port, self.jwt, self.endpoint)
|
||||
self.tl.info('Collected container data.')
|
||||
self.tl.debug('Collected container data.')
|
||||
self.cont_list = build_cont_list(self.cont_obj, self.observed_containers)
|
||||
self.tl.info('Building container list.')
|
||||
self.tl.debug('Building container list.')
|
||||
self.process_cont_list_response = process_cont_list(self.cont_list, c_start_container, self.cc, self.host, self.port, self.jwt, self.endpoint)
|
||||
if self.process_cont_list_response:
|
||||
self.tl.info(f'Started: [{self.process_cont_list_response}]')
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
self.tl.exception(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user