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

Change output format of qvm-ls to something sane #923

Closed
marmarek opened this Issue Mar 8, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by woju on 12 Nov 2014 14:28 UTC

  1. Let's get rid of the ASCII art table anyway. It contributes nothing. Compare it to xl list, virsh list etc.
  2. Make flags field for boolean (and close to boolean) attributes, like internal, include in backups and even running.
  3. Let user choose freely from available columns (in addition to current switches like -n). Cf. ps -o. Let him/her(/it in case of software) choose even arbitrary variables aka properties. It's really easier than it sounds.
  4. Introduce simple filters like "templates", "only running", "HVM" etc. (vm.class.name == ...)

Migrated-From: https://wiki.qubes-os.org/ticket/923

@marmarek marmarek added this to the Release 3 milestone Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 12 Nov 2014 14:46 UTC
I concur :)

Shall we preserve the old format (ASCI art) for backward compatibility (and use it by default when no switches passed), in case there were some user-written scripts parsing this output? Or perhaps R2/R3 switch allows us to ignore this potential compatibility problem? Perhaps only use the old format if --old-format switch passed?

Member

marmarek commented Mar 8, 2015

Comment by joanna on 12 Nov 2014 14:46 UTC
I concur :)

Shall we preserve the old format (ASCI art) for backward compatibility (and use it by default when no switches passed), in case there were some user-written scripts parsing this output? Or perhaps R2/R3 switch allows us to ignore this potential compatibility problem? Perhaps only use the old format if --old-format switch passed?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by woju on 12 Nov 2014 15:14 UTC
I think it should stay in R2.0 untouched, but we can just remove it altogether in R3. I think nobody will ever need the table in the strict meaning of the word. Anybody who attempted to parse such format is probably better with python -c 'import qubes; ...'. Question is, what to do for R2.1?

Member

marmarek commented Mar 8, 2015

Comment by woju on 12 Nov 2014 15:14 UTC
I think it should stay in R2.0 untouched, but we can just remove it altogether in R3. I think nobody will ever need the table in the strict meaning of the word. Anybody who attempted to parse such format is probably better with python -c 'import qubes; ...'. Question is, what to do for R2.1?

@marmarek marmarek modified the milestones: Release 4.0, Release 3.0 May 13, 2015

@kalkin

This comment has been minimized.

Show comment
Hide comment
@kalkin

kalkin Oct 8, 2015

Member

Some time ago i wrote a zsh function which shows a nicer human readable output. Maybe it will inspire someone to solve it similar in python

▶ dom0            Running  Yes  Admin  n/a          black   19677MB
▶ foo             Running              *firewallvm  orange  4096MB
▶ emacs           Running              *firewallvm  orange  2048MB
▶ firewallvm      Running       Proxy  netvm        green   3000MB
◍ bar             Transient            *firewallvm  blue    4096MB
■ private         Halted               *firewallvm  green   4000MB
▶ media           Running              firewallvm   yellow  2048MB
▶ netvm           Running       Net    n/a          red     300MB
▶ news            Running              *firewallvm  green   4000MB
▶ zum             Running              *firewallvm  green   4000MB
▶ skype           Running              *firewallvm  green   1024MB
Member

kalkin commented Oct 8, 2015

Some time ago i wrote a zsh function which shows a nicer human readable output. Maybe it will inspire someone to solve it similar in python

▶ dom0            Running  Yes  Admin  n/a          black   19677MB
▶ foo             Running              *firewallvm  orange  4096MB
▶ emacs           Running              *firewallvm  orange  2048MB
▶ firewallvm      Running       Proxy  netvm        green   3000MB
◍ bar             Transient            *firewallvm  blue    4096MB
■ private         Halted               *firewallvm  green   4000MB
▶ media           Running              firewallvm   yellow  2048MB
▶ netvm           Running       Net    n/a          red     300MB
▶ news            Running              *firewallvm  green   4000MB
▶ zum             Running              *firewallvm  green   4000MB
▶ skype           Running              *firewallvm  green   1024MB
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 8, 2015

Member

@woju can you paste output from the core3 qvm-ls?

Member

marmarek commented Oct 8, 2015

@woju can you paste output from the core3 qvm-ls?

@woju

This comment has been minimized.

Show comment
Hide comment
@woju

woju Oct 12, 2015

Member
NAME                          STATUS   LABEL      TEMPLATE                     NETVM
dom0                          0rU----- -          -                            -
testvm                        a------- red        fedora-21                    -
fedora-21                     t-U----- black      -                            -

Actually we can close this, because it was fixed long ago in core3 branch.

Member

woju commented Oct 12, 2015

NAME                          STATUS   LABEL      TEMPLATE                     NETVM
dom0                          0rU----- -          -                            -
testvm                        a------- red        fedora-21                    -
fedora-21                     t-U----- black      -                            -

Actually we can close this, because it was fixed long ago in core3 branch.

@woju woju closed this Oct 12, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 12, 2015

Member

Just to make sure: besides this fancy STATUS column, is it possible to get something human-readable? With VM type ("AppVM", "TemplateVM" etc), status ("running"), ...

Member

marmarek commented Oct 12, 2015

Just to make sure: besides this fancy STATUS column, is it possible to get something human-readable? With VM type ("AppVM", "TemplateVM" etc), status ("running"), ...

@woju

This comment has been minimized.

Show comment
Hide comment
@woju

woju Oct 12, 2015

Member

On Mon, Oct 12, 2015 at 04:02:00PM -0700, Marek Marczykowski-Górecki wrote:

Just to make sure: besides this fancy STATUS column, is it possible
to get something human-readable? With VM type ("AppVM", "TemplateVM"
etc), status ("running"), ...

No, it is not at the moment. But it can be, if it is needed.

Member

woju commented Oct 12, 2015

On Mon, Oct 12, 2015 at 04:02:00PM -0700, Marek Marczykowski-Górecki wrote:

Just to make sure: besides this fancy STATUS column, is it possible
to get something human-readable? With VM type ("AppVM", "TemplateVM"
etc), status ("running"), ...

No, it is not at the moment. But it can be, if it is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment