Clean up SoftwareReleaseSchema
This is mainly about error handling, simpler and more useful. - Always warn when a valid SR can't be loaded, with a message that contains the original exception (for example, compared to before this commit, it will tell if a JSON file can't be found, or where JSON has syntax errors). - Same as previous point if serialisation type is invalid or missing. If the caller needs it to transform parameters (parameters file), it will raise with the original exception. Otherwise, it falls back on json-in-xml. In some places, such fallback is a change of behaviour and I have no opinion about it except that at least it's now consistent throughout slapos.core. - Remove warning about RootSoftwareInstance/default: meaningless because contradicted the comment, and useless because the transition to 'default' is already complete for SR schemas. There are still 3 lines of backward compatibility code for the rest of slapos.core. - Don't read the same file several times. Note however that this performance fix is only for the SoftwareReleaseSchema class: the caller should be fixed to not instanciate several times with the same parameters (from do_request & _requestComputerPartition). See merge request !621
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#670231
external
|
SlapOS-Master.UnitTest-Master |
01:47:28
|
||||||
passed |
#670603
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:15:17
|
||||||
passed |
#670587
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:17:32
|
||||||
passed |
#670041
external
retried
|
SlapOS-Master.UnitTest-Master |
02:00:18
|
||||||
passed |
#669973
external
retried
|
SlapOS-Master.UnitTest-Master |
01:36:16
|
||||||
passed |
#670005
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:16:06
|
||||||
passed |
#669945
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:14:40
|
||||||
passed |
#670237
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:31:37
|
||||||
passed |
#670332
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:23:34
|
||||||
passed |
#670299
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:16:00
|
||||||
passed |
#670344
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:18:18
|
||||||
passed |
#670009
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:17:08
|
||||||
failed |
#670253
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:36:32
|
||||||
failed |
#670302
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:34
|
||||||
passed |
#669941
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:32
|
||||||