Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

Redfish Mockup Creator

Copyright 2016-2020 DMTF. All rights reserved.


The Redfish Mockup Creator is a tool that creates a Redfish mockup from a live Redfish service. The mockup created can be used with the Redfish Mockup Server.


To run the mockup creator natively on your system:

  • Install Python 3 and pip.
  • Install required Python packages: pip install -r requirements.txt

To run the mockup server as a Docker container:


usage: [-h] --user USER --password PASSWORD --rhost
                              RHOST [--Secure] [--Auth {None,Basic,Session}]
                              [--Headers] [--Time] [--Dir DIR]
                              [--Copyright COPYRIGHT]
                              [--description DESCRIPTION] [--quiet]

A tool to walk a Redfish service and create a mockup from all resources

required arguments:
  --user USER, -u USER  The user name for authentication
  --password PASSWORD, -p PASSWORD
                        The password for authentication
  --rhost RHOST, -r RHOST
                        The IP address (and port) of the Redfish service

optional arguments:
  -h, --help            show this help message and exit
  --Dir DIR, -D DIR     Output directory for the mockup; defaults to
  --Secure, -S          Use HTTPS for all operations
  --Auth {None,Basic,Session}, -A {None,Basic,Session}
                        Authentication mode
  --Headers, -H         Captures the response headers in the mockup
  --Time, -T            Capture the time of each GET in the mockup
                        Copyright string to add to each resource
                        Mockup description to add to the output readme file
  --quiet, -q           Quiet mode; progress messages suppressed
  --trace, -trace       Enable tracing; creates the file rf-mockup-create.log
                        in the output directory to capture Redfish traces with
                        the service
  --maxlogentries MAXLOGENTRIES, -maxlogentries MAXLOGENTRIES
                        The maximum number of log entries to collect in each
                        log service

Example: python -u root -p root -r -S -D /output

The tool will log into the service specified by the rhost argument using the credentials provided by the user and password arguments. It will then walk the service to find all resources and place each resource in directory specified by the Dir argument. If Dir is not specified, the output will be "rfMockUpDfltDir". For every resource found, it will create an "index.json" file in the output directory. If the Headers argument is specified, it will save the response headers for each resource in a "headers.json" file. If the Time argument is specified, it will save the time elapsed for each resource in a "time.json" file.

Docker container example

To run as a Docker container, use one of these actions to pull or build the container:

  • Pull the container from Docker Hub:

    docker pull dmtf/redfish-mockup-creator:latest
  • Build a container from local source:

    docker build -t dmtf/redfish-mockup-creator:latest .
  • Build a container from GitHub:

    docker build -t dmtf/redfish-mockup-creator:latest

This command runs the container with a specified mockup, where <path-to-mockup> is the path to the mockup directory:

docker run --rm --user="$(id -u):$(id -g)" -v <path-to-mockup>:/mockup dmtf/redfish-mockup-creator:latest -u root -p root -r -S

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"


A Python3 program that creates a Redfish Mockup folder structure from a real live Redfish service.








No packages published