Skip to content

Commit

Permalink
Merge pull request #73 from jbemmel/master
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
jbemmel authored May 4, 2024
2 parents 720b5ec + b6218e4 commit 41b20b1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/napalm-sros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ dist: ## This creates a ./dist directory with wheel package
release: dist ## release to PyPi
python3 -m pip install --upgrade twine
# --repository testpypi
python3 -m twine upload dist/*
python3 -m twine upload --repository napalm-sros dist/*
5 changes: 3 additions & 2 deletions napalm_sros/sros.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ def get_config(
retrieve="all",
full=False,
sanitized=False,
format="text",
):
"""
Return the configuration of a device.
Expand All @@ -1128,7 +1129,7 @@ def get_config(
"""
try:
configuration = {"running": "", "candidate": "", "startup": ""}
if self.sros_get_format == "cli" and (sanitized is True or sanitized is False):
if self.sros_get_format == "cli" or format == "cli":
# Getting output in MD-CLI format
# retrieving config using md-cli
cmd_running = "admin show configuration | no-more"
Expand Down Expand Up @@ -1190,7 +1191,7 @@ def _update_buff(buff):
return configuration

# returning the config in xml format
elif self.sros_get_format == "xml" and (sanitized is True or sanitized is False):
elif self.sros_get_format == "xml" or format == "xml":
config_data_running_xml = ""
if retrieve == "running" or retrieve == "all":
config_data_running = to_ele(
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ build-backend = "setuptools.build_meta"

[project]
name = "napalm-sros"
version="1.0.1"
version="1.0.2"
description="Network Automation and Programmability Abstraction Layer driver for Nokia SR OS"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
dynamic = [ "dependencies" ]
classifiers = [
"Topic :: System :: Networking",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Natural Language :: English",
]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pip>=21.3.1
textfsm
paramiko>=2.11.0
lxml>=4.9.1
ncclient>=0.6.13
ncclient>=0.6.15
xmltodict>=0.12.0
dictdiffer>=0.9.0
datetime>=4.7
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="napalm-sros",
version="1.0.1",
version="1.0.2",
packages=find_packages(),
package_data={"napalm_sros.templates": ["*.js"], "napalm_sros.utils.textfsm_templates": ["*.tpl"]},
author="Nokia",
Expand All @@ -17,11 +17,11 @@
classifiers=[
"Topic :: Utilities",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Natural Language :: English",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
Expand Down
1 change: 1 addition & 0 deletions test/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class FakeNokiaSROSDevice(BaseTestDouble):
def __init__(self):
self.get = FakeGetMethod(self)
self.get_config = FakeGetConfigMethod(self)
self.server_capabilities = []

def open(self):
pass
Expand Down

0 comments on commit 41b20b1

Please sign in to comment.