redfish-interop-validator


Nameredfish-interop-validator JSON
Version 2.2.7 PyPI version JSON
download
home_pagehttps://github.com/DMTF/Redfish-Interop-Validator
SummaryRedfish Interop Validator
upload_time2024-11-15 20:12:44
maintainerNone
docs_urlNone
authorDMTF, https://www.dmtf.org/standards/feedback
requires_pythonNone
licenseBSD 3-clause "New" or "Revised License"
keywords redfish
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Copyright 2017-2024 DMTF. All rights reserved.

# Redfish Interop Validator

## About

The 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.

## Introduction

This 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.

## Installation

From PyPI:

    pip install redfish_interop_validator

From 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.gz

## Requirements

External modules:

* beautifulsoup4  - https://pypi.python.org/pypi/beautifulsoup4
* requests  - https://github.com/kennethreitz/requests (Documentation is available at http://docs.python-requests.org/)
* lxml - https://pypi.python.org/pypi/lxml
* jsonschema - https://pypi.org/project/jsonschema

You may install the prerequisites by running:

    pip3 install -r requirements.txt

If you have a previous beautifulsoup4 installation, use the following command:

    pip3 install beautifulsoup4 --upgrade

There 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 Steps

The 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]

| Variable   | CLI Argument  | Type    | Definition |
| :---       | :---          | :---    | :---       |
| `verbose`  | `-v`          | integer | Verbosity of tool in stdout; 0 to 3, 3 being the greatest level of verbosity. |

### [Interop]

Note: These arguments are only supplied via the CLI to the tool and are not specified in the configuration file.

| CLI Argument  | Type   | Definition |
| :---          | :---   | :---       |
| `profile`     | string | The name of the testing profile (mandatory). |
| `--schema`    | string | The filepath and name of the schema file to verify the format of the profile. |

### [Host]

| Variable           | CLI Argument         | Type    | Definition |
| :---               | :---                 | :---    | :---       |
| `ip`               | `-r`                 | string  | The address of the Redfish service (with scheme); example: 'https://123.45.6.7:8000'. |
| `username`         | `-u`                 | string  | The username for authentication. |
| `password`         | `-p`                 | string  | The password for authentication. |
| `description`      | `--description`      | string  | The description of the system for identifying logs; if none is given, a value is produced from information in the service root. |
| `forceauth`        | `--forceauth`        | boolean | Force authentication on unsecure connections; 'True' or 'False'. |
| `authtype`         | `--authtype`         | string  | Authorization type; 'None', 'Basic', 'Session', or 'Token'. |
| `token`            | `--token`            | string  | Token when 'authtype' is 'Token'. |

### [Validator]

| Variable                | CLI Argument              | Type    | Definition |
| :---                    | :---                      | :---    | :---       |
| `payload`               | `--payload`               | string  | The mode to validate payloads ('Tree', 'Single', 'SingleFile', or 'TreeFile') followed by resource/filepath; see below. |
| `logdir`                | `--logdir`                | string  | The directory for generated report files; default: 'logs'. |
| `oemcheck`              | `--nooemcheck`            | boolean | Whether to check OEM items on service; 'True' or 'False'. |
| `online_profiles`       | `--no_online_profiles`    | boolean | Whether to download online profiles; 'True' or 'False'. |
| `debugging`             | `--debugging`             | boolean | Output debug statements to text log, otherwise it only uses INFO; 'True' or 'False'. |
| `required_profiles_dir` | `--required_profiles_dir` | string  | Option to set the root folder of required profiles |
| `collectionlimit`       | `--collectionlimit`       | string  | Sets a limit to links gathered from collections by type (schema name).<br/>Example 1: `ComputerSystem 20` limits ComputerSystemCollection to 20 links.<br/>Example 2: `ComputerSystem 20 LogEntry 10` limits ComputerSystemCollection to 20 links and LogEntryCollection to 10 links. |

### Payload options

The 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 Log

To convert a previous HTML log into a csv file, use the following command:

`python3 tohtml.py htmllogfile`

## Execution flow

* 1.	Redfish 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.
* 2.	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.
* 3.	Step 2 repeats till all the URIs and resources are covered.

Upon validation of a resource, the following types of tests may occur:

* **Unlike** the 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 profile
  * MinCount - 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 profile
  * ReadRequirement - Test the existence of a Property or Resource, depending on whether it is Recommended or Mandatory (others unimplemented) in the profile
  * Members - Test a Resource's "Members" property, which includes MinCount test
  * MinSupportedValues - Test the enumerations of a particular Property, based on the annotation @odata.SupportedValues and the given in the profile
  * Writeable/WriteRequirement - Test if the Property is ReadWrite capable, depending on if it is required in the profile
  * Comparison - 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 Enum
    * GreaterThan, LessThan, Equal, ... = compare based on common comparisons Less, Greater or Equal
    * Absent, Present =  compare if a property exist or does not
  * ConditionalRequirements - 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 listed 
    * Comparison - Test if a Comparison is True to a certain value
  * ActionRequirements - Perform tests based on what Actions require, such as ReadRequirement, AllowableValues
  * Check whether a Property is at first able to be nulled or is mandatory, and pass based on its Requirement or Nullability
  * For 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 Report

