Fuel plugin that enables to configure multiple Cinder backend support for Kaminario K2 All-Flash Array
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

type.pp 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. class kaminario::type {
  2. $num = [ '0', '1', '2', '3', '4', '5' ]
  3. $plugin_settings = hiera('cinder_kaminario')
  4. each($num) |$value| {
  5. kaminario_type {"plugin_${value}":
  6. create_type => $plugin_settings["create_type_${value}"],
  7. options => $plugin_settings["options_${value}"],
  8. backend_name => $plugin_settings["backend_name_${value}"]
  9. }
  10. }
  11. }
  12. define kaminario_type ($create_type,$options,$backend_name) {
  13. if $create_type == true {
  14. case $options {
  15. "enable_replication_type": {
  16. cinder_type {$backend_name:
  17. ensure => present,
  18. properties => ["volume_backend_name=${backend_name}",'kaminario:replication=enabled'],
  19. }
  20. }
  21. "enable_dedup": {
  22. cinder_type {$backend_name:
  23. ensure => present,
  24. properties => ["volume_backend_name=${backend_name}",'kaminario:thin_prov_type=nodedup'],
  25. }
  26. }
  27. "replication_dedup": {
  28. cinder_type {$backend_name:
  29. ensure => present,
  30. properties => ["volume_backend_name=${backend_name}",'kaminario:thin_prov_type=nodedup','kaminario:thin_prov_type=nodedup'],
  31. }
  32. }
  33. "default": {
  34. cinder_type {$backend_name:
  35. ensure => present,
  36. properties => ["volume_backend_name=${backend_name}"],
  37. }
  38. }
  39. }
  40. }
  41. }