def suspend_stack(self, name, wait=True):
        try:
            self.logger.info("Suspending OpenStack Heat stack [%s]" % name)
            self.heat_c.actions.suspend(stack_id=name)
        except (HTTPException, HttpError) as e:
            raise ProviderException(e)

        status = SUSPEND_IN_PROGRESS

        # Wait until suspend finishes.
        if wait:
            while (FAILED not in status and
                   status != DELETE_COMPLETE and
                   status != SUSPEND_COMPLETE):
                self.sleep()

                try:
                    heat_stack = self.heat_c.stacks.get(
                        stack_id=name)
                except HTTPNotFound:
                    status = DELETE_COMPLETE
                except (HTTPException, HttpError) as e:
                    raise ProviderException(e)
                else:
                    status = heat_stack.stack_status

            if FAILED in status:
                raise ProviderException("Failure suspending "
                                        "OpenStack Heat stack.")

        return {"status": status}