From 57991580217d955984c68cd899d9031736182be0 Mon Sep 17 00:00:00 2001 From: Shwetha-H-Panduranga Date: Tue, 13 Dec 2011 17:07:12 +0530 Subject: Changes made to volume info. This is to support multiple 'volumetypes' and counts --- libs/utils/glusterutils.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'libs/utils/glusterutils.py') diff --git a/libs/utils/glusterutils.py b/libs/utils/glusterutils.py index 7ab41d0..551d23e 100644 --- a/libs/utils/glusterutils.py +++ b/libs/utils/glusterutils.py @@ -277,18 +277,26 @@ def volume_create(serverkey): """ """ logger = GlobalObj.getLoggerObj() - base_command = "gluster volume create " + base_command = "gluster volume create" + command = [base_command] env = GlobalObj.getTestenvObj() cm = GlobalObj.getConnectionsManagerObj() active_volume = env.getActiveVolume() if not active_volume: logger.error("ActiveVolume not defined for the TestEnvironment") return 1 + command.extend([active_volume.volumename]) + + if active_volume.replica: + command.extend(["replica", active_volume.replica]) - command = ' '.join([base_command, active_volume.volumename, - active_volume.volumetype, active_volume.count, - "transport", active_volume.transporttype]) + if active_volume.stripe: + command.extend(["stripe", active_volume.stripe]) + + if active_volume.transporttype: + command.extend(["transport", active_volume.transporttype]) + command = ' '.join(command) for brick_obj in active_volume.bricks: brick_value = brick_obj.hostname + ":" + brick_obj.path command = ' '.join([command, brick_value]) -- cgit