slxos_netdev_vlan

The slxos_netdev_vlan type allows you to manage VLANS on a switch.

Syntax

netdev_vlan { "name":
vlan_id => VLAN_id,
description => "vlan-description",
target => $target
}

Properties

Table 1. slxos_netdev_vlan properties
Property Description
name (required) Specifies the name of the VLAN. For example “blue”.
description Assigns the description value to the VLAN. The default is: “Puppet created VLAN: <name>: <vlan-id>” . THe VLAN tag-ID value range is from 1 through 4095.
target (optional) Specifies device connection information. For example, http://admin:password@[3001::1]:830 NOTE: The target can also be specified by using a shortcut. An example is: $ip23= "http://admin:password@10.24.81.23:830; you can then use $ip23 subsequently.

Examples

The following Puppet code segment configures several VLANs and associated properties for each of these VLANS.

class node1 {
$ip23= "http://admin:password@10.11.12.13:830"
$vlans= {
'v10' => {ensure => present, vlan_id =>10, description => 'Vlan 10', target
=>$ip23},
'v11' => {ensure => present, vlan_id =>11, description => 'Vlan 11', target
=>$ip23},
'v12' => {ensure => present, vlan_id =>12, description => 'Vlan 12', target
=>$ip23},
'v13' => {ensure => present, vlan_id =>13, description => 'Vlan 13', target
=>$ip23},
'v14' => {ensure => present, vlan_id =>14, target =>$ip23},
}create_resources(slxos_netdev_vlan, $vlans)}

Use the show running interface vlan command to verify the results of the code segment on the switch.

device# show run interfcae vlan
interface Vlan 1
!
interface Vlan 10
description Vlan 10
!
interface Vlan 11
description Vlan 11
!
interface Vlan 12