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

Add incus file create subcommand #408

Merged
merged 4 commits into from
Jan 22, 2024
Merged

Conversation

monstermunchkin
Copy link
Member

This adds a new incus file create subcommand which allows creating files,
symlinks, and directories without having to specify a source.

@stgraber
Copy link
Member

@monstermunchkin oops, I just merged a Japanese translation update and that's causing a conflict, can you do a quick rebase?

cmd/incus/file.go Outdated Show resolved Hide resolved
cmd/incus/file.go Outdated Show resolved Hide resolved
@monstermunchkin
Copy link
Member Author

@monstermunchkin oops, I just merged a Japanese translation update and that's causing a conflict, can you do a quick rebase?

Done.

@stgraber
Copy link
Member

@monstermunchkin cool, so that makes sense, though I'm not sure about the --content and stdin stuff. If you want to actually send through a file or file content, you probably should just use incus file push which already can read from stdin (so you can always echo content | incus file - push foo/tmp/file

@stgraber
Copy link
Member

The rest of it, making an empty file (touch), making symlinks and dirs, I think that all makes sense.

@stgraber stgraber added the Incomplete Waiting on more information from reporter label Jan 20, 2024
@monstermunchkin
Copy link
Member Author

@monstermunchkin cool, so that makes sense, though I'm not sure about the --content and stdin stuff. If you want to actually send through a file or file content, you probably should just use incus file push which already can read from stdin (so you can always echo content | incus file - push foo/tmp/file

OK, I'll remove that part then.

If both `--gid` and `--uid` are set there's no need to get a file's GID
or UID as they will be overridden by the provided values.

Signed-off-by: Thomas Hipp <[email protected]>
This adds the `incus file create` subcommand which allows creating
files, symlinks, and directories without specifying a source.

Signed-off-by: Thomas Hipp <[email protected]>
This adds tests for the new `incus file create` subcommand.

Signed-off-by: Thomas Hipp <[email protected]>
@stgraber stgraber merged commit 1f37c61 into lxc:main Jan 22, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incomplete Waiting on more information from reporter
Development

Successfully merging this pull request may close these issues.

2 participants