mantis-cli 14.0.1__tar.gz → 14.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mantis-cli-14.0.1/mantis_cli.egg-info → mantis-cli-14.2.0}/PKG-INFO +1 -1
- mantis-cli-14.2.0/mantis/__init__.py +1 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/managers.py +12 -5
- {mantis-cli-14.0.1 → mantis-cli-14.2.0/mantis_cli.egg-info}/PKG-INFO +1 -1
- mantis-cli-14.0.1/mantis/__init__.py +0 -1
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/.gitignore +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/LICENSE +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/MANIFEST.in +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/README.md +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/TODO +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/__main__.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/command_line.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/crypto.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/environment.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/extensions/__init__.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/extensions/django.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/extensions/nginx.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/extensions/postgres.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/helpers.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis/logic.py +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis_cli.egg-info/SOURCES.txt +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis_cli.egg-info/dependency_links.txt +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis_cli.egg-info/entry_points.txt +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis_cli.egg-info/requires.txt +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/mantis_cli.egg-info/top_level.txt +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/setup.cfg +0 -0
- {mantis-cli-14.0.1 → mantis-cli-14.2.0}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = '14.2.0'
|
|
@@ -529,6 +529,12 @@ class BaseManager(object):
|
|
|
529
529
|
else:
|
|
530
530
|
CLI.error(f'Unknown build tool: {build_tool}. Available tools: {", ".join(available_tools)}')
|
|
531
531
|
|
|
532
|
+
def services(self):
|
|
533
|
+
with open(self.compose_file, 'r') as file:
|
|
534
|
+
compose_data = yaml.safe_load(file)
|
|
535
|
+
|
|
536
|
+
return compose_data.get('services', {}).keys()
|
|
537
|
+
|
|
532
538
|
def services_to_build(self):
|
|
533
539
|
with open(self.compose_file, 'r') as file:
|
|
534
540
|
compose_data = yaml.safe_load(file)
|
|
@@ -671,9 +677,10 @@ class BaseManager(object):
|
|
|
671
677
|
def remove_suffixes(self, prefix=''):
|
|
672
678
|
for container in self.get_containers(prefix=prefix):
|
|
673
679
|
if container.split('-')[-1].isdigit():
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
680
|
+
if container not in self.services():
|
|
681
|
+
CLI.info(f'Removing suffix of container {container}')
|
|
682
|
+
new_container = container.rsplit('-', maxsplit=1)[0]
|
|
683
|
+
self.docker(f'container rename {container} {new_container}')
|
|
677
684
|
|
|
678
685
|
def restart_service(self, service):
|
|
679
686
|
container = self.get_container_name(service)
|
|
@@ -757,10 +764,10 @@ class BaseManager(object):
|
|
|
757
764
|
CLI.step(index + 1, steps, f'Removing {container}')
|
|
758
765
|
self.docker(f'container rm {container}')
|
|
759
766
|
|
|
760
|
-
def clean(self): # todo clean on all nodes
|
|
767
|
+
def clean(self, params=''): # todo clean on all nodes
|
|
761
768
|
CLI.info('Cleaning...')
|
|
762
769
|
# self.docker(f'builder prune')
|
|
763
|
-
self.docker(f'system prune
|
|
770
|
+
self.docker(f'system prune {params} -a --force')
|
|
764
771
|
# self.docker(f'container prune')
|
|
765
772
|
# self.docker(f'container prune --force')
|
|
766
773
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = '14.0.1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|