The 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.html

## Release Process

1. Go to the "Actions" page
2. Select the "Release and Publish" workflow
3. Click "Run workflow"
4. Fill out the form
5. Click "Run workflow"

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DMTF/Redfish-Interop-Validator",
    "name": "redfish-interop-validator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Redfish",
    "author": "DMTF, https://www.dmtf.org/standards/feedback",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/76/29/e0c2703c54901ab31c0594aac12641fc994038d386af566b4a998e265c46/redfish_interop_validator-2.2.7.tar.gz",
    "platform": null,
    "description": "Copyright 2017-2024 DMTF. All rights reserved.\n\n# Redfish Interop Validator\n\n## About\n\nThe 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.\n\n## Introduction\n\nThis 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.\n\n## Installation\n\nFrom PyPI:\n\n    pip install redfish_interop_validator\n\nFrom GitHub:\n\n    git clone https://github.com/DMTF/Redfish-Interop-Validator.git\n    cd Redfish-Interop-Validator\n    python setup.py sdist\n    pip install dist/redfish_interop_validator-x.x.x.tar.gz\n\n## Requirements\n\nExternal modules:\n\n* beautifulsoup4  - https://pypi.python.org/pypi/beautifulsoup4\n* requests  - https://github.com/kennethreitz/requests (Documentation is available at http://docs.python-requests.org/)\n* lxml - https://pypi.python.org/pypi/lxml\n* jsonschema - https://pypi.org/project/jsonschema\n\nYou may install the prerequisites by running:\n\n    pip3 install -r requirements.txt\n\nIf you have a previous beautifulsoup4 installation, use the following command:\n\n    pip3 install beautifulsoup4 --upgrade\n\nThere is no dependency based on Windows or Linux OS.\nThe 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.\n\n## Execution Steps\n\nThe 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:\n\nModify the config\\example.ini file to enter the system details under below section\n\n### [Tool]\n\n| Variable   | CLI Argument  | Type    | Definition |\n| :---       | :---          | :---    | :---       |\n| `verbose`  | `-v`          | integer | Verbosity of tool in stdout; 0 to 3, 3 being the greatest level of verbosity. |\n\n### [Interop]\n\nNote: These arguments are only supplied via the CLI to the tool and are not specified in the configuration file.\n\n| CLI Argument  | Type   | Definition |\n| :---          | :---   | :---       |\n| `profile`     | string | The name of the testing profile (mandatory). |\n| `--schema`    | string | The filepath and name of the schema file to verify the format of the profile. |\n\n### [Host]\n\n| Variable           | CLI Argument         | Type    | Definition |\n| :---               | :---                 | :---    | :---       |\n| `ip`               | `-r`                 | string  | The address of the Redfish service (with scheme); example: 'https://123.45.6.7:8000'. |\n| `username`         | `-u`                 | string  | The username for authentication. |\n| `password`         | `-p`                 | string  | The password for authentication. |\n| `description`      | `--description`      | string  | The description of the system for identifying logs; if none is given, a value is produced from information in the service root. |\n| `forceauth`        | `--forceauth`        | boolean | Force authentication on unsecure connections; 'True' or 'False'. |\n| `authtype`         | `--authtype`         | string  | Authorization type; 'None', 'Basic', 'Session', or 'Token'. |\n| `token`            | `--token`            | string  | Token when 'authtype' is 'Token'. |\n\n### [Validator]\n\n| Variable                | CLI Argument              | Type    | Definition |\n| :---                    | :---                      | :---    | :---       |\n| `payload`               | `--payload`               | string  | The mode to validate payloads ('Tree', 'Single', 'SingleFile', or 'TreeFile') followed by resource/filepath; see below. |\n| `logdir`                | `--logdir`                | string  | The directory for generated report files; default: 'logs'. |\n| `oemcheck`              | `--nooemcheck`            | boolean | Whether to check OEM items on service; 'True' or 'False'. |\n| `online_profiles`       | `--no_online_profiles`    | boolean | Whether to download online profiles; 'True' or 'False'. |\n| `debugging`             | `--debugging`             | boolean | Output debug statements to text log, otherwise it only uses INFO; 'True' or 'False'. |\n| `required_profiles_dir` | `--required_profiles_dir` | string  | Option to set the root folder of required profiles |\n| `collectionlimit`       | `--collectionlimit`       | string  | Sets a limit to links gathered from collections by type (schema name).<br/>Example 1: `ComputerSystem 20` limits ComputerSystemCollection to 20 links.<br/>Example 2: `ComputerSystem 20 LogEntry 10` limits ComputerSystemCollection to 20 links and LogEntryCollection to 10 links. |\n\n### Payload options\n\nThe payload option takes two parameters as \"option uri\"\n\n(Single, SingleFile, Tree, TreeFile)\nHow 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\n\n([Filename], [uri])\n\nURI of the target payload, or filename of a local file.\n\n### HTML Log\n\nTo convert a previous HTML log into a csv file, use the following command:\n\n`python3 tohtml.py htmllogfile`\n\n## Execution flow\n\n* 1.\tRedfish 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.\n* 2.\tFor each navigation property/Collection of resource returned, it does following operations:\n** i.\tReads all the Navigation/collection of resources.\n** ii.\tQueries 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.\n* 3.\tStep 2 repeats till all the URIs and resources are covered.\n\nUpon validation of a resource, the following types of tests may occur:\n\n* **Unlike** the 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.\n* 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.\n* 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:\n  * MinVersion - Test the @odata.type/version of the Resource which is being tested, which must be GREATER than the given MinVersion in the profile\n  * MinCount - 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 profile\n  * ReadRequirement - Test the existence of a Property or Resource, depending on whether it is Recommended or Mandatory (others unimplemented) in the profile\n  * Members - Test a Resource's \"Members\" property, which includes MinCount test\n  * MinSupportedValues - Test the enumerations of a particular Property, based on the annotation @odata.SupportedValues and the given in the profile\n  * Writeable/WriteRequirement - Test if the Property is ReadWrite capable, depending on if it is required in the profile\n  * Comparison - Test between an Enum Property's value and values in the Profile, with a particular set of comparisons available:\n    * AnyOf, AllOf = compare if any or all of the given values exist in a List or single Enum\n    * GreaterThan, LessThan, Equal, ... = compare based on common comparisons Less, Greater or Equal\n    * Absent, Present =  compare if a property exist or does not\n  * ConditionalRequirements - Perform some of the above tests above if one of the specified requirements are True:\n    * Subordinate - Test if this Resource is a child/link of the type tree listed \n    * Comparison - Test if a Comparison is True to a certain value\n  * ActionRequirements - Perform tests based on what Actions require, such as ReadRequirement, AllowableValues\n  * Check whether a Property is at first able to be nulled or is mandatory, and pass based on its Requirement or Nullability\n  * For collections, validate each property inside of itself, and expects a list rather than a single Property, otherwise validate normally:\n \n## Conformance Logs - Summary and Detailed Conformance Report\n\nThe 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.\n\nThere 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.html\n\n## Release Process\n\n1. Go to the \"Actions\" page\n2. Select the \"Release and Publish\" workflow\n3. Click \"Run workflow\"\n4. Fill out the form\n5. Click \"Run workflow\"\n",
    "bugtrack_url": null,
    "license": "BSD 3-clause \"New\" or \"Revised License\"",
    "summary": "Redfish Interop Validator",
    "version": "2.2.7",
    "project_urls": {
        "Homepage": "https://github.com/DMTF/Redfish-Interop-Validator"
    },
    "split_keywords": [
        "redfish"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbaa7c2388c05840bac4f6eabcc51ffed4872686e1d50b968cd57e4a02287232",
                "md5": "ef8411c5a2e00738fe6e1f893b4fc481",
                "sha256": "cb315a077ed518d24484145a015149adec6fb1d5c2ce6bae6582d04d645133e8"
            },
            "downloads": -1,
            "filename": "redfish_interop_validator-2.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef8411c5a2e00738fe6e1f893b4fc481",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 62339,
            "upload_time": "2024-11-15T20:12:42",
            "upload_time_iso_8601": "2024-11-15T20:12:42.279608Z",
            "url": "https://files.pythonhosted.org/packages/fb/aa/7c2388c05840bac4f6eabcc51ffed4872686e1d50b968cd57e4a02287232/redfish_interop_validator-2.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7629e0c2703c54901ab31c0594aac12641fc994038d386af566b4a998e265c46",
                "md5": "d7647711ab2940cd8a0051263468491a",
                "sha256": "0d2bbf6a9ce12dd44ed2a5136bb4850d8f260aba96d41ea88754d7ef1e828139"
            },
            "downloads": -1,
            "filename": "redfish_interop_validator-2.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "d7647711ab2940cd8a0051263468491a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 62028,
            "upload_time": "2024-11-15T20:12:44",
            "upload_time_iso_8601": "2024-11-15T20:12:44.084173Z",
            "url": "https://files.pythonhosted.org/packages/76/29/e0c2703c54901ab31c0594aac12641fc994038d386af566b4a998e265c46/redfish_interop_validator-2.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 20:12:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DMTF",
    "github_project": "Redfish-Interop-Validator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "redfish-interop-validator"
}
        
Elapsed time: 0.66917s