Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit e736220

Browse files
author
ygorelik
committed
Corrected documentation
1 parent 118e7d6 commit e736220

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN echo 'Installing dependencies and ydk-py'
88

99
WORKDIR /root/ydk-py
1010

11-
RUN /bin/bash -c './dependencies_xenial.sh && ./dependencies_gnmi.sh && tests.sh'
11+
RUN /bin/bash -c './dependencies_xenial.sh && ./dependencies_gnmi.sh && ./tests.sh'
1212

1313
RUN pip3 install ./core/dist/ydk-0.8.2.tar.gz
1414
RUN python3 -c "import ydk.providers"

README.rst

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.. image:: https://travis-ci.org/CiscoDevNet/ydk-py.svg?branch=master
2-
:target: https://travis-ci.org/CiscoDevNet/ydk-py
1+
.. image:: https://travis-ci.com/CiscoDevNet/ydk-py.svg?branch=master
2+
:target: https://travis-ci.com/CiscoDevNet/ydk-py
33

44
.. image:: https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg
55
:alt: Docker Automated build
@@ -12,20 +12,20 @@ YANG Development Kit (Python)
1212
.. contents:: Table of Contents
1313

1414
Overview
15-
--------
15+
========
1616

1717
The YANG Development Kit (YDK) is a Software Development Kit that provides API's that are modeled in YANG.
1818
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.
1919
YDK is composed of a core package that defines services and providers, plus one or more module bundles that are based on YANG models.
2020

2121
Backward Compatibility
22-
----------------------
22+
======================
2323

2424
The Python YDK-0.8.2 core package is compatible with all model bundles generated previously with ydk-gen releases starting from 0.7.3.
2525
Please see `the release notes <https://github.com/CiscoDevNet/ydk-py/releases/tag/0.8.2>`_ for details.
2626

2727
Docker
28-
------
28+
======
2929

3030
A `docker image <https://docs.docker.com/engine/reference/run/>`_ is automatically built with the latest ydk-py installed.
3131
This be used to run ydk-py without installing anything natively on your machine.
@@ -37,10 +37,10 @@ See the `docker documentation <https://docs.docker.com/engine/reference/run/>`_
3737

3838

3939
System Requirements
40-
-------------------
40+
===================
4141

4242
Linux
43-
~~~~~
43+
-----
4444

4545
**Ubuntu (Debian-based)**
4646

@@ -86,7 +86,7 @@ The following packages must be present in your system before installing YDK-Py.
8686
sudo yum install https://devhub.cisco.com/artifactory/rpm-ydk/0.8.2/libydk-0.8.2-1.x86_64.rpm
8787

8888
MacOS
89-
~~~~~
89+
-----
9090

9191
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::
9292

@@ -174,15 +174,15 @@ Python Requirements
174174

175175
YDK supports both Python2 and Python3 versions. At least Python2.7 or Python3.4 must be installed on your system.
176176

177-
It is also required for Python installation to include corresponding shared library. As example:
177+
It is also required for Python installation to include corresponding shared library. As example::
178178

179-
- python2.7 - /usr/lib/x86_64-linux-gnu/libpython2.7.so
180-
- python3.5m - /usr/lib/x86_64-linux-gnu/libpython3.5m.so
179+
python2.7 - /usr/lib/x86_64-linux-gnu/libpython2.7.so
180+
python3.5m - /usr/lib/x86_64-linux-gnu/libpython3.5m.so
181181
182182
Please follow `System Requirements` to assure presence of shared Python libraries.
183183

184184
Mac OS
185-
======
185+
~~~~~~
186186

