Skip to content

Add binary for gNMI+gRIBI server, add TLS support.#26

Merged
robshakir merged 50 commits intomainfrom
rib5
Jun 18, 2021
Merged

Add binary for gNMI+gRIBI server, add TLS support.#26
robshakir merged 50 commits intomainfrom
rib5

Conversation

@robshakir
Copy link
Copy Markdown
Member

commit 7e1a0add185a411dd5282e8ac5be734f7b3bde61
Author: Rob Shakir <robjs@google.com>
Date:   Tue Jun 15 23:27:30 2021 -0700

    Plumb TLS through the client.
    
      * (M) client/client.go
        - Move to defaulting that TLS is on in gRIBI to match
          gNMI. In the future this could be dialoption controlled.
      * (M) cmd/rtr/main.go
        - Add a simple binary that allows a gnmi+gribi server to
          be created.
      * (M) compliance/compliance.go
      * (M) compliance/compliance_test.go
        - Adopt TLS in compliance tests.
        - Add basic IPv4Entry test
      * (A) demo/ipv4/ipv4.go
      * (A) demo/ipv4/ipv4_test.go
        - Allow IPv4Entry compliance test to be run against the rtr
          binary.
      * (M) device/device.go
      * (M) device/device_test.go
        - Add TLS credential options.
        - Add a device package test.
      * (M) fluent/fluent_test.go
        - Adopt TLS.
      * (M) gnmit/gnmit.go
        - Add TLS for gNMI server.
      * (M) server/server.go
        - Clean up clients that have gone away. :-)
      * (A) testcommon/testcommon.go
      * (A) testcommon/testdata/server.cert
      * (A) testcommon/testdata/server.key
        - Keys for all test packages and an accessor function.

As of this PR there is a binary gRIBI server, with gNMI hook that is
able to expose the gRIBI service to external callers, and publish to a gNMI cache
that it runs.

Subsequent steps are to add the integration with the sysRIB (left as a TODO
in this change), and add an interface for determining where packets are going.

robshakir added 30 commits June 8, 2021 14:49
  * (M) aft/oc.go
  * (M) aft/update.sh
    - Update generated code.
  * (M) go.mod
  * (M) go.sum
    - Go mod tidying.
  * (M) rib/rib.go
  * (M) rib/rib_test.go
    - Add IPv4 entry add and delete.
  * (M) go.mod
  * (M) go.sum
    -  Tidy up modules.
  * (M) rib/rib.go
  * (M) rib/rib_test.go
    -  Add support for network instances in the RIB rather than
       a single RIB.
  * (M) client/client.go
    - TODO comment about handling coalescing.
  * (M) rib/rib.go
  * (M) rib/rib_test.go
    - Add support for adding NHG and NHs to the RIB.
  * (M) rib/rib.go
  * (M) rib/rib_test.go
    - Validate any candidate RIB against the OpenConfig schema before
      adding it to the RIB.
  * (M) aft/oc.go
  * (M) aft/update.sh
    - Add delete methods.
  * (M) go.mod
  * (M) go.sum
    - Tidy up modules.
  * (M) rib/rib.go
    - Add support for a simple callback function that is run after
      every update to the RIB.
    - Fix a defect with implicit replace whereby we did not delete the
      RIB entry before doing MergeStructInto meaning that for some
      leaf-lists we ended up appending to the contents of the RIB.
  * (M) rib/rib_test.go
    - Add test cases for the above functionality - including a test
      case demonstrating how gNMI Notifications can be generated.
* Add an initial implementation of a resolved-RIB.

Background -- we want the gRIBI server to be able build both a RIB that
is efficient for it to do gRIBI operations with, as well as a software
emulated 'resolved RIB' / 'FIB' whereby we can say something like "where
will this packet go based on what gRIBI is programmed?". This package
starts this implementation.

  * (M) aft/oc.go
    - Update generated code.
  * (M) go.mod
  * (M) go.sum
    - New dependencies on kentik/patricia
  * (A) ocrt/oc.go
  * (A) ocrt/update.sh
    - Generated routing specific OpenConfig Go structs.
  * (A) ocrt/yang/deviations.yang
    - Deviations to reduce the size of the generated oc.go.
  * (M) rib/rib.go
    - Fix handling of implicit replace.
  * (A) sysrib/sysrib.go
  * (A) sysrib/sysrib_test.go
    -  Initial system RIB implementation. This package currently parses
        OpenConfig to build a list of all of the connected routes that
        are on the system.

