Beispiel #1
0
 def __init__(self,
              conn_auth_mechanisms: str = None,
              conn_username: str = None,
              conn_password: str = None,
              conn_ssl_keystore_location: str = None,
              conn_ssl_keystore_password: str = None,
              conn_ssl_key_alias: str = None,
              conn_ssl_trust_all: str = None,
              conn_ssl_verify_host: str = None,
              urls: str = None,
              reconnect: bool = None,
              reconnect_interval: int = None,
              reconnect_limit: int = None,
              reconnect_timeout: int = None,
              heartbeat: int = None,
              max_frame_size: int = None):
     ConnectionOptionsCommon.__init__(self,
                                      urls=urls,
                                      reconnect=reconnect,
                                      reconnect_interval=reconnect_interval,
                                      reconnect_limit=reconnect_limit,
                                      reconnect_timeout=reconnect_timeout,
                                      heartbeat=heartbeat,
                                      max_frame_size=max_frame_size)
     self.conn_auth_mechanisms = conn_auth_mechanisms
     self.conn_username = conn_username
     self.conn_password = conn_password
     self.conn_ssl_keystore_location = conn_ssl_keystore_location
     self.conn_ssl_keystore_password = conn_ssl_keystore_password
     self.conn_ssl_key_alias = conn_ssl_key_alias
     self.conn_ssl_trust_all = conn_ssl_trust_all
     self.conn_ssl_verify_host = conn_ssl_verify_host
Beispiel #2
0
 def __init__(
     self,
     conn_ssl: bool = None,
     conn_ssl_certificate: str = None,
     conn_ssl_private_key: str = None,
     conn_ws: bool = None,
     conn_ws_protocols: str = None,
     urls: str = None,
     reconnect: bool = None,
     reconnect_interval: int = None,
     reconnect_limit: int = None,
     reconnect_timeout: int = None,
     heartbeat: int = None,
     max_frame_size: int = None,
 ) -> None:
     ConnectionOptionsCommon.__init__(
         self,
         urls=urls,
         reconnect=reconnect,
         reconnect_interval=reconnect_interval,
         reconnect_limit=reconnect_limit,
         reconnect_timeout=reconnect_timeout,
         heartbeat=heartbeat,
         max_frame_size=max_frame_size,
     )
     self.conn_ssl: Optional[bool] = conn_ssl
     self.conn_ssl_certificate: Optional[str] = conn_ssl_certificate
     self.conn_ssl_private_key: Optional[str] = conn_ssl_private_key
     self.conn_ws: Optional[bool] = conn_ws
     self.conn_ws_protocols: Optional[str] = conn_ws_protocols
Beispiel #3
0
 def valid_options(self) -> list:
     return ConnectionOptionsCommon.valid_options(self) + [
         Toggle('conn-ssl', '--conn-ssl'),
         Prefixed('conn-ssl-certificate', '--conn-ssl-certificate'),
         Prefixed('conn-ssl-private-key', '--conn-ssl-private-key'),
         Toggle('conn-ws', '--conn-ws'),
         Prefixed('conn-ws-protocols', '--conn-ws-protocols'),
     ]
Beispiel #4
0
 def valid_options(self) -> list:
     return ConnectionOptionsCommon.valid_options(self) + [
         Prefixed('conn-auth-mechanisms', '--conn-auth-mechanisms'),
         Prefixed('conn-username', '--conn-username'),
         Prefixed('conn-password', '--conn-password'),
         Prefixed('conn-ssl-keystore-location', '--conn-ssl-keystore-location'),
         Prefixed('conn-ssl-keystore-password', '--conn-ssl-keystore-password'),
         Prefixed('conn-ssl-key-alias', '--conn-ssl-key-alias'),
         Prefixed('conn-ssl-trust-all', '--conn-ssl-trust-all'),
         Prefixed('conn-ssl-verify-host', '--conn-ssl-verify-host'),
     ]
 def __init__(self,
              conn_allowed_mechs: str = None,
              conn_ssl_certificate: str = None,
              conn_ssl_private_key: str = None,
              urls: str = None,
              reconnect: bool = None,
              reconnect_interval: int = None,
              reconnect_limit: int = None,
              reconnect_timeout: int = None,
              heartbeat: int = None,
              max_frame_size: int = None):
     ConnectionOptionsCommon.__init__(self,
                                      urls=urls,
                                      reconnect=reconnect,
                                      reconnect_interval=reconnect_interval,
                                      reconnect_limit=reconnect_limit,
                                      reconnect_timeout=reconnect_timeout,
                                      heartbeat=heartbeat,
                                      max_frame_size=max_frame_size)
     self.conn_allowed_mechs = conn_allowed_mechs
     self.conn_ssl_certificate = conn_ssl_certificate
     self.conn_ssl_private_key = conn_ssl_private_key
Beispiel #6
0
 def __init__(
     self,
     stdout: bool = False,
     stderr: bool = False,
     daemon: bool = False,
     timeout: int = 0,
     encoding: str = 'utf-8',
 ) -> None:
     super(ClientCommand, self).__init__([], stdout, stderr, daemon,
                                         timeout, encoding)
     self.control: ControlOptionsCommon = ControlOptionsCommon()
     self.logging: LoggingOptionsCommon = LoggingOptionsCommon()
     self.connection: ConnectionOptionsCommon = ConnectionOptionsCommon()
     self.connector: ConnectorOptions = ConnectorOptions()
Beispiel #7
0
 def __init__(
     self,
     stdout: bool = False,
     stderr: bool = False,
     daemon: bool = False,
     timeout: int = 0,
     encoding: str = 'utf-8',
 ) -> None:
     super(ClientCommandBase, self).__init__(
         [], stdout, stderr, daemon, timeout, encoding
     )
     self.control: ControlOptionsSenderReceiver = ControlOptionsSenderReceiver()
     self.logging: LoggingOptionsSenderReceiver = LoggingOptionsSenderReceiver()
     self.transaction: TransactionOptionsSenderReceiver = TransactionOptionsSenderReceiver()
     self.connection: ConnectionOptionsCommon = ConnectionOptionsCommon()
     self.message: MessageOptionsSender = MessageOptionsSender()
Beispiel #8
0
 def valid_options(self) -> list:
     return ConnectionOptionsCommon.valid_options(self) + [
         Prefixed('conn-allowed-mechs', '--conn-allowed-mechs'),
         Prefixed('conn-ssl-certificate', '--conn-ssl-certificate'),
         Prefixed('conn-ssl-private-key', '--conn-ssl-private-key'),
     ]