CiscoTestAutomation / pyats

Cisco DevNet pyATS Test Framework Bug Tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fail Copy_To_Device cleaner via FTP on iOS XR

widadzakaria opened this issue · comments

Hi,

When I try to copy a file from a Server to an iOS XR router (ASR9K) using the copy_to_device cleaner and the FTP protocole, the command executed in the CLI has this format : copy ftp://[Username]:[Password]@[Server-IP]//[File_Directory] [Destination_Directory_on_Router] .

The problem is that the router ask again the : Address or name of remote host, Source Username, Source password, Destination FIlename... so the new format 'generated' by the router add again the username and the password...
So the command become : ftp://[Username]:*@[Server-IP]/%2F[Username]:[Password]@[Server-IP]//[File_Directory] [Destination_Directory_on_Router]. So the copy fails with this error :
%GENIE-ERROR: ('Command execution failed', SubCommandFailure('sub_command failure, patterns matched in the output:'.....

Actually, the command that has to be executed on an iOS XR router has to be : copy ftp://[Server-IP]//[File_Directory] [Destination_Directory_on_Router], so when the router ask for the username and password, the command that it generates is the good one .

Here is an example of the clean.yaml:

cleaners:
    PyatsDeviceClean:
        module: genie.libs.clean
        devices: [R1]

devices:
    R1:
        connect:

        copy_to_device:
            origin:
                hostname: Server
                files:
                    - [File_Directory] 
            destination:
                [Destination_Directory_on_Router]
            protocol: ftp #it works using tftp
        order:
        - connect
        - copy_to_device

Thanks for the help :)

Hello @widadzakaria,

I will closing this ticket as you have created a duplicate one here: CiscoTestAutomation/genielibs#152

Kindly do not create duplicate tickets.

Thank you.