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:
Mike Place 2015-11-09 11:13:50 -07:00
commit fd571890b9

View File

@ -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):