Skip to content

Commit

Permalink
Merge pull request #77 from akarneliuk/0.7.6
Browse files Browse the repository at this point in the history
Will be new release 0.8.0
  • Loading branch information
akarneliuk authored Jul 22, 2022
2 parents 3808dc7 + ffa17f4 commit 4d16203
Show file tree
Hide file tree
Showing 16 changed files with 683 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-new.txt
- name: Perform linting validation
continue-on-error: true
Expand Down
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ Contributors
Dev Log
=======

Release **0.8.0**:

- **Important**: potentially breaking change. The dependency is moved from ``grpcio-tools`` to ``protobuf``, which as a standalone package has a much newer serion.
- Spec is rebuilt and updated to support gNMI of version ``0.8.0``.

Release **0.7.5**:

- Amended the logic of ``ONCE`` telemetry mode to automatically terminate on receiving ``{"sync_response": True}`` message.
Expand Down
2 changes: 1 addition & 1 deletion pygnmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pyGNMI module to manage network devices with gNMI
(c)2020-2022, Karneliuk
"""
__version__ = "0.7.5"
__version__ = "0.8.0"
10 changes: 5 additions & 5 deletions pygnmi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import os
import cryptography
import grpc
from pygnmi.spec.gnmi_pb2_grpc import gNMIStub
from pygnmi.spec.gnmi_pb2 import (CapabilityRequest, Encoding, GetRequest,\
from pygnmi.spec.v080.gnmi_pb2_grpc import gNMIStub
from pygnmi.spec.v080.gnmi_pb2 import (CapabilityRequest, Encoding, GetRequest,\
SetRequest, Update, TypedValue, SubscribeRequest, Poll, SubscriptionList,\
SubscriptionMode, AliasList, UpdateResult)

Expand Down Expand Up @@ -375,7 +375,7 @@ def get(self, prefix: str = "", path: list = [],
pb_encoding = 4

try:
gnmi_message_request = GetRequest(prefix=protobuf_prefix, path=protobuf_paths,
gnmi_message_request = GetRequest(prefix=protobuf_prefix, path=protobuf_paths,
type=pb_datatype, encoding=pb_encoding)
debug_gnmi_msg(self.__debug, gnmi_message_request, "gNMI request")

Expand Down Expand Up @@ -459,8 +459,8 @@ def get(self, prefix: str = "", path: list = [],
logger.critical(f"GRPC ERROR Host: {self.__target_path}, Error: {err.details()}")
raise gNMIException(f"GRPC ERROR Host: {self.__target_path}, Error: {err.details()}", err)

except:
logger.error(f'Collection of Get information failed is failed.')
# except:
# logger.error(f'Collection of Get information failed is failed.')

return None

Expand Down
2 changes: 1 addition & 1 deletion pygnmi/path_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
# Modules
import re
from pygnmi.spec.gnmi_pb2 import Path
from pygnmi.spec.v080.gnmi_pb2 import Path


# User-defined functions
Expand Down
3 changes: 0 additions & 3 deletions pygnmi/spec/gnmi_ext_pb2_grpc.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
102 changes: 102 additions & 0 deletions pygnmi/spec/v080/gnmi_ext_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4d16203

Please sign in to comment.