[openstack-dev] [murano] MuranoPL types question
paul.bourke at oracle.com
Thu Mar 30 17:17:51 UTC 2017
I had a quick(hopefully) question about MuranoPL that I hope you might
be able to help with, Felipe had mentioned you are very knowledgeable in
this area. If you don't have time please disregard!
I'm working on a patch for the Murano core library to make volume
attachment info available, which is available at
https://review.openstack.org/451909. It's mostly working, but I'm having
some issues getting the types correct in MuranoPL to make this info
consumable by end users.
The attachment info from a sample run in the stack $outputs looks like
this (taken from the dashboard using $reporter)
u'attached_at': u'2017-03-30T16:51:57.000000', u'host_name': None,
u'volume_id': u'373e4a5a-46b6-4091-82d6-b3dba62d552b', u'device':
u'/dev/vda', u'id': u'373e4a5a-46b6-4091-82d6-b3dba62d552b'}]"
Here both key and value appear to be a string (note, I can't confirm
this as the typeinfo function doesn't appear to be available in
Instance.yaml for some reason... perhaps I'm using it wrong)
My goal is to then set this into a property of CinderVolume.yaml, with a
Contract of ''. However, when I access this from a sample app, I end
up with a list of strings, shown by $reporter as:
u'attached_at': u'2017-03-30T16:51:59.000000', u'host_name': None,
u'volume_id': u'ed7eb535-9e81-4c97-b063-86936d4ee306', u'device':
u'/dev/vdb', u'id': u'ed7eb535-9e81-4c97-b063-86936d4ee306'}]",)
So my question is:
1) Why is the content of this 'get_attr' coming from heat being stored
in the stack outputs as a string, and
2) Is there a way I can cast this to a list of dicts or similar
structure so it can be iterated as expected?
Any tips much appreciated.
More information about the OpenStack-dev