libffi \
libffi-dev \
make \
- openssl-dev
+ openssl-dev \
+ wget
# Build binaries
WORKDIR /wheels
RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
+RUN wget -qO- https://github.com/DMTF/Redfish-Test-Framework/archive/master.zip | \
+ unzip -qd /opt/akraino -
+RUN wget -qO- https://github.com/DMTF/Redfish-Usecase-Checkers/archive/master.zip | \
+ unzip -qd /opt/akraino -
+
# Copy binaries in the final contaier and install robot framework
FROM python:3.6-alpine3.9
COPY --from=build /wheels /wheels
COPY --from=build /opt/akraino/validation /opt/akraino/validation
+COPY --from=build /opt/akraino/Redfish-Test-Framework-master /opt/akraino/Redfish-Test-Framework
+COPY --from=build /opt/akraino/Redfish-Usecase-Checkers-master /opt/akraino/Redfish-Usecase-Checkers
RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
-f /wheels && \
# Install blueval dependencies
RUN pip install -r /opt/akraino/validation/bluval/requirements.txt
+# Install Redfish dependencies
+RUN pip install html-testRunner \
+ -r /opt/akraino/Redfish-Usecase-Checkers/requirements.txt
+
# Install curl
RUN apk --no-cache add --update \
curl
robotframework
robotframework-httplibrary
+robotframework-jsonlibrary
robotframework-requests
robotframework-sshlibrary
--- /dev/null
+##############################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you maynot use this file except in compliance with the License. #
+# #
+# You may obtain a copy of the License at #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+##############################################################################
+
+
+*** Settings ***
+Library JSONLibrary
+Library OperatingSystem
+Library Process
+
+
+*** Variables ***
+${REPORTDIR} ${LOG_PATH}/${SUITE_NAME.replace(' ','_')}
+${REDFISHDIR} ${TEMPDIR}/Redfish
+
+
+*** Keywords ***
+Update Config File
+ ${conf}= Load JSON From File ${REDFISHDIR}/framework_conf.json
+ ${conf}= Update Value To Json ${conf} $.password ${BMC_PASSWORD}
+ ${conf}= Convert JSON To String ${conf}
+ Create File ${REDFISHDIR}/framework_conf.json ${conf}
+
+Run Suite Against Target Node
+ [Arguments] ${ip}
+ ${result}= Run Process python test_framework.py
+ ... --directory ${REDFISHDIR}
+ ... --rhost ${ip}
+ ... --user ${BMC_USER}
+ ... --interpreter python
+ ... --secure Always
+ ... cwd=${REDFISHDIR}
+ Copy Files ${REDFISHDIR}/reports/output-*/results*.json ${REPORTDIR}/${ip}
+ Copy Files ${REDFISHDIR}/output-*/*.html ${REPORTDIR}/${ip}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Not Contain ${result.stderr} FAILED${\n} (Failures=
+
+Run Usecase Checkers Suite
+ FOR ${ip} IN @{BMC_IP}
+ Copy Directory /opt/akraino/Redfish-Test-Framework ${REDFISHDIR}
+ Copy Directory /opt/akraino/Redfish-Usecase-Checkers ${REDFISHDIR}/Redfish-Usecase-Checkers
+ Create Directory ${REDFISHDIR}/reports
+ Update Config File
+ Run Suite Against Target Node ${ip}
+ Remove Directory ${REDFISHDIR} recursive=True
+ END
--- /dev/null
+##############################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you maynot use this file except in compliance with the License. #
+# #
+# You may obtain a copy of the License at #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+##############################################################################
+
+
+*** Settings ***
+Documentation Redfish Test Framework is a tool and a model for organizing
+... and running a set of Redfish interoperability test
+Resource redfish.resource
+
+
+*** Test Cases ***
+Validate Common Use Cases
+ Run Usecase Checkers Suite
biosver: bios_version # host bios version
firmware: firmware_version # host firmware
+### Input variables for Redfish test
+bmc_ip: # bmc address list
+ - 192.168.10.10
+ - 192.168.10.11
+bmc_user: admin # username
+bmc_password: Password#0 # password
+
### Input variables for containerized ceph test
nodename: targetnode # target node to test ceph