[openstack-dev] [heat] About intrinsic function to convert string	to map/json
    Ethan Lynn 
    xuanlangjian at gmail.com
       
    Mon Feb 22 08:12:35 UTC 2016
    
    
  
Hi,
  Is there any intrinsic function can convert string to map/json?
When I’m writing templates for senlin resources, I use following yaml:
   profile:
     type: OS::Senlin::Profile
     properties:
       type:  os.heat.stack-1.0
       properties:
         template:  {get_file: server.yaml}
Here ‘template’ expect a json format, but get_file return a string. It would be good to find out a function that can translate string to json.
If we don’t have a function like that, I would be glad to add one, e.g. ‘str_json’ . So that I can use following yaml to create senlin profile resource:
   profile:
     type: OS::Senlin::Profile
     properties:
       type:  os.heat.stack-1.0
       properties:
         template:  {str_json: {get_file: server.yaml}}
Best Regards,
Ethan Lynn
xuanlangjian at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160222/c6f447d6/attachment.html>
    
    
More information about the OpenStack-dev
mailing list