From 7538c249d97e4de7b07082e25ca577f0b8fdf77d Mon Sep 17 00:00:00 2001
From: Takashi Kajinami <tkajinam@redhat.com>
Date: Tue, 4 May 2021 02:03:15 +0900
Subject: [PATCH] Test the new horizon::dashboards::heat class

Depends-on: https://review.opendev.org/775322
Change-Id: Ie4989a772a308bfb44ad61a04d135d0c8b217163
---
 fixtures/scenario003.pp |  4 +++-
 manifests/horizon.pp    | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/fixtures/scenario003.pp b/fixtures/scenario003.pp
index afc979ec6..be514614a 100644
--- a/fixtures/scenario003.pp
+++ b/fixtures/scenario003.pp
@@ -96,7 +96,9 @@ include openstack_integration::nova
 if $trove_enabled {
   include openstack_integration::trove
 }
-include openstack_integration::horizon
+class { 'openstack_integration::horizon':
+  heat_enabled => true
+}
 include openstack_integration::heat
 class { 'openstack_integration::sahara':
   integration_enable => $sahara_integration_enable,
diff --git a/manifests/horizon.pp b/manifests/horizon.pp
index b44624ea6..5a27d63c8 100644
--- a/manifests/horizon.pp
+++ b/manifests/horizon.pp
@@ -1,4 +1,12 @@
-class openstack_integration::horizon {
+# Configure the Horizon service
+#
+# [*heat_enabled*]
+#  (optional) Flag to enable heat dashboard
+#  Defaults to false.
+#
+class openstack_integration::horizon (
+  $heat_enabled = false,
+) {
 
   include openstack_integration::config
   include openstack_integration::params
@@ -44,5 +52,7 @@ class openstack_integration::horizon {
     compress_offline  => false,
   }
 
-  horizon::dashboard { 'heat': }
+  if $heat_enabled {
+    class { 'horizon::dashboards::heat': }
+  }
 }