Skip to content

Commit

Permalink
Add support for tspVersion in IdentifierService
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Nov 1, 2024
1 parent f14b70c commit d22176b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions test_tsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ def test_fetch_identifier(self):
assert response.model.cpu_count
assert response.model.max_memory
assert response.model.product_id
assert response.model.tsp_version

@staticmethod
def __requested_parameters(response):
Expand Down
9 changes: 8 additions & 1 deletion tsp/identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
MAX_MEMORY = "maxMemory"
LAUNCHER_NAME = "launcherName"
PRODUCT_ID = "productId"
TSP_VERSION = "tspVersion"


class Identifier:
Expand Down Expand Up @@ -106,8 +107,14 @@ def __init__(self, params):
else:
self.launcher_name = None

# TSP Version
if TSP_VERSION in params:
self.tsp_version = params.get(TSP_VERSION)
else:
self.tsp_version = None

def to_string(self):
'''
to_string method
'''
return f"Identifier[version={self.server_version}, buildTime={self.build_time}, os={self.os_name}, osArch={self.os_arch}, osVersion={self.os_version}, cpuCount={self.cpu_count}, maxMemory={self.max_memory}, productId={self.product_id}, launcherName={self.launcher_name}]"
return f"Identifier[version={self.server_version}, buildTime={self.build_time}, os={self.os_name}, osArch={self.os_arch}, osVersion={self.os_version}, cpuCount={self.cpu_count}, maxMemory={self.max_memory}, productId={self.product_id}, launcherName={self.launcher_name}, tspVersion={self.tsp_version}]"

0 comments on commit d22176b

Please sign in to comment.