[openstack-dev] [heat] [CustomResource] LifeCycle methods flow

2014-11-26 Thread Pradip Mukhopadhyay
Hello, Any pointer (document and/or code pointer) related to how the different overridden methods are getting called when a custom resource is getting deployed in the heat stack? Basically just tried to annotate the h-eng log on a simple, very-first-attempt 'hello world' resource. Noticed the

Re: [openstack-dev] [heat] [CustomResource] LifeCycle methods flow

2014-11-26 Thread Pavlo Shchelokovskyy
Pradip, https://github.com/openstack/heat/blob/master/heat/engine/resource.py#L473 Basically, it calls handle_create that might return some data, yields, and than keeps calling check_create_complete with that data returned by handle_create, yielding control in-between, until

Re: [openstack-dev] [heat] [CustomResource] LifeCycle methods flow

2014-11-26 Thread Pradip Mukhopadhyay
Thanks Pavlo. One particular thing I did not comprehend is: Suppose my resource code is something like: class HelloWorld(resource.Resource): def __init__(self, controller, deserializer, serializer=None): LOG.info([pradipm]:Inside HelloWorld ctor);

Re: [openstack-dev] [heat] [CustomResource] LifeCycle methods flow

2014-11-26 Thread Zane Bitter
On 26/11/14 05:20, Pradip Mukhopadhyay wrote: Hello, Any pointer (document and/or code pointer) related to how the different overridden methods are getting called when a custom resource is getting deployed in the heat stack? Basically just tried to annotate the h-eng log on a simple,

Re: [openstack-dev] [heat] [CustomResource] LifeCycle methods flow

2014-11-26 Thread Pradip Mukhopadhyay
Thanks, Zane. I do understand the mistake I made (too much dependency on ctags). I am getting what you're pointing out. In face inside my _resolve_attribute, I should have return self.properties['value'] instead of depending on the cached value. I wanted to understand if it is OK to cache value