|
1 |
| -Copyright 2016 Distributed Management Task Force, Inc. All rights reserved. |
| 1 | +Copyright 2016-2018 Distributed Management Task Force, Inc. All rights reserved. |
| 2 | + |
2 | 3 | # Redfish Profile Simulator
|
| 4 | + |
3 | 5 | ## About
|
4 |
| -***Redfish Profile Simulator*** |
5 |
| -is a Python34 real simulator of the "simple monolithic server" feature profile. |
6 | 6 |
|
7 |
| - * A simple, minimal Redfish Service |
8 |
| - * For a monolithic Server |
9 |
| - * Aligned with: OCP Remote Machine Management Spec feature set |
| 7 | +***Redfish Profile Simulator*** is a Python34 real simulator of the "simple monolithic server" feature profile. |
| 8 | + |
| 9 | +* A simple, minimal Redfish Service |
| 10 | +* For a monolithic Server |
| 11 | +* Aligned with: OCP Remote Machine Management Spec feature set |
10 | 12 |
|
11 | 13 | ### Description
|
| 14 | + |
12 | 15 | * Based on flask
|
13 | 16 | * Initial resources are loaded from a catfish mockup into python dictionary structures
|
14 |
| - * After that, data is read/patched... to the dictionaries |
| 17 | + * After that, data is read/patched... to the dictionaries |
15 | 18 | * Supports BasicAuth, as well as Redfish Session Auth (for one session, one user)
|
16 | 19 | * Uses:
|
17 |
| - * easy to add new URIs for testing a client |
18 |
| - * easy to tweak behavior or add bad responses to test a client |
19 |
| - * allows testing of authentication -- which current mockup servers dont do |
20 |
| - * easy to insert print statements in service to see if data coming across good..etc |
| 20 | + * easy to add new URIs for testing a client |
| 21 | + * easy to tweak behavior or add bad responses to test a client |
| 22 | + * allows testing of authentication -- which current mockup servers dont do |
| 23 | + * easy to insert print statements in service to see if data coming across good..etc |
21 | 24 |
|
22 | 25 | ### Current Limitation:
|
23 |
| - * supports a single user/passwd and token |
24 |
| - * the user/passwd is: root/password123456 |
25 |
| - * The authToken for Session Auth is: 123456SESSIONauthcode |
26 |
| - * Supports only HTTP (not HTTPS) |
27 |
| - * with redfishtool, use options: redfishtool.py -r127.0.0.1:5000 -u root -p password123456 -S Never <subcmd> |
28 |
| - |
29 | 26 |
|
| 27 | +* supports a single user/passwd and token |
| 28 | +* the user/passwd is: root/password123456 |
| 29 | +* The authToken for Session Auth is: 123456SESSIONauthcode |
| 30 | +* Supports only HTTP (not HTTPS) |
| 31 | +* with redfishtool, use options: redfishtool.py -r127.0.0.1:5000 -u root -p password123456 -S Never <subcmd> |
30 | 32 |
|
31 | 33 | ## Usage
|
32 |
| -* ` python redfishProfileSimulatorMain.py [options]` |
33 | 34 |
|
| 35 | +* ` python redfishProfileSimulatorMain.py [options]` |
34 | 36 | * `[Options]`:
|
35 | 37 |
|
36 |
| - -V, --Version,--- the program version |
37 |
| - -h, --help, --- help |
38 |
| - -H<hostIP>, --Host=<hostIp> --- host IP address. dflt=127.0.0.1 |
39 |
| - -P<port>,--Port=<port> --- the port to use. dflt=5000 |
40 |
| - -p<profile_path>, --profile=<profile_path> --- the path to the Redfish profile to use. dflt="SimpleOcpServerV1" |
41 |
| - |
| 38 | + -V, --Version,--- the program version |
| 39 | + -h, --help, --- help |
| 40 | + -H<hostIP>, --Host=<hostIp> --- host IP address. dflt=127.0.0.1 |
| 41 | + -P<port>,--Port=<port> --- the port to use. dflt=5000 |
| 42 | + -p<profile_path>, --profile=<profile_path> --- the path to the Redfish profile to use. dflt="SimpleOcpServerV1" |
42 | 43 |
|
43 | 44 | ## Implementation
|
| 45 | + |
44 | 46 | * The simulation includes an http server, RestEngine, and dynamic Redfish datamodel.
|
45 | 47 | * You can GET, PATCH,... to the service just like a real Redfish service.
|
46 | 48 | * Both Basic and Redfish Session/Token authentication are supported
|
47 |
| - * for a single user/passwd and token |
48 |
| - * the user/passwd is: root/password123456 |
49 |
| - * The authToken for Session Auth is: 123456SESSIONauthcode |
50 |
| - * these can be changed by editing the redfishURSs.py file---will make dynamic later. |
| 49 | + * for a single user/passwd and token |
| 50 | + * the user/passwd is: root/password123456 |
| 51 | + * The authToken for Session Auth is: 123456SESSIONauthcode |
| 52 | + * these can be changed by editing the redfishURSs.py file---will make dynamic later. |
51 | 53 | * The http service and Rest engine is built on Flask, and all code is Python 3.4+
|
52 | 54 | * The data model resources are "initialized" from the SPMF "SimpleOcpServerV1" Mockup.
|
53 |
| - * and stored as python dictionaries |
54 |
| - * then the dictionaries are updated with patches, posts, deletes. |
| 55 | + * and stored as python dictionaries |
| 56 | + * then the dictionaries are updated with patches, posts, deletes. |
55 | 57 | * The program can be extended to support other mockup \"profiles\".
|
56 | 58 | * By default, the simulation runs on localhost (127.0.0.1), on port 5000.
|
57 |
| - * These can be changed with CLI options: -P<port> -H <hostIP> | --port=<port> --host=<hostIp> |
| 59 | + * These can be changed with CLI options: -P<port> -H <hostIP> | --port=<port> --host=<hostIp> |
58 | 60 |
|
59 | 61 | ## Simple OCP Server V1 Mockup Description
|
| 62 | + |
60 | 63 | * A Monolithic server:
|
61 |
| - * One ComputerSystem |
62 |
| - * One Chassis |
63 |
| - * One Manager |
| 64 | + * One ComputerSystem |
| 65 | + * One Chassis |
| 66 | + * One Manager |
64 | 67 |
|
65 | 68 | * Provides basic management features aligned with OCP Remote Machine Management Spec 1.01:
|
66 |
| - * Power-on/off/reset |
67 |
| - * Boot to PXE, HDD, BIOS setup (boot override) |
68 |
| - * 4 temp sensors per DCMI (CPU1, CPU2, Board, Inlet) |
69 |
| - * Simple Power Reading, and DCMI Power Limiting |
70 |
| - * Fan Monitoring w/ redundancy |
71 |
| - * Set asset tag and Indicator LED |
72 |
| - * Basic inventory (serial#, model, SKU, Vendor, BIOS ver…) |
73 |
| - * User Management |
74 |
| - * BMC management: get/set IP, version, enable/disable protocol |
| 69 | + * Power-on/off/reset |
| 70 | + * Boot to PXE, HDD, BIOS setup (boot override) |
| 71 | + * 4 temp sensors per DCMI (CPU1, CPU2, Board, Inlet) |
| 72 | + * Simple Power Reading, and DCMI Power Limiting |
| 73 | + * Fan Monitoring w/ redundancy |
| 74 | + * Set asset tag and Indicator LED |
| 75 | + * Basic inventory (serial#, model, SKU, Vendor, BIOS ver…) |
| 76 | + * User Management |
| 77 | + * BMC management: get/set IP, version, enable/disable protocol |
75 | 78 |
|
76 | 79 | * What it does NOT have -- that the Redfish 1.0 model supports
|
77 |
| - * No PSUs in model (RMM spec did not include PSUs) |
78 |
| - * No ProcessorInfo, MemoryInfo, StorageInfo, System-EthernetInterfaceInfo |
79 |
| - * No Tasks |
80 |
| - * JsonSchema and Registries collections left out (since that is optional) |
81 |
| - * No EventService--Remote Machine Management spec used basic PET alerts |
82 |
| - * Uses only the pre-defined privileges and roles |
83 |
| - |
| 80 | + * No PSUs in model (RMM spec did not include PSUs) |
| 81 | + * No ProcessorInfo, MemoryInfo, StorageInfo, System-EthernetInterfaceInfo |
| 82 | + * No Tasks |
| 83 | + * JsonSchema and Registries collections left out (since that is optional) |
| 84 | + * No EventService--Remote Machine Management spec used basic PET alerts |
| 85 | + * Uses only the pre-defined privileges and roles |
84 | 86 |
|
85 | 87 | ## TO DO
|
| 88 | + |
86 | 89 | Some limitations to be extended in current implementation
|
87 | 90 |
|
88 | 91 | * Auth supports a single hard-coded username, password, and AuthToken, although the protocol is 100% compliant with respect to testing clients trying to authenticate
|
89 |
| - * ex with basic auth, you have to use the hard coded user/password |
90 |
| - * ex with Session Auth, you just use the hard coded AuthToken |
| 92 | + * ex with basic auth, you have to use the hard coded user/password |
| 93 | + * ex with Session Auth, you just use the hard coded AuthToken |
91 | 94 | * adding and deleting users not implemented--has 3 or 4 users predefined
|
92 | 95 | * accountService properties can be written, but failed logins, lockouts, etc is not implemented
|
93 | 96 | * system log not implemented yet
|
94 |
| - |
95 |
| - |
96 |
| - |
97 |
| - |
98 |
| - |
99 |
| - |
100 |
| - |
101 |
| - |
102 |
| - |
0 commit comments