-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed many small logging mistakes and changed validation logging to l…
…ocal
- Loading branch information
1 parent
23b7bff
commit e7bde51
Showing
8 changed files
with
103 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
""" | ||
Module that acts as a wrapper and uses validate_configuration to validate given configuration | ||
""" | ||
import logging | ||
from bibigrid.core.utility import validate_configuration | ||
|
||
LOG = logging.getLogger("bibigrid") | ||
|
||
|
||
def check(configurations, providers): | ||
def check(configurations, providers, log): | ||
""" | ||
Uses validate_configuration to validate given configuration. | ||
:param configurations: list of configurations (dicts) | ||
:param providers: list of providers | ||
:param log: | ||
:return: | ||
""" | ||
success = validate_configuration.ValidateConfiguration(configurations, providers).validate() | ||
success = validate_configuration.ValidateConfiguration(configurations, providers, log).validate() | ||
check_result = "succeeded! Cluster is ready to start." if success else "failed!" | ||
print(f"Total check {check_result}") | ||
LOG.info("Total check returned %s.", success) | ||
log.log(0, f"Total check {check_result}") | ||
log.info("Total check returned %s.", success) | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.