linkahead.common.administration module

missing docstring.

class linkahead.common.administration.PermissionRule(action, permission, priority=False)

Bases: object

Permission rules.

Parameters:
  • action (str) – Either “grant” or “deny”

  • permission (str) – For example RETRIEVE:*.

  • priority (bool, optional) – Whether the priority shall be set, defaults is False.

linkahead.common.administration.generate_password(length: int)

Create a random password that fulfills the security requirements

Parameters:

length (int) – Length of the generated password. Has to be greater than 7.

Returns:

password – Generated random password of the given length

Return type:

string

Raises:

ValueError: – If the length is less than 8.

linkahead.common.administration.get_server_properties()

get_server_properties.

Get all server properties as a dict.

Returns:

The server properties.

Return type:

dict

linkahead.common.administration.get_server_property(key)

get_server_property.

Get a server property.

Parameters:

key (str) – The name of the server property

Returns:

value – The string value of the server property.

Return type:

str

Raises:

KeyError – If the server property is no defined.

linkahead.common.administration.set_server_property(key, value)

set_server_property.

Set a server property.

Parameters:
  • key (str) – The name of the server property.

  • value (str) – The value of the server property.

Return type:

None