networking_generic_switch.netconf_models.openconfig.network_instance package

Submodules

networking_generic_switch.netconf_models.openconfig.network_instance.network_instance module

class networking_generic_switch.netconf_models.openconfig.network_instance.network_instance.NetworkInstance(name)

Bases: object

An OpenConfig description of a network_instance.

This may be a Layer 3 forwarding construct such as a virtual routing and forwarding (VRF) instance, or a Layer 2 instance such as a virtual switch instance (VSI). Mixed Layer 2 and Layer 3 instances are also supported.

NAMESPACE = 'http://openconfig.net/yang/network-instance'
TAG = 'network-instance'
property name

A unique name identifying the network instance

to_restconf_dict()

Serialize to RESTCONF JSON (RFC 7951) dict.

Returns:

dict suitable for RESTCONF PATCH/PUT payload

to_restconf_path()

Return the RESTCONF API path segment for this list entry.

to_xml_element()

Create XML Element

Returns:

ElementTree Element with SubElements

property vlans

Group/List of VLANs - keyed by id

class networking_generic_switch.netconf_models.openconfig.network_instance.network_instance.NetworkInstances

Bases: Collection

Top-level grouping containing a list of network instances.

NAMESPACE = 'http://openconfig.net/yang/network-instance'
TAG = 'network-instances'
add(name: str)

Add network instance

Parameters:

name – A unique name identifying the network instance

Type:

str

Keyword arguments:

Network instance arguments

property network_instances
to_restconf_dict()

Serialize to RESTCONF JSON (RFC 7951) dict.

Returns the network-instances container with module prefix at the top level.

Returns:

dict suitable for RESTCONF PATCH/PUT payload

to_restconf_path()

Return the RESTCONF API path segment for this container.

to_xml_element()

Create XML Element

Returns:

ElementTree Element with SubElements

Module contents