1. 20 Apr, 2015 1 commit
  2. 12 Sep, 2014 1 commit
  3. 17 Apr, 2014 1 commit
  4. 10 Feb, 2014 1 commit
  5. 07 Feb, 2014 2 commits
    • Santi Raffa's avatar
      serializer: emit and encode Private values · 560ef132
      Santi Raffa authored
      For inbound data the simplest, safest thing to do is to traverse all
      JSON right after encoding and search for private parameters by key.
      
      This ensures that all consumers of this data get Private values
      transparently and consistently; the serializing methods don't have to
      worry about trying to understand what kind of JSON it is receiving.
      It also minimizes the surface area of codebase that is exposed to the
      values directly.
      
      The downside is it adds a ~5% time overhead to all JSON decoding as
      measured through:
      
      $ time make hs-test-py_compat_types
      
      As far as encoding to JSON is concerned, the serializer will redact
      Private values unless told to do so explicitly (e.g., for tests).
      Signed-off-by: default avatarSanti Raffa <rsanti@google.com>
      Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
      560ef132
    • Santi Raffa's avatar
      Add Private types to Python, Haskell · 4884f187
      Santi Raffa authored
      This commit adds the private containers to Python and Haskell.
      Signed-off-by: default avatarSanti Raffa <rsanti@google.com>
      Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
      4884f187
  6. 04 Feb, 2014 1 commit
  7. 27 Nov, 2012 1 commit
  8. 21 Dec, 2011 1 commit
    • Michael Hanselmann's avatar
      serializer: Remove JSON indentation and dict key sorting · a182a3ed
      Michael Hanselmann authored
      Serializing to JSON using “simplejson” is significantly slower when
      indentation and/or sorting of dictionary keys is used. In simplejson 1.x
      the difference isn't that big, but with simplejson 2.x the difference
      can be up to a factor of 7.5. The reason is that the latter no longer
      uses C functions when sorting or indentation is used.
      
      With this patch we revert everything to simplejson's defaults, which
      should provide us with the best performance available.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      a182a3ed
  9. 26 Sep, 2011 2 commits
  10. 23 Sep, 2011 2 commits
  11. 30 Aug, 2011 1 commit
  12. 25 Jul, 2011 1 commit
  13. 04 May, 2010 2 commits
  14. 09 Apr, 2010 1 commit
    • Guido Trotter's avatar
      Fix new pylint errors · fe7c59d5
      Guido Trotter authored
      Under squeeze pylint reports the following errors:
      ************* Module ganeti.serializer
      E1103:155:LoadSignedJson: Instance of 'False' has no 'get' member (but some types could not be inferred)
      ************* Module ganeti-masterd
      E1103:166:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred)
      E1103:167:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred)
      ************* Module gnt-instance
      E1103:431:BatchCreate: Instance of 'False' has no 'keys' member (but some types could not be inferred)
      
      For the first two cases it's actually wrong: we had checked before that
      the variable on which "get" is called is actually a dict. In the third
      case though such check doesn't exist, so we add it. Then we silence the
      error all three times.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      fe7c59d5
  15. 26 Feb, 2010 1 commit
  16. 28 Dec, 2009 1 commit
  17. 05 Nov, 2009 1 commit
  18. 19 Oct, 2009 1 commit
  19. 16 Oct, 2009 1 commit
  20. 07 Aug, 2009 2 commits
  21. 05 Aug, 2009 1 commit
  22. 16 Jul, 2009 1 commit
  23. 14 Jul, 2009 1 commit
  24. 11 Dec, 2008 1 commit
    • Iustin Pop's avatar
      Fix epydoc format warnings · c41eea6e
      Iustin Pop authored
      This patch should fix all outstanding epydoc parsing errors; as such, we
      switch epydoc into verbose mode so that any new errors will be visible.
      
      Reviewed-by: imsnah
      c41eea6e
  25. 08 Jul, 2008 1 commit
  26. 18 Jun, 2008 1 commit
  27. 06 Jun, 2008 1 commit
  28. 21 Apr, 2008 1 commit
    • Iustin Pop's avatar
      Abstract the json functions into a separate module · 8d14b30d
      Iustin Pop authored
      This simple patch adds a new module that holds the simplejson functions
      for serialization/deserialization. This reduces the amount of redundant
      code.
      
      The patch also adds some normalizations to the json output:
        - the output text will always have an EOL as last char
        - extra spaces before EOL are removed
      
      Reviewed-by: ultrotter
      8d14b30d