System Module
- class arrowhead_client.system.ArrowheadSystem(**data)
-
ArrowheadSystem class, inherits from
DTOMixin
, which makes it a subclass ofpydantic.BaseModel
. This makes__init__
have different behaviour, which is described in the links above.This class is a data container for data related to a system in an Arrowhead local cloud. It should not be necessary to create instances of this class outside of sending data between systems.
- Parameters
system_name (str) – System name.
address (str) – URL or IP address.
port (int) – Port.
authentication_info (str) – Authentication info.
systemName (str) – Alias of system_name.
authenticationInfo (str) – Alias of authentication_info
- Return type
None
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- classmethod make(system_name, address, port, authentication_info='')
-
Creates a new instance of ArrowheadSystem without needing to use keyword arguments.
- Parameters
system_name (
str
) – Name of the system.address (
str
) – Address of the system.port (
int
) – Port of the system.authentication_info (
str
) – PEM string representing the certificate used by the client owning the system.
- Returns
Instantiated ArrowheadSystem.
Example:
pythonfrom arrowhead_client.system import ArrowheadSystem # Create an ArrowheadSystem without an authentication info string. example_system = ArrowheadSystem.make( 'example_system', '127.0.0.1', 5678, )
- classmethod with_certfile(system_name, address, port, certfile)
-
Creates a new ArrowheadSystem similarly to ArrowheadSystem.make(), but automatically constructs the authentication info from a certificate file.
- Parameters
system_name (
str
) – Name of the system.address (
str
) – Address of the system.port (
int
) – Port of the system.certfile (
str
) – PEM certificate file.
- Return type
- Returns
Instantiated ArrowheadSystem.
Example:
pythonfrom arrowhead_client.system import ArrowheadSystem # Create a new instance of ArrowheadSystem and automatically generate # authentication string from a certificate. example_system = ArrowheadSystem.with_certfile( 'example_system', '127.0.0.1', 5678, 'certificates/example_system.crt', )