MCPcopy Create free account
hub / github.com/ceph/ceph / main

Function main

src/python-common/ceph/cryptotools/cryptotools.py:96–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94
95
96def main() -> None:
97 # create the top-level parser
98 parser = argparse.ArgumentParser(prog='cryptotools.py')
99 parser.set_defaults(crypto=InternalCryptoCaller())
100 subparsers = parser.add_subparsers(required=True)
101
102 # create the parser for the "password_hash" command
103 parser_password_hash = subparsers.add_parser('password_hash')
104 parser_password_hash.set_defaults(func=password_hash)
105
106 # create the parser for the "create_self_signed_cert" command
107 parser_cssc = subparsers.add_parser('create_self_signed_cert')
108 parser_cssc.set_defaults(func=create_self_signed_cert)
109
110 parser_cpk = subparsers.add_parser('create_private_key')
111 parser_cpk.set_defaults(func=create_private_key)
112
113 # create the parser for the "certificate_days_to_expire" command
114 parser_dte = subparsers.add_parser('certificate_days_to_expire')
115 parser_dte.set_defaults(func=certificate_days_to_expire)
116
117 # create the parser for the "get_cert_issuer_info" command
118 parser_gcii = subparsers.add_parser('get_cert_issuer_info')
119 parser_gcii.set_defaults(func=get_cert_issuer_info)
120
121 # create the parser for the "verify_tls" command
122 parser_verify_tls = subparsers.add_parser('verify_tls')
123 parser_verify_tls.set_defaults(func=verify_tls)
124
125 # password verification
126 parser_verify_password = subparsers.add_parser('verify_password')
127 parser_verify_password.set_defaults(func=verify_password)
128
129 # parse the args and call whatever function was selected
130 args = parser.parse_args()
131 args.func(args)
132
133
134if __name__ == "__main__":

Callers 1

cryptotools.pyFile · 0.70

Calls 4

set_defaultsMethod · 0.80
parse_argsMethod · 0.45
funcMethod · 0.45

Tested by

no test coverage detected