-
Notifications
You must be signed in to change notification settings - Fork 85
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
List logically bound images #871
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks sane to me to start!
I suspect though to really meet the goal we need to think about machine-readable output, which raises its own set of questions.
Also should be straightforward to change test-logically-bound-install.nu
to cover this right?
I've played around with formats, none of it is final so feel free to suggest changes:
|
Seems so, I'm trying to get at-least one successful run of the |
I don't see the need to have both csv and json, let's pick json. This overlaps a bit with #522 in that in theory we could expose this via varlink too? But eh, json seems like a sane baseline. |
Removed CSV (it was trivial to add and to remove so no harm done), it was mostly just an example of how we can add formats easily anyway |
Extending a bootc image with the following commands seems to be enough to prepare it , once booted on a VM, for cloning the bootc repo and running FROM localhost/bootc
RUN dnf install -y --setopt=install_weak_deps=False cargo git genisoimage libvirt python-pip qemu-kvm rsync && \
dnf clean all && \
rm -rf /var/cache/dnf /var/log/dnf* /var/log/yum.*
RUN python3 -m pip install testcloud tmt && \
rm -rf ~/.cache/pip
RUN systemctl enable virtqemud.socket Is anything like this documented anywhere? Am I even doing it right or am I missing some obvious simpler way? |
I run most things from a toolbox container personally where I have this stuff already installed. What you're doing there is "recursive" which is cool, but I am unsure I would have that be a primary target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits but looking sane to me!
6cc374d
to
916f296
Compare
2b53d68
to
165b676
Compare
Solves the second part of containers#846 The (hidden) image list command now has a `--type` flag to allow users to list only logical images, only host images, or all images. Also the command has been adjusted so that it can run even when not booted off of a bootc system. In that case, it will only list logical images. If a user tries to list host images without a booted system, an error will be thrown. The command also has a `--format` flag to allow users to choose between a human-readable table format and a JSON format. Signed-off-by: Omer Tuchfeld <[email protected]>
} | ||
|
||
async fn list_images(list_type: ImageListType) -> Result<Vec<ImageOutput>> { | ||
let rootfs = cap_std::fs::Dir::open_ambient_dir("/", cap_std::ambient_authority()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK as is but generally so far I've been trying to do things like this closer to cli.rs
, keeping functions in other places expecting ambient state.
Solves the second part of #846
The (hidden) image list command now has a
--type
flag to allow users to list only logical images, only host images, or all images.Also the command has been adjusted so that it can run even when not booted off of a bootc system. In that case, it will only list logical images. If a user tries to list host images without a booted system, an error will be thrown.
The command also has a
--format
flag to allow users to choose between a human-readable table format and a JSON format.