Ejemplo n.º 1
0
 def disable_module(self, ctxt, name):
     LOG.info('Received disable command for module {}.'.format(name))
     lock = lockutils.lock('module-state')
     with lock:
         self._module_state[name] = False
         if name in self._pending_reload:
             self._pending_reload.remove(name)
Ejemplo n.º 2
0
 def disable_module(self, ctxt, name):
     LOG.info('Received disable command for module {}.'.format(name))
     lock = lockutils.lock('module-state')
     with lock:
         self._module_state[name] = False
         if name in self._pending_reload:
             self._pending_reload.remove(name)
Ejemplo n.º 3
0
 def enable_module(self, ctxt, name):
     LOG.info('Received enable command for module {}.'.format(name))
     lock = lockutils.lock('module-state')
     with lock:
         self._module_state[name] = True
Ejemplo n.º 4
0
 def reload_module(self, ctxt, name):
     LOG.info('Received reload command for module {}.'.format(name))
     lock = lockutils.lock('module-reload')
     with lock:
         if name not in self._pending_reload:
             self._pending_reload.append(name)
Ejemplo n.º 5
0
 def get_module_state(self):
     lock = lockutils.lock('module-state')
     with lock:
         module_list = self._module_state
         self._module_state = {}
         return module_list
Ejemplo n.º 6
0
 def get_reload_list(self):
     lock = lockutils.lock('module-reload')
     with lock:
         reload_list = self._pending_reload
         self._pending_reload = []
         return reload_list
Ejemplo n.º 7
0
 def enable_module(self, ctxt, name):
     LOG.info('Received enable command for module {}.'.format(name))
     lock = lockutils.lock('module-state')
     with lock:
         self._module_state[name] = True
Ejemplo n.º 8
0
 def reload_module(self, ctxt, name):
     LOG.info('Received reload command for module {}.'.format(name))
     lock = lockutils.lock('module-reload')
     with lock:
         if name not in self._pending_reload:
             self._pending_reload.append(name)
Ejemplo n.º 9
0
 def get_module_state(self):
     lock = lockutils.lock('module-state')
     with lock:
         module_list = self._module_state
         self._module_state = {}
         return module_list
Ejemplo n.º 10
0
 def get_reload_list(self):
     lock = lockutils.lock('module-reload')
     with lock:
         reload_list = self._pending_reload
         self._pending_reload = []
         return reload_list