dana-i2cat/opennaas — pull request #510 by isartcanyameres (2013-02-12 09:01:28+00:00)
Title: Remove vCPE when there is an error in buildModel.

In VCPENetworkManager build method, an error during template.buildModel
causes resource not being removed. Although it should be.

Removing operations are only called when the resource is set, but setting
happens after trying to build the model. Thus, an error in buildModel prevents
the resource to be set and removing operations skipped.

This patch avoid skipping the "rollback" by setting the resource before any
other operation is called in build method.