type -> ec_type updates for command line tools

Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
This commit is contained in:
Tushar Gohad
2014-04-20 19:23:30 -07:00
parent b4622ce4ab
commit a816e2c553
4 changed files with 20 additions and 22 deletions

@ -32,21 +32,20 @@ import argparse
parser = argparse.ArgumentParser(description='Encoder for PyECLib.')
parser.add_argument('k', type=int, help='number of data elements')
parser.add_argument('m', type=int, help='number of parity elements')
parser.add_argument('type', help='EC algorithm used')
parser.add_argument('ec_type', help='EC algorithm used')
parser.add_argument('file_dir', help='directory with the file')
parser.add_argument('filename', help='file to encode')
parser.add_argument('fragment_dir', help='directory to drop encoded fragments')
args = parser.parse_args()
print args.k
print args.m
print args.type
print args.filename
print("k = %d, m = %d" % (args.k, args.m))
print("ec_type = %s" % args.ec_type)
print("filename = %s" % args.filename)
ec_driver = ECDriver(
"pyeclib.core.ECPyECLibDriver",
k=args.k, m=args.m, type=args.type)
k=args.k, m=args.m, ec_type=args.ec_type)
# read
with open(("%s/%s" % (args.file_dir, args.filename)), "rb") as fp: