Service Module
There is rarely a need to create a custom instance of any of the classes here. :py:
- class arrowhead_client.service.Service(service_definition, service_uri='', interface=None, access_policy=AccessPolicy.CERTIFICATE, metadata=None, version=None)
-
Arrowhead Service class.
- Parameters
service_definition (str) –
service_uri (str) –
interface (ServiceInterface) –
access_policy (str) –
metadata (Metadata) –
version (Version) –
- Return type
None
- interface
-
Service interface triple, given as
str
(ex.'HTTP-SECURITY_SECURE-JSON'
) or asServiceInterface
.
- class arrowhead_client.service.ServiceInterface(protocol, secure, payload)
-
Service interface triple class.
- Parameters
protocol (str) –
secure (str) –
payload (str) –
- Return type
None
- classmethod from_str(interface_str)
-
Construct a ServiceInterface from a string representation.
- Parameters
interface_str (
str
) – string representation of type ‘PROTOCOL-SECURITY_SECURE-PAYLOAD’- Return type
- Returns
ServiceInterface from string description.
- Raises
TypeError if interface string is malformed. –
- classmethod with_access_policy(protocol, access_policy, payload)
-
Construct a ServiceInterface similar to the normal constructor, but using the name of an access policy instead of ‘SECURITY_SECURE’ or ‘SECURITY_INSECURE’
- Parameters
protocol – Protocol supported by service.
access_policy – Access policy.
payload – Payload type.
- Returns
ServiceInterface from string description.