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

qvm-ls --raw-data: also remove the []{}=> chars #2444

Closed
rootkovska opened this issue Nov 20, 2016 · 4 comments
Closed

qvm-ls --raw-data: also remove the []{}=> chars #2444

rootkovska opened this issue Nov 20, 2016 · 4 comments
Labels
C: core P: minor Priority: minor. The lowest priority, below "default."

Comments

@rootkovska
Copy link
Member

rootkovska commented Nov 20, 2016

Just make it easier to write bash scripts, avoid piping through additional tr -d :)

@rootkovska rootkovska added C: core enhancement P: minor Priority: minor. The lowest priority, below "default." labels Nov 20, 2016
@rootkovska rootkovska added this to the Release 3.2 updates milestone Nov 20, 2016
@jpouellet
Copy link
Contributor

jpouellet commented Nov 22, 2016

I am currently relying on this in one of my scripts, and using --raw-list where plain names are desired. I'm more than happy to change my parsing as I think it would actually simplify things anyway, but one question I even had at the time was what Qubes interfaces should be considered stable? This would be nice to have an actual documented policy on.

As for the specifics of this case, I can easily change it to check ip back != n/a instead of {}, and type = Tpl instead of [].

That leaves only =>. What do you suggest is the best way to expose that? Additional field hidden from default view?

@jpouellet
Copy link
Contributor

FWIW, core3 looks like the stable interface I actually want.

@marmarek
Copy link
Member

That leaves only =>. What do you suggest is the best way to expose that? Additional field hidden from default view?

See qubes-prefs.

FWIW, core3 looks like the stable interface I actually want.

The ugliness of the current interface (and the code behind it) is one of the reason for core3...

@rootkovska does --raw-list solve your case? Otherwise I think we may introduce new field like raw_name to not break compatibility.

@jpouellet
Copy link
Contributor

There is also <dispN>

jpouellet added a commit to jpouellet/qubes-core-admin that referenced this issue Nov 27, 2016
Useful to avoid needing to `... | tr -d '<>{}[]='` just to get clean
VM names in scripts.

Fixes QubesOS/qubes-issues#2444
marmarek pushed a commit to QubesOS/qubes-core-admin that referenced this issue Mar 14, 2017
Useful to avoid needing to `... | tr -d '<>{}[]='` just to get clean
VM names in scripts.

Fixes QubesOS/qubes-issues#2444

(cherry picked from commit 80450da)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core P: minor Priority: minor. The lowest priority, below "default."
Projects
None yet
Development

No branches or pull requests

3 participants