diff --git a/README.rst b/README.rst index 437f952..a77bdc9 100644 --- a/README.rst +++ b/README.rst @@ -66,6 +66,10 @@ By using the pyGNMI tool you agree with `the license `_. Dev Log ======= +Release **0.4.5**: + +- Minor bug fix. + Release **0.4.4**: - Minor bug fix. @@ -221,7 +225,7 @@ Release **0.1.0**: (c)2020-2021, karneliuk.com -.. |version| image:: https://img.shields.io/static/v1?label=latest&message=v0.4.3&color=success +.. |version| image:: https://img.shields.io/static/v1?label=latest&message=v0.4.4&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/ diff --git a/dist/pygnmi-0.4.4.tar.gz b/dist/pygnmi-0.4.4.tar.gz new file mode 100644 index 0000000..f02c44c Binary files /dev/null and b/dist/pygnmi-0.4.4.tar.gz differ diff --git a/pygnmi/__init__.py b/pygnmi/__init__.py index f16ae44..f805761 100644 --- a/pygnmi/__init__.py +++ b/pygnmi/__init__.py @@ -1,3 +1,3 @@ #(c)2019-2021, karneliuk.com -__version__ = '0.4.4' \ No newline at end of file +__version__ = '0.4.5' \ No newline at end of file diff --git a/pygnmi/client.py b/pygnmi/client.py index afa2f41..25e68c5 100644 --- a/pygnmi/client.py +++ b/pygnmi/client.py @@ -33,6 +33,7 @@ def __init__(self, target: tuple, username: str = None, password: str = None, self.__insecure = insecure self.__path_cert = path_cert self.__options=[('grpc.ssl_target_name_override', override)] if override else None + self.__gnmi_timeout = gnmi_timeout if re.match('.*:.*', target[0]): self.__target = (f'[{target[0]}]', target[1]) @@ -47,7 +48,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=gnmi_timeout) + grpc.channel_ready_future(self.__channel).result(timeout=self.__gnmi_timeout) self.__stub = gNMIStub(self.__channel) else: @@ -62,7 +63,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=gnmi_timeout) + grpc.channel_ready_future(self.__channel).result(timeout=self.__gnmi_timeout) self.__stub = gNMIStub(self.__channel) return self diff --git a/setup.py b/setup.py index 3bac26e..e9295a7 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = 'pygnmi', packages = ['pygnmi', 'pygnmi.spec', 'pygnmi.artefacts'], - version = '0.4.4', + version = '0.4.5', 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, @@ -14,7 +14,7 @@ author = 'Anton Karneliuk', author_email = 'anton@karneliuk.com', url = 'https://github.com/akarneliuk/pygnmi', - download_url = 'https://github.com/akarneliuk/pygnmi/archive/v0.4.4.tar.gz', + download_url = 'https://github.com/akarneliuk/pygnmi/archive/v0.4.5.tar.gz', keywords = ['gnmi', 'automation', 'grpc', 'network'], install_requires=[ 'grpcio',