Creation and configuration of the driver's environment:
- Start a new project with shellfoundry:
$ shellfoundry new DriverName --template layer-1-switch- Create a new Python virtualenv in the project's folder. Specify the same python executable which is used by CloudShell.
virtualenv --python="c:\Program Files (x86)\QualiSystems\CloudShell\Server\python\2.7.10\python.exe" --always-copy .\cloudshell-L1-DriverName- Activate the project's virtualenv
.\cloudshell-L1-DriverName\Scripts\activate.bat- Edit and install requirements (from the new project folder):
$ pip install -r requirements.txt
Implementation:
-
Implement methods of the DriverCommands class in <project_slug>/driver_commands.py. Follow the DEVGUIDE and docstrings with description, as an example of an L1 driver with CLI usage you can reffer to the cloudshel-L1-mrv project. To debug the driver use the DEBUGGING GUIDE.
-
Update the driver version and metadata in version.txt
Install the driver and compile the driver executable:
- Copy the project's folder Cloudshell-L1-DriverName to the drivers folder (usually "C:\Program Files (x86)\QualiSystems\CloudShell\Server\Drivers").
- Compile the driver executable:
- Download Bat To Exe Converter
- Open bat To Exe Converter
- Select Batch File: from the project's folder. For example cloudshell-L1-DriverName\DriverName.bat
- Specify Save As: the drivers location with the driver's executable name. For example C:\Program Files (x86)\QualiSystems\CloudShell\Server\Drivers\DriverName.exe
- Specify Architecture
- Press Compile
Test in CloudShell:
- Follow this guide to import the new datamodel, create a resource, set the timeout period, auto load it and configure its physical connections
- When you execute the auto load (or any other command later), the log files will get created under the Server\Logs folder
- After validating the auto load, you can validate the mapping functions either from Resource Manager or in the CloudShell Portal, build a blueprint with 2 resources and a route, then reserve this blueprint and connect the route.
Build and extract the driver package (not necessary)
- Build the package:
- Create new zip archive, DriverName.zip
- Put there the project's folder, C:\Program Files (x86)\QualiSystems\CloudShell\Server\Drivers\Cloudshell-L1-DriverName
- Put there the driver's executable, C:\Program Files (x86)\QualiSystems\CloudShell\Server\Drivers\DriverName.exe
- Extract the package:
- Extract the driver package to the Drivers folder C:\Program Files (x86)\QualiSystems\CloudShell\Server\Drivers