Forge Home


Type definitions for Networking Device (netdev) Library


13,950 latest version

4.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
released Mar 29th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'netdevops-netdev_stdlib', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add netdevops-netdev_stdlib
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install netdevops-netdev_stdlib --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



netdevops/netdev_stdlib — version 1.0.0 Mar 29th 2013


Netdev is a vendor-neutral network abstraction framework developed by Juniper Networks and contributed freely to the DevOps community


This module has been tested against Puppet agent 2.7.19.

Here is a short example illustrating a multi-vendor use-case. Both switch vendors are using the same configuration class definition "puppet_switch_demo". The VLAN definitions are being sourced from a YAML file that mirrors the netdev_vlan properies. The device specific port information is wrapped up in another class that examines the Facter 'osfamily' fact.

class puppet_switch_ports {
   case $osfamily {
     JUNOS: {
       $db_port = "ge-0/0/0"
       $web_port = "ge-0/0/1"
       $uplink_lag = "ae0"
       $uplink_lag_ports = [ 'ge-0/0/2', 'ge-0/0/3' ]
     EOS: {
       $db_port = "Ethernet1"
       $web_port = "Ethernet2"
       $uplink_lag = "Port-Channel1"
       $uplink_lag_ports = [ 'Ethernet3', 'Ethernet4' ]
   $all_ports = [ $db_port, $web_port, $uplink_lag_ports ]      

class puppet_switch_demo {
   netdev_device { $hostname: }     
   include puppet_switch_ports
   $vlans = loadyaml( "$DATADIR/vlans.yaml" )
   create_resources( netdev_vlan, $vlans ) 
   netdev_interface { $puppet_switch_ports::all_ports:
      admin => up

   netdev_l2_interface { $puppet_switch_ports::db_port:
      untagged_vlan => Blue
   netdev_l2_interface{ $puppet_switch_ports::web_port:
      untagged_vlan => Green
   netdev_l2_interface { $puppet_switch_ports::uplink_lag_ports: 
      ensure => absent 
   netdev_lag { $puppet_switch_ports::uplink_lag:
      links => $puppet_switch_ports::uplink_lag_ports 
   netdev_l2_interface { $puppet_switch_ports::uplink_lag: 
      tagged_vlans => keys( $vlans )

node "" {
   include puppet_switch_demo

node "" { 
   include puppet_switch_demo


  • Puppet 2.7.19


  • puppet module install netdevops/netdev_stdlib


See for documentation and usage examples


  • Jeremy Schulman, @nwkautomaniac
  • Derick Winkworth, @cloudtoad
  • Peter Sprygada, @privateip


BSD-2, See LICENSE file