• Iustin Pop's avatar
    Rework the results of OpDiagnoseOS opcode · 1f9430d6
    Iustin Pop authored
    Currently, the opcode DiagnoseOS is the only opcode that return a
    structure of objects.OS (which is a custom class, and not a simple
    python object) and furthermore all the processing of OS validity across
    nodes is left to the clients of this opcode.
    It would be more logical to have this opcode be similar to list
    instances/nodes, in the sense that:
      - it should return a table of results
      - the fields in the table should be selectable
    This patch does the above. The possible fields are:
      - name (os name)
      - valid (bool representing validity across all nodes)
      - node_status, which is a complicated structure required for ‘gnt-os
    With this patch, gnt-os list becomes a very simple iteration over the
    list of results, filtering out non-valid ones. gnt-os diagnose is still
    complicated, but no more than before.
    The burnin tool has also been modified to work with the modified
    results, and is simpler because of this (it only needs to know if an OS
    is valid or not, not the per-node details).
    Reviewed-by: imsnah
gnt-os 3.57 KB