File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,28 @@ def GetFloatingClientMeterAttributeUses(name):
285
285
else :
286
286
raise LexFloatClientException (status )
287
287
288
+ @staticmethod
289
+ def GetFloatingClientMetadata (key ):
290
+ """Gets the value of the floating client metadata.
291
+
292
+ Args:
293
+ key (str): metadata key to retrieve the value
294
+
295
+ Raises:
296
+ LexFloatClientException
297
+
298
+ Returns:
299
+ str: value of the floating client metadata
300
+ """
301
+ cstring_key = LexFloatClientNative .get_ctype_string (key )
302
+ buffer_size = 4096
303
+ buffer = LexFloatClientNative .get_ctype_string_buffer (buffer_size )
304
+ status = LexFloatClientNative .GetFloatingClientMetadata (
305
+ cstring_key , buffer , buffer_size )
306
+ if status != LexFloatStatusCodes .LF_OK :
307
+ raise LexFloatClientException (status )
308
+ return LexFloatClientNative .byte_to_string (buffer .value )
309
+
288
310
@staticmethod
289
311
def RequestFloatingLicense ():
290
312
"""Sends the request to lease the license from the LexFloatServer.
Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ def byte_to_string(input):
163
163
GetFloatingClientMeterAttributeUses .argtypes = [CSTRTYPE , POINTER (c_uint32 )]
164
164
GetFloatingClientMeterAttributeUses .restype = c_int
165
165
166
+ GetFloatingClientMetadata = library .GetFloatingClientMetadata
167
+ GetFloatingClientMetadata .argtypes = [CSTRTYPE , STRTYPE , c_uint32 ]
168
+ GetFloatingClientMetadata .restype = c_int
169
+
166
170
RequestFloatingLicense = library .RequestFloatingLicense
167
171
RequestFloatingLicense .argtypes = []
168
172
RequestFloatingLicense .restype = c_int
You can’t perform that action at this time.
0 commit comments