Skip to content

Commit

Permalink
fixed file copy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alhogan committed Sep 13, 2024
1 parent d72c53b commit 6d45d9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyntc/devices/eos_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6d45d9f

Please sign in to comment.