OpenStack VM creation driver #350
Unanswered
Quali-Community
asked this question in
Forums
Replies: 1 comment
-
|
I am sure you can simplify your components like here: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Originally for Mellanox.
This is working demo that creates VMs using the OpenStack REST APIs. The OpenStack resource driver is the main part and could be extended. It is meant to be reusable.
Extensive debug logging in %programdata%\QualiSystems\qs_rest_json_log.txt. You can freely call Log at any time to write a message to this file.
All functions are wrappers around a single function, Query. There is no special order in which functions need to be called, and no initialization.
Auth is done behind the scenes and the token is managed automatically. This also automatically determines the tenant id. This mechanism needs to be slightly enhanced to handle the fact that the token can expire. If you get an error about an expired token, just restart Driver Builder or restart the TestShell server, whatever will reset the project variables.
In your own added functions you will probably call Query. Query gets the service IP and port from the resource and substitutes the tenant id wherever <tenant> occurs in the URL. You need to provide only the HTTP method, the part of the URL after http://host:port, and the JSON body if any. If you get a mysterious error, be sure to check the HTTP method (especially PUT vs. POST).
Setup:
Import models.xml
Build linux_pc driver, register it as "linux_pc", associate it with family Virtual Machine, model OpenStack VM.
Build the "openstack" driver, register it as "openstack_installation", associate it with family "OpenStack Installation", model "OpenStack Installation v2".
To add features to this driver, you will probably want to call the Query function in new ways. It takes JSON input and returns XML output.
Create a resource named "OpenStack":
Build the topology driver "Mellanox Deploy VM and FIO Topo" and register it.
Create a topology containing the "OpenStack" resource and set the topology driver.
Eric Rosenquist (Eric.R) - 07/23/2014 11:10 PM
Beta Was this translation helpful? Give feedback.
All reactions