nxsconfigserver package

Submodules

nxsconfigserver.ComponentParser module

Parser for searching database names in components

class ComponentHandler(dsLabel='datasources', delimiter='.')[source]

Bases: xml.sax.handler.ContentHandler

SAX2 parser

constructor

Parameters
  • dsLabel (str) -- variable element label, e.g. 'datasources'

  • delimiter (str) -- variable element delimiter, e.g. '.'

Brief

It constructs parser and sets variables to default values

characters(content)[source]

adds the tag content

param content: partial content of the tag :type content: str

datasources

(dict <str , str> ) dictionary with datasources

endElement(name)[source]

parses the closing tag

Parameters

name (str) -- tag name

startElement(name, attrs)[source]

parses the opening tag

Parameters
  • name (str) -- tag name

  • attrs (dict <str, str>) -- attribute dictionary

nxsconfigserver.Errors module

Error classes

exception IncompatibleNodeError(value, nodes=None)[source]

Bases: Exception

Incompatible class Exception

constructor

Parameters
  • value (str) -- string with error message

  • nodes (list <lxml.etree.Element>) -- list of nodes with errors

nodes

nodes with errors

value

exception value

exception NonregisteredDBRecordError[source]

Bases: Exception

Error for non-existing database records

exception UndefinedTagError[source]

Bases: Exception

Exception for undefined tags

exception WrongJSONError[source]

Bases: Exception

Exception for undefined tags

exception WrongXMLError[source]

Bases: Exception

Exception for undefined tags

nxsconfigserver.MYSQLDataBase module

Providesthe access to MYSQL database with NDTS configuration files

class MYSQLDataBase(streams=None)[source]

Bases: object

XML Configurer

constructor

Brief

It creates the MYSQLDataBase instance

Parameters

streams (StreamSet or tango.LatestDeviceImpl) -- tango-like steamset class

availableComponents()[source]

fetches the names of available components

Returns

list of available components

Return type

list <str>

availableDataSources()[source]

fetches the names of available datasources

Returns

list of available datasources

Return type

list <str>

availableSelections()[source]

fetches the names of available selections

Returns

list of available selections

Return type

list <str>

close()[source]

closes database connection

Brief

It closes connection to the open database

components(names)[source]

fetches the required components

Parameters

names (list <str>) -- list of component names

Returns

list of given components

Return type

list <str>

connect(args)[source]

connects to the database

Parameters

args (dict <str, any>) -- arguments of the MySQLdb connect method

dataSources(names)[source]

fetches the required datasources

Parameters

names (list <str>) -- list of datasource names

Returns

list of given datasources

Return type

list <str>

deleteComponent(name)[source]

deletes the given component

Parameters

name (str) -- name of the component to delete

deleteDataSource(name)[source]

deletes the given datasource

Parameters

name (str) -- name of the datasource to delete

deleteSelection(name)[source]

deletes the given selection

Parameters

name (str) -- name of the selection to delete

mandatory()[source]

provides mandatory components

Returns

list of mandatory components

Return type

list <str>

selections(names)[source]

fetches the required selections

Parameters

names (list <str>) -- list of selection names

Returns

list of given selections

Return type

list <str>

setMandatory(name)[source]

sets components as mandatory

Parameters

name (str) -- name of the component

storeComponent(name, xml)[source]

stores the given component

Parameters
  • name (str) -- name of the component to store

  • xml (str) -- component tree

storeDataSource(name, xml)[source]

stores the given datasource

Parameters
  • name (str) -- name of the datasource to store

  • xml (str) -- datasource tree

storeSelection(name, selection)[source]

stores the given selection

Parameters
  • name (str) -- name of the selection to store

  • selection (str) -- selection tree

unsetMandatory(name)[source]

sets components as not mandatory

Parameters

name (str) -- name of the component to delete

version()[source]

provides DB configuration version

Returns

DB configuration version

Return type

str

nxsconfigserver.Merger module

Classes for merging DOM component trees

class Merger[source]

Bases: object

merges the components

consturctor

canfaildatasources

(list <str> ) aliased to switch to CanFial mode

children

(dict <str , tuple <str>> ) allowed children

collect(components)[source]

collects the given components in one DOM tree

Parameters

components (list <str>) -- given components

linkable

(list <str> ) node which can have links

linkdatasources

(list <str> ) aliased to add links

merge()[source]

performs the merging operation

modesToSwitch

(dict <str , str> ) strategy modes to switch

singles

(list <str> ) tags which cannot have the same siblings

switchable

