-
Notifications
You must be signed in to change notification settings - Fork 113
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
netconf notifications #36
Comments
Do you have an example of a notification? I have never used the before. The package is setup to be request and response as per the RFC. |
I met the same problem and Iwrote onr by myself.Maybe you can take it as reference. func main() { type RPCReply struct { func newRPCReply(rawXML []byte, ErrOnWarning bool, messageID string) (*RPCReply, error) {
} |
I test the example ,wait for about 10 minutes and I am sorry to find that it will wrong by the mistakes:waitWalkFunc failed |
you can refer this address this is a notifaction example |
This will be supported n v2. No ETA |
Add unittest for RPCMsg encoding and ensure that operation is supplied when encoding `rpc` request messages (i.e `ReqMSG`) via custom MarshalXML method. Future work to make sure structs passed in are named. **Test Plan:** ``` $ go test . -v -run=MarshalRPCMsg === RUN TestMarshalRPCMsg === RUN TestMarshalRPCMsg/nil msg_test.go:55: out: === RUN TestMarshalRPCMsg/string msg_test.go:55: out: <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><foo><bar/></foo></rpc> === RUN TestMarshalRPCMsg/byteslice msg_test.go:55: out: <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><baz><qux/></baz></rpc> === RUN TestMarshalRPCMsg/validate msg_test.go:55: out: <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><validate><source><running/></source></validate></rpc> === RUN TestMarshalRPCMsg/customStruct msg_test.go:55: out: <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><command xmlns="http://xml.juniper.net/junos/22.4R0/junos">show bgp neighbors</command></rpc> --- PASS: TestMarshalRPCMsg (0.00s) --- PASS: TestMarshalRPCMsg/nil (0.00s) --- PASS: TestMarshalRPCMsg/string (0.00s) --- PASS: TestMarshalRPCMsg/byteslice (0.00s) --- PASS: TestMarshalRPCMsg/validate (0.00s) --- PASS: TestMarshalRPCMsg/customStruct (0.00s) PASS ok github.com/nemith/netconf (cached) ```
Currently I have a netconf client session connection to a server. Now I want to receive notifications from the server, so I send a subscribe request. But after I do this, I see that my requests to the server are returning error " expected type rpc-reply but received notification" I am curious to learn how others are subscribing to netconf notifications. Any suggestions/advice will be helpful. Thanks in advance.
The text was updated successfully, but these errors were encountered: