Registry

Helper for /Registry section

DIRAC.ConfigurationSystem.Client.Helpers.Registry.findDefaultGroupForDN(dn)

Search defaut group for DN

Parameters:

dn (str) – DN

Returns:

S_OK()/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.findDefaultGroupForUser(username)

Get default group for user

Parameters:

username (str) – user name

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getAllGroups()

Get all groups

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getAllUsers()

Get all users

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getBannedIPs()

Get banned IPs

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getCAForUsername(username)

Get CA option by user name

Parameters:

username (str) – user name

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDNForHost(host)

Get host DN

Parameters:

host (str) – host domain

Returns:

S_OK(list)/S_ERROR() – list of DNs

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDNForUsername(username)

Get user DN for user

Parameters:

username (str) – user name

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDNFromProxyProviderForUserID(proxyProvider, userID)

Get groups by user DN in DNProperties

Parameters:
  • proxyProvider (str) – proxy provider name

  • userID (str) – user identificator

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDNProperty(userDN, value, defaultValue=None)

Get property from DNProperties section by user DN

Parameters:
  • userDN (str) – user DN

  • value (str) – option that need to get

  • defaultValue – default value

Returns:

S_OK()/S_ERROR() – str or list that contain option value

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDNsInGroup(groupName)

Find all DNs for DIRAC group

Parameters:

groupName (str) – group name

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDNsInVO(vo)

Get all DNs that have a VO users

Parameters:

vo (str) – VO name

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDefaultUserGroup()

Search general default group

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDefaultVOMSAttribute()

Get default VOMS attribute

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getDefaultVOMSVO()

Get default VOMS VO

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getEmailsForGroup(groupName)

Get email list of users in group

Parameters:

groupName (str) – DIRAC group name

Returns:

list(list) – inner list contains emails for a user

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getGroupOption(groupName, optName, defaultValue='')

Get group option

Parameters:
  • groupName (str) – group name

  • optName (str) – option name

  • defaultValue – default value

Returns:

defaultValue or str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getGroupsForDN(dn)

Get all possible groups for DN

Parameters:

dn (str) – user DN

Returns:

S_OK(list)/S_ERROR() – contain list of groups

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getGroupsForUser(username)

Find groups for user

Parameters:

username (str) – user name

Returns:

S_OK(list)/S_ERROR() – contain list of groups

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getGroupsForVO(vo)

Get groups for VO

Parameters:

vo (str) – DIRAC VO name

Returns:

S_OK(list)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getGroupsWithProperty(propName)

Search groups by property

Parameters:

propName (str) – property name

Returns:

S_OK(list)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getGroupsWithVOMSAttribute(vomsAttr)

Search groups with VOMS attribute

Parameters:

vomsAttr (str) – VOMS attribute

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getHostOption(hostName, optName, defaultValue='')

Get host option

Parameters:
  • hostName (str) – host name

  • optName (str) – option name

  • defaultValue – default value

Returns:

defaultValue or str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getHostnameForDN(dn)

Search host name for host DN

Parameters:

dn (str) – host DN

Returns:

S_OK()/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getHosts()

Get all hosts

Returns:

S_OK()/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getIDFromDN(userDN)

Parse user ID from user DN

Parameters:

userDN (str) – user DN

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getIdPForGroup(group)

Get identity provider for group VO

Parameters:

group (str) – group name

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getPropertiesForEntity(group, name='', dn='', defaultValue=None)

Return some entity properties

Parameters:
  • group (str) – group name

  • name (str) – entity name

  • dn (str) – DN

  • defaultValue – default value

Returns:

defaultValue or list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getPropertiesForGroup(groupName, defaultValue=None)

Return group properties

Parameters:
  • groupName (str) – group name

  • defaultValue – default value

Returns:

defaultValue or list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getPropertiesForHost(hostName, defaultValue=None)

Return host properties

Parameters:
  • hostName (str) – host name

  • defaultValue – default value

Returns:

defaultValue or list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getProxyProvidersForDN(userDN)

Get proxy providers by user DN

Parameters:

userDN (str) – user DN

Returns:

S_OK(list)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUserDict(username)

Get full information from user section

Parameters:

username (str) – DIRAC user name

Returns:

S_OK()/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUserOption(username, optName, defaultValue='')

Get user option

Parameters:
  • username (str) – user name

  • optName (str) – option name

  • defaultValue – default value

Returns:

defaultValue or str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUsernameForDN(dn, usersList=None)

Find DIRAC user for DN

Parameters:
  • dn (str) – user DN

  • usersList (list) – list of possible users

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUsernameForID(ID, usersList=None)

Get DIRAC user name by ID

Parameters:
  • ID (str) – user ID

  • usersList (list) – list of DIRAC user names

Returns:

S_OK(str)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUsersInGroup(groupName, defaultValue=None)

Find all users for group

Parameters:
  • group (str) – group name

  • defaultValue – default value

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUsersInVO(vo, defaultValue=None)

Search users in VO

Parameters:
  • vo (str) – DIRAC VO name

  • defaultValue – default value

Returns:

list

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOForGroup(group)

Search VO name for group

Parameters:

group (str) – group name

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOMSAttributeForGroup(group)

Search VOMS attribute for group

Parameters:

group (str) – group name

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOMSRoleGroupMapping(vo='')

Get mapping of the VOMS role to the DIRAC group

Parameters:

vo (str) – perform the operation for the given VO

Returns:

S_OK(dict)/S_ERROR() – dictionary have standard structure with two mappings: VOMS-DIRAC { <VOMS_Role>: [<DIRAC_Group>] }, DIRAC-VOMS { <DIRAC_Group>: <VOMS_Role> } and a list of DIRAC groups without mapping

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOMSServerInfo(requestedVO='')

Get information on VOMS servers for the given VO or for all of them

Parameters:

requestedVO (str) – requested VO

Returns:

S_OK()/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOMSVOForGroup(group)

Search VOMS VO for group

Parameters:

group (str) – group name

Returns:

str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOOption(voName, optName, defaultValue='')

Get VO option

Parameters:
  • voName (str) – DIRAC VO name

  • optName (str) – option name

  • defaultValue – default value

Returns:

defaultValue or str

DIRAC.ConfigurationSystem.Client.Helpers.Registry.getVOs()

Get all the configured VOs

Returns:

S_OK(list)/S_ERROR()

DIRAC.ConfigurationSystem.Client.Helpers.Registry.groupHasProperties(groupName, propList)

Match required properties with group properties

Parameters:
  • groupName (str) – group name

  • propList (list) – required properties

Returns:

list – contain matched properties

DIRAC.ConfigurationSystem.Client.Helpers.Registry.hostHasProperties(hostName, propList)

Match required properties with host properties

Parameters:
  • hostName (str) – host name

  • propList (list) – required properties

Returns:

list – contain matched properties

DIRAC.ConfigurationSystem.Client.Helpers.Registry.isDownloadableGroup(groupName)

Get permission to download proxy with group in a argument

Params str groupName:

DIRAC group

Returns:

boolean

DIRAC.ConfigurationSystem.Client.Helpers.Registry.wrapIDAsDN(userID)

Wrap user ID as user DN

Parameters:

userID (str) – user ID

Returns:

str