1. 30 Nov, 2011 1 commit
  2. 22 Nov, 2011 1 commit
  3. 17 Nov, 2011 1 commit
  4. 16 Nov, 2011 3 commits
  5. 07 Nov, 2011 1 commit
  6. 12 Oct, 2011 1 commit
    • Iustin Pop's avatar
      Rename filter and filter_ to qfilter · 2e5c33db
      Iustin Pop authored
      
      
      We currently use 'filter' as the OpCode, QueryRequest and RAPI field
      name for representing a query filter. However, since 'filter' is a
      built-in function, we actually have to use filter_ throughout the code
      in order to not override the built-in function.
      
      This patch simply goes and does a global sed over the code. Due to the
      fact that the RAPI interface already exposed this field, we add
      compatibility code for now which handles both forms.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      2e5c33db
  7. 30 Aug, 2011 1 commit
  8. 03 Aug, 2011 1 commit
  9. 02 Aug, 2011 1 commit
  10. 27 Jul, 2011 1 commit
  11. 11 Jul, 2011 1 commit
  12. 21 Apr, 2011 1 commit
  13. 18 Apr, 2011 1 commit
  14. 05 Apr, 2011 2 commits
  15. 14 Mar, 2011 2 commits
  16. 07 Mar, 2011 1 commit
  17. 02 Mar, 2011 1 commit
  18. 01 Mar, 2011 2 commits
    • Michael Hanselmann's avatar
      query: Add support for filters · fb0be379
      Michael Hanselmann authored
      
      
      This patch adds a “compiler” for query filters, converting them to a
      callable function used while preparing the query result. In addition, a
      hints call allows some analysis to be done on the query (e.g. referenced
      names), making data collection more efficient.
      
      The depth of filters is limited to avoid exceeding the runtime's maximum
      recursion depth.
      
      More operators and other improvements can be implemented using this
      base. Extensive unittests are provided.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      fb0be379
    • Michael Hanselmann's avatar
      Add query field flags · 111bf531
      Michael Hanselmann authored
      
      
      Some fields (e.g. “name”) should be treated specially when comparing for
      equality. Hypervisor names should use normal rules, but for node names,
      “node2” should be equivalent with “node2.example.com”.
      
      To make these differences, a new field for flags is added to the query
      fields. It is not added to ”objects.QueryFieldDefinition” (the first
      item) as it would be exported to clients, something not desired for
      these internal rules. Instead, an additional field is added.
      
      Other special rules, e.g. “a list of strings” for an instance's
      secondary nodes, can be implemented as flags, too.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      111bf531
  19. 24 Feb, 2011 3 commits
  20. 23 Feb, 2011 3 commits
  21. 22 Feb, 2011 1 commit
  22. 17 Feb, 2011 1 commit
    • Iustin Pop's avatar
      NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes · effab4ca
      Iustin Pop authored
      
      
      Since we don't have the data per design, UNAVAIL is appropriate here,
      while NODATA is not.
      
      The patch also adds a comment: if we extend the live fields list to
      contain other data in the future, we need to reevaluate this solution.
      
      This should fix issue 143. The listing now shows (node2==ofline,
      node3==not vm_capable):
      
        Node     DTotal     DFree    MTotal     MNode     MFree Pinst Sinst
        node1    698.6G    630.5G     32.0G      1.0G     30.0G     8     7
        node2 (offline) (offline) (offline) (offline) (offline)     9     4
        node3 (unavail) (unavail) (unavail) (unavail) (unavail)     0     0
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      effab4ca
  23. 28 Jan, 2011 2 commits
  24. 21 Jan, 2011 1 commit
  25. 20 Jan, 2011 2 commits
  26. 18 Jan, 2011 4 commits
    • Iustin Pop's avatar
      query: use the actual types for BE/HV parameters · af58707c
      Iustin Pop authored
      
      
      This patch exposes the VTYPE kind of BE/HV parameters, instead of
      returning QFT_OTHER. The current situation makes a query like:
      
          gnt-instance list -o name,be/memory,oper_ram
      
      very strange looking.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      af58707c
    • Iustin Pop's avatar
      query: return UNAVAIL for "wrong" HV parameters · ff4cd4d2
      Iustin Pop authored
      
      
      If a HV parameter is required that does not apply for an instance,
      currently the code returns None. This is bad, as it means we cannot
      switch to the actual HV parameter types and validate correctly this
      field.
      
      This patch changes it so that in this case we return QRFS_UNAVAIL;
      ideally we would use a NOT_APPROPRIATE or similar field, but UNAVAIL is
      good enough (the call cannot fail in another way).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      ff4cd4d2
    • Iustin Pop's avatar
      query: change (debug-mode) field validation errors · d1c3c3b3
      Iustin Pop authored
      
      
      Currently, the single assert just checks that the entire row is
      consistent (true/false), and dumps the row and field definitions as an
      accompanying message. This makes it very hard to understand what failed.
      
      This patch changes this validation to show descriptive messages, which
      makes it much faster in diagnosing invalid result.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      d1c3c3b3
    • Iustin Pop's avatar
      Rename a few instance field titles · 0ca7e384
      Iustin Pop authored
      
      
      The conversion to querylib introduced unique field titles, which however
      did an inconsistent rename of the instance vcpus/memory fields.
      
      This patch makes both BE_MEMORY and _VCPUS be named with prefix “Config”
      (which before was “Configured_”), and drops the “Runtime” (note no
      underscore) prefix on the oper_ ones.
      
      Rationale: for numeric fields, the width of the title defines the width
      of the columns, as the numbers are usually small. Hence these columns
      (more likely used than the BE ones) would be very wide, leading to a
      not-so-nice display. I happened upon this when my terminals didn't
      manage to fit a gnt-instance list anymore.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      0ca7e384