Netconfd-pro and ypgrpc-go-app Interaction

The ypgrpc-go-app application uses several messages to interact with the netconfd-pro server that described in this section.

Message Format

These messages are defined in the yumaworks-yp-grpc.yang YANG module. The ypgrpc-go-app payload is defined as a YANG container that augments the YControl “message-payload” container.

The following diagram illustrates the YControl messages overview:

../_images/ypgrpc_message.png

Messages Interaction

The ypgrpc-go-app application contains YControl subsystem service that communicate with the netconfd-pro server. The netconfd-pro server and the ypgrpc-go-app application have the following messages interaction:

  • capability-ad-event: ypgrpc-go-app sends subsystem event to advertise all the gRPC available and active capabilities during the registration time

  • open-stream-event: ypgrpc-go-app sends subsystem event to advertise a new gRPC server or client stream(s)

  • close-stream-event: ypgrpc-go-app sends subsystem event to advertise that the gRPC server or client stream was closed.

Registration Message Flow

During the startup phase the server will initialize the yp-grpc subsystem callback functions and handlers (similar to the db-api service layer).

The connection with the server is started with a <ncx-connect> message that adds the YControl subsystem with the “example-grpc” subsystem ID to the server (agt_connect module).

YControl protocol connection parameters:

  • transport: netconf-aflocal

  • protocol: yp-grpc

  • <port-num> not used

Additional parameters:

  • subsys-id: example-grpc

The Registration message flow looks as follows:

  • ypgrpc-go-app to Server: register-request: the yp-grpc service registers callbacks supported by the subsystem.

  • Server to ypgrpc-go-app: ok: the server responds to the register request with an <ok> or an <error> message

  • ypgrpc-go-app to Server: capability-ad-event: sends subsystem event to advertise all the gRPC available and active capabilities during the registration time

The YP-gRPC subsystem service messages are defined in the yumaworks-yp-grpc.yang module.