From 7ace3f614ac32c6c0b5121ec8c3f28ea57d22eba Mon Sep 17 00:00:00 2001 From: Shwetha-H-Panduranga Date: Wed, 21 Dec 2011 10:42:37 +0530 Subject: Adding new argument 'operation' for the function volume_replacebrick to specify what operation to be performed --- libs/utils/glusterutils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libs') diff --git a/libs/utils/glusterutils.py b/libs/utils/glusterutils.py index 551d23e..f55d260 100644 --- a/libs/utils/glusterutils.py +++ b/libs/utils/glusterutils.py @@ -419,11 +419,11 @@ def volume_addbrick(serverkey, *bricks): atfutils.print_stderr(output['stderrdata']) return return_status -def volume_replacebrick(serverkey, replacebrick_key, tobrick_key): +def volume_replacebrick(serverkey, brick, newbrick, operation): """ """ logger = GlobalObj.getLoggerObj() - base_command = "gluster volume replace-brick " + base_command = "gluster volume replace-brick" env = GlobalObj.getTestenvObj() cm = GlobalObj.getConnectionsManagerObj() command = [base_command] @@ -440,7 +440,7 @@ def volume_replacebrick(serverkey, replacebrick_key, tobrick_key): logger.error("Invalid Brick. Brick Not defined in TestEnvironment") return 1 - command.extend([volumename, replace_brick, to_brick]) + command.extend([volumename, brick, newbrick, operation]) command = ' '.join(command) host_connection = cm.getConnection(serverkey) if not host_connection: @@ -452,11 +452,11 @@ def volume_replacebrick(serverkey, replacebrick_key, tobrick_key): output = host_connection.executecommand(command, commandInput="y\n") return_status = atfutils.assert_success(**output) if not return_status: - if env.replaceBrickInVolume(replacebrick_key, tobrick_key): + if env.replaceBrickInVolume(brick, newbrick): return 1 atfutils.print_stdout(output['stdoutdata']) atfutils.print_stderr(output['stderrdata']) - return return_status + return output def volume_set(serverkey, key, value): """ -- cgit