Skip to content

Commit

Permalink
Merge pull request #552 from DMTF/collection-object-fix
Browse files Browse the repository at this point in the history
Changes to collection handling, notes/variable changes
  • Loading branch information
mraineri authored Aug 11, 2023
2 parents 7c1c317 + 6cb6601 commit 155afc4
Show file tree
Hide file tree
Showing 8 changed files with 709 additions and 778 deletions.
8 changes: 6 additions & 2 deletions RedfishServiceValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
# License: BSD 3-Clause License. For full text see link:
# https://github.com/DMTF/Redfish-Service-Validator/blob/master/LICENSE.md

from redfish_service_validator.RedfishServiceValidator import main
from redfish_service_validator.RedfishServiceValidator import main, my_logger
import sys

if __name__ == '__main__':
sys.exit(main())
try:
sys.exit(main())
except Exception as e:
my_logger.exception("Program finished prematurely: %s", e)
raise
12 changes: 8 additions & 4 deletions redfish_service_validator/RedfishServiceValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import json
from datetime import datetime
import traceback
from redfish_service_validator.metadata import getSchemaDetails
from redfish_service_validator.config import convert_config_to_args, convert_args_to_config
from redfish_service_validator.validateResource import validateSingleURI, validateURITree
import redfish_service_validator.schema as schema
from redfish_service_validator import tohtml, schema_pack, traverse
from urllib.parse import urlparse, urlunparse
from urllib.parse import urlparse
from collections import Counter

tool_version = '2.3.3'
Expand Down Expand Up @@ -231,7 +231,7 @@ def validate(argslist=None, configfile=None):
my_logger.info("\n".join('{}: {} '.format(x, y) for x, y in sorted(finalCounts.items())))

# dump cache info to debug log
my_logger.debug('getSchemaDetails() -> {}'.format(schema.getSchemaDetails.cache_info()))
my_logger.debug('getSchemaDetails() -> {}'.format(getSchemaDetails.cache_info()))
my_logger.debug('callResourceURI() -> {}'.format(currentService.callResourceURI.cache_info()))

if not success:
Expand All @@ -250,4 +250,8 @@ def main():
return status_code

if __name__ == '__main__':
sys.exit(main())
try:
sys.exit(main())
except Exception as e:
my_logger.exception("Program finished prematurely: %s", e)
raise
Loading

0 comments on commit 155afc4

Please sign in to comment.