Description of problem:
When vm is created without disk, then template is created from this vm. And there is user with ie TemplateOwner permissions on DC, then this TemplateOwner permissions are not inherted to template without disk.
Version-Release number of selected component (if applicable):
sf13
How reproducible:
always
Steps to Reproduce:
1. Create vm without disk.
2. Create template from this vm.
3. Add TemplateOwner permissions on DC to user1.
4. Check template permissions if user1 has TemplateOwner permissions
inherited from DC.
Actual results:
User has not iherited permissions from DC.
Expected results:
User has iherited permissions from DC.
Additional info:
Found while verifying 921450.
Note - when user log in into UserPortal he can see this template, but he can't manipulate with it.
Problem is in "fn_get_entity_parents" stored procedure.
Currently, the parents of a template are only system, and the DC in which the template disks are placed.
So, if the template has no disks, then it won't inherit permissions from the data center.
This is obviously a bug.
The question is - should the template permissions hierarchy be:
System
DC
Template
Or:
System
DC
Cluster
Template
IMO it sounds like the former, but, looking at the templates main tab dialog (and the API), you can see both the cluster and the DC of a template, so perhaps it should be the latter. Simon?
Template is a virt-related entity.
Moving to virt to determine whether they want to fix it, or leave it as is...
Also, with the existence of instance types, perhaps this is no longer relevant.