SAM0123-231: Enhance OPC UA client setup by asserting certificate and private key presence and assigning pod ID to client description.

This commit is contained in:
vitor-aignosi
2026-07-23 16:18:28 -03:00
parent f099091bee
commit a239a1a706

View File

@@ -162,6 +162,7 @@ class OpcManager(SientiaMonitoring):
cert = str(Path(self.cert_path)) if self.cert_path else None
private_key = str(Path(self.private_key_path)) if self.private_key_path else None
server_cert = str(Path(self.server_cert_path)) if self.server_cert_path else None
assert cert is not None and private_key is not None
if self.client:
self.client.application_uri = self.server_uri
@@ -209,7 +210,7 @@ class OpcManager(SientiaMonitoring):
assert self.client is not None # Informa ao mypy que client não é None
self.client.name = self.pod_id
self.client.application_name = self.pod_id
self.client.description = self.pod_id
pod_uri = self.pod_id.replace('-', ':')
self.client.application_uri = pod_uri
self.client.product_uri = pod_uri