You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 2, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.rst
+24-53Lines changed: 24 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,14 @@ YANG Development Kit (Python)
14
14
Overview
15
15
--------
16
16
17
-
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.
17
+
The YANG Development Kit (YDK) is a Software Development Kit that provides API's that are modeled in YANG.
18
+
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.
19
+
YDK is composed of a core package that defines services and providers, plus one or more module bundles that are based on YANG models.
18
20
19
21
Backward Compatibility
20
22
----------------------
21
-
Please see `the release notes <https://github.com/CiscoDevNet/ydk-py/releases/tag/0.6.0>`_ and `documentation <http://ydk.cisco.com/py/docs/backward_compatibility.html>`_ for details on some backward incompatible changes introduced as part of the 0.6.0 release.
23
+
Please see `the release notes <https://github.com/CiscoDevNet/ydk-py/releases/tag/0.6.0>`_ and `documentation <http://ydk.cisco.com/py/docs/backward_compatibility.html>`_
24
+
for details on some backward incompatible changes introduced as part of the 0.6.0 release.
22
25
23
26
Docker
24
27
------
@@ -27,8 +30,6 @@ A `docker image <https://docs.docker.com/engine/reference/run/>`_ is automatical
27
30
28
31
To use the docker image, `install docker <https://docs.docker.com/install/>`_ on your system and run the below command. See the `docker documentation <https://docs.docker.com/engine/reference/run/>`_ for more details::
29
32
30
-
.. code-block:: sh
31
-
32
33
docker run -it ydkdev/ydk-py
33
34
34
35
@@ -44,8 +45,6 @@ Linux
44
45
45
46
The following packages must be present in your system before installing YDK-Py::
It is required to install Xcode command line tools, `homebrew <http://brew.sh>`_ and the following homebrew packages on your system before installing YDK-Py.
94
91
95
-
You can download the latest python package from `here <https://www.python.org/downloads/>`_. 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::
96
-
97
-
.. code-block:: sh
92
+
You can download the latest python package from `here <https://www.python.org/downloads/>`_.
93
+
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::
There is an open issue with gRPC on Centos/Fedora, which requires an extra step before running any YDK gNMI application. See this issue on `GRPC GitHub <https://github.com/grpc/grpc/issues/10942#issuecomment-312565041>`_
177
-
for details. As a workaround, the YDK based application runtime environment must include setting of `LD_LIBRARY_PATH` variable:
178
-
179
-
.. code-block:: sh
169
+
for details. As a workaround, the YDK based application runtime environment must include setting of `LD_LIBRARY_PATH` variable::
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)::
191
-
192
-
.. code-block:: sh
180
+
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.
181
+
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),
182
+
which automatically installs all other YDK-related packages (``ydk``, ``openconfig`` and ``ietf`` packages)::
193
183
194
184
$ pip install ydk-models-cisco-ios-xr
195
185
$ pip install ydk-models-cisco-ios-xe
@@ -200,35 +190,27 @@ Alternatively, you can perform a partial installation. If you only want to inst
200
190
201
191
If you only want to install the ``ietf`` bundle and its dependencies (``ydk`` package), execute::
202
192
203
-
.. code-block:: sh
204
-
205
193
$ pip install ydk-models-ietf
206
194
207
195
To installation of model bundles on CentOS/RedHat platforms require special handling; please follow the below steps.
@@ -239,61 +221,50 @@ To installation of model bundles on CentOS/RedHat platforms require special hand
239
221
Installing from Source
240
222
~~~~~~~~~~~~~~~~~~~~~~
241
223
242
-
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::
243
-
244
-
.. code-block:: sh
224
+
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.
225
+
To install the ``ydk`` core package, execute::
245
226
246
227
$ cd core
247
228
core$ python setup.py sdist
248
229
core$ pip install dist/ydk*.gz
249
230
250
-
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::
251
-
252
-
.. code-block:: sh
231
+
Once you have installed the ``ydk`` core package, you can install one more model bundles. Note that some bundles have dependencies on other bundles.
232
+
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::
253
233
254
234
core$ cd ../ietf
255
235
ietf$ python setup.py sdist
256
236
ietf$ pip install dist/ydk*.gz
257
237
258
238
To install the ``openconfig`` bundle, execute::
259
239
260
-
.. code-block:: sh
261
-
262
240
ietf$ cd ../openconfig
263
241
openconfig$ python setup.py sdist
264
242
openconfig$ pip install dist/ydk*.gz
265
243
266
244
To install the ``cisco-ios-xr`` bundle, execute::
267
245
268
-
.. code-block:: sh
269
-
270
246
openconfig$ cd ../cisco-ios-xr
271
247
cisco-ios-xr$ python setup.py sdist
272
248
cisco-ios-xr$ pip install dist/ydk*.gz
273
249
cisco-ios-xr$ cd ..
274
250
275
251
Using a Virtual Environment
276
252
~~~~~~~~~~~~~~~~~~~~~~~~~~~
277
-
You may want to perform the installation under a Python virtual environment (`virtualenv <https://pypi.python.org/pypi/virtualenv/>`_/`virtualenvwrapper <https://pypi.python.org/pypi/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.
253
+
You may want to perform the installation under a Python virtual environment (`virtualenv <https://pypi.python.org/pypi/virtualenv/>`_/`virtualenvwrapper <https://pypi.python.org/pypi/virtualenvwrapper>`_).
254
+
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.
278
255
279
256
To install virtual environment support in your system, execute::
280
257
281
-
.. code-block:: sh
282
-
283
258
$ pip install virtualenv virtualenvwrapper
284
259
$ source /usr/local/bin/virtualenvwrapper.sh
285
260
286
261
In some systems (e.g. Debian-based Linux), you need to install support for Python virtual environments as root::
287
262
288
-
.. code-block:: sh
289
-
290
263
$ sudo pip install virtualenv virtualenvwrapper
291
264
$ source /usr/local/bin/virtualenvwrapper.sh
292
265
293
266
Create a new virtual environment::
294
267
295
-
.. code-block:: sh
296
-
297
268
$ mkvirtualenv -p python2.7 ydk-py
298
269
299
270
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.
0 commit comments