Project

General

Profile

Tâche #22107

Scénario #21863: Corrections let's encrypt

Plante creole en cas de problème dans les parametres

Added by Emmanuel GARETTE over 2 years ago. Updated over 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
05/15/2017
Due date:
% Done:

50%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

Si on met un param de type eole sans texte ca plante :

        <fill name='calc_multi_condition' target='server_pem'>
            <param>letsencrypt</param>
            <param type='eole' name='condition_1'>cert_type</param>
            <param type='eole' name='match'></param>
            <param name='mismatch'>/etc/ssl/certs/eole.pem</param>
        </fill>

Avec le message :

root@lab15-eole:~# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from creole.loader import creole_loader;c=creole_loader()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 761, in creole_loader
    eolobj.space_visitor()
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 454, in space_visitor
    SpaceAnnotator(self.space, self.paths, self)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 832, in __init__
    self.filter_autofill(space)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1156, in filter_autofill
    self.filter_fill(space.constraints.fill)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1400, in filter_fill
    if HIGH_COMPATIBILITY and param.text.startswith('container_ip'):
AttributeError: 'Param' object has no attribute 'text'
>>> 

Ca devrait faire une vrai erreur (penser a faire un test unitaire ...)

Associated revisions

Revision bf3b50cf (diff)
Added by Gwenael Remond over 2 years ago

Eole type variable must be correctly set exception

Ref #22107

Revision 8fe1c438 (diff)
Added by Gwenael Remond over 2 years ago

update translation

ref #22107

Revision efe9cc1f (diff)
Added by Gwenael Remond over 2 years ago

changed exception type

ref #22107

Revision 56a07734 (diff)
Added by Gwenael Remond over 2 years ago

unit tests on the type eole param error

ref #22107

Revision 0e8ca2bc (diff)
Added by Joël Cuissinat over 2 years ago

fix translation call :o

Ref: #22107

Revision c044136f (diff)
Added by Gwenael Remond over 2 years ago

Handles exceptions on creole types number, python and container

Ref #22107

Revision 2cdde708 (diff)
Added by Emmanuel GARETTE over 2 years ago

fix test for number, python or container (ref #22107)

Revision 069b78a6 (diff)
Added by Emmanuel GARETTE over 2 years ago

add more tests for number/container/eole/valid_enum (ref #22107)

Revision 60ed428a (diff)
Added by Joël Cuissinat over 2 years ago

Update translations Ref: #22107

History

#1 Updated by Gwenael Remond over 2 years ago

  • Assigned To set to Gwenael Remond

#2 Updated by Scrum Master over 2 years ago

  • Status changed from Nouveau to En cours

#3 Updated by Gwenael Remond over 2 years ago

  • Estimated time set to 0.00 h
  • Remaining (hours) set to 0.0

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

  • % Done changed from 0 to 100
  • Estimated time changed from 0.00 h to 3.00 h
  • Remaining (hours) changed from 0.0 to 0.25

#5 Updated by Scrum Master over 2 years ago

  • Status changed from En cours to Résolu

#6 Updated by Scrum Master over 2 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.25 to 0.0

#7 Updated by Scrum Master over 2 years ago

  • Status changed from Fermé to Résolu

#8 Updated by Emmanuel GARETTE over 2 years ago

  • Status changed from Résolu to En cours
  • % Done changed from 100 to 50

J'ai des erreurs avec d'autres types :

  • "number" : TypeError: int() argument must be a string or a number, not 'NoneType'
  • "container" : AttributeError: 'Param' object has no attribute 'text'
  • "python" : AttributeError: 'Param' object has no attribute 'text'

Pour le type python j'ai fait :

        <check name="valid_enum" target="nombre_interfaces">
            <param type="python"></param>
        </check>

#9 Updated by Scrum Master over 2 years ago

  • Status changed from En cours to Résolu

#10 Updated by Scrum Master over 2 years ago

  • Status changed from Résolu to En cours

#11 Updated by Gwenael Remond over 2 years ago

  • Status changed from En cours to Résolu

#12 Updated by Laurent Flori over 2 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF