File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,6 +285,28 @@ def GetFloatingClientMeterAttributeUses(name):
285285 else :
286286 raise LexFloatClientException (status )
287287
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+
288310 @staticmethod
289311 def RequestFloatingLicense ():
290312 """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):
163163GetFloatingClientMeterAttributeUses .argtypes = [CSTRTYPE , POINTER (c_uint32 )]
164164GetFloatingClientMeterAttributeUses .restype = c_int
165165
166+ GetFloatingClientMetadata = library .GetFloatingClientMetadata
167+ GetFloatingClientMetadata .argtypes = [CSTRTYPE , STRTYPE , c_uint32 ]
168+ GetFloatingClientMetadata .restype = c_int
169+
166170RequestFloatingLicense = library .RequestFloatingLicense
167171RequestFloatingLicense .argtypes = []
168172RequestFloatingLicense .restype = c_int
You can’t perform that action at this time.
0 commit comments