ONIE Compliance Environment or OCE is a set of tools that are used for
Testing ONIE from a user’s perspective included naming the NOS
installer onie-installer
, placing it in the root location of a web server,
and letting ONIE do it’s thing. While this works, it doesn’t fully test a
vendor’s implementation of ONIE:
While most of these actions can be observed and recorded by the user, it is typically not their deployment strategy to do so. As such, we have a simpler way of doing so for certification labs, vendors, and others to use the same deployment tools that an end user will use to provide a suite of tests to ensure a HW vendor’s implementation of ONIE is compliant with the OCP specification.
test-onie.py
allows the automatic configuration and testing of a
given test from the OCP ONIE specification.
It takes a list of arguments:
And test-onie.py
takes care of the rest. By default, test-onie.py
uses the following:
However, it is possible to change out the back end services by either
modifying the test definition file (default:
config/onie-tests.json
) or creating a new one.
At the current time, test-onie.py
cannot handle the test cases
that require power or console interaction (10 test cases in all). It
is able to handle the remaining 70 test cases just fine.
Before we get started, if you system is running apparmor
, you must
stop it and unload all the profiles. Typically, this involves:
# sudo service apparmor stop
# sudo service apparmor teardown
Install the necessary backend services and have them stopped and disabled. Typically this involves:
# sudo apt-get install isc-dhcp-server tftpd-hpa nginx
# sudo stop service isc-dhcp-server stop
# sudo stop service nginx stop
# sudo update-rc.d -f isc-dhcp-server remove
# sudo update-rc.d -f nginx remove
Note
ensure tftpd is not running in inetd or xinetd
To use test-onie.py
, you need to have all of the python modules,
defined in requirements.txt
installed.
An easy way to do this is to use python’s virtualenv.
Ensure you have pip
and virtualenv
installed:
# sudo apt-get install python-pip python-virtualenv
Then create the virtual environment:
# virtualenv .venv
Now let’s enter the virtual environment and install our dependencies:
# source .venv/bin/activate
(.venv) # pip install -r requirements.txt
Now you are ready to run test-onie.py
.
Please refer to OCE’s README for more information on running specific test cases.