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

nornir-netmiko file transfer is not working if platform is set to juniper #47

Open
nanisyako opened this issue Dec 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@nanisyako
Copy link

env:
netmiko==4.1.1
nornir-netmiko==0.2.0

task:

        for file in file_name:
            try:
                transfer_results = task.run(
                    netmiko_file_transfer,
                    source_file=file,
                    dest_file=file,
                    direction="get",
                )
            except:
                print(f"file could not be copied")

error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/nornir/core/task.py", line 99, in start
    r = self.task(self, **self.params)
  File "/usr/local/lib/python3.8/site-packages/nornir_netmiko/tasks/netmiko_file_transfer.py", line 26, in netmiko_file_transfer
    scp_result = file_transfer(
  File "/usr/local/lib/python3.8/site-packages/netmiko/scp_functions.py", line 122, in file_transfer
    with TransferClass(**scp_args) as scp_transfer:
  File "/usr/local/lib/python3.8/site-packages/netmiko/ssh_dispatcher.py", line 459, in FileTransfer
    raise ValueError(
ValueError: Unsupported SCP device_type: currently supported platforms are:
arista_eos
arista_eos_ssh
ciena_saos
ciena_saos_ssh
cisco_asa
cisco_asa_ssh
cisco_ios
cisco_ios_ssh
cisco_nxos
cisco_nxos_ssh
cisco_xe
cisco_xe_ssh
cisco_xr
cisco_xr_ssh
dell_os10
dell_os10_ssh
extreme_exos
extreme_exos_ssh
juniper_junos
juniper_junos_ssh
linux
linux_ssh
mikrotik_routeros
mikrotik_routeros_ssh
nokia_sros
nokia_sros_ssh

it seems the netconnect.device_type makred as juniper instead

net_connect.device_type
'juniper'
@nanisyako nanisyako changed the title file transfer is not working in juniper nornir-netmiko file transfer is not working in juniper Dec 6, 2022
@ktbyers ktbyers changed the title nornir-netmiko file transfer is not working in juniper nornir-netmiko file transfer is not working if platform is set to juniper Dec 6, 2022
@ktbyers ktbyers added the bug Something isn't working label Dec 15, 2022
@ktbyers
Copy link
Owner

ktbyers commented Dec 15, 2022

Temporary workaround is to use a platform value of juniper_junos, but this should be fixed in Netmiko to support juniper as an SCP device type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants