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

Use pointers for optional datatypes. Use arrays for fixed size sets #204

Merged
merged 2 commits into from
Aug 3, 2021

Commits on Aug 2, 2021

  1. 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 Aug 2, 2021
    Configuration menu
    Copy the full SHA
    c68cba9 View commit details
    Browse the repository at this point in the history
  2. bindings: Update 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 Aug 2, 2021
    Configuration menu
    Copy the full SHA
    8f86fcb View commit details
    Browse the repository at this point in the history