From 6d45d9f3c8f6d825dfe42e5e1fb42a7b74d16221 Mon Sep 17 00:00:00 2001 From: alhogan <98360253+alhogan@users.noreply.github.com> Date: Fri, 13 Sep 2024 15:21:04 -0500 Subject: [PATCH] fixed file copy issues --- pyntc/devices/eos_device.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyntc/devices/eos_device.py b/pyntc/devices/eos_device.py index 24646a9e..1fbd4613 100644 --- a/pyntc/devices/eos_device.py +++ b/pyntc/devices/eos_device.py @@ -73,11 +73,11 @@ def __init__(self, host, username, password, transport="http", port=None, timeou self._connected = False log.init(host=host) - def _file_copy_instance(self, src, dest=None, file_system="flash:"): + def _file_copy_instance(self, src, dest=None, file_system="/mnt/flash"): if dest is None: dest = os.path.basename(src) - file_copy = FileTransfer(self.native_ssh, src, dest, file_system=file_system) + file_copy = FileTransfer(self.native_ssh, src, dest, file_system="/mnt/flash") log.debug("Host %s: File copy instance %s.", self.host, file_copy) return file_copy @@ -175,7 +175,7 @@ def boot_options(self): dict: Key is ``sys`` with value being the image on the device. """ image = self.show("show boot-config")["softwareImage"] - image = image.replace("flash:", "") + image = image.replace("flash:/", "") log.debug("Host %s: the boot options are %s", self.host, {"sys": image}) return {"sys": image} @@ -375,7 +375,7 @@ def file_copy(self, src, dest=None, file_system=None): file_copy = self._file_copy_instance(src, dest, file_system=file_system) try: - file_copy.enable_scp() + # file_copy.enable_scp() file_copy.establish_scp_conn() file_copy.transfer_file() log.info("Host %s: File %s transferred successfully.", self.host, src)