diff --git a/README.rst b/README.rst index 318363b..c8e07b3 100644 --- a/README.rst +++ b/README.rst @@ -3,13 +3,13 @@ python-redfish This repository will be used to house the Redfish python library, a reference implementation to enable Python developers to communicate with the Redfish API -(http://www.redfishspecification.org/). +(http://www.dmtf.org/standards/redfish). NOTE:: DRAFT - WORK IN PROGRESS - The current Redfish specification revsion is 0.91 - anything and everything + The current Redfish specification revision is 0.96.0a - anything and everything in this library is subject to change until the DMTF ratifies the Redfish API standard v1.0. diff --git a/dmtf/DSP0266_0.96.0a.pdf b/dmtf/DSP0266_0.96.0a.pdf new file mode 100644 index 0000000..18dba70 Binary files /dev/null and b/dmtf/DSP0266_0.96.0a.pdf differ diff --git a/dmtf/DSP2043_0.96.0a.zip b/dmtf/DSP2043_0.96.0a.zip new file mode 100644 index 0000000..3c4eeba Binary files /dev/null and b/dmtf/DSP2043_0.96.0a.zip differ diff --git a/dmtf/DSP8010_0.96.0a.zip b/dmtf/DSP8010_0.96.0a.zip new file mode 100644 index 0000000..e721df1 Binary files /dev/null and b/dmtf/DSP8010_0.96.0a.zip differ diff --git a/dmtf/Dockerfile b/dmtf/Dockerfile new file mode 100644 index 0000000..1017721 --- /dev/null +++ b/dmtf/Dockerfile @@ -0,0 +1,13 @@ +# Invoke with docker run -p 8000:80 +# Then use by browsing http://localhost:8000 +FROM ubuntu:15.04 +MAINTAINER bruno.cornec@hp.com +ENV DEBIAN_FRONTEND noninterative +# Install deps for Redfish mockup +RUN apt-get update +RUN apt-get -y install apache2 unzip sed +EXPOSE 80 +COPY redfish-setup.sh /tmp/redfish-setup.sh +COPY DSP2043_0.96.0a.zip /tmp/DSP2043_0.96.0a.zip +RUN chmod 755 /tmp/redfish-setup.sh +CMD /tmp/redfish-setup.sh diff --git a/dmtf/buildImage.sh b/dmtf/buildImage.sh new file mode 100755 index 0000000..896e79a --- /dev/null +++ b/dmtf/buildImage.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Build and tag images +docker build -t "redfish-simulator" . +docker tag redfish-simulator:latest localhost:5000/redfish-simulator diff --git a/dmtf/redfish-setup.sh b/dmtf/redfish-setup.sh new file mode 100644 index 0000000..cd23c68 --- /dev/null +++ b/dmtf/redfish-setup.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +function start_apache { + echo "Launching apache2 in foreground with /usr/sbin/apache2ctl -DFOREGROUND -k start" + /usr/sbin/apache2ctl -DFOREGROUND -k start +} + +function stop_apache { + echo "Stopping apache2" + /usr/sbin/apache2ctl stop +} + +# Trap to have a clean exit +trap stop_apache HUP INT QUIT KILL TERM + + +# Main +cd /var/www/html +unzip -q -o /tmp/DSP2043_0.96.0a.zip +mkdir -p redfish +cd redfish +ln -sf .. v1 +cd .. +ip a +#sed -i -e 's/Listen 80/Listen 8000/' /etc/apache2/ports.conf +start_apache diff --git a/dmtf/run-redfish-simulator.sh b/dmtf/run-redfish-simulator.sh new file mode 100755 index 0000000..0e0764f --- /dev/null +++ b/dmtf/run-redfish-simulator.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Th -p option needs to be after the run command. No warning is given if before but doesn't work +docker run -d -p 8000:80 --name "redfish-simulator" localhost:5000/redfish-simulator