Description of problem: It possible to create template from vm without disk via REST on cluster without hosts and storage domains, so now you have interesting situation that you can't remove template without hosts and can't remove cluster with template. Problem appear via REST, because via UI it just don't show other data center clusters via create template menu. Version-Release number of selected component (if applicable): rhevm-3.4.0-0.18.el6ev.noarch How reproducible: Always Steps to Reproduce: 1. Have two datacenters, one(dc_1) with host and storagedomain and also with vm without disk, second(dc_2) just with cluster. 2. Create template from vm on dc_1 via REST and give cluster from dc_2: <template> <name>cluster_template</name> <vm id="vm_id_from_dc_1"/> <cluster id="cluster_id_from_dc2"/> </template> 3. Actual results: Template create successfully. Expected results: Some error message, that say that you chose not correct cluster id(exactly as when you create template from vm with disk) Additional info:
> Create template from vm on dc_1 via REST and give cluster from dc_2 To me this seems like an invalid usecase that should be blocked. Michal - moving to virt to analyze.
right, user shouldn't be able to assign cluster from the wrong DC
Verified in rhevm 3.5.0-0.12.beta.el6ev