(list <str> ) node which can have switched strategy

switchdatasources

(list <str> ) aliased to switch to STEP mode

toString()[source]

Converts DOM tree to string

Returns

DOM tree in XML string

Return type

str

tocut

(list <str> ) tags which cannot have the same siblings

uniqueText

(list <str> ) with unique text

nxsconfigserver.NXSConfigServer module

Configuration Server for Nexus Data Writer

class NXSConfigServer(cl, name)[source]

Bases: tango.device_server.LatestDeviceImpl

NXSConfigServer Class Description:

Brief

Configuration Server based on MySQL database. Device States Description: DevState.OPEN - Open connection to the database, DevState.ON - Server is ON, DevState.RUNNING - Performing a query,

Device constructor

Parameters
  • cl (str) -- class name

  • name (str) -- device name

AvailableComponents()[source]

AvailableComponents command

Brief

Returns a list of available component names

Returns

DevVarStringArray list of available component names

Return type

list <str>

AvailableDataSources()[source]

AvailableDataSources command

Brief

Returns a list of available DataSource names

Returns

DevVarStringArray list of available DataSource names

Return type

list <str>

AvailableSelections()[source]

AvailableSelections command

Brief

Returns a list of available selection names

Returns

DevVarStringArray list of available selection names

Return type

list <str>

Close()[source]

Close command

Brief

Closes connection into the database

ComponentDataSources(argin)[source]

ComponentDataSources command

Brief

Returns a list of datasource names for a given component

Parameters

argin (str) -- DevString component name

Returns

DevVarStringArray list of datasource names

Return type

list <str>

ComponentVariables(argin)[source]

ComponentVariables command

Brief

Returns a list of variable names for a given component

Parameters

argin (str) -- DevString component name

Returns

DevVarStringArray list of variable names

Return type

list <str>

Components(argin)[source]

Components command

Brief

Returns a list of required components

Parameters

argin (list <str>) -- DevVarStringArray list of component names

Returns

DevVarStringArray list of required components

Return type

list <str>

ComponentsDataSources(argin)[source]

ComponentsDataSources command

Brief

Returns a list of datasource names for a given components

Parameters

argin (list <str>) -- DevVarStringArray component names

Returns

DevVarStringArray list of datasource names

Return type

list <str>

ComponentsVariables(argin)[source]

ComponentsVariables command

Brief

Returns a list of variable names for a given components

Parameters

argin (list <str>) -- DevVarStringArray component names

Returns

DevVarStringArray list of variable names

Return type

list <str>

CreateConfiguration(argin)[source]

CreateConfiguration command

Brief

Creates the NDTS configuration script from the given components. The result is strored in XMLString

Parameters

argin (list <str>) -- DevVarStringArray list of component names

DataSources(argin)[source]

DataSources command

Brief

Returns a list of required DataSources

Parameters

argin (list <str>) -- DevVarStringArray list of DataSource names

Returns

DevVarStringArray list of required DataSources

Return type

list <str>

DeleteComponent(argin)[source]

DeleteComponent command

Brief

Deletes the given component

Parameters

argin (str) -- DevString component name

DeleteDataSource(argin)[source]

DeleteDataSource command

Brief

Deletes the given datasource

Parameters

argin (str) -- DevString datasource name

DeleteSelection(argin)[source]

DeleteSelection command

Brief

Deletes the given selection

Parameters

argin (str) -- DevString selection name

DependentComponents(argin)[source]

DependentComponents command

Brief

returns a list of dependent component names for a given components

Parameters

argin (list <str>) -- DevVarStringArray component names

Returns

DevVarStringArray list of component names

Return type

list <str>

InstantiatedComponents(argin)[source]

InstantiatedComponents command

Brief

Returns a list of required components

Parameters

argin (list <str>) -- DevVarStringArray list of component names

Returns

DevVarStringArray list of instantiated components

Return type

list <str>

MandatoryComponents()[source]

MandatoryComponents command

Brief

Returns the mandatory components

Returns

DevVarStringArray component names

Return type

list <str>

Merge(argin)[source]

Merge command

Brief

Merges give components

Parameters

argin (list <str>) -- DevVarStringArray list of component names

Returns

DevString merged components

Return type

str

Open()[source]

Open command

Brief

Opens connection to the database

Selections(argin)[source]

Selections command

Brief

Returns a list of required selections

Parameters

argin (list <str>) -- DevVarStringArray list of selection names

Returns

DevVarStringArray list of required selections

Return type

list <str>

SetComponentDataSources(argin)[source]

