refactor: the share and mount transports in their own mixin (NetOrk/netork#3104)
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 15s
driver / lowest (pull_request) Successful in 27s
driver / types (pull_request) Successful in 54s
driver / test (3.12) (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 53s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 1m41s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 15s
driver / lowest (pull_request) Successful in 27s
driver / types (pull_request) Successful in 54s
driver / test (3.12) (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 53s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 1m41s
driver / publish (pull_request) Skipped
The standard's ratchet holds linux.py at its recorded size: the two exec-channel transports move to _shares.LinuxSharesMixin, which the host readings bring in.
This commit is contained in:
1 parent
6f073aa96c
commit
480107c96a
3 files changed
+42
-19
No files matched your search
@@ -40,10 +40,8 @@ from napalm_device_types import (
|
||||
HostStatusMixin,
|
||||
KernelFactsMixin,
|
||||
LldpNeighborDict,
|
||||
NetworkMountsMixin,
|
||||
OpenSshServerMixin,
|
||||
OSDriver,
|
||||
PosixSharesMixin,
|
||||
ServiceClustersMixin,
|
||||
ServicePackagesMixin,
|
||||
SnmpAgentMixin,
|
||||
@@ -277,8 +275,6 @@ class LinuxDriver(
|
||||
AptProxyMixin,
|
||||
KernelFactsMixin,
|
||||
ServicePackagesMixin,
|
||||
PosixSharesMixin,
|
||||
NetworkMountsMixin,
|
||||
LinuxProcessReadingsMixin,
|
||||
HostFirewallMixin,
|
||||
VirtualIpsMixin,
|
||||
@@ -1046,20 +1042,6 @@ class LinuxDriver(
|
||||
"""
|
||||
return self.run_command(f"sh -c {_shlex_quote(command)}", timeout=120).stdout
|
||||
|
||||
def _run_shares_command(self, command: str) -> str:
|
||||
"""The transport for ``PosixSharesMixin.get_shares``: the NFS exports and Samba
|
||||
shares the host serves (NetOrk/netork#3104).
|
||||
|
||||
An exec channel under ``sh``, like the service packages. The export table and
|
||||
Samba's configuration are readable to everyone, so never through sudo.
|
||||
"""
|
||||
return self.run_command(f"sh -c {_shlex_quote(command)}", timeout=60).stdout
|
||||
|
||||
def _run_network_mounts_command(self, command: str) -> str:
|
||||
"""The transport for ``NetworkMountsMixin.get_network_mounts``: the NFS exports
|
||||
and SMB shares the host has mounted (NetOrk/netork#3104). Readable by everyone."""
|
||||
return self.run_command(f"sh -c {_shlex_quote(command)}", timeout=30).stdout
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# HostFirewallMixin – the transport for get_host_firewall
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user