Change in vdsm[master]: Added gluster hooks support for existing hooks

tjeyasin at redhat.com tjeyasin at redhat.com
Fri Dec 14 12:34:34 UTC 2012


Timothy Asir has posted comments on this change.

Change subject: Added gluster hooks support for existing hooks
......................................................................


Patch Set 3: (6 inline comments)

....................................................
Commit Message
Line 12: execution of gluster command and post-scripts are executed after
Line 13: execution of gluster command.
Line 14: 
Line 15: This patch enables listing, enabling and disabling a hook
Line 16: 
Done
Line 17: New verbs:
Line 18: * glusterHookEnable,
Line 19: * glusterHookDisable
Line 20: * glusterHooksList:


....................................................
File vdsm/gluster/cli.py
Line 904:           'status': STATUS,
Line 905:           'command': GLUSTERCOMMAND,
Line 906:           'level': HOOK-LEVEL}]
Line 907:     """
Line 908:     def getHooks(gCmd, hookLevel):
Done
Line 909:         hooks = []
Line 910:         for hookFile in os.listdir(os.path.join(
Line 911:                 _glusterHooksPath, gCmd, hookLevel.lower())):
Line 912:             status = getattr(HookStatus, hookFile[0], None)


Line 914:                 hooks.append({'name': hookFile[1:],
Line 915:                               'status': status,
Line 916:                               'command': gCmd,
Line 917:                               'level': hookLevel})
Line 918:         return hooks
Done
Line 919:     hooks = []
Line 920:     try:
Line 921:         for gCmd in os.listdir(_glusterHooksPath):
Line 922:             hooks += getHooks(gCmd, HookLevel.PRE)


....................................................
File vdsm/gluster/exception.py
Line 352: 
Line 353: 
Line 354: class GlusterHookEnableFailedException(GlusterVolumeException):
Line 355:     code = 4168
Line 356:     message = "enable gluster hooks failed"
Done
Line 357: 
Line 358: 
Line 359: class GlusterHookDisableFailedException(GlusterVolumeException):
Line 360:     code = 4169


Line 357: 
Line 358: 
Line 359: class GlusterHookDisableFailedException(GlusterVolumeException):
Line 360:     code = 4169
Line 361:     message = "disable gluster hooks failed"
Done
Line 362: 
Line 363: 
Line 364: class GlusterHookAlreadyEnabledException(GlusterVolumeException):
Line 365:     code = 4170


Line 392:         self.glusterCmd = glusterCmd
Line 393:         self.level = level
Line 394:         self.hookName = hookName
Line 395:         self.message = \
Line 396:             'Hook %s for gluster command %s of action %s not found' % \
Done
Line 397:             (hookName, level, glusterCmd)
Line 398: 
Line 399: 
Line 400: # Host


--
To view, visit http://gerrit.ovirt.org/9671
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3918aa035d90967f1297dc7fadcf14b6a9385c45
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list