Skip to content

[13.0][ADD] storage_backend_ftp#102

Closed
acsonefho wants to merge 3 commits intoOCA:13.0from
acsone:13.0-storage_backend_ftp
Closed

[13.0][ADD] storage_backend_ftp#102
acsonefho wants to merge 3 commits intoOCA:13.0from
acsone:13.0-storage_backend_ftp

Conversation

@acsonefho
Copy link
Contributor

@acsonefho acsonefho commented Jul 10, 2021

New module storage_backend_ftp

Note: I didn't test every security protocols

@acsonefho acsonefho force-pushed the 13.0-storage_backend_ftp branch 2 times, most recently from f6b5104 to 2400d17 Compare July 12, 2021 14:22
@acsonefho acsonefho changed the title WIP [13.0][ADD] storage_backend_ftp [13.0][ADD] storage_backend_ftp Jul 12, 2021
@acsonefho acsonefho force-pushed the 13.0-storage_backend_ftp branch 3 times, most recently from 1107ef6 to a2014d4 Compare July 13, 2021 08:24
@sebastienbeau sebastienbeau added this to the 13.0 milestone Jul 23, 2021
@acsonefho acsonefho force-pushed the 13.0-storage_backend_ftp branch from a2014d4 to 48e1336 Compare August 2, 2021 07:08
@acsonefho acsonefho force-pushed the 13.0-storage_backend_ftp branch from 48e1336 to a169408 Compare August 4, 2021 08:49
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did an initial test, see a comment inline.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not return a list. But a string with a command-like message. I think you should use client.nlst(full_path)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in acsone#1.

* list should return a python list of files.
* get should get and directly return the bynary from the FTP.
  Before, a string was being retrived and then encoded. This is
  problematic if the original binary was not utf-8.
@LoisRForgeFlow
Copy link
Contributor

Hi @acsonefho, I have done a full testing and found a couple of issues. I have created a PR to your branch addressing them, could you have a look? acsone#1

[FIX] storage_backend_ftp: fix list and get
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

# Due to a bug into between ftplib and ssl, this part (about ssl) might not work!
# https://bugs.python.org/issue31727
security = None
if backend.ftp_security == "tls":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use a dict 😉

)

# Do not patch the entire ftplib otherwise the error_perm Exception
# become also a mock and then a traceback is genrated on the "except ftplib.error_perm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# become also a mock and then a traceback is genrated on the "except ftplib.error_perm"
# become also a mock and then a traceback is generated on the "except ftplib.error_perm"

sftp_port = fields.Integer(string="SFTP Port", default=22)
sftp_auth_method = fields.Selection(
string="Authentification Method",
string="SFTP Authentification Method",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string="SFTP Authentification Method",
string="SFTP Authentication Method",

@simahawk
Copy link
Contributor

simahawk commented Sep 9, 2021

build is red

@LoisRForgeFlow
Copy link
Contributor

@acsonefho could you attend the final comments from @simahawk ?

@LoisRForgeFlow
Copy link
Contributor

LoisRForgeFlow commented Oct 26, 2021

I have superseded this PR due to inactivity here #134, I think we can close this one.

@simahawk simahawk closed this Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments