Skip to content
Snippets Groups Projects
  1. Dec 04, 2012
  2. Nov 30, 2012
  3. Nov 29, 2012
    • Michael Hanselmann's avatar
      Fix type descriptions in RAPI documentation · 16091a6e
      Michael Hanselmann authored
      
      This patch adds descriptors to the “_CheckCIDR*” functions in opcodes
      and improves the descriptions generated by “ht.TInstanceOf”, thereby
      indirectly fixing bad type descriptions in the RAPI documentation.
      
      Before this patch:
      - (String and (<function _CheckCIDRAddrNotation at 0x2f…>))
      - (Instance of (<class 'ganeti.opcodes.OpInstanceCreate'>))
      
      After this patch:
      - (String and (IPv4 address))
      - (Instance of (ganeti.opcodes.OpInstanceCreate))
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
      16091a6e
  4. Nov 23, 2012
    • Iustin Pop's avatar
      Introduce a TMaybe combinator · fd9f58fd
      Iustin Pop authored
      
      We have many cases in the code where we write TOr(TNone, a), so let's
      introduce a combinator that simplifies this case.
      
      Beside replacing the above with TMaybe(a), I did a few other parameter
      fixes:
      
      - noop change TOr(TNone, TDict) to TMaybeDict
      - noop change TOr(TNone, TNonEmptyString) to TMaybeString
      - OpClusterSetParams, change master netmask from any integer to a
        non-negative integer
      
      (I can move the last one to a separate patch if desired)
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      fd9f58fd
  5. Nov 21, 2012
  6. Nov 20, 2012
    • Iustin Pop's avatar
      Cleanup ht's use of positive/strictpositive · 2c9fa1ff
      Iustin Pop authored
      Currently, ht.py uses a bad terminology for positive/non-negative
      numbers. Per http://en.wikipedia.org/wiki/Positive_number
      
      , this is the
      correct terminology:
      
      - A number is positive if it is greater than zero.
      - A number is negative if it is less than zero.
      - A number is non-negative if it is greater than or equal to zero.
      - A number is non-positive if it is less than or equal to zero.
      
      So this patch renames things as follows:
      
      - TPositiveInt            ⇒ TNonNegativeInt
      - TStrictPositiveInt      ⇒ TPositiveInt
      - TMaybePositiveInt       ⇒ dropped, not used anywhere
      - TMaybeStrictPositiveInt ⇒ TMaybePositiveInt
      - TPositiveFloat          ⇒ TNonNegativeFloat
      - TStrictNegativeInt      ⇒ TNegativeInt
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      2c9fa1ff
  7. Sep 12, 2012
  8. Feb 01, 2012
  9. Jan 18, 2012
  10. Aug 12, 2011
  11. Jul 21, 2011
  12. Jul 12, 2011
  13. Jul 11, 2011
  14. May 30, 2011
    • Michael Hanselmann's avatar
      ht: Accept both int and long as integers · b99b607f
      Michael Hanselmann authored
      
      This fixes a unittest failure on 32 bit systems. A recently added
      unittest for ht.TJobId uses a rather large number (2347625220). On 64
      bit systems it is stored as “int”. On 32 bit systems however, Python
      uses “long”. The two types can be intermixed in Python as the
      interpreter will take care of conversions. If one processed too many
      jobs (2**31) on a 32 bit system, ht would no longer accept the job IDs.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      b99b607f
  15. May 27, 2011
  16. May 17, 2011
  17. Mar 09, 2011
  18. Feb 04, 2011
  19. Jan 25, 2011
  20. Jan 04, 2011
  21. Oct 13, 2010
Loading