Skip to content

Commit

Permalink
0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
akarneliuk committed Mar 20, 2021
1 parent 4c3019d commit 94bc178
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ By using the pyGNMI tool you agree with `the license <LICENSE.txt>`_.
Dev Log
=======

Release **0.4.3**:

- Added possibility to modify the timeout (default value is 5 seconds) for the session using ``gnmi_timeout`` key for ``gNMIclient class.
Release **0.4.2**:
- Modified the path generation to comply with `gNMI Path encoding conventions <https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-path-conventions.md>`_.
Expand Down Expand Up @@ -213,7 +217,7 @@ Release **0.1.0**:

(c)2020-2021, karneliuk.com

.. |version| image:: https://img.shields.io/static/v1?label=latest&message=v0.4.2&color=success
.. |version| image:: https://img.shields.io/static/v1?label=latest&message=v0.4.3&color=success
.. _version: https://pypi.org/project/pygnmi/
.. |tag| image:: https://img.shields.io/static/v1?label=status&message=in%20development&color=yellow
.. _tag: https://pypi.org/project/pygnmi/
Expand Down
Binary file added dist/pygnmi-0.3.12.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pygnmi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#(c)2019-2021, karneliuk.com

__version__ = '0.4.2'
__version__ = '0.4.3'
7 changes: 4 additions & 3 deletions pygnmi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class gNMIclient(object):
This class instantiates the object, which interacts with the network elements over gNMI.
"""
def __init__(self, target: tuple, username: str = None, password: str = None,
debug: bool = False, insecure: bool = False, path_cert: str = None, override: str = None):
debug: bool = False, insecure: bool = False, path_cert: str = None, override: str = None,
gnmi_timeout: int = 5):
"""
Initializing the object
"""
Expand All @@ -46,7 +47,7 @@ def __enter__(self):

if self.__insecure:
self.__channel = grpc.insecure_channel(f'{self.__target[0]}:{self.__target[1]}', self.__metadata)
grpc.channel_ready_future(self.__channel).result(timeout=5)
grpc.channel_ready_future(self.__channel).result(timeout=gnmi_timeout)
self.__stub = gNMIStub(self.__channel)

else:
Expand All @@ -61,7 +62,7 @@ def __enter__(self):

self.__channel = grpc.secure_channel(f'{self.__target[0]}:{self.__target[1]}',
credentials=cert, options=self.__options)
grpc.channel_ready_future(self.__channel).result(timeout=5)
grpc.channel_ready_future(self.__channel).result(timeout=gnmi_timeout)
self.__stub = gNMIStub(self.__channel)

return self
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
setup(
name = 'pygnmi',
packages = ['pygnmi', 'pygnmi.spec', 'pygnmi.artefacts'],
version = '0.4.2',
version = '0.4.3',
license='bsd-3-clause',
description = 'This repository contains pure Python implementation of the gNMI client to interact with the network functions.',
long_description = long_description,
long_description_content_type = 'text/x-rst',
author = 'Anton Karneliuk',
author_email = '[email protected]',
url = 'https://github.com/akarneliuk/pygnmi',
download_url = 'https://github.com/akarneliuk/pygnmi/archive/v0.4.2.tar.gz',
download_url = 'https://github.com/akarneliuk/pygnmi/archive/v0.4.3.tar.gz',
keywords = ['gnmi', 'automation', 'grpc', 'network'],
install_requires=[
'grpcio',
Expand Down

0 comments on commit 94bc178

Please sign in to comment.