def validate_plan(self, plan_name):
        """Validate Plan

        This private method provides validations to ensure a plan
        meets the proper criteria before allowed to persist in storage.

        :param plan_files: The files to import into the container.
        :type plan_files: dict
        :returns boolean
        """

        plan = self.get_plan(plan_name)
        # there can only be up to one root-template file in metadata
        rt = {k: v for (k, v) in plan.files.items()
              if v.get('meta', {}).get('file-type') == 'root-template'}
        if 1 > len(rt):
            raise exception.TooManyRootTemplatesError()

        # the plan needs to be validated with heat to ensure it conforms
        template, environment, files = templates.process_plan_data(plan.files)
        try:
            self.heatclient.stacks.validate(
                template=template,
                files=files,
                environment=environment,
                show_nested=True)
        except heatexceptions.HTTPBadRequest as exc:
            LOG.exception("Error validating the plan.")
            six.raise_from(exception.HeatValidationFailedError(msg=exc), exc)

        # no validation issues found
        return True
dataset/ETHPy150Open openstack/tripleo-common/tripleo_common/core/plan.py/PlanManager.validate_plan/swapped operands of `>`