Finish basic management

This commit is contained in:
askiiart 2022-12-15 11:46:11 -06:00
parent 0a0065d24c
commit 795aa23c89

View file

@ -37,14 +37,14 @@ while True:
elif selection == 'start': elif selection == 'start':
status = Docker.start(container) status = Docker.start(container)
if status == '0': if status == 0:
print(f'{container} started successfully') print(f'{container} started successfully')
else: else:
print(f'{container} did NOT start successfully. Exit code: {status}') print(f'{container} did NOT start successfully. Exit code: {status}')
elif selection == 'stop': elif selection == 'stop':
status = Docker.stop(container) status = Docker.stop(container)
if status == '0': if status == 0:
print(f'{container} stopped successfully') print(f'{container} stopped successfully')
else: else:
print(f'{container} was NOT stopped successfully. Exit code: {status}') print(f'{container} was NOT stopped successfully. Exit code: {status}')
@ -57,10 +57,12 @@ while True:
if selection == 'y' or selection == 'Y': if selection == 'y' or selection == 'Y':
print('Deleting...') print('Deleting...')
status = Docker.rm(container) status = Docker.rm(container)
# TODO: Add status logic if status == 0:
print(f'{container} has been deleted')
print('Done') print('Done')
elif selection == 'n' or selection == 'N': elif selection == 'n' or selection == 'N':
print(f'Operation cancelled, returning to {container} menu...') print(f'Operation cancelled, returning to {container} menu...')
break
elif selection == 'menu': elif selection == 'menu':
print('Returning to main menu...') print('Returning to main menu...')