############################################################################
#  Copyright 2017 Northern.tech AS
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License LGPL as published by the
#  Free Software Foundation; version 3.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  To the extent this program is licensed as part of the Enterprise
#  versions of CFEngine, the applicable Commercial Open Source License
#  (COSL) may apply to this file if you as a licensee so wish it. See
#  included file COSL.txt.
###########################################################################
#
# CFEngine Community Open Promise-Body Library
#
# This initiative started by CFEngine promotes a
# standardized set of names and promise specifications
# for template functionality within CFEngine 3.
#
# The aim is to promote an industry standard for
# naming of configuration patterns, leading to a
# de facto middleware of standardized syntax.
#
# Names should be intuitive and parameters should be
# minimal to assist readability and comprehensibility.

# Contributions to this file are voluntarily given to
# the cfengine community, and are moderated by CFEngine.
# No liability or warranty for misuse is implied.
#
# If you add to this file, please try to make the
# contributions "self-documenting". Comments made
# after the bundle/body statement are retained in
# the online docs
#

# For CFEngine Core: 3.7.0 to 3.7.x

#################################################
# CFEngine Enterprise Hub HA policy inclusion
#################################################
bundle common cfengine_enterprise_hub_ha
# @brief Inputs specific to CFEngine Enterpise
{
  vars:
    enable_cfengine_enterprise_hub_ha::

      "input[ha_main]"
        string => "cfe_internal/enterprise/ha/ha.cf";

      "input[ha_def]"
        string => "cfe_internal/enterprise/ha/ha_def.cf";

      "classification_bundles"
        slist => { "ha_def" };

      "management_bundles"
        slist => { "ha_main" };

      "inputs" slist => getvalues(input);

    !enable_cfengine_enterprise_hub_ha::

      "classification_bundles"
        slist => { "$(this.bundle)" };

      "management_bundles"
        slist => { "$(this.bundle)" };

      "inputs"
        slist => { };

}
body file control
{
  inputs => { @(cfengine_enterprise_hub_ha.inputs) };
}
