This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

cisco_os_shim - Cisco Operating System Shim

Gem Version
Build Status

The cisco_os_shim gem provides an abstract interface for communicating with
Cisco network nodes running various Cisco operating systems. Currently the
following nodes and operating systems are supported:

  • Nexus switches running NX-OS 7.0(3)I2(1) and later (via the NX-API management API).
  • Routers running IOS XR 6.0.0 and later (via gRPC).

For a greater level of abstraction, use the CiscoNodeUtils gem.

Installation

To install the cisco_os_shim gem, use the following command:

$ gem install cisco_os_shim

(Add sudo if you're installing under a POSIX system as root)

Examples

This gem can be used directly on a Cisco device (as used by Puppet and Chef)
or can run on a workstation and point to a Cisco device (as used by the
included minitest suite).

In either case, unless you want to explicitly specify the client implementation class in use, you can simply require 'cisco_os_shim' (which will automatically discover available client implementations) and use the Cisco::Shim::Client.create API to automatically determine the correct implementation to use.

Usage on a Cisco device

require 'cisco_os_shim'

client = Cisco::Shim::Client.create

client.show("show version")

client.config(["interface ethernet1/1",
               "description Managed by NX-API",
               "no shutdown"])

Remote usage

require 'cisco_os_shim'

client = Cisco::Shim::Client.create("n3k.mycompany.com",
                                    "username", "password")

client.show("show version")

client.config(["interface ethernet1/1",
               "description Managed by NX-API",
               "no shutdown"])

Changelog

See CHANGELOG for a list of changes.

Contributing

See CONTRIBUTING.

License

Copyright (c) 2013-2015 Cisco and/or its affiliates.

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.

View code on GitHub
  • Owner

  • Contributors

    +4Github contributors
  • Categories

  • Products

    IOS XRNX-OS
  • Programming Languages

    Ruby
  • License

    Apache License 2.0

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.