SetComponentDataSources command

Brief

Sets component datasources according to given dictionary

Parameters

argin (str) -- DevString JSON dict { comp1: {ds: tds, ...}, ...}

SetMandatoryComponents(argin)[source]

SetMandatoryComponents command

Brief

Sets the mandatory components

Parameters

argin (list <str>) -- DevVarStringArray component names

StoreComponent(argin)[source]

StoreComponent command

Brief

Stores the component from XMLString

Parameters

argin (str) -- DevString component name

StoreDataSource(argin)[source]

StoreDataSource command

Brief

Stores the DataSource from XMLString

Parameters

argin (str) -- DevString datasource name

StoreSelection(argin)[source]

StoreSelection command

Brief

Stores the selection from XMLString

Parameters

argin (str) -- DevString selection name

UnsetMandatoryComponents(argin)[source]

UnsetMandatoryComponents command

Brief

Removes the given components from the mandatory components

Parameters

argin (list <str>) -- DevVarStringArray list of component names

always_executed_hook()[source]

Always excuted hook method

delete_device()[source]

Device destructor

init_device()[source]

Device initialization

is_AvailableComponents_allowed()[source]

AvailableComponents command State Machine

Returns

True if the operation allowed

Return type

bool

is_AvailableDataSources_allowed()[source]

AvailableDataSources command State Machine

Returns

True if the operation allowed

Return type

bool

is_AvailableSelections_allowed()[source]

AvailableSelections command State Machine

Returns

True if the operation allowed

Return type

bool

is_CanFailDataSources_write_allowed()[source]

CanFailDataSources attribute Write State Machine

Returns

True if the operation allowed

Return type

bool

is_Close_allowed()[source]

Close command State Machine

Returns

True if the operation allowed

Return type

bool

is_ComponentDataSources_allowed()[source]

ComponentDataSources command State Machine

Returns

True if the operation allowed

Return type

bool

is_ComponentVariables_allowed()[source]

ComponentVariables command State Machine

Returns

True if the operation allowed

Return type

bool

is_ComponentsDataSources_allowed()[source]

ComponentsDataSources command State Machine

Returns

True if the operation allowed

Return type

bool

is_ComponentsVariables_allowed()[source]

ComponentsVariables command State Machine

Returns

True if the operation allowed

Return type

bool

is_Components_allowed()[source]

Components command State Machine

Returns

True if the operation allowed

Return type

bool

is_CreateConfiguration_allowed()[source]

CreateConfiguration command State Machine

Returns

True if the operation allowed

Return type

bool

is_DataSources_allowed()[source]

DataSources command State Machine

Returns

True if the operation allowed

Return type

bool

is_DeleteComponent_allowed()[source]

DeleteComponent command State Machine

Returns

True if the operation allowed

Return type

bool

is_DeleteDataSource_allowed()[source]

DeleteDataSource command State Machine

Returns

True if the operation allowed

Return type

bool

is_DeleteSelection_allowed()[source]

DeleteSelection command State Machine

Returns

True if the operation allowed

Return type

bool

is_DependentComponents_allowed()[source]

DependentComponents command State Machine

Returns

True if the operation allowed

Return type

bool

is_InstantiatedComponents_allowed()[source]

Components command State Machine

Returns

True if the operation allowed

Return type

bool

is_JSONSettings_write_allowed()[source]

JSONSettings attribute Write State Machine

Returns

True if the operation allowed

Return type

bool

is_LinkDataSources_write_allowed()[source]

LinkDataSources attribute Write State Machine

Returns

True if the operation allowed

Return type

bool

is_MandatoryComponents_allowed()[source]

MandatoryComponents command State Machine

Returns

True if the operation allowed

Return type

bool

is_Merge_allowed()[source]

Merge command State Machine

Returns

True if the operation allowed

Return type

bool

is_Open_allowed()[source]

Open command State Machine

Returns

True if the operation allowed

Return type

bool

is_STEPDataSources_write_allowed()[source]

STEPDataSources attribute Write State Machine

Returns

True if the operation allowed

Return type

bool

is_Selection_allowed(_)[source]

Selection attribute State Machine

Returns

True if the operation allowed

Return type

bool

is_Selections_allowed()[source]

Selections command State Machine

Returns

True if the operation allowed

Return type

bool

is_SetComponentDataSources_allowed()[source]

SetComponentDataSources command State Machine

Returns

True if the operation allowed

Return type

bool

is_SetMandatoryComponents_allowed()[source]

SetMandatoryComponents command State Machine

