Features
This section describes all features that are shipped with this package.
Scenario Features
Client Features
- class balderhub.rfb.lib.features.client.ErrorMessageViewerFeature(**kwargs)
Bases:
FeatureFeature that allows to access the provided error message from the rfb client
- get_message() str | None
- Returns:
returns the expected error message
- class balderhub.rfb.lib.features.client.RfbClientErrorMessageConfig(**kwargs)
Bases:
Featureconfig feature that holds information about the expected error messages of the rfb client
- property failed_sec_result: str
- Returns:
return the expected error message if the security result failed
- property invalid_security_type: str
- Returns:
return the expected error message if the security type is invalid
- class balderhub.rfb.lib.features.client.RfbClientFeature(**kwargs)
Bases:
Featurefeature class that manages the rfb client
- class RfbServer
Bases:
VDevicevdevice of the rfb server which holds at least the rfb server configuration
- connect(password: str | None = None)
triggers the rfb client connect
- Parameters:
password – the rfb password that should be used for connecting with the rfb server (if this parameter is None, the client should use the password from the configured value in the VDevice)
- disconnect()
triggers the disconnecting from the connected rfb server
Server Features
- class balderhub.rfb.lib.features.server.ClosedPortConfig(**kwargs)
Bases:
Featureconfig feature that returns a port that is expected to be closed
- get_closed_port() int
- Returns:
returns an expected closed port
- class balderhub.rfb.lib.features.server.ProtocolInjectorFeature(**kwargs)
Bases:
Featurefeature that allows to set a protocol version
- set_protocol_version(protocol_bytes: bytes | bytearray)
This method sets a protocol version that should be returned by the server
- Parameters:
protocol_bytes – the protocol that should be returned by the server
- class balderhub.rfb.lib.features.server.PasswordSetterFeature(**kwargs)
Bases:
Featurefeature that sets the password for the rfb server
- set_password(password: str)
This method sets the password that should be used by the server
- Parameters:
password – the password that should be set
- class balderhub.rfb.lib.features.server.RfbServerConfig(**kwargs)
Bases:
Featureconfig feature that holds all important coniguration of the rfb server
- property hostname
- Returns:
returns the hostname of the rfb server
- property password
- Returns:
returns the valid password of the rfb server
- property port
- Returns:
returns the port of the rfb server
- class balderhub.rfb.lib.features.server.RunningRfbServerFeature(**kwargs)
Bases:
Featureautonomous feature that describes a running rfb server
- class balderhub.rfb.lib.features.server.SecResultInjectorFeature(**kwargs)
Bases:
Featurefeature that allows to set inject a security result that should be returned by the rfb server
- set_security_result(security_result: bytes)
This method sets the security result that should be returned by the server (independent of the normal workflow)
- Parameters:
security_result – the security result that should be set
- class balderhub.rfb.lib.features.server.SecurityTypeInjectorFeature(**kwargs)
Bases:
Featurefeature that sets the allowed security types that should be returned by the server
- set_one_security_type(security_type: int | None)
This method allows to set exactly one allowed security type. This value will be returned by the server in the available-security-type message.
- Parameters:
security_type – the security type that should be set in the server (None in case the server should return no ‘supported security types’)
Setup Features
Client Setup Features
This section holds features that can directly be used in your setup.
- class balderhub.rfb.lib.setup_features.server.ProtocolInjectorFeature(**kwargs)
Bases:
ProtocolInjectorFeaturesetup feature that allows to set a protocol version for the shipped
RfbServer- set_protocol_version(protocol_bytes: bytes | bytearray)
This method sets a protocol version that should be returned by the server
- Parameters:
protocol_bytes – the protocol that should be returned by the server
- class balderhub.rfb.lib.setup_features.server.LocalTestRfbServerFeature(**kwargs)
Bases:
Featuresetup only feature that provides the bindings for the shipped
RfbServer- set_password(password: str)
This method sets the password in the rfb server.
- Parameters:
password – the password that should be set
- set_protocol_version(protocol_bytes: bytes | bytearray)
This method sets the protocol version in the server
- Parameters:
protocol_bytes – the protocol that should be returned by the server
- set_security_result(security_result: bytes)
This method sets the security result that should be returned by the rfb server
- Parameters:
security_result – the security type that should be returned
- set_security_types(security_types: List[int])
This method sets the security types that should be returned as available-security-types
- Parameters:
security_types – a list with all security types that should be returned
- shutdown_server()
This method shuts down the server
- start_server()
method that starts the rfb server
- class balderhub.rfb.lib.setup_features.server.PasswordSetterFeature(**kwargs)
Bases:
PasswordSetterFeaturesetup feature that sets the password for the shipped
RfbServer- set_password(password: str)
This method sets the password that should be used by the server
- Parameters:
password – the password that should be set
- class balderhub.rfb.lib.setup_features.server.SecResultInjectorFeature(**kwargs)
Bases:
SecResultInjectorFeaturesetup feature that allows to set inject a security result that should be returned by the shipped
RfbServer- set_security_result(security_result: bytes)
This method sets the security result that should be returned by the server (independent of the normal workflow)
- Parameters:
security_result – the security result that should be set
- class balderhub.rfb.lib.setup_features.server.SecurityTypeInjectorFeature(**kwargs)
Bases:
SecurityTypeInjectorFeaturesetup feature that sets the allowed security types that should be returned by the shipped
RfbServer- set_allowed_security_types(security_types: List[int])
note: the set security types must be supported by the server
- set_one_security_type(security_type: int | None)
This method allows to set exactly one allowed security type. This value will be returned by the server in the available-security-type message.
- Parameters:
security_type – the security type that should be set in the server (None in case the server should return no ‘supported security types’)