summaryrefslogtreecommitdiffstats
path: root/plugins/config_generator.py
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-04-16 10:52:56 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:37 +0530
commit8a52346c78331d6b192a0bb2205b9a73983c9a97 (patch)
tree41f22f9999ef37dcae829cafb949d732cf88689c /plugins/config_generator.py
parent7b0612039a50d9bbe7a258bf07e0ecdb4b3e50c3 (diff)
autocof: adding volume name as part of brick services
Currently there is no way to identify the volume from brick services. Hence adding volume name as custom variable and note in brick services Change-Id: If1ef000196dca2239f713fe41d033d8a4161d6c0 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
Diffstat (limited to 'plugins/config_generator.py')
-rw-r--r--plugins/config_generator.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/config_generator.py b/plugins/config_generator.py
index 9254b69..17b5df3 100644
--- a/plugins/config_generator.py
+++ b/plugins/config_generator.py
@@ -67,7 +67,7 @@ class GlusterNagiosConfManager:
checkCommand = 'check_vol_utilization!%s!%s!70!90' % \
(clusterName, volume['name'])
volumeService['check_command'] = checkCommand
- volumeService['notes'] = "Volume type : %s" % (volume['typeStr'])
+ volumeService['notes'] = "Volume type : %s" % (volume['type'])
return volumeService
def __createVolumeStatusService(self, volume, clusterName):
@@ -80,7 +80,7 @@ class GlusterNagiosConfManager:
checkCommand = 'check_vol_status!%s!%s' % \
(clusterName, volume['name'])
volumeService['check_command'] = checkCommand
- volumeService['notes'] = "Volume type : %s" % (volume['typeStr'])
+ volumeService['notes'] = "Volume type : %s" % (volume['type'])
return volumeService
def __createVolumeQuotaStatusService(self, volume, clusterName):
@@ -93,6 +93,7 @@ class GlusterNagiosConfManager:
checkCommand = 'check_vol_quota_status!%s!%s' % \
(clusterName, volume['name'])
volumeService['check_command'] = checkCommand
+ volumeService['notes'] = "Volume type : %s" % (volume['type'])
return volumeService
def createClusterUtilizationService(self, clusterName):
@@ -134,6 +135,8 @@ class GlusterNagiosConfManager:
brick['brickpath'])
brickService['service_description'] = serviceDesc
brickService['_BRICK_DIR'] = brick['brickpath']
+ brickService['_VOL_NAME'] = brick['volumeName']
+ brickService['notes'] = "Volume : %s" % (brick['volumeName'])
return brickService
def __createBrickStatusService(self, brick, hostName):
@@ -143,6 +146,8 @@ class GlusterNagiosConfManager:
serviceDesc = "Brick Status - %s:%s" % (hostName, brick['brickpath'])
brickService['service_description'] = serviceDesc
brickService['_BRICK_DIR'] = brick['brickpath']
+ brickService['_VOL_NAME'] = brick['volumeName']
+ brickService['notes'] = "Volume : %s" % (brick['volumeName'])
return brickService
def createBrickServices(self, host):