* Address review comments.
  * (A) gnmit/gnmit.go
  * (A) gnmit/gnmit_test.go
    - Wrap the openconfig/gnmi libraries to create a single-device
      cache that can be used to send gNMI updates to from the overall
      fake device.
  * (M) go.mod
  * (M) go.sum
    - move off ygot development branch.
  * (M) rib/rib.go
    -  Adopt change to protomap API in ygot.
  * (M) server/server.go
    -  Add goroutines to server Modify handler to allow concurrent
       processing.
  * (M) gnmit/gnmit_test.go
    - deflake test by:
      - checking for presence of correct leaves before syncresponse.
      - ignoring update order.
  * (M) fluent/fluent.go
  * (M) fluent/fluent_test.go
    - Add support for generating basic IPv4Entry types in the
      fluent API.
    - Ensure coverage of the builder functions in the fluent
      library.
  * (M) client/client.go
    - Fix duplicate queueing for AFTOperations during send queueing.
    - Handle received operations from the server by removing them
      from the pending queue.
  * (M) fluent/fluent.go
    - Simplfy mapping to canonical reason codes.
  * (M) fluent/fluent_test.go
    - Add an integration test for a simple IPv4 entry.
  * (M) rib/rib.go
  * (M) rib/rib_test.go
    - Define a type for the RIB function hook.
    - add locking across network instances.
    - change ribHolder to be publicly accessible.
  * (M) server/server.go
    - Define a const for the default network instance name.
    - Add handling for specifying a RIBHook when initialising the
      server.
    - Add handling for doing an IPv4 add operation.
robshakir added 11 commits June 15, 2021 12:35
  * (M) go.mod
  * (M) go.sum
    - 🧹 - tidy up go modules.
  * (M) rib/rib.go
  * (M) rib/rib_test.go
    - add mutex to protect RIB datastructures from concurrent access.
    - make RIBHolder/NewRIBHolder public to enable testing.
    - add new IsValid method for a RIBHolder to detect badly initialised
      RIBs and => avoid panics.
    - make concreteIPv4Proto use the correct prefix.
  * (M) server/server.go
  * (M) server/server_test.go
    - add storage for the last election ID from a client so that we can
      check that they did not just increment the ID when we did not
      expect it.
    - add handling of adding ipv4 entries.
    - add clearer encapsulation of election results.
    - encapsulate the election process in a clearer function.
    - add unit testing for server.go ipv4 additions.
  * (M) client/client.go
    - Move to defaulting that TLS is on in gRIBI to match
      gNMI. In the future this could be dialoption controlled.
  * (M) cmd/rtr/main.go
    - Add a simple binary that allows a gnmi+gribi server to
      be created.
  * (M) compliance/compliance.go
  * (M) compliance/compliance_test.go
    - Adopt TLS in compliance tests.
    - Add basic IPv4Entry test
  * (A) demo/ipv4/ipv4.go
  * (A) demo/ipv4/ipv4_test.go
    - Allow IPv4Entry compliance test to be run against the rtr
      binary.
  * (M) device/device.go
  * (M) device/device_test.go
    - Add TLS credential options.
    - Add a device package test.
  * (M) fluent/fluent_test.go
    - Adopt TLS.
  * (M) gnmit/gnmit.go
    - Add TLS for gNMI server.
  * (M) server/server.go
    - Clean up clients that have gone away. :-)
  * (A) testcommon/testcommon.go
  * (A) testcommon/testdata/server.cert
  * (A) testcommon/testdata/server.key
    - Keys for all test packages and an accessor function.
  * (M) .github/workflows/go.yml
    - Exclude files from race testing.
@robshakir robshakir changed the base branch from main to rib4.6 June 16, 2021 06:51
@robshakir robshakir requested a review from sthesayi June 17, 2021 05:08
Base automatically changed from rib4.6 to main June 17, 2021 05:09
Copy link
Copy Markdown
Contributor

@sthesayi sthesayi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow. massive PR :)

@robshakir robshakir merged commit 3673914 into main Jun 18, 2021
@robshakir robshakir deleted the rib5 branch June 18, 2021 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants