diff options
Diffstat (limited to 'Libraries/GlusterCommands/ATFGlusterd.py')
-rwxr-xr-x | Libraries/GlusterCommands/ATFGlusterd.py | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/Libraries/GlusterCommands/ATFGlusterd.py b/Libraries/GlusterCommands/ATFGlusterd.py deleted file mode 100755 index fe2a838..0000000 --- a/Libraries/GlusterCommands/ATFGlusterd.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -import ATFUtils - -def start_glusterd(**arguments): - """ - Objective : - Start Glusterd process on the server - - Parameter : - arguments: key = value pair. - server = 'server(1..n)' - host = 'host(1..n)' - Return: - Success : 0 - Failure : 1 - """ - - command = "/etc/init.d/glusterd start" - arguments['user'] = 'root' - status, stdin, stdout, stderr = ATFUtils.execute_command(command, - **arguments) - - if (status == 1): - return 1 - else: - return ATFUtils.parse_output(stdout, stderr) - -def stop_glusterd(**arguments): - """ - Description: - Stop Glusterd process on the server - - Parameter: - arguments: key = value pair. - server = 'server(1..n)' - host = 'host(1..n)' - - Return: - Success : 0 - Failure : 1 - """ - - command = "/etc/init.d/glusterd stop" - arguments['user'] = 'root' - status, stdin, stdout, stderr = ATFUtils.execute_command(command, - **arguments) - - if (status == 1): - return 1 - else: - return ATFUtils.parse_output(stdout, stderr) - -def restart_glusterd(**arguments): - """ - Description: - Restart Glusterd process on the server - - Parameter: - arguments: key = value pair. - server = 'server(1..n)' - host = 'host(1..n)' - - Return: - Success : 0 - Failure : 1 - """ - - command = "/etc/init.d/glusterd restart" - arguments['user'] = 'root' - status, stdin, stdout, stderr = ATFUtils.execute_command(command, - **arguments) - - if (status == 1): - return 1 - else: - return ATFUtils.parse_output(stdout, stderr) - -def cleanup_glusterd(**arguments): - """ - Description: - Cleans up the glusterd directory on Servers - - Parameter: - arguments: key = value pair. - server = 'server(1..n)' - host = 'host(1..n)' - - Return: - Success : 0 - Failure : 1 - """ - - command = "rm -rf /etc/glusterd/*" - arguments['user'] = 'root' - status, stdin, stdout, stderr = ATFUtils.execute_command(command, - **arguments) - - if (status == 1): - return 1 - else: - return ATFUtils.parse_output(stdout, stderr) - - |