Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stronger Types for Enums and Improve Set Encoding #151

Closed
wants to merge 3 commits into from

Commits on Jul 15, 2021

  1. Add stronger typing for Enums

    This commit:
    1. Adjusts the mapper to handle stronger enum types
    2. Adjusts modelgen to produce these types
    
    Fixes: ovn-org#154
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    5dc9643 View commit details
    Browse the repository at this point in the history
  2. modelgen: Add constraints to sets

    Sets with min 1 and max 1 are a type
    Sets with min 0 and max 1 are a pointer to a type
    Sets with a max > 1 (non-default) are an array
    Otherwise a set is represented by a slice
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    27341d5 View commit details
    Browse the repository at this point in the history
  3. Update mapper/bindings to support new constraints

    This handles mapping from OvsToNative
    
    - min 0, max > 1 && !unlimted to an array
    - min 0, max 1 to a pointer
    - min 0, max unlimited to a slice
    
    And in NativeToOvs, we convert all cases back in to an
    OvsSet
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    ccd9a6f View commit details
    Browse the repository at this point in the history