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

Fail Copy_To_Device cleaner via FTP on iOS XR #819

Closed
widadzakaria opened this issue Feb 5, 2024 · 1 comment
Closed

Fail Copy_To_Device cleaner via FTP on iOS XR #819

widadzakaria opened this issue Feb 5, 2024 · 1 comment

Comments

@widadzakaria
Copy link

widadzakaria commented Feb 5, 2024

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 :)

@SohanTirpude
Copy link
Contributor

SohanTirpude commented now
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants