From 0d7fb171026fa998fbd3c87d3949b2d98863a913 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Wed, 5 Aug 2015 20:40:00 +0200 Subject: [PATCH] Make args for conf, mons, osds and keys wrappers optional By making args optional we can include it in the manifest and provide args from hieradata. Otherwise we're forced to pass a value from args from the manifests. Change-Id: I3932026dc6b21f57a9175239a2afe1cdcab611bb --- manifests/conf.pp | 4 ++-- manifests/keys.pp | 4 ++-- manifests/mons.pp | 4 ++-- manifests/osds.pp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifests/conf.pp b/manifests/conf.pp index f1d78917..2e51942f 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -22,11 +22,11 @@ # === Parameters: # # [*args*] A Ceph config hash. -# Mandatory. +# Optional. # # [*defaults*] A config hash # Optional. Defaults to a empty hash # -class ceph::conf($args, $defaults = {}) { +class ceph::conf($args = {}, $defaults = {}) { create_resources(ceph_config, $args, $defaults) } diff --git a/manifests/keys.pp b/manifests/keys.pp index 090489aa..6c7bdcc5 100644 --- a/manifests/keys.pp +++ b/manifests/keys.pp @@ -22,11 +22,11 @@ # === Parameters: # # [*args*] A Ceph keys config hash -# Mandatory. +# Optional. # # [*defaults*] A keys config hash # Optional. Defaults to a empty hash. # -class ceph::keys($args, $defaults = {}) { +class ceph::keys($args = {}, $defaults = {}) { create_resources(ceph::key, $args, $defaults) } diff --git a/manifests/mons.pp b/manifests/mons.pp index 3998b651..c71ac8b0 100644 --- a/manifests/mons.pp +++ b/manifests/mons.pp @@ -22,11 +22,11 @@ # === Parameters: # # [*args*] A Ceph mons config hash -# Mandatory. +# Optional. # # [*defaults*] A config hash # Optional. Defaults to a empty hash # -class ceph::mons($args, $defaults = {}) { +class ceph::mons($args = {}, $defaults = {}) { create_resources(ceph::mon, $args, $defaults) } diff --git a/manifests/osds.pp b/manifests/osds.pp index 83b18da5..f20b6035 100644 --- a/manifests/osds.pp +++ b/manifests/osds.pp @@ -22,11 +22,11 @@ # === Parameters: # # [*args*] A Ceph osds config hash -# Mandatory. +# Optional. # # [*defaults*] A config hash # Optional. Defaults to a empty hash # -class ceph::osds($args, $defaults = {}) { +class ceph::osds($args = {}, $defaults = {}) { create_resources(ceph::osd, $args, $defaults) }