Bug #2609
Inverted logic between ”instantiating multiple templates” and “multiple instantiations of one template”
| Status: | Closed | Start date: | 01/09/2014 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0%  | |
| Category: | Sunstone | |||
| Target version: | - | |||
| Resolution: | worksforme | Pull request: | ||
| Affected Versions: | OpenNebula 4.2 | 
Description
Hello,
I think the logic of appending the ID of the VM to the VM name is inverted between the two following.
Instantiate multiple templates¶
In sunstone:
- select 
Virtual Resources->Templates - select two templates with different names
 - clic 
Instantiate 
It produce two VMs, each VM name is derived from the template name with -<VM ID> appended.
Multiple instantiations of one template¶
In sunstone:
- select 
Virtual Resources->Templates - select a single template
 - clic 
Instantiate - set 
VM Nametotest-instantiate - set 
#VMsto 2 - click 
Instantiate 
It produce two VMs with the same name test-instantiate
Expected behaviour¶
- multiple instantiations of one template should produce VM names in the form: 
<VM NAME>-<VM ID> - instantiate multiple templates should produce VM names in the form:
	
<VM NAME>if no other VM with the same name exists<VM NAME>-<VM ID>if another VM has the same name prefix
 
Regards.
History
#1
    
    Updated by Ruben S. Montero over 7 years ago
    - Status changed from Pending to Closed
 - Resolution set to worksforme
 
In the scenario (Multiple instantiations of one template) you can use the parameter %i to generate a a diferent name. %i is substituted with 0...N-1 (N=number of templates instantiated).
test-instance-%i --> test-instance-0, test-instance-1...
#2
    
    Updated by EOLE Team over 7 years ago
    Ruben S. Montero wrote:
In the scenario (Multiple instantiations of one template) you can use the parameter %i to generate a a diferent name. %i is substituted with 0...N-1 (N=number of templates instantiated).
test-instance-%i --> test-instance-0, test-instance-1...
Thanks, I missed that.
Is there a way to avoid adding the ID in Instantiate multiple templates when no other VM with the same name prefix?
Regards.
#3
    
    Updated by Ruben S. Montero over 7 years ago
    I am afraid, that if you do not provide a name it is always appended