Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python 3.12, remove 3.7 and fix get_config method signature #54

Merged
merged 5 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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"] # in line with Napalm base project
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
10 changes: 8 additions & 2 deletions napalm_srl/srl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,13 @@ def get_snmp_information(self):
# }


def get_config(self, retrieve='all', full=False, sanitized=False):
def get_config(
self,
retrieve: str = "all",
full: bool = False,
sanitized: bool = False,
format: str = "text", # This driver supports 'cli' for CLI, else default 'json'
):
"""
:param retrieve: Which configuration type you want to populate, default is all of them. The rest will be set to “”.
:param full:Retrieve all the configuration. For instance, on ios, “sh run all”.
Expand All @@ -1691,7 +1697,7 @@ def get_config(self, retrieve='all', full=False, sanitized=False):
"startup": ""
}

if self.running_format == 'cli':
if self.running_format == 'cli' or format == 'cli':
if sanitized:
raise NotImplementedError(
"sanitized=True is not implemented with CLI format")
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ name = "napalm-srl"
version="1.0.4"
description="Network Automation and Programmability Abstraction Layer driver for Nokia SR Linux"
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",
]
authors = [
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
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",
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
],
url="https://github.com/napalm-automation-community/napalm-srlinux",
python_requires=">=3.7",
python_requires=">=3.8",
include_package_data=True,
install_requires=reqs,
)
Loading