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 format optional variable to core drivers to support JUNOS get_config() options #1972

Merged
merged 3 commits into from Apr 10, 2024

Conversation

s1mplesimon
Copy link
Contributor

@s1mplesimon s1mplesimon commented Jul 6, 2023

Added format optional variable to core drivers to support JUNOS get_config() text option.

Related to problem #1105

s1mplesimon and others added 2 commits July 5, 2023 22:43
Add format optional parameter to core drivers to support JUNOS get_co…
@s1mplesimon s1mplesimon changed the title Add format optional parameter to core drivers to support JUNOS get_config Add format optional variable to core drivers to support JUNOS get_config Jul 6, 2023
@s1mplesimon s1mplesimon changed the title Add format optional variable to core drivers to support JUNOS get_config Add format optional variable to core drivers to support JUNOS get_config() options Jul 6, 2023
@mirceaulinic mirceaulinic added this to the 5.0.0 milestone Mar 26, 2024
@mirceaulinic
Copy link
Member

@s1mplesimon can you apply the following patch to your branch so the tests will pass?

diff --git a/napalm/base/base.py b/napalm/base/base.py
index b1b56040..10448deb 100644
--- a/napalm/base/base.py
+++ b/napalm/base/base.py
@@ -1599,7 +1599,11 @@ class NetworkDriver(object):
         raise NotImplementedError
 
     def get_config(
-        self, retrieve: str = "all", full: bool = False, sanitized: bool = False
+        self,
+        retrieve: str = "all",
+        full: bool = False,
+        sanitized: bool = False,
+        format: str = "text",
     ) -> models.ConfigDict:
         """
         Return the configuration of a device.
@@ -1609,6 +1613,7 @@ class NetworkDriver(object):
                               The rest will be set to "".
             full(bool): Retrieve all the configuration. For instance, on ios, "sh run all".
             sanitized(bool): Remove secret data. Default: ``False``.
+            format(string): The configuration format style to be retrieved.
 
         Returns:
           The object returned is a dictionary with a key for each configuration store:

@s1mplesimon
Copy link
Contributor Author

@mirceaulinic Applied. Still failing tests, though.

@mirceaulinic
Copy link
Member

@mirceaulinic
Copy link
Member

Merging and I'll follow up with a PR to fix.

@mirceaulinic mirceaulinic merged commit 29c5ea0 into napalm-automation:develop Apr 10, 2024
1 of 6 checks passed
mirceaulinic added a commit that referenced this pull request Apr 10, 2024
mirceaulinic added a commit that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants