Interface VlanSwitchedConfig
- All Superinterfaces:
org.opendaylight.yangtools.yang.binding.BindingContract<org.opendaylight.yangtools.yang.binding.DataContainer>,org.opendaylight.yangtools.yang.binding.BindingObject,org.opendaylight.yangtools.yang.binding.DataContainer,org.opendaylight.yangtools.yang.binding.DataObject
@Generated("mdsal-binding-generator")
public interface VlanSwitchedConfig
extends org.opendaylight.yangtools.yang.binding.DataObject
VLAN related configuration that is part of the physical Ethernet interface.
This class represents the following YANG schema fragment defined in module openconfig-vlan
grouping vlan-switched-config {
leaf interface-mode {
type oc-vlan-types:vlan-mode-type;
}
leaf native-vlan {
when "../interface-mode = 'TRUNK'" {
}
type oc-vlan-types:vlan-id;
}
leaf access-vlan {
when "../interface-mode = 'ACCESS'" {
}
type oc-vlan-types:vlan-id;
}
leaf-list trunk-vlans {
when "../interface-mode = 'TRUNK'" {
}
type union {
type oc-vlan-types:vlan-id;
type oc-vlan-types:vlan-range;
}
}
}
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classThis class represents the following YANG schema fragment defined in module openconfig-vlan -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @NonNull org.opendaylight.yangtools.yang.common.QNameYANG identifier of the statement represented by this class. -
Method Summary
Modifier and TypeMethodDescriptionReturn accessVlan, ornullif it is not present.Return interfaceMode, ornullif it is not present.Return nativeVlan, ornullif it is not present.@Nullable Set<VlanSwitchedConfig.TrunkVlans>Return trunkVlans, ornullif it is not present.Class<? extends VlanSwitchedConfig>default @NonNull VlanIdReturn accessVlan, guaranteed to be non-null.default @NonNull VlanModeTypeReturn interfaceMode, guaranteed to be non-null.default @NonNull VlanIdReturn nativeVlan, guaranteed to be non-null.default @NonNull Set<VlanSwitchedConfig.TrunkVlans>Return trunkVlans, guaranteed to be non-null.
-
Field Details
-
QNAME
static final @NonNull org.opendaylight.yangtools.yang.common.QName QNAMEYANG identifier of the statement represented by this class.
-
-
Method Details
-
implementedInterface
Class<? extends VlanSwitchedConfig> implementedInterface()- Specified by:
implementedInterfacein interfaceorg.opendaylight.yangtools.yang.binding.BindingContract<org.opendaylight.yangtools.yang.binding.DataContainer>- Specified by:
implementedInterfacein interfaceorg.opendaylight.yangtools.yang.binding.DataObject
-
getInterfaceMode
VlanModeType getInterfaceMode()Return interfaceMode, ornullif it is not present.Set the interface to access or trunk mode for VLANs- Returns:
VlanModeTypeinterfaceMode, ornullif it is not present.
-
requireInterfaceMode
Return interfaceMode, guaranteed to be non-null.Set the interface to access or trunk mode for VLANs- Returns:
VlanModeTypeinterfaceMode, guaranteed to be non-null.- Throws:
NoSuchElementException- if interfaceMode is not present
-
getNativeVlan
VlanId getNativeVlan()Return nativeVlan, ornullif it is not present.Set the native VLAN id for untagged frames arriving on a trunk interface. Tagged frames sent on an interface configured with a native VLAN should have their tags stripped prior to transmission. This configuration is only valid on a trunk interface.- Returns:
VlanIdnativeVlan, ornullif it is not present.
-
requireNativeVlan
Return nativeVlan, guaranteed to be non-null.Set the native VLAN id for untagged frames arriving on a trunk interface. Tagged frames sent on an interface configured with a native VLAN should have their tags stripped prior to transmission. This configuration is only valid on a trunk interface.- Returns:
VlanIdnativeVlan, guaranteed to be non-null.- Throws:
NoSuchElementException- if nativeVlan is not present
-
getAccessVlan
VlanId getAccessVlan()Return accessVlan, ornullif it is not present.Assign the access vlan to the access port.- Returns:
VlanIdaccessVlan, ornullif it is not present.
-
requireAccessVlan
Return accessVlan, guaranteed to be non-null.Assign the access vlan to the access port.- Returns:
VlanIdaccessVlan, guaranteed to be non-null.- Throws:
NoSuchElementException- if accessVlan is not present
-
getTrunkVlans
@Nullable Set<VlanSwitchedConfig.TrunkVlans> getTrunkVlans()Return trunkVlans, ornullif it is not present.Specify VLANs, or ranges thereof, that the interface may carry when in trunk mode. If not specified, all VLANs are allowed on the interface. Ranges are specified in the form x..y, where x<y - ranges are assumed to be inclusive (such that the VLAN range is x <= range <= y.- Returns:
Set<TrunkVlans>trunkVlans, ornullif it is not present.
-
requireTrunkVlans
Return trunkVlans, guaranteed to be non-null.Specify VLANs, or ranges thereof, that the interface may carry when in trunk mode. If not specified, all VLANs are allowed on the interface. Ranges are specified in the form x..y, where x<y - ranges are assumed to be inclusive (such that the VLAN range is x <= range <= y.- Returns:
Set<TrunkVlans>trunkVlans, guaranteed to be non-null.- Throws:
NoSuchElementException- if trunkVlans is not present
-