GithubHelp home page GithubHelp logo

isabella232 / redfish-mockup-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dmtf/redfish-mockup-server

0.0 0.0 0.0 242 KB

A simple Python 3.4 program that can be copied into a folder at the top of any Redfish mockup and can serve Redfish requests on the specified IP/port.

License: Other

Shell 1.51% Python 97.35% Dockerfile 1.14%

redfish-mockup-server's Introduction

Redfish Mockup Server

Copyright 2016-2020 DMTF. All rights reserved.

About

The Redfish Mockup Server serves Redfish requests against a Redfish mockup. The server runs at either a specified IP address and port or the default IP address and port, 127.0.0.1:8000.

You can find DMTF-published sample mockups at All Published Versions of DSP2043.

To create a mockup from a service, use the Redfish-Mockup-Creator.

Requirements

To run the mockup server 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

Redfish Mockup Server, version 1.1.4
usage: redfishMockupServer.py [-h] [-H HOST] [-p PORT] [-D DIR] [-E] [-X]
                              [-t TIME] [-T] [-s] [--cert CERT] [--key KEY]
                              [-S] [-P]

Serve a static Redfish mockup.

optional arguments:
  -h, --help            show this help message and exit
  -H HOST, --host HOST, --Host HOST
                        hostname or IP address (default 127.0.0.1)
  -p PORT, --port PORT, --Port PORT
                        host port (default 8000)
  -D DIR, --dir DIR, --Dir DIR
                        path to mockup dir (may be relative to CWD)
  -E, --test-etag, --TestEtag
                        (unimplemented) etag testing
  -X, --headers         load headers from headers.json files in mockup
  -t TIME, --time TIME  delay in seconds added to responses (float or int)
  -T                    delay response based on times in time.json files in
                        mockup
  -s, --ssl             place server in SSL (HTTPS) mode; requires a cert and
                        key
  --cert CERT           the certificate for SSL
  --key KEY             the key for SSL
  -S, --short-form, --shortForm
                        apply short form to mockup (omit filepath /redfish/v1)
  -P, --ssdp            make mockup SSDP discoverable

Description

The mockup server starts an HTTP server at the -H HOST host and -p PORT port. The mockup server provides Redfish resources in the -D DIR mockup directory.

If the mockup does not contain the representation of the /redfish resource, you must provide the --short-form argument. If you omit the mockup, the mockup server serves DMTF's public-rackmount1 mockup.

Native system example

python redfishMockupServer.py -D /home/user/redfish-mockup

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-server:latest
  • Build a container from local source:

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

    docker build -t dmtf/redfish-mockup-server:latest https://github.com/DMTF/Redfish-Mockup-Server.git

This command runs the container with the built-in public-rackmount1 mockup:

docker run --rm dmtf/redfish-mockup-server:latest

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

docker run --rm -v <path-to-mockup>:/mockup dmtf/redfish-mockup-server:latest -D /mockup

Release process

To publish a new version, run the release.sh script, where <new-version> is the new version number:

sh release.sh <new-version>

When prompted, type the release notes. To indicate the end of notes, enter an an empty line.

redfish-mockup-server's People

Contributors

bharadwaj-a avatar billdodd avatar drfleming0227 avatar flow86 avatar glimchb avatar jautor avatar mrabhiram avatar mraineri avatar nasimh avatar pwvancil avatar rite2hhh avatar robisonjoel avatar tomasg2012 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.