ConfigurationHandler
The CS! (Configuration Service)
The following options can be set for the Configuration Service.
Server
{
HandlerPath = DIRAC/ConfigurationSystem/Service/ConfigurationHandler.py
Port = 9135
# Subsection to configure authorization over the service
Authorization
{
# Default authorization
Default = authenticated
#Define who can commit new configuration
commitNewData = CSAdministrator
# Define who can roll back the configuration to a previous version
rollbackToVersion = CSAdministrator
# Define who can get version contents
getVersionContents = ServiceAdministrator
getVersionContents += CSAdministrator
forceGlobalConfigurationUpdate = CSAdministrator
}
}
- class DIRAC.ConfigurationSystem.Service.ConfigurationHandler.ConfigurationHandler(handlerInitDict, trid)
Bases:
RequestHandler
The CS handler
- __init__(handlerInitDict, trid)
Constructor
- Parameters:
handlerInitDict (dictionary) – Information vars for the service
trid (object) – Transport to use
- auth_forceGlobalConfigurationUpdate = ['CSAdministrator']
- auth_ping = ['all']
- auth_refreshConfiguration = ['CSAdministrator']
- auth_whoami = ['all']
- export_commitNewData(sData)
- static export_echo(data)
This method is used for testing performance of the service
- Parameters:
data (str) – data to be sent back to the caller
- Returns:
S_OK, Value is the input data
- export_forceGlobalConfigurationUpdate()
Attempt to request all the configured services to update their configuration
- Returns:
S_OK
- classmethod export_getCommitHistory(limit=100)
- classmethod export_getCompressedData()
- classmethod export_getCompressedDataIfNewer(sClientVersion)
- classmethod export_getVersion()
- classmethod export_getVersionContents(versionList)
- export_ping()
- classmethod export_publishSlaveServer(sURL)
- static export_refreshConfiguration(fromMaster)
Force refreshing the configuration data
- Parameters:
fromMaster (bool) – flag to refresh from the controller configuration service
- export_rollbackToVersion(version)
- export_whoami()
A simple whoami, returns all credential dictionary, except certificate chain object.
- classmethod export_writeEnabled()
- classmethod getCSOption(optionName, defaultValue=False)
Get an option from the CS section of the services
- Returns:
Value for serviceSection/optionName in the CS being defaultValue the default
- getRemoteAddress()
Get the address of the remote peer.
- Returns:
Address of remote peer.
- getRemoteCredentials()
Get the credentials of the remote peer.
- Returns:
Credentials dictionary of remote peer.
- initialize()
Initialize this instance of the handler (to be overwritten)
- srv_disconnect(trid=None)
- classmethod srv_disconnectClient(trid)
- srv_getActionTuple()
- classmethod srv_getCSOption(optionName, defaultValue=False)
Get an option from the CS section of the services
- Returns:
Value for serviceSection/optionName in the CS being defaultValue the default
- srv_getClientSetup()
- srv_getClientVO()
- srv_getClientVersion()
- srv_getFormattedRemoteCredentials()
- classmethod srv_getMonitor()
- srv_getRemoteAddress()
Get the address of the remote peer.
- Returns:
Address of remote peer.
- srv_getRemoteCredentials()
Get the credentials of the remote peer.
- Returns:
Credentials dictionary of remote peer.
- classmethod srv_getServiceName()
- srv_getTransportID()
- classmethod srv_getURL()
- classmethod srv_msgCreate(msgName)
- srv_msgReply(msgObj)
- classmethod srv_msgSend(trid, msgObj)
- transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
- transfer_bulkToClient(bulkId, token, fileHelper)
- transfer_fromClient(fileId, token, fileSize, fileHelper)
- transfer_listBulk(bulkId, token, fileHelper)
- transfer_toClient(fileId, token, fileHelper)
- types_commitNewData = [(<class 'bytes'>, <class 'str'>)]
- types_echo = [<class 'str'>]
- types_forceGlobalConfigurationUpdate = []
- types_getCommitHistory = []
- types_getCompressedData = []
- types_getCompressedDataIfNewer = [<class 'str'>]
- types_getVersion = []
- types_getVersionContents = [<class 'list'>]
- types_ping = []
- types_publishSlaveServer = [<class 'str'>]
- types_refreshConfiguration = [<class 'bool'>]
- types_rollbackToVersion = [<class 'str'>]
- types_whoami = []
- types_writeEnabled = []
- DIRAC.ConfigurationSystem.Service.ConfigurationHandler.initializeConfigurationHandler(serviceInfo)