Skip to content

Commit

Permalink
Merge pull request #594 from DMTF/mockup-readme
Browse files Browse the repository at this point in the history
Added text for `mockup` option usage
  • Loading branch information
mraineri authored Jul 19, 2024
2 parents 91f4f4f + 92689ea commit 744fb36
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ At a minimum, the `ip`, `username`, and `password` options must be modified.
| `uricheck` | `--uricheck` | boolean | Allow URI checking on services below RedfishVersion 1.6.0; 'True' or 'False'. |
| `debugging` | `--debugging` | boolean | Output debug statements to text log, otherwise it only uses INFO; 'True' or 'False'. |
| `schema_directory` | `--schema_directory` | string | Directory for local schema files. |
| `mockup` | `--mockup` | string | Enables insertion of local mockup resources to replace missing, incomplete, or incorrect implementations retrieved from the service that may hinder full validation coverage. |
| `mockup` | `--mockup` | string | Directory tree for local mockup files. This option enables insertion of local mockup resources to replace missing, incomplete, or incorrect implementations retrieved from the service that may hinder full validation coverage. |
| `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 Option
Expand All @@ -101,6 +101,16 @@ The second parameter specifies a URI of the target payload to test or a filename

For example, `--payload Single /redfish/v1/AccountService` will perform validation of the URI `/redfish/v1/AccountService` and no other resources.

### Mockup Option

The `mockup` option takes a single parameter as a string. The parameter specifies a local directory path to the `ServiceRoot` resource of a Redfish mockup tree.

This option provides a powerful debugging tool as is allows local "mockup" JSON payloads to replace those retreived from the unit under test. This can aid testers by allowing the tool to skip over problematic resources, which may cause the tool to crash, or more likely, miss portions of the implemented resources due to missing or invalid link properties or values.

The mockup files follow the Redfish mockup style, with the directory tree matching the URI segments under /redfish/v1, and with a single `index.json` file in each subdirectory as desired. For examples of full mockups, see the Redfish Mockup Bundle (DSP2043) at https://www.dmtf.org/sites/default/files/standards/documents/DSP2043_2024.1.zip.

Populate the mockup directory tree with `index.json` files wherever problematic resources need to be replaced. Any replaced resource will report a Warning in the report to indicate a workaround was used.

## Execution Flow

1. The Redfish Service Validator starts by querying the service root resource from the target service and collections information about the service.
Expand Down

0 comments on commit 744fb36

Please sign in to comment.