Add RAID viewer.
[libguestfs-talks.git] / 2012-dublin / 0300-modify.html
1 <meta charset="utf-8"/>
2 <link rel="stylesheet" href="style.css" type="text/css"/>
3 <script src="code.js" type="text/javascript"></script>
4
5 <div>
6 <h1>Using libguestfs from Python</h1>
7
8 <p id="steps">
9 Create handle &mdash;
10 Inspect &mdash;
11 <b>Modify</b> &mdash;
12 Shutdown</p>
13
14 <pre class="code">
15 if type == "linux" and distro == "fedora":
16     <b>g.mkdir_p</b> ("/etc/profile.d")
17     <b>g.write</b> ("/etc/profile.d/proxy.sh",
18              "http_proxy=http://cache:3128/")
19 else
20     # etc
21 </pre>
22
23 </div>