# L2VSI (L2 virtual switch instance)

# URL

frinx-openconfig-network-instance:network-instances/network-instance=

# OPENCONFIG YANG

{
    "network-instance": [
        {
            "name": "",
            "config": {
                "name": "",
                "description": "",
                "type": "L2VSI",
                "enabled": true,
                "frinx-saos-vs-extension:encap-cos-policy": ,
                "frinx-saos-vs-extension:encap-fixed-dot1dpri": ,  
                "frinx-saos-vs-extension:tagged-pvst-l2pt": true  
            },
            "connection-points": {
                "connection-point": [
                    {
                        "connection-point-id": "",
                        "config": {
                            "connection-point-id": ""
                        } 
                    }
                ]
            },
            "interfaces": {
                "interface": [
                    {
                        "id": "",
                        "config": {
                            "id": "",
                            "interface": "",
                            "frinx-saos-ni-if-extension:type": "iana-if-type:ieee8023adLag/iana-if-type:l2vlan"
                        } 
                    }
                ]
            },
            "frinx-saos-virtual-ring-extension:rings": {
                "ring": [
                    {
                        "name": "",
                        "config": {
                            "name": ""
                        }
                    }
                ]
            }
        }
    ]
}

# OS Configuration Commands

# Ciena SAOS 6.14

# CLI

virtual-switch ethernet create vs  vc 
virtual-switch ethernet set vs  description 
virtual-switch ethernet set vs  encap-cos-policy 
virtual-switch ethernet set vs  encap-fixed-dot1dpri 
virtual-switch ethernet add vs  port 
port set port  untagged-ctrl-vs 
port set port  untagged-data-vs 
l2-cft tagged-pvst-l2pt enable vs 

can have values <dot1dpri-inherit | fixed | ip-prec-inherit | phbg-inherit | port-inherit | vs-inherit>
*l2-cft tagged-pvst-l2pt enable vs * is a conversion of "tagged-pvst-l2pt" field set to true
*l2-cft tagged-pvst-l2pt disable vs * is a conversion of "tagged-pvst-l2pt" field set to false

# Ciena SAOS 8

# CLI

virtual-switch create vs 
virtual-switch set vs  description  
ring-protection virtual-ring add ring  vs  
ring-protection virtual-ring remove ring  vs 
virtual-switch interface attach cpu-subinterface  vs 
virtual-switch interface attach sub-port  vs 

cpu-subinterface command is sent, if the type of the interface added is iana-if-type:l2vlan

sub-port command is sent, if the type of the interface added is iana-if-type:ieee8023adLag

** in this case needs to have form <parent_ifc_name.subifc_name> . This can be derived from : https://github.com/FRINXio/translation-units-docs/blob/master/Configuration%20datasets/interfaces/lag_interface.md