187187
The developers of Python2 on Mac OS might face an issue ([#837](https://github.com/CiscoDevNet/ydk-gen/issues/837)).
188188
This is well known and documented issue. Each developer might have different approaches for its resolution.
@@ -191,42 +191,49 @@ One of them is to use Python2 virtual environment. See section below for details
191191
In addition it is required properly set CMAKE_LIBRARY_PATH environment variable to assure that `cmake` uses correct Python library.
192192
Follow these steps to find and set correct library path.
193193

194-
1. Find installations of `libpython2.7` library::
194+
1. Find installations of `libpython2.7` library:
195195

196-
locate libpython2.7.dylib
197-
198-
Example::
196+
.. code-block:: sh
199197
198+
# Example:
200199
$ locate libpython2.7.dylib
201200
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
202201
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
203202
/usr/lib/libpython2.7.dylib
204203
/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
205204
/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
206205
207-
2. Choose non-system Python library installation and set CMAKE_LIBRARY_PATH before any YDK component installation. Example::
206+
2. Choose non-system Python library installation and set CMAKE_LIBRARY_PATH before any YDK component installation. Example:
207+
208+
.. code-block:: sh
208209
209210
export CMAKE_LIBRARY_PATH=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib
210211
211-
3. Run YDK core package installation with '-v' flag to check that `PythonLibs` points to correct library path. Example::
212+
3. Run YDK core package installation with '-v' flag to check that `PythonLibs` points to correct library path. Example:
213+
214+
.. code-block:: sh
212215
213216
$ ./generate.py --core
214217
$ pip install -v gen-api/python/ydk/dist/ydk*.tar.gz
215218
216-
# In 'cmake' log look for 'PythonLibs' and 'found version' settings line:
219+
4. In 'cmake' log look for 'PythonLibs' and 'found version' settings line:
217220

221+
.. code-block:: sh
222+
218223
-- Found PythonLibs: /usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib (found version "2.7.15")
219224
220-
4. Finally test you YDK core library installation from CLI, making sure there are no errors::
225+
5. Finally test you YDK core library installation from CLI, making sure there are no errors:
226+
227+
.. code-block:: sh
221228
222229
$ python -c "import ydk.types"
223230
224231
225232
How to install
226-
--------------
233+
==============
227234

228235
Using Python virtual environment
229-
================================
236+
--------------------------------
230237

231238
You may want to perform the installation under Python virtual environment (`virtualenv <https://pypi.python.org/pypi/virtualenv/>`_/`virtualenvwrapper <https://pypi.python.org/pypi/virtualenvwrapper>`_).
232239
The 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.
@@ -252,7 +259,7 @@ Once Python virtual environment is activated, you can perform quick installation
252259
Take into consideration that you must not attempt to install YDK as root user under virtual environment.
253260

254261
Quick Install
255-
~~~~~~~~~~~~~
262+
-------------
256263

257264
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.
258265
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),
@@ -296,7 +303,7 @@ To installation of model bundles on CentOS/RedHat platforms require special hand
296303
pip install --install-option="--install-purelib=/usr/lib64/python3.6/site-packages" --no-deps ydk-models-cisco-ios-xe
297304

298305
Installing from Source
299-
~~~~~~~~~~~~~~~~~~~~~~
306+
----------------------
300307

301308
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.
302309
To install the ``ydk`` core package, execute::
@@ -326,14 +333,15 @@ To install the ``cisco-ios-xr`` bundle, execute::
326333
cisco-ios-xr$ cd ..
327334

328335
Documentation and Support
329-
--------------------------
336+
=========================
337+
330338
- Read the `API documentation <http://ydk.cisco.com/py/docs>`_ for details on how to use the API and specific models
331339
- Samples can be found under the `samples directory <https://github.com/CiscoDevNet/ydk-py/tree/master/core/samples>`_
332340
- Hundreds of additional samples can be found in the `YDK-PY samples repository <https://github.com/CiscoDevNet/ydk-py-samples>`_
333341
- Join the `YDK community <https://communities.cisco.com/community/developer/ydk>`_ to connect with other users and with the makers of YDK
334342
- Additional YDK information can be found at `ydk.io <http://ydk.io>`_
335343

336344
Release Notes
337-
--------------
345+
=============
338346

339347
The current YDK release version is 0.8.2. YDK-Py is licensed under the Apache 2.0 License.

0 commit comments

Comments
 (0)