From d263687f8469a3c7f7897484405c76b671f02fd6 Mon Sep 17 00:00:00 2001 From: Johannes Grassler Date: Wed, 30 Mar 2016 09:55:37 +0200 Subject: [PATCH] Warn against API calls in plugin guide API calls raising uncaught exceptions have previously caused problems, especially when deleting stacks or cleaning up after a stack's partial deletion. This commit explicitely documents this pitfall. Change-Id: If86ef0deb5b8eaa1a0665c07bfddcfe52994f249 Related-Bug: #1554625 --- doc/source/developing_guides/pluginguide.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/source/developing_guides/pluginguide.rst b/doc/source/developing_guides/pluginguide.rst index 04af034ff5..46f9d43cf5 100644 --- a/doc/source/developing_guides/pluginguide.rst +++ b/doc/source/developing_guides/pluginguide.rst @@ -523,6 +523,24 @@ Delete is deleted; ``False`` otherwise. :raise: any ``Exception`` if the delete operation failed. +Resource Dependencies ++++++++++++++++++++++ + +Ideally, your resource should not have any 'hidden' dependencies, i.e. Heat +should be able to infer any inbound or outbound dependencies of your resource +instances from resource properties and the other resources/resource attributes +they reference. This is handled by +``heat.engine.resource.Resource.add_dependencies()``. + +If this is not possible, please do not simply override `add_dependencies()` in +your resource plugin! This has previously caused `problems +`_ for multiple operations, +usually due to uncaught exceptions, If you feel you need to override +`add_dependencies()`, please reach out to Heat developers on the `#heat` IRC +channel on FreeNode or on the `openstack-dev +`_ mailing list to discuss the +possibility of a better solution. + Registering Resource Plug-ins +++++++++++++++++++++++++++++ To make your plug-in available for use in stack templates, the plug-in must