Returns

True if the operation allowed

Return type

bool

is_StoreComponent_allowed()[source]

StoreComponent command State Machine

Returns

True if the operation allowed

Return type

bool

is_StoreDataSource_allowed()[source]

StoreDataSource command State Machine

Returns

True if the operation allowed

Return type

bool

is_StoreSelection_allowed()[source]

StoreSelection command State Machine

Returns

True if the operation allowed

Return type

bool

is_UnsetMandatoryComponents_allowed()[source]

UnsetMandatoryComponents command State Machine

Returns

True if the operation allowed

Return type

bool

is_Variables_allowed(_)[source]

Variables attribute State Machine

Returns

True if the operation allowed

Return type

bool

is_XMLString_allowed(_)[source]

XMLString attribute State Machine

Returns

True if the operation allowed

Return type

bool

read_CanFailDataSources(attr)[source]

Read CanFailDataSources attribute

Parameters

attr (tango.Attribute) -- step datasources attribute

read_JSONSettings(attr)[source]

Read JSONSettings attribute

Parameters

attr (tango.Attribute) -- jsonsettings attribute

read_LinkDataSources(attr)[source]

Read LinkDataSources attribute

Parameters

attr (tango.Attribute) -- link datasources attribute

read_STEPDataSources(attr)[source]

Read STEPDataSources attribute

Parameters

attr (tango.Attribute) -- step datasources attribute

read_Selection(attr)[source]

Read Selection attribute

Parameters

attr (tango.Attribute) -- selection attribute

read_Variables(attr)[source]

Read Variables attribute

Parameters

attr (tango.Attribute) -- variables attribute

read_Version(attr)[source]

Read Version attribute

Parameters

attr (tango.Attribute) -- version attribute

read_XMLString(attr)[source]

Read XMLString attribute

Parameters

attr (tango.Attribute) -- xml string attribute

read_attr_hardware(_)[source]

Read Attribute Hardware

write_CanFailDataSources(attr)[source]

Write CanFailDataSources attribute

Parameters

attr (tango.Attribute) -- step datasources attribute

write_JSONSettings(attr)[source]

Read JSONSettings attribute

Parameters

attr (tango.Attribute) -- jsonsettings attribute

write_LinkDataSources(attr)[source]

Write LinkDataSources attribute

Parameters

attr (tango.Attribute) -- link datasources attribute

write_STEPDataSources(attr)[source]

Write STEPDataSources attribute

Parameters

attr (tango.Attribute) -- step datasources attribute

write_Selection(attr)[source]

Write Selection attribute

Parameters

attr (tango.Attribute) -- selection attribute

write_Variables(attr)[source]

Write Variables attribute

Parameters

attr (tango.Attribute) -- variables attribute

write_XMLString(attr)[source]

Write XMLString attribute

Parameters

attr (tango.Attribute) -- xml string attribute

xmlc

(nxsconfigserver.XMLConfigutator.XMLConfigutator) xml configurator instance

class NXSConfigServerClass(name)[source]

Bases: tango._tango.DeviceClass

NXSConfigServerClass class definition

NXSConfigServerClass Constructor

attr_list = {'CanFailDataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Datasources to be switched into CanFail Mode', 'description': 'JSON list of datasources to be switched into CanFail mode during creating configuration process'}], 'JSONSettings': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Arguments of MySQLdb.connect(...)', 'description': 'The JSON string with parameters of MySQLdb.connect(...).', 'Memorized': 'true', 'Display level': tango._tango.DispLevel.EXPERT}], 'LinkDataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Datasources to which links will be added', 'description': 'JSON list of datasourcesto which links will be added'}], 'STEPDataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Datasources to be switched into STEP Mode', 'description': 'JSON list of datasources to be switched into STEP mode during creating configuration process'}], 'Selection': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Selected Component', 'description': 'It allows to pass JSON strings into database during performing StoreSelection.', 'Display level': tango._tango.DispLevel.EXPERT}], 'Variables': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'XML Configuration Variables', 'description': 'The JSON string with XML configuration variables'}], 'Version': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'label': 'Configuration Version', 'description': 'Configuration version'}], 'XMLString': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'XML Configuration', 'description': 'It allows to pass XML strings into database during performing StoreComponent and StoreDataSource.\nMoreover, after performing CreateConfiguration it contains the resulting XML configuration.', 'Display level': tango._tango.DispLevel.EXPERT}]}
class_property_list = {}

(dict <str, [ str, tango.CmdArgType, [ list <int> ] ] > ) Class Properties

