Skip to content

Commit d22176b

Browse files
committed
Add support for tspVersion in IdentifierService
Signed-off-by: Bernd Hufmann <[email protected]>
1 parent f14b70c commit d22176b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test_tsp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ def test_fetch_identifier(self):
715715
assert response.model.cpu_count
716716
assert response.model.max_memory
717717
assert response.model.product_id
718+
assert response.model.tsp_version
718719

719720
@staticmethod
720721
def __requested_parameters(response):

tsp/identifier.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
MAX_MEMORY = "maxMemory"
3232
LAUNCHER_NAME = "launcherName"
3333
PRODUCT_ID = "productId"
34+
TSP_VERSION = "tspVersion"
3435

3536

3637
class Identifier:
@@ -106,8 +107,14 @@ def __init__(self, params):
106107
else:
107108
self.launcher_name = None
108109

110+
# TSP Version
111+
if TSP_VERSION in params:
112+
self.tsp_version = params.get(TSP_VERSION)
113+
else:
114+
self.tsp_version = None
115+
109116
def to_string(self):
110117
'''
111118
to_string method
112119
'''
113-
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}]"
120+
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 commit comments

Comments
 (0)