Connection Profile#
SDC offers versatile connection capabilities with devices, supporting multiple protocols like NETCONF and gNMI. It is designed to accommodate a range of devices and security needs. The connection details are comprehensively outlined in the TargetConnectionProfile CustomResource. For further information, please refer to here.
Understanding Supported Protocols in SDC#
SDC seamlessly integrates two key protocols - NETCONF and gNMI - for device communication. Configuring connection profiles in SDC involves both general attributes and protocol-specific ones.
General Connection Attributes#
protocol: Determines the connection protocol, with options beingnetconforgnmi.connectRetry: The interval between retries after a connection failure, defaulting to 10 seconds.timeout: The duration for attempting initial connection establishment, set by default to 10 seconds.
Protocol-Specific Attributes#
NETCONF Connection Attributes#
For connections via NETCONF, the protocol needs to be set to netconf. Specific attributes include:
port: The designated SSH port for NETCONF sessions, usually830.includeNS: When enabled, XML tags incorporate their namespace as an attribute.operationWithNS: Activates proper namespacing for theedit-configRPC operation attribute in NETCONF.useOperationRemove: If set to true, SDC utilizes the NETCONF operationremoverather thandelete.preferredNetconfVersion: Selects between NETCONF versions1.0or1.1.commitCandidate: Selects the datastore on the target for applying the config to. Defaults tocandidate, but can be set torunningif the target does not support acandidatedatastore.
apiVersion: inv.sdcio.dev/v1alpha1
kind: TargetConnectionProfile
metadata:
  name: netconf
  namespace: default
  labels:
    dummy: dummy
spec:
  port: 830
  protocol: netconf
  skipVerify: true
  includeNS: true
  operationWithNS: true
gNMI Connection Attributes#
For gNMI protocol connections, set protocol to gnmi. Key attributes for gNMI are:
port: The default TCP port for gNMI sessions is57400.encoding: Specifies the encoding format for gNMI (JSON,JSON_IETF,PROTO).skipVerify: If enabled, SDC secures the connection without validating device certificates.insecure: Establishes an insecure gNMI connection when set to true.
Example gNMI Configuration with Skip-Verify: