File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -267,6 +267,28 @@ def GetFloatingClientMeterAttributeUses(name):
267267 else :
268268 raise LexFloatClientException (status )
269269
270+ @staticmethod
271+ def GetFloatingClientMetadata (key ):
272+ """Gets the value of the floating client metadata.
273+
274+ Args:
275+ key (str): metadata key to retrieve the value
276+
277+ Raises:
278+ LexFloatClientException
279+
280+ Returns:
281+ str: value of metadata for the key
282+ """
283+ cstring_key = LexFloatClientNative .get_ctype_string (key )
284+ buffer_size = 256
285+ buffer = LexFloatClientNative .get_ctype_string_buffer (buffer_size )
286+ status = LexFloatClientNative .GetFloatingClientMetadata (
287+ cstring_key , buffer , buffer_size )
288+ if status != LexFloatStatusCodes .LF_OK :
289+ raise LexFloatClientException (status )
290+ return LexFloatClientNative .byte_to_string (buffer .value )
291+
270292 @staticmethod
271293 def RequestFloatingLicense ():
272294 """Sends the request to lease the license from the LexFloatServer.
Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ def byte_to_string(input):
159159GetFloatingClientMeterAttributeUses .argtypes = [CSTRTYPE , POINTER (c_uint32 )]
160160GetFloatingClientMeterAttributeUses .restype = c_int
161161
162+ GetFloatingClientMetadata = library .GetFloatingClientMetadata
163+ GetFloatingClientMetadata .argtypes = [CSTRTYPE , STRTYPE , c_uint32 ]
164+ GetFloatingClientMetadata .restype = c_int
165+
166+
162167RequestFloatingLicense = library .RequestFloatingLicense
163168RequestFloatingLicense .argtypes = []
164169RequestFloatingLicense .restype = c_int
You can’t perform that action at this time.
0 commit comments