summaryrefslogtreecommitdiffstats
path: root/libs/parser
diff options
context:
space:
mode:
authorShwetha-H-Panduranga <shwetha@gluster.com>2011-12-13 17:07:12 +0530
committerShwetha-H-Panduranga <shwetha@gluster.com>2011-12-13 17:07:12 +0530
commit57991580217d955984c68cd899d9031736182be0 (patch)
tree89a2150f003685789d12a77ed90033924d549415 /libs/parser
parent689f862f24f949361603a808250ae3f7ec9f40f6 (diff)
Changes made to volume info. This is to support multiple 'volumetypes' and counts
Diffstat (limited to 'libs/parser')
-rw-r--r--libs/parser/parser.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/libs/parser/parser.py b/libs/parser/parser.py
index 70619c9..51c960d 100644
--- a/libs/parser/parser.py
+++ b/libs/parser/parser.py
@@ -233,17 +233,28 @@ def parse_testenv_configfile(filename):
return 1
elif re.match('volume', result):
- necessary_options = ["volumename", "volumetype",
- "count", "transporttype",
- "bricks"]
+ necessary_options = ["volumename", "bricks"]
if verify_necessary_options(cp, section, necessary_options):
volumename = items.pop('volumename')
- volumetype = items.pop('volumetype')
- count = items.pop('count')
- transporttype = items.pop('transporttype')
bricks = items.pop('bricks')
- function(section, volumename, volumetype,
- count, transporttype, bricks)
+ if (items.has_key('replica') and items['replica']):
+ replica = items.pop('replica')
+ else:
+ replica = None
+
+ if (items.has_key('stripe') and items['stripe']):
+ stripe = items.pop('stripe')
+ else:
+ stripe = None
+
+ if (items.has_key('transporttype') and
+ items['transporttype']):
+ transporttype = items.pop('transporttype')
+ else:
+ transporttype = None
+
+ function(section, volumename, replica,
+ stripe, transporttype, bricks)
else:
return 1