if ( ! $slice_id ) { plc_error('Malformed URL - id not set'); return; }
////////////////////
-// Get all columns as we focus on only one entry
-$slices= $api->GetSlices( array($slice_id));
+// have to name columns b/c we need the non-native 'omf_control' column
+$slice_columns=array('slice_id','name','peer_id','site_id','person_ids','node_ids',
+ 'url','description','instantiation','omf_control');
+$slices= $api->GetSlices( array($slice_id), $slice_columns);
if (empty($slices)) {
drupal_set_message ("Slice " . $slice_id . " not found");
} else {
print <<< EOF
<div class='my-slice-renewal'>
-<p>You must provide a short description as well as a link to a project website before renewing it.
-Do <span class='bold'>not</span> provide bogus information; if a complaint is lodged against your slice
-and PlanetLab Operations is unable to determine what the normal behavior of your slice is,
-your slice may be deleted to resolve the complaint.</p>
+<p>You <span class='bold'>must</span> provide a short description,
+as well as a link to a project website, before renewing it.
+
+<br/> Please make sure to provide reasonable details on <span class='bold'>
+the kind of traffic</span>, and <span class='bold'>copyrights</span> if relevant.
+Do <span class='bold'>not</span> provide bogus information; if a complaint is lodged against
+your slice and your PlanetLab Operations Center is unable to determine what the normal behavior
+of your slice is, your slice may be deleted to resolve the complaint.</p>
+
<p><span class='bold'>NOTE:</span>
Slices cannot be renewed beyond another $max_renewal_weeks week(s) ($max_renewal_date).
</p>
$details->tr_submit("submit","Update Slice");
$details->th_td('Expires',$expires);
$details->th_td('Instantiation',$slice['instantiation']);
+$details->th_td("OMF-friendly", ($slice['omf_control'] ? 'Yes' : 'No') . " [to change: see 'omf_control' in the tags section below]");
$details->th_td('Site',l_site_obj($site));
// xxx show the PIs here
//$details->th_td('PIs',...);
if ($slice_id > 0) {
drupal_set_message ("Slice $slice_id created");
+ if (isset($_POST['omf-control'])) {
+ if ($api->SetSliceOmfControl($slice_id,'yes') != 'yes') {
+ drupal_set_error("Could not set the 'omf_control' tag on newly created slice...");
+ } else {
+ drupal_set_message("Successfully set the 'omf_control' tag on slice");
+ }
+ }
+
if ($person_ids) {
// Add people
$success=true;
print <<< EOF
<div class='create-slice-instantiations'>
-<p>You must provide a short description of the new slice
-as well as a link to a project website before creating it.
-<br/>
-Do <span class='bold'>not</span> provide bogus information; if a complaint
-is lodged against your slice and your PlanetLab Operations Center
-is unable to determine what the normal behavior of your slice is,
-your slice may be deleted to resolve the complaint.
-</p>
+<p>You <span class='bold'>must</span> provide a short description,
+as well as a link to a project website, before creating it.
+
+<br/> Please make sure to provide reasonable details on <span class='bold'>
+the kind of traffic</span>, and <span class='bold'>copyrights</span> if relevant.
+Do <span class='bold'>not</span> provide bogus information; if a complaint is lodged against
+your slice and your PlanetLab Operations Center is unable to determine what the normal behavior
+of your slice is, your slice may be deleted to resolve the complaint.</p>
+
<p><span class='bold'>NOTE</span>: All PlanetLab users are <span class='bold'>strongly</span>
encouraged to join the PlanetLab
<a href='https://lists.planet-lab.org/mailman/listinfo/users'>Users</a>
$details->th_td("Instantiation",$instantiation_select,"instantiation",
array('input_type'=>'select', 'value'=>$instantiation));
+// display the current settings if any (like, we've screwed up the first time)
+if (isset($_POST['omf-control'])) {
+ $omf_options=array('checked'=>'checked');
+} else {
+ $omf_options=array();
+}
+$details->th_td("OMF friendly",
+ $form->checkbox_html('omf-control','yes',$omf_options));
$instantiation_text = <<< EOF
<div class='create-slice-instantiations'>
<li><span class='bold'>Controller</span> creates a slice on all nodes to manipulate Delegated slices. </li>
<li><span class='bold'>None</span> allows you to reserve a slice name; you may instantiate the slice later.</li>
</ul>
+<p>PLC instantiated slices can be defined as <span class='bold'>OMF friendly</span>,
+in which case slivers come with the OMF <span class='bold'>Resource Controller</span> pre-installed and pre-configured.
+Such slivers can then be easily managed through a centralized tool, the OMF Experiment Controller.
+</p>
</div>
EOF;