Commit 3b7a67ce authored by Kirk Webb's avatar Kirk Webb

Pass experiment description through to Planetlab as the slice description

when creating a slice.  Also mention the Planetlab AUP and importance of
providing an accurate slice description in the documentation.  The ez
interface also briefly mentions the importance of the slice description.
parent ec4db676
......@@ -105,8 +105,13 @@ NODEPREFIX = "plab"
BADSITECHARS = re.compile(r"\W+")
PLABBASEPRIO = 20000
PLAB_SVC_SLICENAME = "utah_svc_slice"
PLAB_SVC_SLICEDESC = "Emulab management service slice. Performs periodic " \
"checkins with Emulab central, and routes events for " \
"other Emulab slices. Slivers in this slice should " \
"only interact with other PlanetLab machines, and Emulab."
PLABMON_PID = "emulab-ops"
PLABMON_EID = "plab-monitor"
DEF_SLICE_DESC = "Slice created by Emulab"
PLABEXPIREWARN = 2*24*60*60 # two days advance warning.
......@@ -893,6 +898,7 @@ class Slice:
self.pid, self.eid = pid, eid
self.slicemeta = None
self.slicename = slicename
self.description = DEF_SLICE_DESC
return
def _create(self):
......@@ -903,19 +909,23 @@ class Slice:
adminbit = 0
if self.pid == PLABMON_PID and self.eid == PLABMON_EID:
self.slicename = PLAB_SVC_SLICENAME
self.slicename = PLAB_SVC_SLICENAME
self.description = PLAB_SVC_SLICEDESC
adminbit = 1
pass
if not self.slicename:
res = DBQueryFatal("select idx from experiments "
res = DBQueryFatal("select idx, expt_name from experiments "
"where pid=%s "
"and eid=%s",
(self.pid, self.eid))
if not len(res):
raise RuntimeError, "Didn't get any results while looking for idx"
eindex = res[0][0]
raise RuntimeError, \
"Didn't get any results while looking up info on " \
"experiment %s/%s" % (self.pid, self.eid)
(eindex, descr) = res[0]
self.slicename = "%s_%s" % (SLICEPREFIX, eindex)
self.description = descr
pass
print "Creating Plab slice %s." % self.slicename
......
......@@ -287,7 +287,7 @@ class mod_PLCNM:
# raise
try:
res = tryXmlrpcCmd(agent.SliceUpdate)
res = tryXmlrpcCmd(agent.SliceUpdate, slice.description)
if debug:
print "SliceUpdate result: %s" % res
pass
......
......@@ -287,8 +287,16 @@ function SPITFORM($formfields, $errors)
}
} else {
if (isset($view['plab_ns_message'])) {
echo "<p>To finish creating your slice, edit the following " .
"information if you wish, and click Submit.</p>\n";
echo "<center>
<p><b>To finish creating your slice, edit the
following information as needed, and click
Submit. PlanetLab <font size=+1 color=red>
strongly advises </font> users
to provide detail on what their slice will
be doing via it's description (i.e. what kind
of network traffic it will be producing).
</b></p>
</center>\n";
} else {
echo "<p><b>Your automatically generated NS file has been " .
"uploaded.</b> To finish creating your experiment, " .
......@@ -408,16 +416,29 @@ function SPITFORM($formfields, $errors)
#
# Description
#
echo "<tr>
<td class='pad4'>Description:<br>
<font size='-1'>(A concise sentence)</font></td>
<td class='pad4' class=left>
<input type=text
name=\"formfields[exp_description]\"
value=\"" . $formfields[exp_description] . "\"
size=60>
</td>
</tr>\n";
if (isset($view[plab_descr])) {
echo "<tr>
<td class='pad4'>Slice Description:<br>
<font size='-1'>(Please be detailed)</font></td>
<td class='pad4' class=left>
<textarea
name=\"formfields[exp_description]\"
value=\"" . $formfields[exp_description] . "\"
rows=5 cols=50></textarea>
</td>
</tr>\n";
} else {
echo "<tr>
<td class='pad4'>Description:<br>
<font size='-1'>(A concise sentence)</font></td>
<td class='pad4' class=left>
<input type=text
name=\"formfields[exp_description]\"
value=\"" . $formfields[exp_description] . "\"
size=60>
</td>
</tr>\n";
}
#
# NS file
......
......@@ -38,7 +38,7 @@ unset($view);
if (isset($view_style) && $view_style == "plab") {
$view['hide_proj'] = $view['hide_group'] = $view['hide_swap'] =
$view['hide_preload'] = $view['hide_batch'] = $view['hide_linktest'] =
$view['quiet'] = $view['plab_ns_message'] = 1;
$view['quiet'] = $view['plab_ns_message'] = $view['plab_descr'] = 1;
}
include("beginexp_form.php3");
......
......@@ -7,6 +7,15 @@
<h2>PlanetLab Interface</h2>
</center>
<h3>PlanetLab Policies</h3>
Before you start using Emulab's PlanetLab portal, be sure you have
read over the <a href="http://www.planet-lab.org/php/aup/"> PlanetLab
Acceptable Use Policy</a>. During the slice creation process, you will
be asked to provide a slice descrition. Please be detailed and accurate
regarding the type of activity you expect your slice to produce, including
the nature and frequency of the network traffic involved.
<h3>Creating a PlanetLab Slice</h3>
Simply use the 'Create a (PlanetLab) Slice' menu option. Most of the options
......
......@@ -495,15 +495,12 @@ function MAKENS($formfields) {
#
$expname = "planetlab" . $formfields['count'];
$descr = "A planetlab experiment with " . $formfields['count'] .
" nodes started by " . GETUID();
#
# Build up a URL to send the user to
#
$url = "beginexp_html.php3?view_style=plab&formfields[exp_id]=" .
urlencode($expname) . "&formfields[exp_description]=" .
urlencode($descr) . "&formfields[exp_idleswap]=0" .
urlencode($expname) . "&formfields[exp_idleswap]=0" .
"&formfields[exp_noidleswap_reason]=" .
urlencode("PlanetLab experiment");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment