Esempio n. 1
0
 def get_csdb_server_list(self):
     cache = settings.get_cache()
     exported_devices = cache.keys('tango.info.sys/database*')
     result = []
     for exp_dev in exported_devices:
         info = settings.HashSetting(key_name)
         result.append(info.get('IOR'))
     return result
Esempio n. 2
0
 def get_exported_device_list_for_class(self, class_name):
     result = []
     cache = settings.get_cache()
     exported_devices = cache.keys('tango.info.*')
     for exp_dev in exported_devices:
         dev_name = exp_dev.replace('tango.info.','')
         dev_node = self._tango_name_2_node.get(dev_name)
         if dev_node:
             dev_class_name = dev_node.get('class')
             if dev_class_name == class_name:
                 result.append(dev_name)
     return result
Esempio n. 3
0
 def get_host_server_list(self, host_name):
     result = []
     wildcard = host_name.replace('*','.*')
     m = re.compile(wildcard)
     cache = settings.get_cache()
     for key_name in cache.keys('tango.info.*'):
         host = settings.HashSetting(key_name).get('host')
         if not m.match(host): continue
         dev_name = key_name.replace('tango.info.','')
         dev_node = self._tango_name_2_node.get(dev_name)
         if dev_node is None: continue
         server_node = dev_node.parent
         result.append('%s/%s' % (server_node.get('server',''),server_node.get('personal_name')))
     return result
Esempio n. 4
0
 def get_host_list(self, host_name):
     cache = settings.get_cache()
     host_list =  [settings.HashSetting(key_name).get('host') for key_name in cache.keys('tango.info.*')]
     return _filter(host_name,host_list)
Esempio n. 5
0
 def get_device_exported_list(self, wildcard):
     cache = settings.get_cache()
     return [x.replace('tango.','') for x in cache.keys('tango.%s' % wildcard)]
Esempio n. 6
0
 def get_class_property_list(self, class_name):
     cache = settings.get_cache()
     return cache.keys('tango.class.properties.%s*' % class_name)