def init_parser():
 parser = argparse.ArgumentParser(description='Checks if any upgrade is required and runs the script for the process.')
 parser.add_argument('--keyname', help='The deployment keyname')
 parser.add_argument('--log-postfix', help='An identifier for the status log')
 parser.add_argument('--db-master', required=True, help='The IP address of the DB master')
 parser.add_argument('--zookeeper', nargs='+', help='A list of ZooKeeper IP addresses')
 parser.add_argument('--database', nargs='+', help='A list of DB IP addresses')
 parser.add_argument('--replication', type=int, help='The keyspace replication factor')
 return parser

def init_parser ( ) : parser = argparse . ArgumentParser ( description = 'Checks if any upgrade is required and runs the script for the process.' ) parser . add_argument ( '--keyname' , help = 'The deployment keyname' ) parser . add_argument ( '--log-postfix' , help = 'An identifier for the status log' ) parser . add_argument ( '--db-master' , required = True , help = 'The IP address of the DB master' ) parser . add_argument ( '--zookeeper' , nargs = '+' , help = 'A list of ZooKeeper IP addresses' ) parser . add_argument ( '--database' , nargs = '+' , help = 'A list of DB IP addresses' ) parser . add_argument ( '--replication' , type = int , help = 'The keyspace replication factor' ) return parser
initializes the command line argument parser .