diff options
author | Shwetha-H-Panduranga <shwetha@gluster.com> | 2011-12-13 17:07:12 +0530 |
---|---|---|
committer | Shwetha-H-Panduranga <shwetha@gluster.com> | 2011-12-13 17:07:12 +0530 |
commit | 57991580217d955984c68cd899d9031736182be0 (patch) | |
tree | 89a2150f003685789d12a77ed90033924d549415 /libs/utils | |
parent | 689f862f24f949361603a808250ae3f7ec9f40f6 (diff) |
Changes made to volume info. This is to support multiple 'volumetypes' and counts
Diffstat (limited to 'libs/utils')
-rw-r--r-- | libs/utils/glusterutils.py | 16 |
1 files changed, 12 insertions, 4 deletions
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]) |