1313See the License for the specific language governing permissions and
1414limitations under the License.
1515"""
16+
1617import logging
1718import os
1819from typing import Dict , List , Optional
@@ -34,6 +35,10 @@ def __init__(self, data: Dict):
3435 self .__client_key : str = data .get ("client_key" , None )
3536 self .__client_key_pass_file : str = data .get ("client_key_pass_file" , None )
3637 self .__root_ca : str = data .get ("root_ca" , "/etc/pki/tls/certs/ca-bundle.crt" )
38+ self .__radas_sign_timeout_retry_count : int = data .get ("radas_sign_timeout_retry_count" , 10 )
39+ self .__radas_sign_timeout_retry_interval : int = data .get (
40+ "radas_sign_timeout_retry_interval" , 60
41+ )
3742
3843 def validate (self ) -> bool :
3944 if not self .__umb_host :
@@ -60,7 +65,7 @@ def validate(self) -> bool:
6065 return True
6166
6267 def umb_target (self ) -> str :
63- return f' amqps://{ self .__umb_host } :{ self .__umb_host_port } '
68+ return f" amqps://{ self .__umb_host } :{ self .__umb_host_port } "
6469
6570 def result_queue (self ) -> str :
6671 return self .__result_queue
@@ -77,7 +82,7 @@ def client_key(self) -> str:
7782 def client_key_password (self ) -> str :
7883 pass_file = self .__client_key_pass_file
7984 if os .access (pass_file , os .R_OK ):
80- with open (pass_file , 'r' ) as f :
85+ with open (pass_file , "r" ) as f :
8186 return f .read ()
8287 elif pass_file :
8388 logger .warning ("The key password file is not accessible. Will ignore the password." )
@@ -86,6 +91,12 @@ def client_key_password(self) -> str:
8691 def root_ca (self ) -> str :
8792 return self .__root_ca
8893
94+ def radas_sign_timeout_retry_count (self ) -> int :
95+ return self .__radas_sign_timeout_retry_count
96+
97+ def radas_sign_timeout_retry_interval (self ) -> int :
98+ return self .__radas_sign_timeout_retry_interval
99+
89100
90101class CharonConfig (object ):
91102 """CharonConfig is used to store all configurations for charon
0 commit comments