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

prettify rocks report host vm config #9

Open
lclementi opened this issue Sep 5, 2014 · 1 comment
Open

prettify rocks report host vm config #9

lclementi opened this issue Sep 5, 2014 · 1 comment
Assignees

Comments

@lclementi
Copy link
Contributor

Rocks report host vm config returns a very ugly xml.
Verify if you can prettify it with the following code before print it out:


import xml.dom.minidom

print xml.dom.minidom.parseString("zzz").toprettyxml()

@lclementi lclementi self-assigned this Sep 5, 2014
@tcooper
Copy link
Contributor

tcooper commented Sep 5, 2014

I tried that... whitespace hell as described in [1]. Solution is not as good as..

# rocks report host vm config compute-0-0-0 | xmllint --format -
<?xml version="1.0"?>
<domain type="kvm">
  <name>compute-0-0-0</name>
  <os>
    <type>hvm</type>
    <boot dev="network"/>
    <boot dev="hd"/>
    <bootmenu enable="yes"/>
  </os>
  <memory>16777216</memory>
  <vcpu>16</vcpu>
  <cpu mode="host-passthrough"/>
...

I'll try to come up with something better.

[1] - http://stackoverflow.com/a/14493981

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

No branches or pull requests

2 participants