Dinesh Belwalkar | 6c0bc75 | 2020-04-24 23:47:53 +0000 | [diff] [blame^] | 1 | # Copyright 2018-present Open Networking Foundation |
| 2 | # Copyright 2018-present Edgecore Networks Corporation |
Scott Baker | bdb962b | 2020-04-03 10:53:36 -0700 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | # To generate mockup, run this inside container: |
| 17 | # cd /Redfish-Mockup-Creator && mkdir mockup && python ./redfishMockupCreate.py -v -r 10.90.0.114:8888 -A None -S -D /Redfish-Mockup-Creator/mockup && tar -czf olt-redfish-mockup.tar.gz mockup/redfish |
| 18 | |
| 19 | # Deployment example to deploy two mock OLTs: |
| 20 | # docker run -d -p 127.0.0.1:8401:8001 opencord/redfish-mockup-server:latest |
| 21 | # docker run -d -p 127.0.0.1:8402:8001 opencord/redfish-mockup-server:latest |
| 22 | |
| 23 | FROM python:3.5.9 |
| 24 | RUN git clone --depth=1 --branch 1.0.9 https://github.com/DMTF/Redfish-Mockup-Server.git |
| 25 | RUN git clone --depth=1 --branch 1.0.5 https://github.com/DMTF/Redfish-Mockup-Creator.git |
| 26 | |
| 27 | WORKDIR /Redfish-Mockup-Server |
| 28 | RUN pip install -r requirements.txt |
| 29 | |
| 30 | COPY mockup ./mockup |
| 31 | |
| 32 | RUN openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem -subj "/C=NL/ST=CA/L=Menlo/O=ONF/OU=Development/CN=redfish.mock.server" |
| 33 | |
| 34 | CMD python redfishMockupServer.py -H 0.0.0.0 -p 8001 -T -s --cert certificate.pem --key key.pem -D /Redfish-Mockup-Server/mockup |