Skip to content

Commit af82226

Browse files
authoredApr 1, 2022
Merge pull request #13 from ygorelik/0.8.6.2
0.8.6.2
2 parents f4030a1 + 30884cf commit af82226

File tree

5,672 files changed

+480603
-27969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,672 files changed

+480603
-27969
lines changed
 

‎CHANGES.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
### 2022-03-31 version 0.8.6.2
2+
3+
#### New features and enhancements
4+
* Improved installation script to allow use of Python system installation
5+
* Corrected few Codacy issues
6+
* Added support for MacOS Big Sur
7+
8+
#### Resolved GitHub issues
9+
* Fixed Python 3.5 code compatibility issue for Ubuntu:xenial
10+
* install_ydk.sh tries to create a new venv ([#1034](https://github.com/CiscoDevNet/ydk-gen/issues/1034))
11+
* getting YCodecError when leaf value has string 'sftp://' ([#1056](https://github.com/CiscoDevNet/ydk-gen/issues/1056))
12+
* vrf route-target leaf stitching(bool) fails as invalid ([#1059](https://github.com/CiscoDevNet/ydk-gen/issues/1059))
13+
14+
### Resolved non-GitHub issues
15+
* Addressed segmentation fault error when required modules are not loaded.
16+
* Patched catch.hpp for Linux distributions that do not define SIGSTKSZ
17+
18+
#### Bundle improvements
19+
* Cleaned up older profiles
20+
21+
122
### 2021-09-30 version 0.8.6
223

324
#### New features and enhancements
@@ -8,6 +29,8 @@
829

930
#### Resolved GitHub issues
1031
* Go function EntityEqual result depends on parameters order ([#1053](https://github.com/CiscoDevNet/ydk-gen/issues/1053))
32+
* Failed to get "ietf-netconf" module with Executor Service and get-schema RPC ([#1047](https://github.com/CiscoDevNet/ydk-gen/issues/1047))
33+
* The Executor Service fails to return module content back to user ([#1048](https://github.com/CiscoDevNet/ydk-gen/issues/1048))
1134

1235
#### Bundle improvements
1336
* Updated cisco-ios-xr bundle (profile cisco-ios-xr_6_7_3.json) to support Cisco IOS XR 6.7.3
@@ -399,7 +422,7 @@ The [backward incompatible](http://ydk.cisco.com/py/docs/backward_compatibility.
399422
* Add support for choosing either a per-device or a common cache for storing downloaded yang models ([#502](https://github.com/CiscoDevNet/ydk-gen/pull/502))
400423
* Introduced encoding/decoding subtree XML in `CodecService` and changed `CRUDService` to use XML subtree filtering to create filters for the `read` operation ([#489](https://github.com/CiscoDevNet/ydk-gen/pull/489))
401424
* Added support for non-standard RPCs as well in path API ([#498](https://github.com/CiscoDevNet/ydk-gen/pull/498))
402-
* Add ability to generate Linux and Mac OSX packages in cmake using [cpack](https://cmake.org/Wiki/CMake:Packaging_With_CPack) ([#466](https://github.com/CiscoDevNet/ydk-gen/pull/466))
425+
* Add ability to generate Linux and MacOS packages in cmake using [cpack](https://cmake.org/Wiki/CMake:Packaging_With_CPack) ([#466](https://github.com/CiscoDevNet/ydk-gen/pull/466))
403426

404427
#### ydk-gen
405428
* Updated [`cisco-ios-xr`](https://github.com/CiscoDevNet/ydk-gen/blob/master/profiles/bundles/cisco-ios-xr_6_2_2.json) to support Cisco IOS XR 6.2.2 release
@@ -473,7 +496,7 @@ The [backward incompatible](http://ydk.cisco.com/py/docs/backward_compatibility.
473496
* RestconfServiceProvider
474497
* OpenDaylightServiceProvider
475498
* Introduced support for netconf service ([#341](https://github.com/CiscoDevNet/ydk-gen/pull/341), [#352](https://github.com/CiscoDevNet/ydk-gen/pull/352))
476-
* Released ydk-cpp for OSX platform (on [Homebrew](https://github.com/CiscoDevNet/homebrew-ydk)) and on Ubuntu platform (on [Lauchpad](https://launchpad.net/~ydk)) ([#362](https://github.com/CiscoDevNet/ydk-gen/pull/362), [#322](https://github.com/CiscoDevNet/ydk-gen/pull/322))
499+
* Released ydk-cpp for MacOS platform (on [Homebrew](https://github.com/CiscoDevNet/homebrew-ydk)) and on Ubuntu platform (on [Lauchpad](https://launchpad.net/~ydk)) ([#362](https://github.com/CiscoDevNet/ydk-gen/pull/362), [#322](https://github.com/CiscoDevNet/ydk-gen/pull/322))
477500
* Added support for generated CRUD model tests based on bundles ([#354](https://github.com/CiscoDevNet/ydk-gen/pull/354))
478501
* Improved negative test cases and added support for netconf operations on leafs and leaf-lists ([#324](https://github.com/CiscoDevNet/ydk-gen/pull/324))
479502

‎README.md

+49-62
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ YANG Development Kit
4949
- [Building from source](#building-from-source)
5050
- [Adding gNMI service](#adding-gnmi-service)
5151
- [Generate YDK Components](#generate-ydk-components)
52-
- [Generate deployment packages](#generate-deployment-packages)
5352
- [Build model bundle profile](#build-model-bundle-profile)
5453
- [Generate and install model bundle](#generate-and-install-model-bundle)
5554
- [Writing your first app](#writing-your-first-app)
56-
- [Documentation](#documentation)
57-
- [Generating an "Adhoc" YDK-Py Bundle](#generating-an-adhoc-ydk-py-bundle)
55+
- [Generating Documentation](#generating-documentation)
56+
- [Generating an "Adhoc" YDK-Py Bundle](#generating-an-adhoc-ydk-py-bundle)
5857
- [Notes](#notes)
5958
- [Python requirements](#python-requirements)
6059
- [C++ requirements](#c-requirements)
@@ -120,7 +119,7 @@ docker run -it ydksolutions/ydk-gen
120119
The YDK is currently supported on the following platforms including native installations, virtual machines, and docker images:
121120
- Linux Ubuntu Xenial (16.04 LTS), Bionic (18.04 LTS), and Focal (20.04 LTS)
122121
- Linux CentOS/RHEL versions 7 and 8
123-
- MacOS up to 10.14.6 (Mojave)
122+
- MacOS up to 11.6.2 (Big Sur)
124123

125124
On Windows 10 the Linux virtual machine can run using Windows Subsystem for Linux (WSL);
126125
check [this](https://www.windowscentral.com/install-windows-subsystem-linux-windows-10) for virtual machine installation procedure.
@@ -133,7 +132,7 @@ For both the methods the user must install `git` package prior to the installati
133132

134133
All YDK core components are based on C and C++ code. These components compiled using default compilers for the supported platform.
135134
Corresponding binaries, libraries, and header files are installed in default locations,
136-
which are `/usr/local/bin` ,`/usr/local/lib`, and `/usr/local/include`.
135+
which are `/usr/local/bin`, `/usr/local/lib`, and `/usr/local/include`.
137136
The user must have sudo access in order to install YDK core components to these locations.
138137

139138
# Core Installation
@@ -142,11 +141,11 @@ The user must have sudo access in order to install YDK core components to these
142141

143142
For YDK installation it is recommended to use script `install_ydk.sh` from `ydk-gen` git repository.
144143
The script detects platform OS, installs all the dependencies and builds complete set of YDK components for specified language.
145-
The user must have sudo access to these locations.
146144

147145
The YDK extensively uses Python scripts for building its components and model API packages (bundles).
148-
In order to isolate YDK Python environment from system installation, the script builds Python virtual environment.
149-
The user must manually activate virtual environment when generating model bundles and/or running YDK based application.
146+
By default the YDK uses Python system installation.
147+
In order to isolate YDK Python environment from system installation, the script can build Python3 virtual environment.
148+
If built, the user must manually activate virtual environment when generating model bundles and/or running YDK based application.
150149
By default the Python virtual environment is installed under `$HOME/venv` directory.
151150
For different location the PYTHON_VENV environment variable should be set to that location.
152151

@@ -166,11 +165,14 @@ Full set of script capabilities could be viewed like this:
166165

167166
```
168167
./install_ydk.sh --help
169-
usage: install_ydk [-l [cpp, py, go]] [-s gnmi] [-h] [-n]
168+
usage: install_ydk [ {--cpp|--py|--go|--all} ] [-c] [-s gnmi] [-h] [-n] [-v]
170169
Options and arguments:
171-
-l [cpp, py, go, all] installation language; if not specified Python is assumed
172-
'all' corresponds to all available languages
173-
-c|--core install YDK core package
170+
--cpp install YDK for C++ programming language
171+
--go install YDK for Go programming language
172+
--py|--python install YDK for Python programming language (default)
173+
--all install YDK for all supported programming languages
174+
-v|--venv create python virtual environment
175+
-c|--core install YDK core packages
174176
-s|--service gnmi install gNMI service package
175177
-n|--no-deps skip installation of dependencies
176178
-h|--help print this help message and exit
@@ -188,17 +190,33 @@ C_INCLUDE_PATH location of C include files;
188190
if not set, /usr/local/include is assumed
189191
CPLUS_INCLUDE_PATH location of C++ include files;
190192
if not set, /usr/local/include is assumed
193+
CMAKE_LIBRARY_PATH Location of Python shared libraries;
194+
if not set, default system library location is assumed
191195
```
192196

193197
If user environment is different from the default one (different Python installation or different
194198
location of libraries) then building from source method should be used.
195199

196200
## Building from source
197201

202+
### Environment variables
203+
204+
In some OS configurations during YDK package installation the cmake fails to find C/C++ headers for previously installed YDK libraries.
205+
In this case the header files location must be specified explicitly (in below commands the default location is shown):
206+
207+
```
208+
export C_INCLUDE_PATH=/usr/local/include
209+
export CPLUS_INCLUDE_PATH=/usr/local/include
210+
```
211+
212+
When non-standard Python installation is used or there are multiple installations of Python on the platform,
213+
the PATH and CMAKE_LIBRARY_PATH environment variables must be set accordingly in order for the installation scripts
214+
to pick up correct Python binaries and shared libraries.
215+
198216
### Installing third party dependencies
199217

200218
If user platform is supported one, it is recommended to use `ydk-gen/install_ydk.sh` script.
201-
The script will also install Python virtual environment in default or specified location.
219+
The script will also install Python virtual environment in default or specified location, when '--venv' is specified.
202220

203221
```
204222
# Clone ydk-gen from GitHub
@@ -208,30 +226,22 @@ cd ydk-gen
208226
# Define optional environment variables and install dependencies
209227
export YDKGEN_HOME=`pwd`
210228
export PYTHON_VENV=$HOME/ydk_venv
211-
./install_ydk.sh # also builds Python virtual environment
229+
./install_ydk.sh -v # also builds Python virtual environment
212230
```
213231

214232
For unsupported platforms it is recommended to follow logic of `ydk-gen/test/dependencies-*` scripts.
215233

216-
### Environment variables
217-
218-
In some OS configurations during YDK package installation the cmake fails to find C/C++ headers for previously installed YDK libraries.
219-
In this case the header location must be specified explicitly (in below commands the default location is shown)::
220-
221-
export C_INCLUDE_PATH=/usr/local/include
222-
export CPLUS_INCLUDE_PATH=/usr/local/include
223-
224234
### Installing core components
225235

226236
```
227-
# Activate Python virtual environment
237+
# If created, activate Python virtual environment
228238
source $PYTHON_VENV/bin/activate
229239
230240
# Generate and install YDK core library
231241
./generate.py -is --core --cpp
232242
233243
# For Python programming language add
234-
./generate.py -i --core
244+
./generate.py -i --core --py
235245
236246
# For Go programming language add
237247
./generate.py -i --core --go
@@ -248,7 +258,7 @@ Here is simple example how gNMI service package for Python could be added:
248258

249259
```
250260
cd ydk-gen
251-
./install_ydk.sh -l py --service gnmi
261+
./install_ydk.sh --py --service gnmi -v
252262
```
253263

254264
### Runtime environment
@@ -316,28 +326,6 @@ and [ydk-cpp](https://github.com/CiscoDevNet/ydk-cpp).
316326
The script [create_ydk_sdk_for_github.sh](create_ydk_sdk_for_github.sh) can be used to generate the `ydk-py`,
317327
`ydk-cpp` and `ydk-go` repositories after having generated all the bundles and core packages using `generate.py`.
318328

319-
## Generate deployment packages
320-
321-
First the core installation procedure must be executed. Refer to [Core Installation](#core-installation) section for details.
322-
323-
To create the `libydk` binary package run the below commands:
324-
325-
```
326-
./generate.py --libydk
327-
cd gen-api/cpp/ydk/build
328-
make
329-
[sudo] make package
330-
```
331-
332-
To create the `libydk_gnmi` binary package run the below commands:
333-
334-
```
335-
./generate.py --cpp --service profiles/services/gnmi-0.4.0.json
336-
cd gen-api/cpp/ydk-service-gnmi/build
337-
make
338-
[sudo] make package
339-
```
340-
341329
## Build model bundle profile
342330

343331
The first step in using ydk-gen is either using one of the already built
@@ -456,24 +444,23 @@ Also refer to the [documentation for python](http://ydk.cisco.com/py/docs/develo
456444
[Go](http://ydk.cisco.com/go/docs/developer_guide.html) and
457445
[C++](http://ydk.cisco.com/cpp/docs/developer_guide.html).
458446

459-
## Documentation
447+
## Generating Documentation
460448

461449
In order to generate YDK core and bundles documentation, the `--generate-doc` option of `generate.py` script is used,
462450
while generating core package. Therefore the user should generate all the bundles without the `--generate-doc`
463451
option prior to the documentation generation.
464452
For example, the below sequence of commands will generate the documentation for the three python bundles and the python core
465453
(for C++, use `--cpp`; for Go, use `--go`).
466454

467-
**Note.** The documentation generation for bundles can take few hours due to their sizes.
468-
469455
```
470456
./generate.py --python --bundle profiles/bundles/ietf_0_1_1.json
471457
./generate.py --python --bundle profiles/bundles/openconfig_0_1_1.json
472458
./generate.py --python --bundle profiles/bundles/cisco_ios_xr_6_1_1.json
473459
./generate.py --python --core --generate-doc
474460
```
475461

476-
If you have previously generated documentation using the `--cached-output-dir --output-directory <dir>` option,
462+
**Note.** The documentation generation for bundles can take few hours due to their size. If you have previously
463+
generated documentation using the `--cached-output-dir --output-directory <dir>` option,
477464
the add-on documentation generation time can be reduced. Adding cisco-ios-xr documentation as an example:
478465

479466
```
@@ -484,17 +471,14 @@ mv gen-api/python gen-api/cache
484471
./generate.py --python --core --generate-doc --output-directory gen-api --cached-output-dir
485472
```
486473

487-
Pre-generated documentation is available on the web for [Python](http://ydk.cisco.com/py/docs/),
488-
[C++](http://ydk.cisco.com/cpp/docs/) and [Go](http://ydk.cisco.com/go/docs/).
489-
490-
# Generating an "Adhoc" YDK-Py Bundle
474+
## Generating an "Adhoc" YDK-Py Bundle
491475

492476
When YANG models available on the hard drive, there is capability to generate small model bundles, which include
493477
just few models. It is called an "adhoc" bundle. Such a bundle generated without profile directly from command line.
494478
Here is simple example:
495479

496480
```
497-
./generate.py --adhoc-bundle-name test --adhoc-bundle \
481+
./generate.py -i --adhoc-bundle-name test --adhoc-bundle \
498482
/opt/git-repos/clean-yang/vendor/cisco/xr/621/Cisco-IOS-XR-ipv4-bgp-oper*.yang \
499483
/opt/git-repos/clean-yang/vendor/cisco/xr/621/Cisco-IOS-XR-types.yang
500484
/opt/git-repos/clean-yang/vendor/cisco/xr/621/Cisco-IOS-XR-ipv4-bgp-datatypes.yang
@@ -510,13 +494,15 @@ and easily let the user see if dependencies have been satisfied.
510494

511495
## Python requirements
512496

513-
Starting from release 0.8.6 YDK supports only Python3 version. At least Python 3.5 along with corresponding pip3 utility
514-
must be installed on your the system. It is also required for Python installation to include corresponding shared
497+
Starting from release 0.8.5 YDK supports only Python3 version. At least Python 3.5 along with corresponding pip3 utility
498+
must be installed on your system. It is also required for Python installation to include corresponding shared
515499
library. As example:
516500

517-
- python3.5m - /usr/lib/x86_64-linux-gnu/libpython3.5m.so
501+
- python3.6m - /usr/lib/x86_64-linux-gnu/libpython3.6m.so
502+
503+
It is recommended to follow [Core Installation](#core-installation) procedure to ensure presence of shared Python libraries.
518504

519-
Please follow [Core Installation](#core-installation) procedures to assure presence of shared Python libraries.
505+
**NOTE.** Due to GitHub issue [#1050](https://github.com/CiscoDevNet/ydk-gen/issues/1050) YDK is not supported with Python 3.9.x.
520506

521507
## C++ requirements
522508

@@ -549,7 +535,7 @@ generate_bundles.sh - convinience script to generate core and bundle pa
549535
generate.py - script used to generate SDK for YANG models
550536
install_ydk.sh - YDK core components installation script
551537
requirements.txt- python dependencies used during installation
552-
README - installation and usage notes
538+
README.md - installation and usage notes
553539
```
554540

555541
## Troubleshooting
@@ -564,7 +550,7 @@ Other times, when the problem is not so evident, it is recommended to try runnin
564550
```
565551

566552
Also, it may be a good idea to obtain a local copy of the YANG models and compile them using `pyang` to ensure
567-
the validity of the models:
553+
the validity of the models and completeness of the model package:
568554

569555
```
570556
cd /path/to/yang/models
@@ -654,4 +640,5 @@ Please refer [here](https://github.com/ygorelik/ydk-gen/blob/master/sdk/go/core/
654640
# Release Notes
655641
656642
The current YDK release version is 0.8.6.
643+
657644
YDK-Gen is licensed under the Apache 2.0 License.

0 commit comments

Comments
 (0)