Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The netdev cookbook has been deprecated

Author provided reason for deprecation:

The netdev cookbook has been deprecated and is no longer being maintained by its authors. Use of the netdev cookbook is no longer recommended.

RSS

netdev (2) Versions 2.0.0

Provides a set of vendor-neutral resources for managing networking devices

Policyfile
Berkshelf
Knife
cookbook 'netdev', '~> 2.0.0', :supermarket
cookbook 'netdev', '~> 2.0.0'
knife supermarket install netdev
knife supermarket download netdev
README
Dependencies
Quality 33%

netdev Cookbook

Build Status

Provides a set of vendor-agnostic resources for managing networking devices.

Requirements

  • Chef 11.0.0+
  • Supported networking device from Arista or Juniper.

Usage

Add a dependency on netdev to your cookbook's metadata.rb

depends 'netdev'

Resources/Providers

All resources are fully documented on Chef's offical documentation site.

Resource Description Example Usage
netdev_interface This resource provides an abstraction for managing physical interfaces on network elements. [netdev_interface integation test fixture](test/fixtures/cookbooks/interface/recipes/create.rb)
netdev_l2_interface This resource provides an abstraction for creating and deleting layer 2 interfaces on network devices. [netdev_l2_interface integation test fixture](test/fixtures/cookbooks/l2_interface/recipes/create.rb).
netdev_lag This resource provides an abstraction for creating and deleting link aggregation group interfaces. [netdev_lag integation test fixture](test/fixtures/cookbooks/lag/recipes/create.rb).
netdev_vlan This resource provides an abstraction for creating and deleting VLANs. [netdev_vlan integation test fixture](test/fixtures/cookbooks/vlan/recipes/create.rb).

Testing

You can run the tests in this cookbook using Rake:

rake integration  # Run Test Kitchen integration tests
rake style        # Run all style checks
rake style:chef   # Lint Chef cookbooks
rake style:ruby   # Run Ruby style checks
rake travis:ci    # Run tests on Travis

Test Kitchen

Test Kitchen 1.0.0+ ships with a proxy driver that proxies commands through to a test instance whose lifecycle is not managed by Test Kitchen. This driver is useful for testing against long-lived non-ephemeral test instances that are simply "reset" between test runs. This driver is also perfect for testing against physical network equipment!

You will need to specify the location and login details for the switch you will be running Test Kitchen against. This should be done in a .kitchen.local.yml file:

platforms:
- name: junos-13.2
  driver:
    # Set the login user of the test switch
    username: schisamo
    # Set the ipaddress or DNS name of the test switch.
    host: 10.66.44.10
    # Set the port sshd is listening on; defaults to 22.
    port: 22

This repository ships with an example file which can easily be copied into place:

cp kitchen.local.example.yml kitchen.local.yml

Juniper Equipment

Requirements:

Test run resets on Juniper device is achieved using Juno's rescue configuration feature. A rescue configuration allows you to define a known working configuration or a configuration with a known state that you can roll back to at any time.

Creating a rescue configuration is easy. SSH into your switch and run the following command:

{master:0}
schisamo@junos-chef-dev> request system configuration rescue save

{master:0}
schisamo@junos-chef-dev>

You now have a known good state to roll back to! Test Kitchen activates the rescue
configuration by issuing the command cli -c 'configure; rollback rescue; commit'
during the CREATE and DESTROY stages of testing. Reference the [.kitchen.yml](.kitchen.yml)
for some additional environment variables that are used to set host, username and
sshd port of the switch being tested against.

Arista Equipment

Currently not supported.

License & Authors

  • Author: Peter Sprygada (Arista Networks)
  • Author: Jeremy Schulman (Juniper Networks)
  • Author: Seth Chisamore (CHEF, Inc.)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

netdev_eos Applicable Versions

Collaborator Number Metric
            

2.0.0 passed this metric

Contributing File Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

2.0.0 failed this metric

FC064: Ensure issues_url is set in metadata: netdev/metadata.rb:1
FC065: Ensure source_url is set in metadata: netdev/metadata.rb:1
FC066: Ensure chef_version is set in metadata: netdev/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: netdev/metadata.rb:1
FC069: Ensure standardized license defined in metadata: netdev/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

2.0.0 passed this metric

Testing File Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number