Commit 79a71661 authored by Gino Tosti's avatar Gino Tosti
Browse files

added blobber, controller and monitoring controller in test CDB and updated...

added blobber, controller and monitoring controller in test CDB and updated the script that create the test CDB; added generation of random integer value to Int16 node in simulation server
parent 34c404eb
......@@ -103,13 +103,18 @@ def createCBDBaseDir(dirname):
def createCDBDirs():
basedir=os.environ["ACS_CDB"]
templatedir=os.environ["PYGEN"]+"/templates/Alarms"
templatedir=os.environ["PYGEN"]+ "/templates/CDB" #/templates/Alarms"
print (basedir)
if basedir=="":
print ("ACS_CDB variable is not defined")
return False
else:
almadir = basedir+"/CDB/alma"
alarmdir=basedir+"/CDB" #"/CDB/Alarms"
if os.path.exists(alarmdir):
print ("dir:",alarmdir," already exists")
else:
shutil.copytree(templatedir,alarmdir)
"""almadir = basedir+"/CDB/alma"
if createDir(almadir):
srt="directory:"+almadir+" created"
print (srt)
......@@ -130,12 +135,8 @@ def createCDBDirs():
if createDir(managerdir):
print ("directory:"+managerdir+" created")
else:
print ("error creting directory:"+managerdir)
alarmdir=basedir+"/CDB/Alarms"
if os.path.exists(alarmdir):
print ("dir:",alarmdir," already exists")
else:
shutil.copytree(templatedir,alarmdir)
print ("error creting directory:"+managerdir)"""
def createManagerXml():
basedir=os.environ["ACS_CDB"]
managerdir = basedir+"/CDB/MACI/Managers/Manager"
......
<?xml version="1.0" encoding="ISO-8859-1"?>
<alarm-system-configuration
xmlns="urn:schemas-cosylab-com:acsalarm-alarmservice:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<configuration-property name="Implementation">CERN</configuration-property>
</alarm-system-configuration>
<?xml version="1.0" encoding="UTF-8"?>
<categories
xmlns="urn:schemas-cosylab-com:acsalarm-categories:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<category is-default="true" path="CATEGORY1">
<description>Test category 1</description>
<alarms>
<FaultFamily>BaciPropTest#testDoubleVar</FaultFamily>
<FaultFamily>BaciPropTest#testPatternVar</FaultFamily>
<FaultFamily>TestFF</FaultFamily>
<FaultFamily>AnotherFF</FaultFamily>
</alarms>
</category>
</categories>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
- Sample configuration of alarm reduction links.
-->
<reduction-definitions
xmlns="urn:schemas-cosylab-com:AcsAlarmSystem:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
<links-to-create/>
<thresholds/>
-->
</reduction-definitions>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="BACIProperty"
xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="Test"/>
<fault-code value="1">
<priority>1</priority>
<problem-description>BACI property</problem-description>
</fault-code>
<fault-code value="2">
<priority>1</priority>
<problem-description>BACI property (LOW)</problem-description>
</fault-code>
<fault-code value="3">
<priority>1</priority>
<problem-description>BACI property (HIGH)</problem-description>
</fault-code>
<fault-member-default>
</fault-member-default>
</fault-family>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="BaciPropTest#testDoubleVar"
xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="Test"/>
<fault-code value="1">
<priority>1</priority>
<problem-description>BACI property</problem-description>
</fault-code>
<fault-code value="2">
<priority>1</priority>
<problem-description>BACI property (LOW)</problem-description>
</fault-code>
<fault-code value="3">
<priority>1</priority>
<problem-description>BACI property (HIGH)</problem-description>
</fault-code>
<fault-member-default>
</fault-member-default>
</fault-family>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="BaciPropTest#testEnumVar"
xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="Test"/>
<fault-code value="1">
<priority>1</priority>
<problem-description>BACI property</problem-description>
</fault-code>
<fault-code value="2">
<priority>1</priority>
<problem-description>BACI property (LOW)</problem-description>
</fault-code>
<fault-code value="3">
<priority>1</priority>
<problem-description>BACI property (HIGH)</problem-description>
</fault-code>
<fault-member-default>
</fault-member-default>
</fault-family>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="BaciPropTest#testPatternVar"
xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="Test"/>
<fault-code value="1">
<priority>1</priority>
<problem-description>BACI property</problem-description>
</fault-code>
<fault-code value="2">
<priority>1</priority>
<problem-description>BACI property (LOW)</problem-description>
</fault-code>
<fault-code value="3">
<priority>1</priority>
<problem-description>BACI property (HIGH)</problem-description>
</fault-code>
<fault-member-default>
</fault-member-default>
</fault-family>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="DPSInterface"
xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="Vito" />
<fault-code value="1">
<priority>1</priority>
<problem-description>BACI property with aanother FF, FM</problem-description>
</fault-code>
<fault-code value="2">
<priority>1</priority>
<problem-description>BACI property with a another FF, FM (LOW)</problem-description>
</fault-code>
<fault-code value="3">
<priority>1</priority>
<problem-description>BACI property with a another FF, FM (HIGH)</problem-description>
</fault-code>
<fault-member-default>
</fault-member-default>
</fault-family>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="Manager" xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="Alessandro Caproni"/>
<fault-code value="1">
<priority>3</priority>
<problem-description>Container crashed</problem-description>
</fault-code>
<fault-code value="2">
<priority>2</priority>
<problem-description>Filesystem error affecting manager state recovery after restart.</problem-description>
</fault-code>
<!-- Having a default fault member is necessary for alarms on container/client crashes (FC=1),
because for these the manager uses FM=<clientName> which cannot be configured statically.
-->
<fault-member-default/>
<fault-member name="Prevayler"/>
</fault-family>
<?xml version="1.0" encoding="UTF-8"?>
<fault-family name="TestFF"
xmlns="urn:schemas-cosylab-com:acsalarm-fault-family:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alarm-source>ALARM_SYSTEM_SOURCES</alarm-source>
<help-url>http://tempuri.org</help-url>
<contact name="ACS developer"/>
<fault-code value="1">
<priority>1</priority>
<problem-description>BACI property with a new FF, FM</problem-description>
</fault-code>
<fault-code value="2">
<priority>1</priority>
<problem-description>BACI property with a new FF, FM (LOW)</problem-description>
</fault-code>
<fault-code value="3">
<priority>1</priority>
<problem-description>BACI property with a new FF, FM (HIGH)</problem-description>
</fault-code>
<fault-member-default>
</fault-member-default>
</fault-family>
<?xml version="1.0" encoding="utf-8"?>
<Component xmlns="urn:schemas-cosylab-com:Component:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Name="ARCHIVE/TMCDB/MONITOR_BLOBBER"
Code="alma.acs.monitoring.blobber.BlobberHelper"
Type="IDL:alma/MonitorArchiver/Blobber:1.0"
Container="monColTestCont"
Default="true"
ImplLang="java" />
<?xml version="1.0" encoding="utf-8"?>
<Component xmlns="urn:schemas-cosylab-com:Component:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Name="ARCHIVE/TMCDB/MONITOR_CONTROL"
Code="alma.acs.monitoring.controller.ControllerHelper"
Type="IDL:alma/MonitorArchiver/Controller:1.0"
Container="monColTestCont"
Default="true"
Autostart="true"
ImplLang="java" />
<?xml version="1.0" encoding="ISO-8859-1"?>
<Components xmlns="urn:schemas-cosylab-com:Components:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<e Name="MONITOR_COLLECTOR_TEST"
Code="MonitorCollector"
Type="IDL:alma/TMCDB/MonitorCollector:1.0"
ImplLang="cpp"
Container="bilboContainer" />
</Components>
<?xml version="1.0" encoding="ISO-8859-1"?>
<Container xmlns="urn:schemas-cosylab-com:Container:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:log="urn:schemas-cosylab-com:LoggingConfig:1.0"
Timeout="20.0"
UseIFR="1"
ManagerRetry="10"
ImplLang="cpp">
<Autoload>
<cdb:e string="baci" />
</Autoload>
<LoggingConfig
centralizedLogger="Log"
minLogLevel="2"
dispatchPacketSize="0"
immediateDispatchLevel="99">
</LoggingConfig>
</Container>
<?xml version="1.0" encoding="ISO-8859-1"?>
<Container
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:schemas-cosylab-com:Container:1.0"
xmlns:log="urn:schemas-cosylab-com:LoggingConfig:1.0"
ImplLang="java"
ServerThreads="99"
>
<Autoload>
</Autoload>
<LoggingConfig
centralizedLogger="Log"
minLogLevel="4"
dispatchPacketSize="10"
immediateDispatchLevel="99">
<log:e Name="jacorb@frodoContainer"
minLogLevel="8" minLogLevelLocal="8" />
<log:e Name="UnknownSlf4j@frodoContainer"
minLogLevel="8" minLogLevelLocal="8" />
</LoggingConfig>
</Container>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<Container
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:schemas-cosylab-com:Container:1.0"
xmlns:log="urn:schemas-cosylab-com:LoggingConfig:1.0"
ImplLang="java"
>
<Autoload>
</Autoload>
<LoggingConfig minLogLevel="2" minLogLevelLocal="2">
<log:e Name="jacorb@frodoContainer" minLogLevel="5" minLogLevelLocal="5" />
</LoggingConfig>
</Container>
<?xml version="1.0" encoding="ISO-8859-1"?>
<Manager xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns="urn:schemas-cosylab-com:Manager:1.0"
xmlns:log="urn:schemas-cosylab-com:LoggingConfig:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Timeout="50.0"
ClientPingInterval="10.0"
ContainerPingInterval="10.0"
AdministratorPingInterval="10.0">
<Startup>
</Startup>
<ServiceComponents>
<cdb:e string="AcsAlarmService" />
<cdb:e string="ACSLogSvc" />
<cdb:e string="Log" />
<cdb:e string="LogFactory" />
<cdb:e string="NotifyEventChannelFactory" />
<cdb:e string="MC_NotifyEventChannelFactory" />
<cdb:e string="LoggingNotifyEventChannelFactory" />
<cdb:e string="MC_LoggingNotifyEventChannelFactory" />
<cdb:e string="AlarmNotifyEventChannelFactory" />
<cdb:e string="MC_AlarmNotifyEventChannelFactory" />
<cdb:e string="ArchivingChannel@ARCHIVING.channels" />
<cdb:e string="LoggingChannel@LOGGING.channels" />
<cdb:e string="AlarmChannel" />
<cdb:e string="InterfaceRepository" />
<cdb:e string="CDB" />
</ServiceComponents>
<LoggingConfig>
<log:e Name="jacorb@Manager" minLogLevel="5" minLogLevelLocal="4" />
</LoggingConfig>
</Manager>
\ No newline at end of file
......@@ -75,6 +75,10 @@ class VarUpdater(Thread):
v.set_value(v.get_value()+random.uniform(-5,5))
else:
v.set_value(random.uniform(-5,5))
if ty==ua.VariantType.Int16:
v.set_value(random.randint(0,8),ua.VariantType.Int16)
if ty==ua.VariantType.Int32:
v.set_value(random.randint(0,8),ua.VariantType.Int32)
time.sleep(2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment