Skip to content

Commit

Permalink
Merge pull request #54 from napalm-automation-community/add-python-3.12
Browse files Browse the repository at this point in the history
Add python 3.12, remove 3.7 and fix get_config method signature
  • Loading branch information
jbemmel authored May 4, 2024
2 parents d1d1f53 + 280fc90 commit b48bf9a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
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,
)

0 comments on commit b48bf9a

Please sign in to comment.