summaryrefslogtreecommitdiffstats
path: root/plugins/config_generator.py
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-05-21 15:54:41 +0530
committerSahina Bose <sabose@redhat.com>2014-05-23 01:59:32 -0700
commit4e7b4ec23793caaae05b1e0e7665e59bf7a607b1 (patch)
tree0501866c3d6ebd036619e8d28d45273e1589615e /plugins/config_generator.py
parent7f05b72eb56f2f012c426c988ec426740c5d1e1a (diff)
autoConfig: create quota/geo rep services conditionally
Create QUOTA and GEO Replication status services for volume only when respective services are enabled in gluster. Bug-Url: https://bugzilla.redhat.com/1099731 Change-Id: I9813a64f7d2573aaf3b23534643662e198b5457d Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7838 Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins/config_generator.py')
-rw-r--r--plugins/config_generator.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/config_generator.py b/plugins/config_generator.py
index 8466c83..acb7fff 100644
--- a/plugins/config_generator.py
+++ b/plugins/config_generator.py
@@ -155,18 +155,20 @@ class GlusterNagiosConfManager:
volumeService = self.__createVolumeUtilizationService(volume,
clusterName)
volumeServices.append(volumeService)
- volumeService = self.__createVolumeQuotaStatusService(volume,
- clusterName)
- volumeServices.append(volumeService)
+ if volume.get('quota') == "on":
+ volumeService = self.__createVolumeQuotaStatusService(
+ volume, clusterName)
+ volumeServices.append(volumeService)
+
if 'REPLICATE' in volume['type'].upper():
- volumeService = (self.
- __createVolumeHealStatusService(volume,
- clusterName))
+ volumeService = self.__createVolumeHealStatusService(
+ volume, clusterName)
volumeServices.append(volumeService)
- volumeService = (self.
- __createVolumeGeoRepStatusService(volume,
- clusterName))
- volumeServices.append(volumeService)
+ if volume.get('geo-rep') == "on":
+ volumeService = self.__createVolumeGeoRepStatusService(
+ volume, clusterName)
+ volumeServices.append(volumeService)
+
volumeService = self.__createVolumeStatusService(volume,
clusterName)
volumeServices.append(volumeService)