summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShwetha-H-Panduranga <shwetha@gluster.com>2011-12-21 10:42:37 +0530
committerShwetha-H-Panduranga <shwetha@gluster.com>2011-12-21 10:42:37 +0530
commit7ace3f614ac32c6c0b5121ec8c3f28ea57d22eba (patch)
tree72b2eadcb5a93380eb1b82ceb1daccaf6779d6f8
parentb07492a89cef6db01ae04979a00c8645ba41a94c (diff)
Adding new argument 'operation' for the function volume_replacebrick to specify what operation to be performed
-rw-r--r--libs/utils/glusterutils.py10
1 files changed, 5 insertions, 5 deletions
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):
"""