Skip to content

Commit

Permalink
Merge pull request #28 from DMTF/1.0.0-Tagging
Browse files Browse the repository at this point in the history
1.0.0 Tagging
  • Loading branch information
mraineri authored Feb 2, 2018
2 parents 2695371 + 1e856ec commit 3aafe9e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Original Contribution:
* Paul Vancil - Dell Inc. -- Dell Extreme Scale Infrastructure (ESI) Architecture Team

* Paul Vancil - Dell Inc. -- Dell Extreme Scale Infrastructure (ESI) Architecture Team

# Other Key Contributions:

* Joshua Giles - Dell Inc. -- Dell Extreme Scale Infrastructure (ESI)
* Abhiram Ampabathina - Dell Inc. -- Dell Extreme Scale Infrastructure (ESI) Software Developer
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

# Change Log

## [1.0.0] - 2018-02-02
- Added support for getting time statistics when collecting resources
- Added support for pulling the $metadata resource
- Added support for pulling the JSON Schema repository
- Added support for pulling OEM resources
- Fixed @odata.type parsing to include support for no versioning

## [0.9.3] - 2017-06-05
- Cleaning help options
- Create directory if specified by "-D" if it is not empty
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
Copyright 2016 Distributed Management Task Force, Inc. All rights reserved.
Copyright 2016-2018 Distributed Management Task Force, Inc. All rights reserved.

# redfishMockupCreator

## About

***redfishMockupCreator*** is a python34 program that creates a redfish Mockup folder structure from a real live Redfish service. This folder structure can then be mounted under the Redfish-Mockup-Server tool.

The program executes Redfish GET requests to the Redfish service and saves the response in a directory structure like what is used for all Redfish mockups.

As a result, it is a way to take a snapshot of a system

## Usage

* copy the redfishMockupCreate.py file and /redfishtoollib folder (with 2 files) into a folder and execute with Python3.4 or later.
* Note that this program uses the redfishtool transport and serviceRoot API routines which are in the /redfishtoollib folder

* Note that this program uses the redfishtool transport and serviceRoot API routines which are in the /redfishtoollib folder

### Options

```
redfishMockupCreate [-VhvqS] -u<user> -p<passwd> -r<rpath> [-A<auth>] [-D<directoryPath>] -d [<descriptionString>]
-V, --version -- show redfishMockupCreate version, and exit
Expand All @@ -36,23 +38,28 @@ As a result, it is a way to take a snapshot of a system
```

## Python Requirement

**The `requests` package is required.**

- On Windows, navigate to your Python folder via CMD.

`cd C:\Python36\`
`cd C:\Python36\`

- run the command line

`python -m pip install requests`

## Example

### Create a directory that is the name of the mockup you are creating

* fyi-mockup-creator wont create the directory, if the dir doesn’t exist, it exits with error
* fyi-also, it won’t over-write the data in an existing directory--if you want to re-run and store the mockup in the same directory, you have to remove all of the files under the dir so make the directory under mymockups

`cd $HOME/mymockups && mkdir C6320mockup9`

### Now run the creator

* Assuming you downloaded the Redfish-Mockup-Creator to $HOME/redfishtools/Redfish-Mockup-Creator

`cd $HOME/redfishtools/Redfish-Mockup-Creator`
Expand All @@ -61,8 +68,8 @@ As a result, it is a way to take a snapshot of a system
* Set the IP address of the Redfish server you are going to get the mockup from
* MYC6320IP=129.168.0.9 #ex

`python3.4 ./redfishMockupCreate.py r $MYC6320IP u root p calvin –S –A Basic –D “$HOME/mymockups/C6320mockup9 \
-d this is my mockup of a real C6320 in rack33" -C "Copyright 2016 Contoso.com Inc. All rights reserved."`
`python3.4 ./redfishMockupCreate.py -r $MYC6320IP -u root -p calvin -S -A Basic -D "$HOME/mymockups/C6320mockup9" \
-d "this is my mockup of a real C6320 in rack33" -C "Copyright 2016 Contoso.com Inc. All rights reserved."`

-r <ip> is the ip address of the server you are pulling the mockup from
-u, -p is user/password
Expand All @@ -72,9 +79,7 @@ As a result, it is a way to take a snapshot of a system
-d <descriptionString> is a short description you can add that it appends to the READ file at the top of the mockup.`

## Notes
* Since a real redfish service can implement any URI it wants (they don't have to start with /redfish/v1), this creates a "tall mockup". That is, it starts creating a directory structure with everything below the IP address of the remote service---it therefore includes /redfish/v1 in the directory structure.

* Initial version: 0.9.1 provides mockup tree based on redfish 1.0 schemas.
Some new resources that were added after 1.0 are not included (eg .../Systems/<sysId>/Memory)
* This version does not walk the SPMF schema to find navigation links, but uses a couple of simple structures at the top of the program. We will add additional navigation properties (eg Memory, Drives,...) in next release.

* Since a real redfish service can implement any URI it wants (they don't have to start with /redfish/v1), this creates a "tall mockup". That is, it starts creating a directory structure with everything below the IP address of the remote service---it therefore includes /redfish/v1 in the directory structure.
* Initial version: 0.9.1 provides mockup tree based on redfish 1.0 schemas. Some new resources that were added after 1.0 are not included (eg .../Systems/<sysId>/Memory)
* This version does not walk the SPMF schema to find navigation links, but uses a couple of simple structures at the top of the program. We will add additional navigation properties (eg Memory, Drives,...) in next release.
6 changes: 3 additions & 3 deletions redfishMockupCreate.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2016 Distributed Management Task Force, Inc. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Mockup-Creator/LICENSE.md

# redfishMockupCreate: ver 0.9.1
# redfishMockupCreate
#
# contains:
#
Expand Down Expand Up @@ -160,8 +160,8 @@ def main(argv):
# set default verbose level to 1. so -v will cause verbose level to go to 2
rft.verbose=1
rft.program="redfishMockupCreate"
rft.version="0.9.3"
rft.releaseDate="05/28/2017"
rft.version="1.0.0"
rft.releaseDate="02/02/2018"
rft.secure="Never"
rft.waitTime=5
rft.timeout=20
Expand Down

0 comments on commit 3aafe9e

Please sign in to comment.