Browse Source

Allow enabling custom backends with manila

It is possible to provide the config settings
to add an arbitrary and unmanaged backend to Manila
at deployment time via Heat environment files. However,
puppet-tripleo doesn't support extending the
list of enabled backends. Add this capability.

Change-Id: I82f62df0a95f03afbda1b6a4ddaa67ef908030a9
Closes-Bug: #1831938
(cherry picked from commit 914cf1f124)
(cherry picked from commit ecbec17a33)
(cherry picked from commit fdab9a1699)
tags/8.5.1
Goutham Pacha Ravi 3 months ago
parent
commit
40d594eb0b
1 changed files with 22 additions and 19 deletions
  1. 22
    19
      manifests/profile/base/manila/share.pp

+ 22
- 19
manifests/profile/base/manila/share.pp View File

@@ -46,19 +46,24 @@
46 46
 #   (Optional) Whether or not the vnx backend is enabled
47 47
 #   Defaults to hiera('manila_backend_vnx_enabled', false)
48 48
 #
49
+# [*manila_user_enabled_backends*]
50
+#   (Optional) List of additional backend stanzas to activate
51
+#   Defaults to hiera('manila_user_enabled_backends', undef)
52
+#
49 53
 # [*step*]
50 54
 #   (Optional) The current step in deployment. See tripleo-heat-templates
51 55
 #   for more details.
52 56
 #   Defaults to hiera('step')
53 57
 #
54 58
 class tripleo::profile::base::manila::share (
55
-  $backend_generic_enabled = hiera('manila_backend_generic_enabled', false),
56
-  $backend_netapp_enabled  = hiera('manila_backend_netapp_enabled', false),
57
-  $backend_vmax_enabled    = hiera('manila_backend_vmax_enabled', false),
58
-  $backend_isilon_enabled  = hiera('manila_backend_isilon_enabled', false),
59
-  $backend_unity_enabled   = hiera('manila_backend_unity_enabled', false),
60
-  $backend_vnx_enabled     = hiera('manila_backend_vnx_enabled', false),
61
-  $backend_cephfs_enabled  = hiera('manila_backend_cephfs_enabled', false),
59
+  $backend_generic_enabled      = hiera('manila_backend_generic_enabled', false),
60
+  $backend_netapp_enabled       = hiera('manila_backend_netapp_enabled', false),
61
+  $backend_vmax_enabled         = hiera('manila_backend_vmax_enabled', false),
62
+  $backend_isilon_enabled       = hiera('manila_backend_isilon_enabled', false),
63
+  $backend_unity_enabled        = hiera('manila_backend_unity_enabled', false),
64
+  $backend_vnx_enabled          = hiera('manila_backend_vnx_enabled', false),
65
+  $backend_cephfs_enabled       = hiera('manila_backend_cephfs_enabled', false),
66
+  $manila_user_enabled_backends = hiera('manila_user_enabled_backends', undef),
62 67
   $step = Integer(hiera('step')),
63 68
 ) {
64 69
   include ::tripleo::profile::base::manila
@@ -257,18 +262,16 @@ class tripleo::profile::base::manila::share (
257 262
       }
258 263
     }
259 264
 
260
-    $manila_enabled_backends = delete_undef_values(
261
-      [
262
-        $manila_generic_backend,
263
-        $manila_cephfsnative_backend,
264
-        $manila_cephfs_backend,
265
-        $manila_netapp_backend,
266
-        $manila_vmax_backend,
267
-        $manila_isilon_backend,
268
-        $manila_unity_backend,
269
-        $manila_vnx_backend
270
-      ]
271
-    )
265
+    $backends = delete_undef_values(concat([], $manila_generic_backend,
266
+                                      $manila_cephfsnative_backend,
267
+                                      $manila_cephfs_backend,
268
+                                      $manila_netapp_backend,
269
+                                      $manila_vmax_backend,
270
+                                      $manila_isilon_backend,
271
+                                      $manila_unity_backend,
272
+                                      $manila_vnx_backend,
273
+                                      $manila_user_enabled_backends))
274
+    $manila_enabled_backends = delete($backends, '')
272 275
     class { '::manila::backends' :
273 276
       enabled_share_backends => $manila_enabled_backends,
274 277
     }

Loading…
Cancel
Save