Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cryptlex/lexfloatclient/lexfloatclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,23 @@
raise LexFloatClientException(status)
return LexFloatClientNative.byte_to_string(buffer.value)

@staticmethod
def GetHostLicenseEntitlementSetTier():

Check warning on line 305 in cryptlex/lexfloatclient/lexfloatclient.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename method "GetHostLicenseEntitlementSetTier" to match the regular expression ^[a-z_][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=cryptlex_lexfloatclient-python&issues=AZy8-fJ8YVCvSQrjbAhq&open=AZy8-fJ8YVCvSQrjbAhq&pullRequest=34
"""Gets the host license entitlement set tier.

Raises:
LexFloatClientException

Returns:
int: tier of the host license entitlement set.
"""
tier = ctypes.c_int64()
status = LexFloatClientNative.GetHostLicenseEntitlementSetTier(
ctypes.byref(tier))
if status != LexFloatStatusCodes.LF_OK:
raise LexFloatClientException(status)
return tier.value

@staticmethod
def GetHostFeatureEntitlements():
"""Gets the feature entitlements associated with the LexFloatServer license.
Expand Down
4 changes: 4 additions & 0 deletions cryptlex/lexfloatclient/lexfloatclient_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def byte_to_string(input):
GetHostLicenseEntitlementSetDisplayName.argtypes = [STRTYPE, c_uint32]
GetHostLicenseEntitlementSetDisplayName.restype = c_int

GetHostLicenseEntitlementSetTier = library.GetHostLicenseEntitlementSetTier
GetHostLicenseEntitlementSetTier.argtypes = [POINTER(c_int64)]
GetHostLicenseEntitlementSetTier.restype = c_int

GetHostFeatureEntitlements = library.GetHostFeatureEntitlementsInternal
GetHostFeatureEntitlements.argtypes = [STRTYPE, c_uint32]
GetHostFeatureEntitlements.restype = c_int
Expand Down