cmd_list = {'AvailableComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available component names']], 'AvailableDataSources': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available DataSource names']], 'AvailableSelections': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available selection names']], 'Close': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'ComponentDataSources': [[tango._tango.CmdArgType.DevString, 'component name'], [tango._tango.CmdArgType.DevVarStringArray, 'list of datasource names']], 'ComponentVariables': [[tango._tango.CmdArgType.DevString, 'component name'], [tango._tango.CmdArgType.DevVarStringArray, 'list of variable names']], 'Components': [[tango._tango.CmdArgType.DevVarStringArray, 'list of component names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of required components']], 'ComponentsDataSources': [[tango._tango.CmdArgType.DevVarStringArray, 'component names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of datasource names']], 'ComponentsVariables': [[tango._tango.CmdArgType.DevVarStringArray, 'component names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of variable names']], 'CreateConfiguration': [[tango._tango.CmdArgType.DevVarStringArray, 'list of component names'], [tango._tango.CmdArgType.DevVoid, '']], 'DataSources': [[tango._tango.CmdArgType.DevVarStringArray, 'list of DataSource names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of required DataSources']], 'DeleteComponent': [[tango._tango.CmdArgType.DevString, 'component name'], [tango._tango.CmdArgType.DevVoid, '']], 'DeleteDataSource': [[tango._tango.CmdArgType.DevString, 'datasource name'], [tango._tango.CmdArgType.DevVoid, '']], 'DeleteSelection': [[tango._tango.CmdArgType.DevString, 'selection name'], [tango._tango.CmdArgType.DevVoid, '']], 'DependentComponents': [[tango._tango.CmdArgType.DevVarStringArray, 'component names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of component names']], 'InstantiatedComponents': [[tango._tango.CmdArgType.DevVarStringArray, 'list of component names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of instantiated components']], 'MandatoryComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'component names']], 'Merge': [[tango._tango.CmdArgType.DevVarStringArray, 'list of component names'], [tango._tango.CmdArgType.DevString, 'merged components']], 'Open': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'Selections': [[tango._tango.CmdArgType.DevVarStringArray, 'list of selection names'], [tango._tango.CmdArgType.DevVarStringArray, 'list of required selections']], 'SetComponentDataSources': [[tango._tango.CmdArgType.DevString, 'JSON dict {comp1: {tds1: ds1, ...}, ...}'], [tango._tango.CmdArgType.DevVoid, '']], 'SetMandatoryComponents': [[tango._tango.CmdArgType.DevVarStringArray, 'component names'], [tango._tango.CmdArgType.DevVoid, '']], 'StoreComponent': [[tango._tango.CmdArgType.DevString, 'component name'], [tango._tango.CmdArgType.DevVoid, '']], 'StoreDataSource': [[tango._tango.CmdArgType.DevString, 'datasource name'], [tango._tango.CmdArgType.DevVoid, '']], 'StoreSelection': [[tango._tango.CmdArgType.DevString, 'selection name'], [tango._tango.CmdArgType.DevVoid, '']], 'UnsetMandatoryComponents': [[tango._tango.CmdArgType.DevVarStringArray, 'list of component names'], [tango._tango.CmdArgType.DevVoid, '']]}

(dict <str, [[ tango.CmdArgType, str]] >) Command definitions

device_property_list = {'VersionLabel': [tango._tango.CmdArgType.DevString, 'version label', ['XCS']]}

(dict <str, [ str, tango.CmdArgType, [ list <int> ] ] > ) Device Properties

nxsconfigserver.StreamSet module

labels to Tango Streams

class StreamSet(streams)[source]

Bases: object

streamset constractor

Parameters

streams (StreamSet or tango.LatestDeviceImpl) -- tango-like steamset class

debug(message, std=None)[source]

writes debug message

Parameters
  • message (str) -- debug message

  • std (bool) -- True if it writes to sys stream when log stream does not exist

error(message, std=None)[source]

writes error message

Parameters
  • message (str) -- error message

  • std (bool) -- True if it writes to sys stream when log stream does not exist

fatal(message, std=None)[source]

writes fatal error message

Parameters
  • message (str) -- error message

  • std (bool) -- True if it writes to sys stream when log stream does not exist

info(message, std=None)[source]

writes info message

Parameters
  • message (str) -- info message

  • std (bool) -- True if it writes to sys stream when log stream does not exist

log_debug

(tango.log4tango.TangoStream) Tango debug log stream

log_error

(tango.log4tango.TangoStream) Tango error log stream

