'Save and flush new deployment to disk.
:return Deferred: Fires when write is finished.'

def save(self, deployment):

    if (deployment == self._deployment):
        _LOG_UNCHANGED_DEPLOYMENT_NOT_SAVED().write(self.logger)
        return succeed(None)
    with _LOG_SAVE(self.logger, configuration=deployment):
        self._sync_save(deployment)
        self._deployment = deployment
        for callback in self._change_callbacks:
            try:
                callback()
            except:
                write_traceback(self.logger, u'')
        return succeed(None)
