Coder Social home page Coder Social logo

ydk-py's Introduction

https://travis-ci.org/CiscoDevNet/ydk-py.svg?branch=master

The YANG Development Kit (YDK) is a Software Development Kit that provides API's that are modeled in YANG. The main goal of YDK is to reduce the learning curve of YANG data models by expressing the model semantics in an API and abstracting protocol/encoding details. YDK is composed of a core package that defines services and providers, plus one or more module bundles that are based on YANG models.

Please see the release notes and documentation for details on some backward incompatible changes introduced as part of the 0.6.0 release.

Ubuntu (Debian-based) - The following packages must be present in your system before installing YDK-Py:

$ sudo apt-get install gdebi-core python3-dev python-dev libtool-bin
$ wget https://devhub.cisco.com/artifactory/debian-ydk/0.6.3/libydk_0.6.3-1_amd64.deb
$ sudo gdebi libydk_0.6.3-1_amd64.deb

Centos (Fedora-based) - The following packages must be present in your system before installing YDK-Py:

$ sudo yum install epel-release libssh-devel gcc-c++ python-devel
$ sudo yum install https://devhub.cisco.com/artifactory/rpm-ydk/0.6.3/libydk-0.6.3-1.x86_64.rpm

It is required to install Xcode command line tools, homebrew and the following homebrew packages on your system before installing YDK-Py.

You can download the latest python package from here. Please do not use the homebrew version of python as it causes issues with installing ydk packages. Please execute brew rm python python3 to remove any homebrew python packages:

$ xcode-select --install
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install pkg-config libssh xml2 libxml2 curl pcre cmake
$ curl -O https://devhub.cisco.com/artifactory/osx-ydk/0.6.3/libydk-0.6.3-Darwin.pkg
$ sudo installer -pkg libydk-0.6.3-Darwin.pkg -target /

Currently, YDK-Py from release 0.6.3 onwards is not supported on Windows.

Both Python 2 and 3 are supported. At least, Python2.7 or Python 3.4 must be installed in your system.

You can install the latest model packages from the Python package index. Note that, in some systems, you need to install the new package as root. You get a fully operational YDK environment by installing the cisco-ios-xr and/or cisco-ios-xe bundle(s) (depending on whether you're developing for an IOS XR or IOS XE platform) which automatically installs all other YDK-related packages (ydk, openconfig and ietf packages):

$ pip install ydk-models-cisco-ios-xr
$ pip install ydk-models-cisco-ios-xe

Alternatively, you can perform a partial installation. If you only want to install the openconfig bundle and its dependencies (ydk and ietf packages), execute:

$ pip install ydk-models-openconfig

If you only want to install the ietf bundle and its dependencies (ydk package), execute:

$ pip install ydk-models-ietf

If you prefer not to use the YDK packages in the Python package index, you need to install manually the ydk core package and then the model bundles you plan to use. To install the ydk core package, execute:

$ cd core
core$ python setup.py sdist
core$ pip install dist/ydk*.gz

Once you have installed the ydk core package, you can install one more model bundles. Note that some bundles have dependencies on other bundles. Those dependencies are already captured in the bundle package. Make sure you install the desired bundles in the order below. To install the ietf bundle, execute:

core$ cd ../ietf
ietf$ python setup.py sdist
ietf$ pip install dist/ydk*.gz

To install the openconfig bundle, execute:

ietf$ cd ../openconfig
openconfig$ python setup.py sdist
openconfig$ pip install dist/ydk*.gz

To install the cisco-ios-xr bundle, execute:

openconfig$ cd ../cisco-ios-xr
cisco-ios-xr$ python setup.py sdist
cisco-ios-xr$ pip install dist/ydk*.gz
cisco-ios-xr$ cd ..

You may want to perform the installation under a Python virtual environment (virtualenv/virtualenvwrapper). A virtual environment allows you to install multiple versions of YDK if needed. In addition, it prevents any potential conflicts between package dependencies in your system.

To install virtual environment support in your system, execute:

$ pip install virtualenv virtualenvwrapper
$ source /usr/local/bin/virtualenvwrapper.sh

In some systems (e.g. Debian-based Linux), you need to install support for Python virtual environments as root:

$ sudo pip install virtualenv virtualenvwrapper
$ source /usr/local/bin/virtualenvwrapper.sh

Create a new virtual environment:

$ mkvirtualenv -p python2.7 ydk-py

At this point, you can perform the quick install or the installation from source described above. Take into account that must not attempt to install YDK as root under a virtual environment.

The current YDK release version is 0.6.3 (beta). YDK-Py is licensed under the Apache 2.0 License.

ydk-py's People

Contributors

manradhacisco avatar 111pontes avatar einarnn avatar psykokwak4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.