Documentation ¶
Index ¶
Constants ¶
View Source
const ( NetconfNS = "urn:ietf:params:xml:ns:netconf:base:1.0" NetconfNotifyNS = "urn:ietf:params:xml:ns:netconf:notification:1.0" CapBase10 = "urn:ietf:params:netconf:base:1.0" CapBase11 = "urn:ietf:params:netconf:base:1.1" CapXpath = "urn:ietf:params:netconf:capability:xpath:1.0" )
Define netconf URNs.
Variables ¶
View Source
var ( NameHello = xml.Name{Space: NetconfNS, Local: "hello"} NameRPC = xml.Name{Space: NetconfNS, Local: "rpc"} NameRPCReply = xml.Name{Space: NetconfNS, Local: "rpc-reply"} NameNotification = xml.Name{Space: NetconfNotifyNS, Local: "notification"} )
Define xml names for different netconf messages.
View Source
var DefaultCapabilities = []string{ CapBase10, CapBase11, CapXpath, }
DefaultCapabilities sets the default capabilities of the client library
View Source
var NoChunkedCodecCapabilities = []string{ CapBase10, CapXpath, }
NoChunkedCodecCapabilities sets omits chunked codec capability.
Functions ¶
func PeerSupportsChunkedFraming ¶
PeerSupportsChunkedFraming returns true if capability list indicates support for chunked framing.
Types ¶
type HelloMessage ¶
type HelloMessage struct { XMLName xml.Name `xml:"urn:ietf:params:xml:ns:netconf:base:1.0 hello"` Capabilities []string `xml:"capabilities>capability"` SessionID uint64 `xml:"session-id,omitempty"` }
HelloMessage defines the message sent/received during session negotiation.
type Notification ¶
Notification defines a specific notification event.
type NotificationMessage ¶
type NotificationMessage struct { XMLName xml.Name // `xml:"notification"` EventTime string `xml:"eventTime"` Event Notification `xml:",any"` }
NotificationMessage defines the notification message sent from the server.
type RPCError ¶
type RPCError struct { Type string `xml:"error-type"` Tag string `xml:"error-tag"` Severity string `xml:"error-severity"` Path string `xml:"error-path"` Message string `xml:"error-message"` Info string `xml:",innerxml"` }
RPCError defines an error reply to a RPC request
type RPCMessage ¶
type RPCMessage struct { XMLName xml.Name `xml:"urn:ietf:params:xml:ns:netconf:base:1.0 rpc"` MessageID string `xml:"message-id,attr"` *Union }
RPCMessage defines an rpc request message
Click to show internal directories.
Click to hide internal directories.