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

Make use of SFTP API for incus file operations #1176

Open
stgraber opened this issue Sep 2, 2024 · 2 comments
Open

Make use of SFTP API for incus file operations #1176

stgraber opened this issue Sep 2, 2024 · 2 comments
Assignees
Labels
Easy Good for new contributors Feature New feature, not a bug
Milestone

Comments

@stgraber
Copy link
Member

stgraber commented Sep 2, 2024

Currently all the incus file operations are done through the individual REST API endpoints, which Incus then internally converts to SFTP interactions. This isn't exactly the most flexible or efficient.

It'd be good to change all the incus file operations to instead use GetInstanceFileSFTP to fetch a Go SFTP client and then perform the relevant filesystem operations through it.

@stgraber stgraber added Feature New feature, not a bug Easy Good for new contributors labels Sep 2, 2024
@stgraber stgraber added this to the soon milestone Sep 2, 2024
@HassanAlsamahi
Copy link
Contributor

Can I work on this? If that is okay, should the change be done in client/incus_instances and replace the REST API part of the functions CreateInstanceFile..etc with the SFTP part? or directly in the cmd/incus/files? I believe the first but wanted to verify.

@stgraber
Copy link
Member Author

stgraber commented Sep 3, 2024

Assigned it to you!

The change should be done directly in cmd/incus/file.go, the Go client package should be a mostly clear mapping to the API so we don't want it to get too smart on that front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Good for new contributors Feature New feature, not a bug
Development

No branches or pull requests

2 participants