@@ -22,19 +22,32 @@ def profile_name_arg(required=False):
2222 return click .argument ("profile_name" , required = required )
2323
2424
25- name_option = click .option (
26- "-n" ,
27- "--name" ,
28- required = True ,
29- help = "The name of the Code42 CLI profile to use when executing this command." ,
30- )
31- server_option = click .option (
32- "-s" , "--server" , required = True , help = "The URL you use to sign into Code42." ,
33- )
25+ def name_option (required = False ):
26+ return click .option (
27+ "-n" ,
28+ "--name" ,
29+ required = required ,
30+ help = "The name of the Code42 CLI profile to use when executing this command." ,
31+ )
32+
33+
34+ def server_option (required = False ):
35+ return click .option (
36+ "-s" ,
37+ "--server" ,
38+ required = required ,
39+ help = "The URL you use to sign into Code42." ,
40+ )
41+
42+
43+ def username_option (required = False ):
44+ return click .option (
45+ "-u" ,
46+ "--username" ,
47+ required = required ,
48+ help = "The username of the Code42 API user." ,
49+ )
3450
35- username_option = click .option (
36- "-u" , "--username" , required = True , help = "The username of the Code42 API user." ,
37- )
3851
3952password_option = click .option (
4053 "--password" ,
@@ -66,9 +79,9 @@ def show(profile_name):
6679
6780
6881@profile .command ()
69- @name_option
70- @server_option
71- @username_option
82+ @name_option ( required = True )
83+ @server_option ( required = True )
84+ @username_option ( required = True )
7285@password_option
7386@yes_option (hidden = True )
7487@disable_ssl_option
@@ -83,9 +96,9 @@ def create(name, server, username, password, disable_ssl_errors):
8396
8497
8598@profile .command ()
86- @name_option
87- @server_option
88- @username_option
99+ @name_option ()
100+ @server_option ()
101+ @username_option ()
89102@password_option
90103@disable_ssl_option
91104def update (name , server , username , password , disable_ssl_errors ):
0 commit comments