how to provide custom UUID for creating resources in heat template

asked 2019-01-08 04:20:52 -0500

sudharsan gravatar image

Hi,

I have a requirement where I need to provide custom UUID for resources as part of heat template.

I tried with reservation_id but in vain.

sample:
  type: OS::Nova::Server
  properties:
    name:
      str_replace:
        template: $vm_name-VM
        params:
            $vm_name: "Test"
    reservation_id: '84358883-6920-4750-a3e8-8c394f0a9a19'
    image: "CentOS-7-x86_64-GenericCloud.qcow2"
    flavor: "m1.small"
    networks:
      - port: { get_resource: privateport }

this Property reservation_id is not working & from the description of this property it says "A UUID for the set of servers being requested."

Can anyone shed somelight on how to provide custom UUID for resource with type OS::Nova::Server can be provided.

thanks, Sudharsan

edit retag flag offensive close merge delete

Comments

can you confirm if your error looks like this? ERROR heat.engine.resource BadRequest: Invalid input for field/attribute return_reservation_id. Value: ffffffff-eeee-dddd-cccc-bbbbbbbbbbbb. u'ffffffff-eeee-dddd-cccc-bbbbbbbbbbbb' is not one of [True, 'True', 'TRUE', 'true', '1', 'ON', 'On', 'on'...

Mozair Anwar gravatar imageMozair Anwar ( 2019-01-08 06:58:49 -0500 )edit

yes. thats correct.

sudharsan gravatar imagesudharsan ( 2019-01-08 07:29:32 -0500 )edit

@Mozair Anwar, do u have any background on this issue ?

sudharsan gravatar imagesudharsan ( 2019-01-08 11:40:30 -0500 )edit

reservation_id is used with blazar (reservation service) and can be used when a resource reservation is made via blazar. As per your question custom uuid can not be created using this option for instance. Check blazar project for further details on this.

Mozair Anwar gravatar imageMozair Anwar ( 2019-01-09 00:45:56 -0500 )edit

is there a way to provide custom UUID for resource while the resource being created if not via heat template?

sudharsan gravatar imagesudharsan ( 2019-01-10 07:06:14 -0500 )edit