Ask Your Question

Is there a way provide user data files as parameter

asked 2016-04-30 07:20:53 -0500

TejasG gravatar image

updated 2016-05-02 14:28:48 -0500

larsks gravatar image


I was trying to pass XML user data files for post boot configuration in heat Template.

  config_drive: "true"
  user_data : 
      template: { get_file : pboot-config.xml }

I don't want to hard code the file name ( template: { get_file : get_param) so this resource can be utilized multiple time as function. I found in Openstack Doc that get_file does not recommend to use any intrinsic functions like get_param. In this situation, Is there any other parametrize way to fetch file for post boot process. ?

edit retag flag offensive close merge delete


Can you describe exactly what you're trying to do? Maybe there is another way of tackling the issue.

larsks gravatar imagelarsks ( 2016-05-02 14:34:36 -0500 )edit

Hi Larsks, thanks for the comment. I am trying to create VM with heat template and pass "pboot-config.xml" file for post boot configuration.I want to dynamically pass the file name/ file path via get_param or any other possible solution. Hope this might be helpful.

TejasG gravatar imageTejasG ( 2016-05-03 22:39:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-19 14:36:18 -0500

zaneb gravatar image

Note that get_param works, but it prevents the client from magically including the files you want. So you can still use it, but you have to explicitly pass all of the files you might need to the ReST API.

An alternative might be to pass the entire file as a parameter rather than using get_file.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-04-30 07:20:53 -0500

Seen: 661 times

Last updated: May 19 '16