]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Resource.__eq__ allow resources in different stacks
authorSteve Baker <sbaker@redhat.com>
Wed, 5 Dec 2012 22:53:45 +0000 (11:53 +1300)
committerSteve Baker <sbaker@redhat.com>
Thu, 6 Dec 2012 01:17:00 +0000 (14:17 +1300)
commit842e6cc31da7e060aba9409a91bd46149223d61e
tree479858b1c362932351eeb5be0352a82cfc492d70
parent8a3a8d6fe4a8680126a62f90f619da5093c937e4
Resource.__eq__ allow resources in different stacks

Doing a stack update was incorrectly replacing identical resources
because Refs in the new resource were evaluating to None in the new stack.

This change allows an alternative template to be passed to parsed_template
and modifies __eq__ to compare the two templates in the same stack.

__eq__ now also checks that the name of both resources matches, since a stack
could have multiple identical resources with different names.

Change-Id: I7e09ee1238dd01490cdfe186c51b7fada9546a63
heat/engine/resource.py
heat/tests/test_resource.py