mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #28686 from jeanpralo/add-validate-dockercompose-get
set a valid flag for docker-compose file on get method
This commit is contained in:
commit
fd571890b9
@ -279,7 +279,16 @@ def get(path):
|
||||
|
||||
salt myminion dockercompose.get /path/where/docker-compose/stored
|
||||
'''
|
||||
return __read_docker_compose(path)
|
||||
|
||||
salt_result = __read_docker_compose(path)
|
||||
if not salt_result['status']:
|
||||
return salt_result
|
||||
project = __load_project(path)
|
||||
if isinstance(project, dict):
|
||||
salt_result['return']['valid'] = False
|
||||
else:
|
||||
salt_result['return']['valid'] = True
|
||||
return salt_result
|
||||
|
||||
|
||||
def create(path, docker_compose):
|
||||
|
Loading…
Reference in New Issue
Block a user