From f5ade97581dd95530df6963ddee1bdfc630aaafd Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Fri, 25 May 2018 09:58:30 -0400 Subject: [PATCH] 0.9.6 Versioning --- AUTHORS.md | 5 -- CHANGELOG.md | 13 +++-- README.md | 116 ++++++++++++++++++------------------- redfishProfileSimulator.py | 2 +- 4 files changed, 65 insertions(+), 71 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index b4eb210..4204230 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,7 +1,2 @@ - # Original Contribution: * Paul Vancil - Dell Inc. -- Dell Extreme Scale Infrastructure (ESI) Architecture Team - - -# Other Key Contributions: - diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4d97e..6aac0c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,15 @@ - # Change Log +## [0.9.6] - 2018-05-25 +- Fixed setuptools config to install all necessary Python modules +- Enabled OpenBMC Static OBmcMonolythicPower8 +- Made simulator more generic to support other mockups +- Fixed several properties in the Computer System resource +- Fixed Content-Type header when returning XML + ## [0.9.2] - 2016-12-08 -- fix code to work with late change in mockup data. It was failing to load -- fixed incomplete code in systems.py modeling logs +- Fixex code to work with late change in mockup data. It was failing to load +- Fixed incomplete code in systems.py modeling logs ## [0.9.1] - 2016-09-06 - Initial Public Release -- diff --git a/README.md b/README.md index 79d2f9f..b026c03 100644 --- a/README.md +++ b/README.md @@ -1,102 +1,96 @@ -Copyright 2016 Distributed Management Task Force, Inc. All rights reserved. +Copyright 2016-2018 Distributed Management Task Force, Inc. All rights reserved. + # Redfish Profile Simulator + ## About -***Redfish Profile Simulator*** -is a Python34 real simulator of the "simple monolithic server" feature profile. - * A simple, minimal Redfish Service - * For a monolithic Server - * Aligned with: OCP Remote Machine Management Spec feature set +***Redfish Profile Simulator*** is a Python34 real simulator of the "simple monolithic server" feature profile. + +* A simple, minimal Redfish Service +* For a monolithic Server +* Aligned with: OCP Remote Machine Management Spec feature set ### Description + * Based on flask * Initial resources are loaded from a catfish mockup into python dictionary structures - * After that, data is read/patched... to the dictionaries + * After that, data is read/patched... to the dictionaries * Supports BasicAuth, as well as Redfish Session Auth (for one session, one user) * Uses: - * easy to add new URIs for testing a client - * easy to tweak behavior or add bad responses to test a client - * allows testing of authentication -- which current mockup servers dont do - * easy to insert print statements in service to see if data coming across good..etc + * easy to add new URIs for testing a client + * easy to tweak behavior or add bad responses to test a client + * allows testing of authentication -- which current mockup servers dont do + * easy to insert print statements in service to see if data coming across good..etc ### Current Limitation: - * supports a single user/passwd and token - * the user/passwd is: root/password123456 - * The authToken for Session Auth is: 123456SESSIONauthcode - * Supports only HTTP (not HTTPS) - * with redfishtool, use options: redfishtool.py -r127.0.0.1:5000 -u root -p password123456 -S Never - +* supports a single user/passwd and token +* the user/passwd is: root/password123456 +* The authToken for Session Auth is: 123456SESSIONauthcode +* Supports only HTTP (not HTTPS) +* with redfishtool, use options: redfishtool.py -r127.0.0.1:5000 -u root -p password123456 -S Never ## Usage -* ` python redfishProfileSimulatorMain.py [options]` +* ` python redfishProfileSimulatorMain.py [options]` * `[Options]`: - -V, --Version,--- the program version - -h, --help, --- help - -H, --Host= --- host IP address. dflt=127.0.0.1 - -P,--Port= --- the port to use. dflt=5000 - -p, --profile= --- the path to the Redfish profile to use. dflt="SimpleOcpServerV1" - + -V, --Version,--- the program version + -h, --help, --- help + -H, --Host= --- host IP address. dflt=127.0.0.1 + -P,--Port= --- the port to use. dflt=5000 + -p, --profile= --- the path to the Redfish profile to use. dflt="SimpleOcpServerV1" ## Implementation + * The simulation includes an http server, RestEngine, and dynamic Redfish datamodel. * You can GET, PATCH,... to the service just like a real Redfish service. * Both Basic and Redfish Session/Token authentication are supported - * for a single user/passwd and token - * the user/passwd is: root/password123456 - * The authToken for Session Auth is: 123456SESSIONauthcode - * these can be changed by editing the redfishURSs.py file---will make dynamic later. + * for a single user/passwd and token + * the user/passwd is: root/password123456 + * The authToken for Session Auth is: 123456SESSIONauthcode + * these can be changed by editing the redfishURSs.py file---will make dynamic later. * The http service and Rest engine is built on Flask, and all code is Python 3.4+ * The data model resources are "initialized" from the SPMF "SimpleOcpServerV1" Mockup. - * and stored as python dictionaries - * then the dictionaries are updated with patches, posts, deletes. + * and stored as python dictionaries + * then the dictionaries are updated with patches, posts, deletes. * The program can be extended to support other mockup \"profiles\". * By default, the simulation runs on localhost (127.0.0.1), on port 5000. - * These can be changed with CLI options: -P -H | --port= --host= + * These can be changed with CLI options: -P -H | --port= --host= ## Simple OCP Server V1 Mockup Description + * A Monolithic server: - * One ComputerSystem - * One Chassis - * One Manager + * One ComputerSystem + * One Chassis + * One Manager * Provides basic management features aligned with OCP Remote Machine Management Spec 1.01: - * Power-on/off/reset - * Boot to PXE, HDD, BIOS setup (boot override) - * 4 temp sensors per DCMI (CPU1, CPU2, Board, Inlet) - * Simple Power Reading, and DCMI Power Limiting - * Fan Monitoring w/ redundancy - * Set asset tag and Indicator LED - * Basic inventory (serial#, model, SKU, Vendor, BIOS ver…) - * User Management - * BMC management: get/set IP, version, enable/disable protocol + * Power-on/off/reset + * Boot to PXE, HDD, BIOS setup (boot override) + * 4 temp sensors per DCMI (CPU1, CPU2, Board, Inlet) + * Simple Power Reading, and DCMI Power Limiting + * Fan Monitoring w/ redundancy + * Set asset tag and Indicator LED + * Basic inventory (serial#, model, SKU, Vendor, BIOS ver…) + * User Management + * BMC management: get/set IP, version, enable/disable protocol * What it does NOT have -- that the Redfish 1.0 model supports - * No PSUs in model (RMM spec did not include PSUs) - * No ProcessorInfo, MemoryInfo, StorageInfo, System-EthernetInterfaceInfo - * No Tasks - * JsonSchema and Registries collections left out (since that is optional) - * No EventService--Remote Machine Management spec used basic PET alerts - * Uses only the pre-defined privileges and roles - + * No PSUs in model (RMM spec did not include PSUs) + * No ProcessorInfo, MemoryInfo, StorageInfo, System-EthernetInterfaceInfo + * No Tasks + * JsonSchema and Registries collections left out (since that is optional) + * No EventService--Remote Machine Management spec used basic PET alerts + * Uses only the pre-defined privileges and roles ## TO DO + Some limitations to be extended in current implementation * Auth supports a single hard-coded username, password, and AuthToken, although the protocol is 100% compliant with respect to testing clients trying to authenticate - * ex with basic auth, you have to use the hard coded user/password - * ex with Session Auth, you just use the hard coded AuthToken + * ex with basic auth, you have to use the hard coded user/password + * ex with Session Auth, you just use the hard coded AuthToken * adding and deleting users not implemented--has 3 or 4 users predefined * accountService properties can be written, but failed logins, lockouts, etc is not implemented * system log not implemented yet - - - - - - - - - diff --git a/redfishProfileSimulator.py b/redfishProfileSimulator.py index cb6a333..5193418 100644 --- a/redfishProfileSimulator.py +++ b/redfishProfileSimulator.py @@ -10,7 +10,7 @@ import getopt import os -rfVersion = "0.9.49" +rfVersion = "0.9.6" rfProgram1 = "redfishProfileSimulator" rfProgram2 = " " rfUsage1 = "[-Vh] [--Version][--help]"