Skip to content

Commit

Permalink
0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
akarneliuk committed Oct 9, 2021
1 parent 80772e5 commit b2c2b2b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ Contributors
Dev Log
=======

Release **0.6.1**:

- Added support of origin per RFC7951.
- Added timeout to the initial setup useful for long-living connections.
- Minor bug-fixing.

Release **0.6.0**:

- Significant improvements in telemetry capabilities of the pygnmi. Now you can use ``subscribe2`` method by simply providing the a corredponding dictionary at input and all modes (STREA, ONCE, POLL) are working correctly.
Expand Down Expand Up @@ -282,7 +288,7 @@ Release **0.1.0**:

(c)2020-2021, karneliuk.com

.. |version| image:: https://img.shields.io/static/v1?label=latest&message=v0.5.3&color=success
.. |version| image:: https://img.shields.io/static/v1?label=latest&message=v0.6.1&color=success
.. _version: https://pypi.org/project/pygnmi/
.. |tag| image:: https://img.shields.io/static/v1?label=status&message=stable&color=success
.. _tag: https://pypi.org/project/pygnmi/
Expand Down
Binary file added dist/pygnmi-0.6.0.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions pygnmi/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def parse_args(msg):
type=str,
required=False,
choices=[
"get", "set-update", "set-replace", "set-delete",
"capabilities", "get", "set-update", "set-replace", "set-delete",
"subscribe-stream", "subscribe-poll", "subscribe-once"
],
default="get",
Expand All @@ -63,7 +63,7 @@ def parse_args(msg):
parser.add_argument(
"-x", "--gnmi_path",
type=str,
required=True,
required=False,
default="", nargs="+",
help="gNMI paths of interest in XPath format, space separated"
)
Expand Down Expand Up @@ -93,7 +93,7 @@ def parse_args(msg):
targets = args.target
try:
if re.match(r'\[.*\]', targets):
args.target = re.sub(r'^\[([0-9a-f:]+?)\]:(\d+?)$', r'\g<1> \g<2>', targets).split(' ')
args.target = re.sub(r'^\[([0-9a-fA-F:]+?)\]:(\d+?)$', r'\g<1> \g<2>', targets).split(' ')
args.target = (str(args.target[0]), int(args.target[1]))
else:
args.target = (str(targets.split(':')[0]), int(targets.split(':')[1]))
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.6.0',
version = '0.6.1',
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.6.0.tar.gz',
download_url = 'https://github.com/akarneliuk/pygnmi/archive/v0.6.1.tar.gz',
keywords = ['gnmi', 'automation', 'grpc', 'network'],
install_requires=[
'grpcio',
Expand Down
20 changes: 20 additions & 0 deletions tests/test_address_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ def test_ipv4_address_override():
assert "gnmi_version" in result


def test_ipv4_address_certificate_download():
load_dotenv()
username_str = os.getenv("PYGNMI_USER")
password_str = os.getenv("PYGNMI_PASS")
hostname_str = os.getenv("PYGNMI_HOST_2")
port_str = os.getenv("PYGNMI_PORT")
path_cert_str = os.getenv("PYGNMI_CERT")

gc = gNMIclient(target=(hostname_str, port_str), username=username_str, password=password_str)
gc.connect()

result = gc.capabilities()

gc.close()

assert "supported_models" in result
assert "supported_encodings" in result
assert "gnmi_version" in result


def test_ipv6_address_override():
load_dotenv()
username_str = os.getenv("PYGNMI_USER")
Expand Down

0 comments on commit b2c2b2b

Please sign in to comment.