Bug #2609

Inverted logic between ”instantiating multiple templates” and “multiple instantiations of one template”

Added by EOLE Team over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:01/09/2014
Priority:NormalDue 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:

  1. select Virtual Resources -> Templates
  2. select two templates with different names
  3. 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:

  1. select Virtual Resources -> Templates
  2. select a single template
  3. clic Instantiate
  4. set VM Name to test-instantiate
  5. set #VMs to 2
  6. 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

Also available in: Atom PDF