log_fatal

(tango.log4tango.TangoStream) Tango fatal log stream

log_info

(tango.log4tango.TangoStream) Tango info log stream

log_warn

(tango.log4tango.TangoStream) Tango warn log stream

warn(message, std=None)[source]

writes warning message

Parameters
  • message (str) -- warning message

  • std (bool) -- True if it writes to sys stream when log stream does not exist

nxsconfigserver.XMLConfigurator module

Provides the access to a database with NDTS configuration files

class XMLConfigurator(server=None)[source]

Bases: object

XML Configurator

constructor

Parameters

server (tango.LatestDeviceImpl) -- NXSConfigServer instance

Brief

It allows to construct XML configurer object

availableComponents()[source]

fetches the names of available components

Returns

list of available components

Return type

list <str>

availableDataSources()[source]

fetches the names of available datasources

Returns

list of available datasources

Return type

list <str>

availableSelections()[source]

fetches the names of available selections

Returns

list of available selections

Return type

list <str>

property canfaildatasources

(str) the json data string

close()[source]

closes database connection

Brief

It closes connection to the open database

componentDataSources(name)[source]

provides a list of datasources from the given component

Parameters

name (str) -- given component

Returns

list of datasource names from the given component

Return type

list <str>

componentVariables(name)[source]

provides a list of variables from the given components

Parameters

name (str) -- given component

Returns

list of variable names from the given components

Return type

str

components(names)[source]

fetches the required components

Parameters

names (list <str>) -- list of component names

Returns

list of given components

Return type

list <str>

componentsDataSources(names)[source]

provides a list of datasources from the given components

Parameters

names (list <str>) -- given components

Returns

list of datasource names from the given components

Return type

list <str>

componentsVariables(names)[source]

provides a tuple of variables from the given components

Parameters

names (list <str>) -- given components

Returns

tuple of variable names from the given components

Return type

list <str>

createConfiguration(names)[source]

creates the final configuration string in the xmlstring attribute

Parameters

names (list <str>) -- list of component names

dataSources(names, _=None)[source]

fetches the required datasources

Parameters

names (list <str>) -- list of datasource names

Returns

list of given datasources

Return type

list <str>

deleteComponent(name)[source]

deletes the given component

Parameters

name (str) -- name of the component to delete

deleteDataSource(name)[source]

deletes the given datasource

Parameters

name (str) -- name of the datasource to delete

deleteSelection(name)[source]

deletes the given selection

Parameters

name (str) -- name of the selection to delete

dependentComponents(names, deps=None)[source]

provides dependent components

Parameters
  • names (list <str>) -- component names to check

  • deps (dict <str, str>) -- dictionery with dependent components

Returns

list of depending components

Return type

list <str>

instantiatedComponents(names)[source]

instantiates the required components

Parameters

names (list <str>) -- list of component names

Returns

list of instantiated components

Return type

list <str>

jsonsettings

(str) JSON string with arguments to connect to database

property linkdatasources

(str) the json data string

mandatoryComponents()[source]

provides names of the mandatory components

Returns

mandatory components

Return type

list <str>

merge(names)[source]

merges the give components

Parameters

names (list <str>) -- list of component names

Returns

merged components

Return type

str

open()[source]

opens database connection

Brief

It opens connection to the give database by JSON string

selection

(str) component selection

selections(names)[source]

fetches the required selections

Parameters

names (list <str>) -- list of selection names

Returns

list of given selections

Return type

list <str>

setComponentDataSources(jdict)[source]

sets component datasources according to given dict

Parameters

jdict (str) -- JSON dict of component datasources

setMandatoryComponents(names)[source]

sets the mandtaory components

Parameters

names (list <str>) -- list of component names

property stepdatasources

(str) the json data string

storeComponent(name)[source]

stores the component from the xmlstring attribute

Parameters

name (str) -- name of the component to store

storeDataSource(name)[source]

stores the datasource from the xmlstring attribute

Parameters

name (str) -- name of the datasource to store

storeSelection(name)[source]

stores the selection from the xmlstring attribute

Parameters

name (str) -- name of the selection to store

unsetMandatoryComponents(names)[source]

sets the mandatory components

Parameters

names (list <str>) -- list of component names

variables

(str) string with XML variables

property version

(str)configuration version

versionLabel

(str) version label

xmlstring

(str) XML config string

Module contents

Implementation of NexDaTaS Configuration Server

run(argv)[source]

runs the Configuration TANGO server

Parameters

argv (list <str>) -- command-line arguments