38
38
)
39
39
40
40
41
- class Params ( object ) :
41
+ class Params :
42
42
"""This class describes the input parameters"""
43
43
44
44
def __init__ (self ):
@@ -54,15 +54,15 @@ def __init__(self):
54
54
self .authWith = "certificate"
55
55
self .enableCS = True
56
56
57
- def disableCS (self , _arg ) -> S_OK :
57
+ def disableCS (self , _arg ) -> dict :
58
58
"""Set issuer
59
59
60
60
:param arg: issuer
61
61
"""
62
62
self .enableCS = False
63
63
return S_OK ()
64
64
65
- def setIssuer (self , arg : str ) -> S_OK :
65
+ def setIssuer (self , arg : str ) -> dict :
66
66
"""Set issuer
67
67
68
68
:param arg: issuer
@@ -71,15 +71,15 @@ def setIssuer(self, arg: str) -> S_OK:
71
71
self .issuer = arg
72
72
return S_OK ()
73
73
74
- def useDIRACAS (self , _arg ) -> S_OK :
74
+ def useDIRACAS (self , _arg ) -> dict :
75
75
"""Use DIRAC AS
76
76
77
77
:param _arg: unuse
78
78
"""
79
79
self .authWith = "diracas"
80
80
return S_OK ()
81
81
82
- def useCertificate (self , _arg ) -> S_OK :
82
+ def useCertificate (self , _arg ) -> dict :
83
83
"""Use certificate
84
84
85
85
:param _arg: unuse
@@ -89,19 +89,19 @@ def useCertificate(self, _arg) -> S_OK:
89
89
self .result = "proxy"
90
90
return S_OK ()
91
91
92
- def setCertificate (self , arg : str ) -> S_OK :
92
+ def setCertificate (self , arg : str ) -> dict :
93
93
"""Set certificate file path
94
94
95
95
:param arg: path
96
96
"""
97
97
if not os .path .exists (arg ):
98
- DIRAC .gLogger .error (f"{ arg } is not exist." )
98
+ DIRAC .gLogger .error (f"{ arg } does not exist." )
99
99
DIRAC .exit (1 )
100
100
self .useCertificate (None )
101
101
self .certLoc = arg
102
102
return S_OK ()
103
103
104
- def setPrivateKey (self , arg : str ) -> S_OK :
104
+ def setPrivateKey (self , arg : str ) -> dict :
105
105
"""Set private key file path
106
106
107
107
:param arg: path
@@ -113,23 +113,23 @@ def setPrivateKey(self, arg: str) -> S_OK:
113
113
self .keyLoc = arg
114
114
return S_OK ()
115
115
116
- def setOutputFile (self , arg : str ) -> S_OK :
116
+ def setOutputFile (self , arg : str ) -> dict :
117
117
"""Set output file location
118
118
119
119
:param arg: output file location
120
120
"""
121
121
self .outputFile = arg
122
122
return S_OK ()
123
123
124
- def setLivetime (self , arg : str ) -> S_OK :
125
- """Set proxy livetime
124
+ def setLifetime (self , arg : str ) -> dict :
125
+ """Set proxy lifetime
126
126
127
127
:param arg: lifetime
128
128
"""
129
129
self .lifetime = arg
130
130
return S_OK ()
131
131
132
- def setProxy (self , _arg ) -> S_OK :
132
+ def setProxy (self , _arg ) -> dict :
133
133
"""Return proxy
134
134
135
135
:param _arg: unuse
@@ -138,7 +138,7 @@ def setProxy(self, _arg) -> S_OK:
138
138
self .result = "proxy"
139
139
return S_OK ()
140
140
141
- def setToken (self , _arg ) -> S_OK :
141
+ def setToken (self , _arg ) -> dict :
142
142
"""Return tokens
143
143
144
144
:param _arg: unuse
@@ -148,7 +148,7 @@ def setToken(self, _arg) -> S_OK:
148
148
self .result = "token"
149
149
return S_OK ()
150
150
151
- def authStatus (self , _arg ) -> S_OK :
151
+ def authStatus (self , _arg ) -> dict :
152
152
"""Get authorization status
153
153
154
154
:param _arg: unuse
@@ -166,7 +166,7 @@ def registerCLISwitches(self):
166
166
"group: select a DIRAC group for authorization, can be determined later." , mandatory = False
167
167
)
168
168
Script .registerArgument (["scope: scope to add to authorization request." ], mandatory = False )
169
- Script .registerSwitch ("T:" , "lifetime=" , "set access lifetime in a hours" , self .setLivetime )
169
+ Script .registerSwitch ("T:" , "lifetime=" , "set access lifetime in hours" , self .setLifetime )
170
170
Script .registerSwitch (
171
171
"O:" ,
172
172
"save-output=" ,
0 commit comments