added stop container
This commit is contained in:
13
cprocess.py
13
cprocess.py
@@ -1,8 +1,13 @@
|
||||
def build_cont_list(obj):
|
||||
# TODO add file for containers that need to be started
|
||||
def build_cont_list(obj,hypercare_containers):
|
||||
cont_list = []
|
||||
for i, c in enumerate(obj):
|
||||
if c["State"].lower() != "running":
|
||||
print(f'index: {i} container: {c["Names"][0].lstrip("/")} State: {c["State"]} ID: {c["Id"]}')
|
||||
cont_list.append(c)
|
||||
if c["Names"][0].lstrip("/") in hypercare_containers:
|
||||
print(f'index: {i} container: {c["Names"][0].lstrip("/")} State: {c["State"]} ID: {c["Id"]}')
|
||||
cont_list.append(c)
|
||||
print(len(cont_list))
|
||||
return cont_list
|
||||
return cont_list
|
||||
|
||||
def process_cont_list(full_cont_list, cont_fn):
|
||||
pass
|
||||
Reference in New Issue
Block a user