summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-05-21 14:39:37 +0530
committerSahina Bose <sabose@redhat.com>2014-05-23 02:00:20 -0700
commitbb238a1049c229858dc1dbfeab9a36a90de1e062 (patch)
treef727e45d1a971c62b8066963208d856d84745b4d /plugins
parenta154212abf47d6bf5b2c6416887f177a062a59d5 (diff)
autoConfig: Return quota and geo rep status in discover volumes
Returning quota and geo replication status as part of volume discovery. It can be used by the auto config in nagios to create or delete the quota/geo rep services based on their enablement in gluster Bug-Url: https://bugzilla.redhat.com/1099731 Change-Id: Iff9406204f4c55298021a6b262185396713b9b47 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7839 Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/discover_volumes.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/discover_volumes.py b/plugins/discover_volumes.py
index f917d40..ba48532 100755
--- a/plugins/discover_volumes.py
+++ b/plugins/discover_volumes.py
@@ -56,6 +56,15 @@ def discoverVolumes(volumeName, list):
volDict['name'] = key
volDict['type'] = volume['volumeType']
if not list:
+ volOptions = volume.get('options')
+ if volOptions:
+ quotaStatus = volOptions.get('features.quota')
+ if quotaStatus == "on":
+ volDict['quota'] = quotaStatus
+ geoRepStatus = volOptions.get('geo-replication.indexing')
+ if geoRepStatus == "on":
+ volDict['geo-rep'] = geoRepStatus
+
volDict['bricks'] = []
for brick in volume['bricksInfo']:
brickproplist = brick['name'].split(':')