networking_baremetal.openconfig.vlan package¶
Submodules¶
networking_baremetal.openconfig.vlan.types module¶
-
class
networking_baremetal.openconfig.vlan.types.VlanId(vlan_id: int)¶ Bases:
objectType definition representing a single-tagged VLAN
-
property
vlan_id¶
-
property
-
class
networking_baremetal.openconfig.vlan.types.VlanInterfaceMode(value)¶ Bases:
enum.EnumVLAN interface mode (trunk or access)
-
ACCESS= 'ACCESS'¶
-
TRUNK= 'TRUNK'¶
-
-
class
networking_baremetal.openconfig.vlan.types.VlanRange(vlan_range: str)¶ Bases:
objectType definition representing a range of single-tagged VLANs.
A range is specified as x..y where x and y are valid VLAN IDs (1 <= vlan-id <= 4094). The range is assumed to be inclusive, such that any VLAN-ID matching x <= VLAN-ID <= y falls within the range.”
-
pattern= re.compile('^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\.\\.(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])$')¶
-
property
vlan_range¶
-
networking_baremetal.openconfig.vlan.vlan module¶
-
class
networking_baremetal.openconfig.vlan.vlan.TrunkVlans¶ Bases:
collections.abc.Collection-
add(value)¶ Add vlan or range of vlans (range: 100..200)
-
-
class
networking_baremetal.openconfig.vlan.vlan.Vlan(vlan_id: int, operation=<NetconfEditConfigOperation.MERGE: 'merge'>)¶ Bases:
objectBase vlan
-
NAMESPACE= 'http://openconfig.net/yang/vlan'¶
-
PARENT= 'vlans'¶
-
TAG= 'vlan'¶
-
property
config¶ Configuration parameters for VLAN
-
property
operation¶ RFC 6241 - <edit-config> operation attribute
-
to_xml_element()¶ Create XML Element
- Returns
ElementTree Element with SubElements
-
property
vlan_id¶ The id of the VLAN
-
-
class
networking_baremetal.openconfig.vlan.vlan.VlanConfig(operation=<NetconfEditConfigOperation.MERGE: 'merge'>, vlan_id: Optional[int] = None, name: Optional[str] = None, status: Optional[str] = None)¶ Bases:
objectOpenConfig VLAN configuration
-
NAMESPACE= 'http://openconfig.net/yang/vlan'¶
-
PARENT= 'vlan'¶
-
TAG= 'config'¶
-
property
name¶ Interface VLAN name.
-
property
operation¶ RFC 6241 - <edit-config> operation attribute
-
property
status¶ Admin state of the VLAN
-
to_xml_element()¶ Create XML Element
- Returns
ElementTree Element with SubElements
-
property
vlan_id¶ The id of the VLAN
-
-
class
networking_baremetal.openconfig.vlan.vlan.VlanSwitchedConfig(operation: str = <NetconfEditConfigOperation.MERGE: 'merge'>, interface_mode: Optional[str] = None, native_vlan: Optional[int] = None, access_vlan: Optional[int] = None)¶ Bases:
objectEthernet interface VLAN config
VLAN related configuration that is part of the physical Ethernet interface.
-
NAMESPACE= 'http://openconfig.net/yang/vlan'¶
-
PARENT= 'switched-vlan'¶
-
TAG= 'config'¶
-
property
access_vlan¶ Access VLAN assigned to the interfaces
-
property
interface_mode¶ Get the interface to access or trunk mode for VLANs
-
property
native_vlan¶ Native VLAN
is valid for trunk mode interfaces
-
property
operation¶ RFC 6241 - <edit-config> operation attribute
-
to_xml_element()¶ Create XML Element
- Returns
ElementTree Element with SubElements
-
property
trunk_vlans¶ Allowed VLANs may be specified for trunk mode interfaces
-
-
class
networking_baremetal.openconfig.vlan.vlan.VlanSwitchedVlan¶ Bases:
objectVLAN interface-specific data on Ethernet interfaces.
Enclosing container for VLAN interface-specific data on Ethernet interfaces. These are for standard L2, switched-style VLANs.
-
NAMESPACE= 'http://openconfig.net/yang/vlan'¶
-
PARENT= 'ethernet'¶
-
TAG= 'switched-vlan'¶
-
property
config¶ Configuration parameters for VLANs
-
to_xml_element()¶ Create XML Element
- Returns
ElementTree Element with SubElements
-
-
class
networking_baremetal.openconfig.vlan.vlan.Vlans¶ Bases:
collections.abc.CollectionGroup/List of VLANs
-
NAMESPACE= 'http://openconfig.net/yang/vlan'¶
-
TAG= 'vlans'¶
-
add(vlan_id: int)¶ Add VLAN
- Parameters
vlan_id – VLAN ID
- Type
int
- Keyword arguments
VLAN configuration
-
remove(vlan_id: int)¶ Remove VLAN
- Parameters
vlan_id – VLAN ID
- Type
int
-
to_xml_element()¶ Create XML Element
- Returns
ElementTree Element with SubElements
-
property
vlans¶ List of VLANs
-