Release 0.5.1 (#101)
* use netmiko_args * Add changes for 4.1.0 (#89) * Update requirements.txt * Typpo in requirements * _send_command has only two parameters * Adapt to stricter Unit tests --------- Co-authored-by: Anton Gridnev <anton@gridnev.pro> * Remove s350_base_interfaces custom map - it is allready in napalm base * Adapt Unit tests to canonical_interface_name() * Add format parameter to get_config() * Add badges * Tests for push are enought * update CD actions * add tests for device SG500-52 * Merge CI to develop (#95) * Simplify CI * CI update * CI update * Update CI from develop (#94) * Add format parameter to get_config() * Add badges * Tests for push are enought * update CD actions * add tests for device SG500-52 * fetch_command_output helper (#97) * fetch_command_output.sh tool * Update fetch_command_update from develop (#93) * adding read_timeout_override netmiko option --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Petr Klima <petr.klima@madeta.cz> Co-authored-by: Dave <davama@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anton Gridnev <anton@gridnev.pro> * Set default command timeout (#98) * adding read_timeout_override netmiko option --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Petr Klima <petr.klima@madeta.cz> * Fetch command output - obfuscations (#99) * add IP and MAC obfuscation * Add obfuscate strings * Merge master changes back to develop (#100) * Lift version to 0.4.1 * Adapt to napalm 4.1 tests (#90) * use netmiko_args * Add changes for 4.1.0 (#89) * Update requirements.txt * Typpo in requirements * _send_command has only two parameters * Adapt to stricter Unit tests --------- Co-authored-by: Anton Gridnev <anton@gridnev.pro> * Remove s350_base_interfaces custom map - it is allready in napalm base * Adapt Unit tests to canonical_interface_name() --------- Co-authored-by: Dave <davama@gmail.com> Co-authored-by: Anton Gridnev <anton@gridnev.pro> * move version to 0.4.1.1 * Make it napalm 5 compliant (#92) * use netmiko_args * Add changes for 4.1.0 (#89) * Update requirements.txt * Typpo in requirements * _send_command has only two parameters * Adapt to stricter Unit tests --------- Co-authored-by: Anton Gridnev <anton@gridnev.pro> * Remove s350_base_interfaces custom map - it is allready in napalm base * Adapt Unit tests to canonical_interface_name() * Add format parameter to get_config() * Add badges --------- Co-authored-by: Dave <davama@gmail.com> Co-authored-by: Anton Gridnev <anton@gridnev.pro> * move version to 5.0.0 * move to version 0.5.0 --------- Co-authored-by: Dave <davama@gmail.com> Co-authored-by: Anton Gridnev <anton@gridnev.pro> * better obfuscation for fetch command output * better obfuscation for fetch command output * get rid of textFSM templates * get rid of textFSM templates * Add support and tests for SG250 * bump to version 0.5.1 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Dave <davama@gmail.com> Co-authored-by: Anton Gridnev <anton@gridnev.pro> Co-authored-by: Petr Klima <petr.klima@madeta.cz> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
77 files changed
+2720
-75
No files matched your search
+19
-4
@@ -100,11 +100,11 @@ class S350Driver(NetworkDriver):
|
||||
try:
|
||||
if isinstance(command, list):
|
||||
for cmd in command:
|
||||
output = self.device.send_command(cmd)
|
||||
output = self.device.send_command(cmd, read_timeout=self.timeout)
|
||||
if "% Invalid" not in output:
|
||||
break
|
||||
else:
|
||||
output = self.device.send_command(command)
|
||||
output = self.device.send_command(command, read_timeout=self.timeout)
|
||||
return output.strip()
|
||||
except (socket.error, EOFError) as e:
|
||||
raise ConnectionClosedException(str(e))
|
||||
@@ -245,13 +245,28 @@ class S350Driver(NetworkDriver):
|
||||
uptime = self._parse_uptime(uptime_str)
|
||||
|
||||
# serial_number and model
|
||||
# take first device
|
||||
inventory = self._get_facts_parse_inventory(show_inv)["1"]
|
||||
serial_number = inventory["sn"]
|
||||
model = inventory["pid"]
|
||||
|
||||
# fqdn
|
||||
domainname = napalm.base.helpers.textfsm_extractor(self, "hosts", show_hosts)[0]
|
||||
domainname = domainname["domain_name"]
|
||||
# take first domain name
|
||||
domainname = "Unknown"
|
||||
atDTh = False
|
||||
atDT = False
|
||||
for line in show_hosts.splitlines():
|
||||
if line.startswith("Default Domain Table"):
|
||||
atDTh = True
|
||||
continue
|
||||
if atDTh and line.startswith("--------"):
|
||||
atDT = True
|
||||
continue
|
||||
if atDT:
|
||||
fields = line.split(" ")
|
||||
domainname = fields[0]
|
||||
break
|
||||
|
||||
if domainname == "Domain":
|
||||
domainname = "Unknown"
|
||||
if domainname != "Unknown" and hostname != "Unknown":
|
||||
|
||||
Whitespace-only changes.
@@ -1 +0,0 @@
|
||||
"""napalm.utils package."""
|
||||
Whitespace-only changes.
@@ -1,8 +0,0 @@
|
||||
Value DOMAIN_NAME ([\w+.]+)
|
||||
|
||||
Start
|
||||
^\s+Domain\s+Source\s+Interface\s+Preference -> Domains
|
||||
^\s+Source\s+Interface\s+Preference\s+Domain -> Domains
|
||||
|
||||
Domains
|
||||
^${DOMAIN_NAME} -> Record End
|
||||
Reference in new issue
Block a user