History | View | Annotate | Download (12 kB)
Clarify job ID-related type checks, add unittests
Instead of a rather complicated expression only “JobId” is output. JobID lists (like generated by “SubmitManyJobs”) are limited to two-itemlists. Unittests are added.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Add ht-based result checks to opcodes
This adds the infrastructure necessary to check opcode results usinght-based functions. Checks are added for two opcodes.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
jqueue: Implement submitting multiple jobs with dependencies
With this change users of the “SubmitManyJobs” interface can userelative job dependencies. Relative job IDs in dependencies are resolvedbefore handing the job off to the workerpool.
opcodes: Add function for compact summary
Depending on the opcode and its parameters, the existing “Summary”function can give a rater long summary. For displaying the summary inlogs and in the lock monitor, it should be shorter. Hence this newfunction is added to just use the opcode ID with common prefixes...
Add opcode parameter descriptions
These will be used in automatically generated parts of the RAPIdocumentation. Not all opcodes are documented so far, but each addedopcode's parameters need to be fully documented (verified by anassertion).
opcodes: Prepare addition of parameter descriptions
For now they're all set to None, but a following patch will set descriptions.
Check consistency of the class names and OP_ID
As the class names should be now consistent with the OP_IDs, we add acheck for wrongly-defined OP_IDs.
However, the future removal of the hand-coded OP_IDs will render thisobsolete, so this check is introduced just to make sure that the...
Generalize the OpCode-should-be-in-mcpu test
Currently, the unittest TestDispatchTable in mcpu unittest does ahard-coded approach to test whether an opcode should be included ornot in the mcpu.Processor dispatch table. This is not flexible, so wereplace it with two changes:...
Improve opcode summary tests
Test full summary instead of just format.
Migrate code verifying opcode parameters to base class
This allows the function to be used in other places as well.An optional parameter is added to control whether defaultvalues should be set. Unittests are added, providing fullcoverage.
Improve tests for OP_ID
… by detecting duplicates.
opcodes: Add opcode parameter definitions
This is the first step for migrating them from cmdlib. A metaclass isused to define “__slots__” upon class creation time (not instantiation).
Add unittests for ganeti.opcodes
According to “coverage”, this covers 99% of the code.