From 01f877726afc9c6c608ade4abbffcf2020b9e5cf Mon Sep 17 00:00:00 2001 From: Owen Synge Date: Wed, 7 Sep 2016 15:39:57 +0200 Subject: [PATCH 1/2] modules.ceph_cfg.init: Add osd_df Use new python-ceph-cfg function osd_df to report disk usage. Signed-off-by: Owen Synge --- _modules/ceph_cfg/__init__.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/_modules/ceph_cfg/__init__.py b/_modules/ceph_cfg/__init__.py index 563dc38..48f7690 100644 --- a/_modules/ceph_cfg/__init__.py +++ b/_modules/ceph_cfg/__init__.py @@ -217,6 +217,33 @@ def osd_reweight(**kwargs): return ceph_cfg.osd_reweight(**kwargs) +def osd_df(**kwargs): + """ + OSD disk space report + + CLI Example: + + .. code-block:: bash + + salt '*' ceph_cfg.osd_df \\ + 'osd_number'='23' \\ + 'cluster_name'='ceph' \\ + 'cluster_uuid'='cluster_uuid' + + Notes: + + osd_number + OSD number to report space from. + + cluster_uuid + Set the deivce to store the osd data on. + + cluster_name + Set the cluster name. Defaults to "ceph". + """ + return ceph_cfg.osd_df(**kwargs) + + def keyring_create(**kwargs): ''' Create keyring for cluster From 1f8d80cbce32c8d89c804409ee761976d1fa8c37 Mon Sep 17 00:00:00 2001 From: Owen Synge Date: Wed, 7 Sep 2016 15:43:17 +0200 Subject: [PATCH 2/2] modules.ceph_cfg.init: Add cluster_df Use new python-ceph-cfg function cluster_df to report disk usage. Signed-off-by: Owen Synge --- _modules/ceph_cfg/__init__.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/_modules/ceph_cfg/__init__.py b/_modules/ceph_cfg/__init__.py index 48f7690..56b907d 100644 --- a/_modules/ceph_cfg/__init__.py +++ b/_modules/ceph_cfg/__init__.py @@ -1479,6 +1479,34 @@ def cluster_status(**kwargs): return ceph_cfg.cluster_status(**kwargs) +def cluster_df(**kwargs): + ''' + Get the cluster free space + + CLI Example: + + .. code-block:: bash + + salt '*' ceph_cfg.cluster_df \\ + 'cluster_name'='ceph' \\ + 'cluster_uuid'='cluster_uuid' + Notes: + Get the cluster free space. + + Scope: + Cluster wide + + Arguments: + + cluster_uuid + Set the cluster UUID. Defaults to value found in ceph config file. + + cluster_name + Set the cluster name. Defaults to "ceph". + ''' + return ceph_cfg.cluster_df(**kwargs) + + def cephfs_list(**kwargs): ''' list the cephfs filesystems