Author: buildbot
Date: Thu Apr 11 12:50:53 2013
New Revision: 858106
Log:
Staging update by buildbot for vcl
Modified:
websites/staging/vcl/trunk/content/ (props changed)
websites/staging/vcl/trunk/content/confluence_export/adding-new-os-module.html
Propchange: websites/staging/vcl/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Apr 11 12:50:53 2013
@@ -1 +1 @@
-1461290
+1466857
Modified:
websites/staging/vcl/trunk/content/confluence_export/adding-new-os-module.html
==============================================================================
---
websites/staging/vcl/trunk/content/confluence_export/adding-new-os-module.html
(original)
+++
websites/staging/vcl/trunk/content/confluence_export/adding-new-os-module.html
Thu Apr 11 12:50:53 2013
@@ -80,51 +80,49 @@
<h1 class="title">Adding New OS Module</h1>
<p>This is a short guide on how to set up development environment for a OS
Module.</p>
-<p><a name="AddingNewOSModule-InstallVCL"></a></p>
-<h1 id="install-vcl">Install VCL</h1>
+<h1 id="installvcl">Install VCL</h1>
<ul>
-<li>...</li>
+<li>Follow the install guide linked to from the <a
href="/downloads/download.cgi">download</a>
+page.</li>
</ul>
-<p><a name="AddingNewOSModule-SettingupanewOSModule"></a></p>
-<h1 id="setting-up-a-new-os-module">Setting up a new OS Module</h1>
+<h1 id="settingupanewosmodule">Setting up a new OS Module</h1>
<ul>
-<li>
-<p>Start by creating a Module/OS/...pm file.
-<strong> See the other OS Module for examples.
-</strong> Set the package path in the file
-package VCL::Module::OS::...;</p>
-</li>
-<li>
-<p>Add an entry to the module table pointing to your new module with the
-package path mentioned above.</p>
-</li>
-<li>
-<p>Add an entry to the OS table pointing to the entry you add to the module
-table.</p>
-</li>
-<li>
-<p>Add entries to the image and imagerevision table for a base new image,
-with image.OSid pointing to the entry you add to the OS table.</p>
-</li>
-<li>
-<p>Enter the computer information for a loaded new machine into VCL and make
-sure that the management node can access this machine via SSH.</p>
+<li>Start by creating a Module/OS/...pm file.<ul>
+<li>See the other OS Module for examples.</li>
+<li>Set the package path in the file<br>
+package VCL::Module::OS::...;</li>
+</ul>
</li>
+<li>Add an entry to the module table pointing to your new module with the
+package path mentioned above.</li>
+<li>Add an entry to the OS table pointing to the entry you add to the module
+table.</li>
+<li>Add entries to the image and imagerevision table for a base new image,
+with image.OSid pointing to the entry you add to the OS table.</li>
+<li>Enter the computer information for a loaded new machine into VCL and make
+sure that the management node can access this machine via SSH.</li>
<li>
<p>Insert the code you want to test at the
beginning of the process() subroutine in new.pm, followed by a call to
exit:</p>
-<p>sub process {
-my $self = shift;</p>
-<p>my $request_data = $self->data->get_request_data();
-...
-my $imagerevision_id = $self->data->get_imagerevision_id();</p>
-<p>print "\n\n---\n\n";</p>
-<p>my $ip = $self->os->get_public_ip_address();
-print "IP: $ip\n";</p>
-<p>print "\n\n---\n\n";
-exit;
-...</p>
+<div class="codehilite"><pre><span class="k">sub </span><span
class="nf">process</span> <span class="p">{</span>
+<span class="k">my</span> <span class="nv">$self</span> <span
class="o">=</span> <span class="nb">shift</span><span class="p">;</span>
+
+<span class="k">my</span> <span class="nv">$request_data</span> <span
class="o">=</span> <span class="nv">$self</span><span
class="o">-></span><span class="n">data</span><span
class="o">-></span><span class="n">get_request_data</span><span
class="p">();</span>
+<span class="o">...</span>
+<span class="k">my</span> <span class="nv">$imagerevision_id</span> <span
class="o">=</span> <span class="nv">$self</span><span
class="o">-></span><span class="n">data</span><span
class="o">-></span><span class="n">get_imagerevision_id</span><span
class="p">();</span>
+
+<span class="k">print</span> <span
class="s">"\n\n---\n\n"</span><span class="p">;</span>
+
+<span class="k">my</span> <span class="nv">$ip</span> <span class="o">=</span>
<span class="nv">$self</span><span class="o">-></span><span
class="n">os</span><span class="o">-></span><span
class="n">get_public_ip_address</span><span class="p">();</span>
+<span class="k">print</span> <span class="s">"IP: $ip\n"</span><span
class="p">;</span>
+
+<span class="k">print</span> <span
class="s">"\n\n---\n\n"</span><span class="p">;</span>
+<span class="nb">exit</span><span class="p">;</span>
+<span class="o">...</span>
+</pre></div>
+
+
</li>
<li>
<p>To test things over and over again, run a script which inserts entries
@@ -133,10 +131,8 @@ laststate set to 'new'. vcld picks up t
everything as it would for a normal reservation, calls new.pm::process(),
test code is executed, then the process exits.</p>
</li>
-<li>
-<p>Once this is set up, it should be pretty efficient to test all of the
-subroutines in OS module.</p>
-</li>
+<li>Once this is set up, it should be pretty efficient to test all of the
+subroutines in OS module.</li>
</ul>
</div>