Skip to content

Commit

Permalink
Merge pull request #1082 from ygorelik/master
Browse files Browse the repository at this point in the history
Maintenance release 0.8.6.4
  • Loading branch information
ygorelik authored Feb 1, 2023
2 parents 710ec98 + 124e523 commit 27dd7d8
Show file tree
Hide file tree
Showing 129 changed files with 27,738 additions and 2,275 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.temp
.idea*
.coverage*
.env
.env*
htmlcov
coverage.xml
*.pyc
Expand All @@ -31,6 +31,8 @@ test/gnmi_client
yang/nxos*
yang-git
profiles/test/ydk-nxos*
profiles/bundles/yang/xe-1764/
profiles/test/cisco-iosxe-1764.json
confd*
grpc
protobuf-3.5.0
Expand Down
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### 2023-01-31 version 0.8.6.4

#### New features and enhancements
* install_ydk.sh: Installation of Python and Go YDK packages should not require root access ([#1069](https://github.com/CiscoDevNet/ydk-gen/issues/1069))
* Expanded unit test cases to retrieve list elements

#### Resolved GitHub issues
* CodecService fails to decode XML in python when referencing namespace prefix ([#1071](https://github.com/CiscoDevNet/ydk-gen/issues/1071))
* CiscoDevNet YDK C++ README needs Documentation & Support links updated ([#1077](https://github.com/CiscoDevNet/ydk-gen/issues/1077))
* Error in ydk-gen-master/test/dependencies_centos.sh version check ([#1078](https://github.com/CiscoDevNet/ydk-gen/issues/1078))
* not_eq is a c++ keyword ([#1080](https://github.com/CiscoDevNet/ydk-gen/issues/1080))
* libyang issue with arguments that are swapped ([#1081](https://github.com/CiscoDevNet/ydk-gen/issues/1081))

### Resolved non-GitHub issues
* Fixed and tested C++ sample apps


### 2022-07-31 version 0.8.6.3

#### New features and enhancements
Expand Down
65 changes: 35 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ To use the docker image, [install docker](https://docs.docker.com/install/) on y
See the [docker documentation](https://docs.docker.com/engine/reference/run/) for more details.

```
docker run -it ydksolutions/ydk-gen:0.8.6.3
docker run -it ydksolutions/ydk-gen:0.8.6.4
```

# System Requirements
Expand Down Expand Up @@ -154,42 +154,47 @@ source .env
```

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

**NOTE.** It is strongly recommended to use Python virtual environment on Centos/RHEL and Mac platforms.

When installing YDK for Python or Go programming languages, the third party dependencies and C++ packages must be installed first.
This step requires sudo/root access to the installation platform.
Here is simple example of core YDK installation for Python programming language and Python virtual environment:

```
git clone https://github.com/ygorelik/ydk-gen.git
cd ydk-gen
export YDKGEN_HOME=`pwd` # optional
export PYTHON_VENV=$HOME/ydk_vne # optional
./install_ydk.sh --core --venv
./install_ydk.sh --cpp --core --venv # This step requires sudo access!
./install_ydk.sh --py --core --venv
```

The script also allows to install individual components like dependencies, core, and service packages
The script also allows installing individual components like dependencies, core, and service packages
for specified programming language or for all supported languages.
Full set of script capabilities could be viewed like this:

```
./install_ydk.sh --help
usage: install_ydk [ {--cpp|--py|--go|--all} ] [-c] [-s gnmi] [-h] [-n] [-v]
Options and arguments:
--cpp install YDK for C++ programming language
--cpp install YDK for C++ programming language;
requires sudo access for dependencies and libraries installation
--go install YDK for Go programming language
--py|--python install YDK for Python programming language (default)
--all install YDK for all supported programming languages
--py|--python install YDK for Python programming language
--all install YDK for all available programming languages;
requires sudo access for dependencies and libraries installation
-v|--venv create python virtual environment
-c|--core install YDK core packages
-c|--core install YDK core package
-s|--service gnmi install gNMI service package
-n|--no-deps skip installation of dependencies
-n|--no-deps skip installation of dependencies;
applicable only with --cpp and --all options
-h|--help print this help message and exit
Environment variables:
YDKGEN_HOME specifies location of ydk-gen git repository;
if not set, $HOME/ydk-gen is assumed
Expand Down Expand Up @@ -251,13 +256,13 @@ For unsupported platforms it is recommended to follow logic of `ydk-gen/test/dep
source .env
# Generate and install YDK core library
./generate.py -is --core --cpp
python3 generate.py -is --core --cpp
# For Python programming language add
./generate.py -i --core --py
python3 generate.py -i --core --py
# For Go programming language add
./generate.py -i --core --go
python3 generate.py -i --core --go
```

## Adding gNMI service
Expand All @@ -267,10 +272,11 @@ and YDK gNMI service package.

### gNMI service installation

Here is simple example how gNMI service package for Python could be added:
Here is simple example how gNMI service package for Python virtual environment could be added:

```
cd ydk-gen
./install_ydk.sh --cpp --service gnmi -v # requires sudo access
./install_ydk.sh --py --service gnmi -v
```

Expand All @@ -284,8 +290,7 @@ See this issue on [GRPC GitHub](https://github.com/grpc/grpc/issues/10942#issuec
As a workaround, the YDK based application runtime environment must include setting of `LD_LIBRARY_PATH` variable:

```
PROTO=$HOME # Default location defined during installation
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PROTO/grpc/libs/opt:$PROTO/protobuf-3.5.0/src/.libs:/usr/local/lib:/usr/local/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64
```

# Generate YDK components
Expand All @@ -295,7 +300,7 @@ All the YDK components/packages can be generated by using Python script `generat
```
cd ydk-gen
source .env
./generate.py --help
python3 generate.py --help
usage: generate.py [-h] [-l] [--core] [--service SERVICE] [--bundle BUNDLE]
[--adhoc-bundle-name ADHOC_BUNDLE_NAME]
[--adhoc-bundle ADHOC_BUNDLE [ADHOC_BUNDLE ...]]
Expand Down Expand Up @@ -426,28 +431,28 @@ YDK runtime environment must be activated prior to these procedures.
If applicable, the Python virtual environment must be activated prior to these procedures

```
./generate.py --python --bundle profiles/bundles/<name-of-profile>.json -i
python3 generate.py --python --bundle profiles/bundles/<name-of-profile>.json -i
```

Check Python packages installed:

```
pip list | grep ydk
ydk (0.8.6.3)
ydk (0.8.6.4)
ydk-models-<name-of-bundle> (0.5.1)
...
```

### For Go

```
./generate.py --go --bundle profiles/bundles/<name-of-profile>.json -i
python3 generate.py --go --bundle profiles/bundles/<name-of-profile>.json -i
```

### For C++

```
./generate.py --cpp --bundle profiles/bundles/<name-of-profile>.json -is
python3 generate.py --cpp --bundle profiles/bundles/<name-of-profile>.json -is
```

## Writing your first app
Expand All @@ -470,10 +475,10 @@ For example, the below sequence of commands will generate the documentation for
(for C++, use `--cpp`; for Go, use `--go`).

```
./generate.py --python --bundle profiles/bundles/ietf_0_1_1.json
./generate.py --python --bundle profiles/bundles/openconfig_0_1_1.json
./generate.py --python --bundle profiles/bundles/cisco_ios_xr_6_1_1.json
./generate.py --python --core --generate-doc
python3 generate.py --python --bundle profiles/bundles/ietf_0_1_1.json
python3 generate.py --python --bundle profiles/bundles/openconfig_0_1_1.json
python3 generate.py --python --bundle profiles/bundles/cisco_ios_xr_6_1_1.json
python3 generate.py --python --core --generate-doc
```

**Note.** The documentation generation for bundles can take few hours due to their size. If you have previously
Expand All @@ -484,8 +489,8 @@ the add-on documentation generation time can be reduced. Adding cisco-ios-xr doc
mkdir gen-api/cache
mv gen-api/python gen-api/cache
./generate.py --python --bundle profiles/bundles/cisco_ios_xr_6_6_3.json
./generate.py --python --core --generate-doc --output-directory gen-api --cached-output-dir
python3 generate.py --python --bundle profiles/bundles/cisco_ios_xr_6_6_3.json
python3 generate.py --python --core --generate-doc --output-directory gen-api --cached-output-dir
```

## Generating an "Adhoc" YDK-Py Bundle
Expand All @@ -495,7 +500,7 @@ just few models. It is called an "adhoc" bundle. Such a bundle generated without
Here is simple example:

```
./generate.py -i --adhoc-bundle-name test --adhoc-bundle \
python3 generate.py -i --adhoc-bundle-name test --adhoc-bundle \
/opt/git-repos/clean-yang/vendor/cisco/xr/621/Cisco-IOS-XR-ipv4-bgp-oper*.yang \
/opt/git-repos/clean-yang/vendor/cisco/xr/621/Cisco-IOS-XR-types.yang
/opt/git-repos/clean-yang/vendor/cisco/xr/621/Cisco-IOS-XR-ipv4-bgp-datatypes.yang
Expand Down Expand Up @@ -563,7 +568,7 @@ Other times, when the problem is not so evident, it is recommended to try runnin
`[--verbose|-v]` flag, which may reveal syntax problems with the YANG models being used. For example:

```
./generate.py --python --bundle profiles/bundles/ietf_0_1_1.json --verbose
python3 generate.py --python --bundle profiles/bundles/ietf_0_1_1.json --verbose
```

Also, it may be a good idea to obtain a local copy of the YANG models and compile them using `pyang` to ensure
Expand Down Expand Up @@ -613,6 +618,6 @@ The script will install core and bundle packages and then perform the unit tests

# Release Notes

The current YDK release version is 0.8.6.3.
The current YDK release version is 0.8.6.4.

YDK-Gen is licensed under the Apache 2.0 License.
6 changes: 3 additions & 3 deletions docs/_static/pygments.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pre { line-height: 125%; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
Expand Down
12 changes: 6 additions & 6 deletions docs/about_ydk.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>About YDK &mdash; YANG Development Kit 0.8.6.3 documentation</title>
<title>About YDK &mdash; YANG Development Kit 0.8.6.4 documentation</title>



Expand All @@ -33,7 +33,7 @@


<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="YANG Development Kit 0.8.6.3 documentation" href="index.html"/>
<link rel="top" title="YANG Development Kit 0.8.6.4 documentation" href="index.html"/>
<link rel="next" title="Getting Started" href="getting_started.html"/>
<link rel="prev" title="Contents:" href="index.html"/>

Expand Down Expand Up @@ -66,7 +66,7 @@


<div class="version">
0.8.6.3
0.8.6.4
</div>


Expand Down Expand Up @@ -167,12 +167,12 @@ <h2>License<a class="headerlink" href="#license" title="Permalink to this headli
</div>
<div class="section" id="version">
<h2>Version<a class="headerlink" href="#version" title="Permalink to this headline"></a></h2>
<p>Version : 0.8.6.3</p>
<p>Version : 0.8.6.4</p>
<p>This YDK documentation was generated using
<a class="reference external" href="https://github.com/CiscoDevNet/ydk-gen/blob/master/generate.py">ydk-gen/generate.py</a> script.</p>
<p>To check out this version of ydk-gen use the below commands:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>$ git clone https://github.com/ygorelik/ydk-gen.git
$ git checkout d7aadc33518843238bb84c768452acdc4dcac8d4
$ git checkout d665b401e363a2dbfbba5258d7705509fd76baed
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -226,7 +226,7 @@ <h2>Release Changes<a class="headerlink" href="#release-changes" title="Permalin
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.8.6.3',
VERSION:'0.8.6.4',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false
Expand Down
8 changes: 4 additions & 4 deletions docs/api/class_hierarchy.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>YDK API &mdash; YANG Development Kit 0.8.6.3 documentation</title>
<title>YDK API &mdash; YANG Development Kit 0.8.6.4 documentation</title>



Expand All @@ -33,7 +33,7 @@


<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="YANG Development Kit 0.8.6.3 documentation" href="../index.html"/>
<link rel="top" title="YANG Development Kit 0.8.6.4 documentation" href="../index.html"/>
<link rel="up" title="API Guide" href="../api_guide.html"/>
<link rel="next" title="Services" href="services/services.html"/>
<link rel="prev" title="API Guide" href="../api_guide.html"/>
Expand Down Expand Up @@ -67,7 +67,7 @@


<div class="version">
0.8.6.3
0.8.6.4
</div>


Expand Down Expand Up @@ -225,7 +225,7 @@ <h1>YDK API<a class="headerlink" href="#ydk-api" title="Permalink to this headli
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.8.6.3',
VERSION:'0.8.6.4',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false
Expand Down
8 changes: 4 additions & 4 deletions docs/api/errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Errors &mdash; YANG Development Kit 0.8.6.3 documentation</title>
<title>Errors &mdash; YANG Development Kit 0.8.6.4 documentation</title>



Expand All @@ -33,7 +33,7 @@


<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="YANG Development Kit 0.8.6.3 documentation" href="../index.html"/>
<link rel="top" title="YANG Development Kit 0.8.6.4 documentation" href="../index.html"/>
<link rel="up" title="YDK API" href="class_hierarchy.html"/>
<link rel="next" title="YDK Path API" href="path/path.html"/>
<link rel="prev" title="Types" href="types.html"/>
Expand Down Expand Up @@ -67,7 +67,7 @@


<div class="version">
0.8.6.3
0.8.6.4
</div>


Expand Down Expand Up @@ -266,7 +266,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.8.6.3',
VERSION:'0.8.6.4',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false
Expand Down
Loading

0 comments on commit 27dd7d8

Please sign in to comment.