admin.vm.Create: add 'created-by-' tag

This commit is contained in:
Marek Marczykowski-Górecki 2017-06-15 00:23:26 +02:00
parent 5f187bd2bf
commit c13cf44e5e
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -737,6 +737,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
self.fire_event_for_permission(pool=pool, pools=pools, **kwargs)
vm = self.app.add_new_vm(vm_class, **kwargs)
vm.tags.add('created-by-' + str(self.src))
try:
yield from vm.create_on_disk(pool=pool, pools=pools)