dom0/core: API CHANGE: pass username as keyword param to vm.run() (#577)

Get rid of ugly embedding username into commandline. This will make much easier
avoid hardcoding username in dom0 code.
Currently dom0 is free of hardcoded "user" username ("root" still is used).
This commit is contained in:
Marek Marczykowski 2012-11-13 04:28:09 +01:00
parent a4d00922b4
commit 97aa4ed9cb
2 changed files with 2 additions and 2 deletions

View File

@ -45,4 +45,4 @@ else:
qvm_collection.unlock_db()
# launch
qvm_collection.get_vm_by_name(backendvm_name).run("root: %s" % cmd)
qvm_collection.get_vm_by_name(backendvm_name).run(cmd, user="root")

View File

@ -41,7 +41,7 @@ else:
qvm_collection.unlock_db()
# launch
qvm_collection.get_vm_by_name(backendvm_name).run("root: %s" % cmd)
qvm_collection.get_vm_by_name(backendvm_name).run(cmd, user="root")
# FIXME: command injection
os.system("xenstore-write /local/domain/%s/backend/vusb/%s/%s/port/%s ''"