Commit 6f2afad4 authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

script to set SR helperApplication property

parent 6306b1d0
#!/usr/bin/python3
# fix helper application on a server/class
from tango import *
appname = 'FourUHV-gui' #change!
#get tango Databse
db = Database()
# get list of devicese form server/instance
instances=['4uhv-srv/vac_a02','4uhv-srv/vac_a04','4uhv-srv/vac_a10','4uhv-srv/vac_a12']
#instances=['4uhv-srv/vac_a02']
for instance in instances:
devlistraw=[]
devlistraw = db.get_device_class_list(instance).value_string
idx = 0
devlist =[]
while idx < len(devlistraw) - 2: # even indexes contains name of device, odd indexs name of class. last couple is for dserver
devlist.append(devlistraw[idx])
idx +=2
for devname in devlist:
if devname.find('sippwr') > 0:
dev = DeviceProxy(devname)
pp = DbDatum('helperApplication')
fullappname = appname + ' ' + devname
pp.append(fullappname)
#dev.put_property(pp)
print(fullappname)
Markdown is supported
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