Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MessageRegistryFile to validation, small RedfishObject tweaks, mild refactoring #438

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ __pycache__/
build/
dist/
logs/
SchemaFiles/
*.pyc
*.spec
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [2.0.6] - 2021-10-27
- Corrected use of iterators to be compatible with versions of Python older than 3.8

## [2.0.5] - 2021-10-15
- Corrected namespace referencing for objects nested in objects

## [2.0.4] - 2021-10-04
- Updated schema pack link to point to the latest DSP8010 bundle

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ Variable | Type | Definition
Version | string | Internal config version (optional)
Copyright | string | _DMTF_ copyright (optional)
verbose | int | level of verbosity (0-3)

### [Host]

Variable | Type | Definition
-- |-- |--
ip | string | Host of testing system, formatted as https:// ip : port (can use http as well)
Expand All @@ -56,15 +58,18 @@ authtype | string | Authorization type (Basic | Session | Token | None)
token | string | Token string for Token authentication

### [Validator]

Variable | Type | Definition
-- |-- |--
payload | string | Option to test a specific payload or resource tree (see below)
logdir | string | Place to save logs and run configs
oemcheck | boolean | Whether to check Oem items on service
uricheck | boolean | Allow URI checking on services below RedfishVersion 1.6.0
debugging | boolean | Whether to print debug to log
schema_directory| string | Where schema is located/saved on system

### Payload options

The payload option takes two parameters as "option uri"

(Single, SingleFile, Tree, TreeFile)
Expand Down
5 changes: 3 additions & 2 deletions RedfishServiceValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import json
from datetime import datetime

tool_version = '2.0.4'
tool_version = '2.0.6'

my_logger = logging.getLogger()
my_logger.setLevel(logging.DEBUG)
Expand Down Expand Up @@ -46,6 +46,7 @@ def main(argslist=None, configfile=None):
argget.add_argument('--logdir', type=str, default='./logs', help='directory for log files')
argget.add_argument('--nooemcheck', action='store_false', dest='oemcheck', help='Don\'t check OEM items')
argget.add_argument('--debugging', action="store_true", help='Output debug statements to text log, otherwise it only uses INFO')
argget.add_argument('--uricheck', action="store_true", help='Allow URI checking on services below RedfishVersion 1.6.0')
argget.add_argument('--schema_directory', type=str, default='./SchemaFiles/metadata', help='directory for local schema files')

# parse...
Expand Down Expand Up @@ -120,7 +121,7 @@ def main(argslist=None, configfile=None):

import common.traverse as traverse
try:
currentService = traverse.startService(vars(args))
currentService = traverse.rfService(vars(args))
except Exception as ex:
my_logger.log(logging.INFO-1, 'Exception caught while creating Service', exc_info=1)
my_logger.error("Service could not be started: {}".format(repr(ex)))
Expand Down
4 changes: 4 additions & 0 deletions RedfishServiceValidatorGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
"value": "False",
"description": "Whether to print debug to log"
},
"uricheck": {
"value": "False",
"description": "Whether to force urichecking if under RedfishVersion 1.6.0"
},
"schema_directory": {
"value": "./SchemaFiles/metadata",
"description": "Where schema is located/saved on system"
Expand Down
Loading