1. 04 Mar, 2013 4 commits
    • Iustin Pop's avatar
      Fix bug in group queries related to node/instance fields · e7124835
      Iustin Pop authored
      
      
      Since we use the primitive string type for group UUIDs, the group
      fields have a bug where we pass the group name as filter for node
      tests, whereas the nodes themselves use the group UUID. This results
      in zero node count, empty node list, and no instances being reported
      as assigned to groups.
      
      The patch fixes this and adds a test for the node count. It does some
      test generation improvement, and also cleans up whitespace issues in
      Test/G/Q/Query.hs (the functions case_queryNode_allfields,
      prop_queryGroup_noUnknown and case_queryGroup_allfields are unchanged
      but simply have indentation fixed).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      e7124835
    • Iustin Pop's avatar
      Abstract the individual query functions · d5b2753a
      Iustin Pop authored
      
      
      After implementing a few of the query executor functions, it turns out
      that we have the same general pattern:
      
      - compile the filter
      - extract the selected fields
      - determine whether we need to run collectors
      - do a first pass filtering
      - run the collector if needed
      - compute the final fields
      
      For pure config queries, the collector/final computation is not
      needed, but otherwise the code flow is the same.
      
      We can therefore abstract all the queries that originate in the config
      (i.e. except the job query) and have a single code path for all of
      them, just with different parameters.
      
      To do this, we add some stub collectors for group/network queries,
      which don't have live data.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      d5b2753a
    • Iustin Pop's avatar
      Allow confd to serve network list-fields queries · dce08ad3
      Iustin Pop authored
      
      
      The fields are not yet complete, but at least we can enable the
      list-field query to see what is there already.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      dce08ad3
    • Iustin Pop's avatar
      Rename/make uniform the other query entities · 36162faf
      Iustin Pop authored
      
      
      Following the new naming style introduced in Exports.hs, this patch
      renames the other resources to export non-qualified names (fieldMap as
      opposed to nodeFieldMap), and to use qualified module imports.
      
      Also fixes a haddock issue in a docstring.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      36162faf
  2. 28 Feb, 2013 7 commits
  3. 27 Feb, 2013 15 commits
  4. 26 Feb, 2013 1 commit
  5. 25 Feb, 2013 13 commits