예제 #1
0
 def __init__(self):
     LOG.debug("Starting RuntimeAgent.")
     # Get monitor name and service
     conf = SysUtil().get_sys_conf()
     monitor_name = conf.get('monitoring')
     self.monitoring_service = FactoryAgent.get_agent(monitor_name)
     self.policy_threads = {}
     self.heat_client = HeatClient()
     self.checker_threads = {}
예제 #2
0
 def __init__(self):
     LOG.debug("Starting RuntimeAgent.")
     # Get monitor name and service
     conf = SysUtil().get_sys_conf()
     monitor_name = conf.get('monitoring')
     self.monitoring_service = FactoryAgent.get_agent(monitor_name)
     self.policy_threads = {}
     self.heat_client = HeatClient()
     self.checker_threads = {}
예제 #3
0
 def run(self):
     logger.debug("Starting new thread")
     i = 0
     while i < 18:
         for service_instance in self.topology.service_instances:
             for unit in service_instance.units:
                 if i == 0:
                     unit.state = 'Initialised'
                 else:
                     unit.state = 'Started'
                     dbm_name = SysUtil().get_sys_conf()['database_manager']
                     db = FactoryAgent.get_agent(dbm_name)
                     db.update(unit)
                     # conf = SysUtil().get_sys_conf().props
                     # runtime_agent = FactoryAgent().get_agent(conf['runtime_agent'])
                     # runtime_agent.run(self.topology)
             if i > 1:
                 return
         time.sleep(2)
         i += 1
     logger.error("Can't get info on the units after 180 seconds, is there a problem?")
예제 #4
0
 def run(self):
     LOG.debug("Starting new thread")
     i = 0
     while i < 18:
         for service_instance in self.topology.service_instances:
             for unit in service_instance.units:
                 if i == 0:
                     unit.state = 'Initialised'
                 else:
                     unit.state = 'Started'
                     dbm_name = SysUtil().get_sys_conf()['database_manager']
                     db = FactoryAgent.get_agent(dbm_name)
                     db.update(unit)
                     # conf = SysUtil().get_sys_conf().props
                     # runtime_agent = FactoryAgent().get_agent(conf['runtime_agent'])
                     # runtime_agent.run(self.topology)
             if i > 1:
                 return
         time.sleep(2)
         i += 1
     LOG.error("Can't get info on the units after 180 seconds, is there a problem?")