Project

General

Profile

Evolution #5474

Ajouter "reload" dans les actions possibles pour service.py

Added by Joël Cuissinat over 6 years ago. Updated over 6 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
05/27/2013
Due date:
05/31/2013
% Done:

100%

Estimated time:
0.75 h
Spent time:
Distribution:
EOLE 2.4

Description

Exemple d'utilisation : reload de dansguardian ou squid depuis l'EAD

      File "/usr/share/ead2/backend/actions/amon/navigation_filters_admin.py", line 58, in execute
        'admin')
      File "/usr/share/ead2/backend/actions/amon/forms.py", line 327, in valid_opt_filters_form
        if dans_tools.reload():
      File "/usr/lib/python2.7/dist-packages/amon/dansguardian/dans_tools.py", line 47, in reload
        ret = service_out('dansguardian', 'reload', container='proxy')
      File "/usr/lib/python2.7/dist-packages/pyeole/service.py", line 681, in service_out
        ret = creole_service_out(c_service, action, c_container)
      File "/usr/lib/python2.7/dist-packages/pyeole/service.py", line 700, in creole_service_out
        for cmd in _gen_service_cmd(service, action):
      File "/usr/lib/python2.7/dist-packages/pyeole/service.py", line 146, in _gen_service_cmd
        _valid_action(action)
      File "/usr/lib/python2.7/dist-packages/pyeole/service.py", line 134, in _valid_action
        raise ValueError('action {} invalide'.format(action))
    exceptions.ValueError: action reload invalide


Related issues

Related to ead - Evolution #5473: Débogage EAD2 pour Amon 2.4 Fermé 05/27/2013 05/31/2013

Associated revisions

Revision f816f02c (diff)
Added by Joël Cuissinat over 6 years ago

  • pyeole/service.py : support de l'action "reload"

Fixes #5474 @20m

Revision 9e9967ec (diff)
Added by Joël Cuissinat over 6 years ago

  • pyeole/service.py : support de l'action "force-reload"

Ref #5474 @10m
Ref #5206

History

#1 Updated by Joël Cuissinat over 6 years ago

  • Status changed from A étudier to Résolu
  • % Done changed from 0 to 100

#2 Updated by Joël Cuissinat over 6 years ago

  • Due date set to 05/31/2013
  • Assigned To set to Joël Cuissinat
  • Start date set to 05/27/2013

#3 Updated by Joël Cuissinat over 6 years ago

  • Status changed from Résolu to Fermé
>>> from pyeole.service import service_out
>>> service_out('apache2', 'reload', container='web')
(0, ' * Reloading web server config apache2\n   ...done.\n', '')
>>> service_out('nscd', 'force-reload', container='fichier')
(0, ' * Restarting Name Service Cache Daemon nscd\n   ...done.\n', '')

Also available in: Atom PDF