Package: redfish-interop-validator
Copyright 2017-2020 DMTF. All rights reserved.Redfish Interop ValidatorAboutThe Redfish Interop Validator is a python3 tool that will validate a service based on an Interoperability profile given to the tool.  The purpose of the tool is to guarantee that a specific service is compatible with vendor systems or system tools based on a vendor's specification in a profile.IntroductionThis tool is designed to accept a profile conformant to the schematics specified by the DMTF Redfish Profile schema, and run against any valid Redfish service for a given device.  It is not biased to any specific hardware, only dependent on the current Redfish specification.InstallationFrom PyPI:pip install redfish_interop_validatorFrom GitHub:git clone https://github.com/DMTF/Redfish-Interop-Validator.git
cd Redfish-Interop-Validator
python setup.py sdist
pip install dist/redfish_interop_validator-x.x.x.tar.gzRequirementsExternal modules:beautifulsoup4  -https://pypi.python.org/pypi/beautifulsoup4requests  -https://github.com/kennethreitz/requests(Documentation is available athttp://docs.python-requests.org/)lxml -https://pypi.python.org/pypi/lxmljsonschema -https://pypi.org/project/jsonschemaYou may install the prerequisites by running:pip3 install -r requirements.txtIf you have a previous beautifulsoup4 installation, use the following command:pip3 install beautifulsoup4 --upgradeThere is no dependency based on Windows or Linux OS.
The result logs are generated in HTML format and an appropriate browser, such as Chrome, Firefox, or Edge, is required to view the logs on the client system.Execution StepsThe Redfish Interop Validator is designed to execute as a purely command line interface tool with no intermediate inputs expected during tool execution.  Below are the step by step instructions on setting up the tool for execution on any identified Redfish device for conformance test:Modify the config\example.ini file to enter the system details under below section[Tool]VariableTypeDefinitionVersionstringInternal config version (optional)CopyrightstringDMTFcopyright (optional)verboseintlevel of verbosity (0-3)[Interop]VariableTypeDefinitionProfilestringname of the testing profile (mandatory)Schemastringname of json schema to test profile against[Host]VariableTypeDefinitionipstringHost of testing system, formatted as https:// ip : port (can use http as well)usernamestringUsername for Basic authenticationpasswordstringPassword for Basic authentication (removed from logs)descriptionstringDescription of system being tested (optional)forceauthbooleanForce authentication even on http serversauthtypestringAuthorization type (BasictokenstringToken string for Token authentication[Validator]VariableTypeDefinitionpayloadstringOption to test a specific payload or resource tree (see below)logdirstringPlace to save logs and run configsoemcheckbooleanWhether to check Oem items on serviceonline_profilesbooleanWhether to download online profilesdebuggingbooleanWhether to print debug to logrequired_profiles_dirstringOption to set the root folder of required profilescollectionlimitstringSets a limit to links gathered from collections by type, e.g.ComputerSystem 20limits ComputerSystemCollection to 20 linksPayload optionsThe payload option takes two parameters as "option uri"(Single, SingleFile, Tree, TreeFile)
How to test the payload URI given.  Single tests will only give a report on a single resource, while Tree will report on every link from that resource([Filename], [uri])URI of the target payload, or filename of a local file.HTML LogTo convert a previous HTML log into a csv file, use the following command:python3 tohtml.py htmllogfileExecution flowRedfish Interop Validator starts with the Service root Resource Schema by querying the service with the service root URI and getting all the device information, the resources supported and their links. Once the response of the Service root query is verified against a given profile (given the profile contains specifications for ServiceRoot), the tool traverses through all the collections and Navigation properties returned by the service.For each navigation property/Collection of resource returned, it does following operations:
** i.	Reads all the Navigation/collection of resources.
** ii.	Queries the service with the individual resource uri and validates all Resource returned by the service that are included in the profile specified to the tool.Step 2 repeats till all the URIs and resources are covered.Upon validation of a resource, the following types of tests may occur:Unlikethe Service Validator, the program will not necessarily list and warn problematic Resources, it will expect those problems to be found with the Service Validator and are ignored in the process here.When a Resource is found, check if this resource exists in the Profile provided, otherwise ignore it and move on to the next available resources via its Links.With the Resource initiated, begin to validate itself and the Properties that exist in the Profile given to the program with the following possible tests:MinVersion - Test the @odata.type/version of the Resource which is being tested, which must be GREATER than the given MinVersion in the profileMinCount - Test based on the @odata.count annotation, determine the size of the a given Collection or List, which must be GREATER than this given MinCount in the profileReadRequirement - Test the existence of a Property or Resource, depending on whether it is Recommended or Mandatory (others unimplemented) in the profileMembers - Test a Resource's "Members" property, which includes MinCount testMinSupportedValues - Test the enumerations of a particular Property, based on the annotation @odata.SupportedValues and the given in the profileWriteable/WriteRequirement - Test if the Property is ReadWrite capable, depending on if it is required in the profileComparison - Test between an Enum Property's value and values in the Profile, with a particular set of comparisons available:AnyOf, AllOf = compare if any or all of the given values exist in a List or single EnumGreaterThan, LessThan, Equal, ... = compare based on common comparisons Less, Greater or EqualAbsent, Present =  compare if a property exist or does notConditionalRequirements - Perform some of the above tests above if one of the specified requirements are True:Subordinate - Test if this Resource is a child/link of the type tree listedComparison - Test if a Comparison is True to a certain valueActionRequirements - Perform tests based on what Actions require, such as ReadRequirement, AllowableValuesCheck whether a Property is at first able to be nulled or is mandatory, and pass based on its Requirement or NullabilityFor collections, validate each property inside of itself, and expects a list rather than a single Property, otherwise validate normally:Conformance Logs - Summary and Detailed Conformance ReportThe Redfish Interop Validator generates reports in the "logs" folder: a text version named "InteropLog_MM_DD_YYYY_HHMMSS.txt" and an html version named "InteropHtmlLog_MM_DD_YYYY_HHMMSS.html". The reports give the detailed view of the individual properties checked, with the Pass/Fail/Skip/Warning status for each resource checked for conformance.There is a verbose log file that may be referenced to diagnose tool problems when the stdout print out is insufficient, located in logs/ConformanceLog_MM_DD_YYYY_HHMMSS.htmlRelease ProcessGo to the "Actions" pageSelect the "Release and Publish" workflowClick "Run workflow"Fill out the formClick "Run workflow"