Revision 76ba77c1
ID | 76ba77c1b6d52141c342aad5ba2cb92908e23693 |
Fix bugs in api/server.py:create_server()
Fix bugs in server creation, in api/server.py:create_server().
More specifically:
* Make sure to save() the vm object before calling vm.backend_id
* Delete the vm instance if the RAPI call fails for any reason
* Use different variable names for the server name at the API level
and at the Ganeti backend level
* Compute a random password before the CreateInstance() call to Ganeti
[not currently used though]
Also patch the VirtualMachine model to safeguard against getting the
backend_id of a yet-unsaved instance of VirtualMachine.
Files
- added
- modified
- copied
- renamed
- deleted