-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for new python core #507
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Change holder type for ydk::Entity from std::unique_ptr to std::shared_ptr - Update generated API, use local reference to avoid type casting error from Python to C++ side - Add wrapper class PyEntithList, automatically assign parent pointer when appending list object - Update small set of test case
pybind11 will automatically cast inherited python class to abstract c++ class PyEntity when converting objects from Python and C++ side. To avoid this, need to associate the object with a local reference.
with Flask's ImportExtension
The crud.update operation no longer does read, it updates the data sent by the user.
- Update python.cpp interface - Update test_sanity_crud.py and test_sanity_delete.py - Add glue code for YLeafList in ydk.types
Put ydk::get_relative_entity_path under ydk.entity_utils.get_relative_entity_path
- Introduce new error classes: - YPYClientError - YPYIllegalStateError - YPYInvalidArgumentError - YPYOperationNotSupportedError - update test case
Child class instance is initiated and added to parent's children map. Attempt to manually assign child class instance will cause a mismatch, and thus segfault.
- test_uint64_invalid_1 no longer applys - update test_boolean_invalid
- Redirect TypeError to YPYServiceError for invalid ServiceProvider arguments - Add check for invalid arguments in CrudService
- Change holder type for ydk::Entity from std::unique_ptr to std::shared_ptr - Update generated API, use local reference to avoid type casting error from Python to C++ side - Add wrapper class PyEntithList, automatically assign parent pointer when appending list object - Update small set of test case
Update type mismatch test - The user should not manually assign child object of current object after initialization. - Add generated code to check manually assignment. - Update test case for manually assignment. Update test_sanity_deviation - Update test_sanity_deviation.py. - Skip leaf-list length restrict deviation test. - Update cisco-xr-bgp-deviations.yang, comment empty deviate statement. - Update generated code for assignment check and enum assignment. - Load deviation modules in repository. Remove duplicate statements Update test_sanity_deviation_bgp - Updated test_sanity_deviation_bgp.py. - Removed python deviation printer. Fix test case in test_sanity_deviation.py - Fix deviation boolean tests - Changed gen code to use enum name as assignment name - Changed affected test case in test_sanity_type_mismatch_errors.py Fix segfault issue for assignment after instantiation. - Change ydk::Entity::children to map of shared_ptr - Change ydk::Entity::children declaration in types.hpp to use map of string and shared_ptr. - Change related c++ source code. - Change related c++ printer code. - Add Entity glue code overrides get_children method. - Change related python printer code. - Removed python printer for get_children method. - Cleanup get_child_by_name method - Add entity method to check monkey patching errors - Update test_sanity_mismatch_errors.py. - Add monkey patching check to gen code. Add YdkStreamHandler Usage: import logging from ydk.logging import YDKStreamHandler log = logging.getLogger('ydk') log.setLevel(logging.DEBUG) ch = YDKStreamHandler() log.addHandler(ch) Fix python.cpp
- Change clone_ptr to const - Remove print statement in test case
- Rename test_sanity_bundle_aug.py to test_sanity_augmentation.py. - Remove code support augmentation cross bundles. - Add module name to augment leafs.
- Add CodecService/CodecServiceProvider python wrapper. - Update test_sanity_codec.py - Install YANG models as data files for every bundle under ydk/models/<bundle>/_yang/ - Replace variables in ydk/models/<bundle>/_yang_ns.py with: - bundle name. - bundle capabilities. - top level entity map. - Remove old _aug and _meta directory from python package. - Remove related printer code. - Remove support for cross bundle augmentation. - Reduce amount of boilerplate code in test cases.
- Add codec wrapper for JSON encoding/decoding. - Add JSON codec test cases to test_sanity_codec.py.
- unicode/str issuse for Python2 and 3 compatibility. - Monkey patching inspect.getargspec to inspect.getfullargspec under Python3
- Introduced Python libraries as dependency libraries for libydk to enable python extension logging. - Add EnableLogging method to ydk.logging module to: - Register a spdlog logger named `ydk` to enable logging. - Use a spdlog null sink for this logger to drop cpp logging. - Logging level: - Drop TRACE level according to syslog RFC 5424. - Use DEBUG as the most verbose level, shows everything propagated from libydk. Target users are YDK developers. - INFO level ignores detailed logging messages, only shows necessary messages and payload. - Update logging level in samples and documentation. - Remove YDKStreamHandler. - Update codec service's oc pattern tests.
* Update ydk core version in CMakeLists.txt * Update ydk core version in packages/setup.py
* Update lxml dependency version in requirements.txt * Update lxml dependency version in sdk/python/core/setup.py * Update lxml dependency version in sdk/python/packages/setup.py
* Rename ydk-version to core-version in bundle resolver and translator * Rename ydk-version to core-version in bundle profiles
* Read ydk core library version from bundle profiles Reads ydk core library version from bundle profiles to generate CMakeLists.txt (for the cpp libraries) and setup.py (for python packages) for coherency.
…ad output needs to be returned as a list (#459) * Fix rpc output to be decoded into entity * Fix incorrect decoding when read list only has one element
* Update README for ydk-gen * Add minor doc edit for YDK-Py/YDK-Cpp * Consolidate gitignore Removed empty `gen-api` directory from repo and consolidated exceptions in a single gitignore file. Directory is locally created when APIs are generated. Those APIs can be deleted by removing the directory w/o the absent directory being reported as a repo change.
* Update README for ydk-gen * Add minor doc edit for YDK-Py/YDK-Cpp * Add profile for Cisco IOS XE bundle Introduces profile for Cisco IOS XE (16.5.1) models. Updates IETF bundle (0.1.2) profile to meet dependencies of all other bundles.
* Update README for ydk-gen * Add minor doc edit for YDK-Py/YDK-Cpp * Fix documentation logo/icon for YDK-Py Makes documentation logo and icon consistent between YDK-Cpp and YDK-Py.
* Add exec to escaped python keywords * Add more issues fixed
* crud update fix * Update crud_service.py * Update crud_service.py
* Escape 'register', 'volatile' etc keyword for cpp * Fix xe compile issue on cpp
…to abhikeshav-new_python
Codecov Report
@@ Coverage Diff @@
## master #507 +/- ##
==========================================
- Coverage 84% 80.26% -3.75%
==========================================
Files 109 92 -17
Lines 13076 9610 -3466
Branches 1892 1221 -671
==========================================
- Hits 10985 7713 -3272
- Misses 1570 1646 +76
+ Partials 521 251 -270
Continue to review full report at Codecov.
|
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.