2 Manage customers (credit-unions). 11 """ Manage customers (credit-unions). """ 15 def setup_args(self, parser):
16 self.add_subcommand(Create)
20 """ Create a new customer. 22 This will create DB tables, records and filesystem assets for a new 25 NOTE: This is a wrapper for the wellknown `cuset.pl` tool. 51 def setup_args(self, parser):
52 self.add_argument(
'ident', help=
'Credit Union Identifier',
54 self.add_argument(
'--vendor', choices=self.
vendors, help=
'Core vendor')
55 self.add_argument(
'--batch', action=
'store_true', help=
'Use `Batch` ' 56 'insteade of `Live` mode.')
57 self.add_argument(
'--nodb', action=
'store_true', help=
'No Database')
58 self.add_argument(
'--nofs', action=
'store_true', help=
'No Filesystem')
60 def ident(self, value):
61 if re.match(
'[a-zA-Z0-9]*', value).group() != value:
62 raise ValueError(
'Invalid characters')
67 '/usr/bin/env',
'perl',
'/cli/cuset.pl',
70 '-v', args.vendor
if args.vendor
else '',
71 '-t',
'B' if args.batch
else 'L',
72 '-x',
'Y' if args.nofs
else 'N',
73 '-w',
'Y' if args.nodb
else 'N',
75 raise SystemExit(subprocess.call(cmd))