X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fslices%2Fslice_add.php;h=59c0efc5c6f73af06f7b4bd6da8145110d1e639f;hb=1ce86fd37ce8da9b475847a59394c0241a8dbbff;hp=f5158b271c3201bb6abc8355c22b0ce6f81d48a7;hpb=303e6c8fff5f0ee095803b9e2100bef4106c0915;p=plewww.git diff --git a/planetlab/slices/slice_add.php b/planetlab/slices/slice_add.php index f5158b2..59c0efc 100644 --- a/planetlab/slices/slice_add.php +++ b/planetlab/slices/slice_add.php @@ -89,6 +89,19 @@ if ( $_POST['add-slice'] ) { 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 ($api->SetSliceVref($slice_id,'omf') != 'omf') { + drupal_set_error("Could not set the 'vref' tag on newly created slice..."); + } else { + drupal_set_message("Successfully set the 'vref' tag on slice"); + } + } + if ($person_ids) { // Add people $success=true; @@ -155,44 +168,43 @@ $multiple_sites=false; $site_columns=array('name','login_base','site_id'); if (plc_is_admin ()) { $multiple_sites=true; - $filter=NULL; + $filter=array('-SORT'=>'name'); } else if (count (plc_my_site_ids()) > 1) { $multiple_sites=true; - $filter=plc_my_site_ids(); + $filter=array('-SORT'=>'name','site_id'=>plc_my_site_ids()); } if ($multiple_sites) { - print "
"; + print "
"; $other_sites=$api->GetSites($filter,$site_columns); $selectors=array(); foreach ($other_sites as $other_site) { $selector=array('display'=>$other_site['name'], 'value'=>$other_site['site_id']); - if ($other_site['site_id']==$other_site_id) $selector['selected']='selected'; + if ($other_site['site_id']==$site_id) $selector['selected']='selected'; $selectors []= $selector; } - $site_form = new PleKitForm (l_slice_add(),array(),'get'); + $site_form = new PleKitForm (l_slice_add(),array(),array('method'=>'get')); $site_form->start(); print $site_form->label_html('site_id','Or choose some other site'); print $site_form->select_html('site_id',$selectors,array('autosubmit'=>true, - 'id'=>'add_slice_choose_site')); + 'id'=>'create-slice-choose-site')); $site_form->end(); print "
"; } print <<< EOF -
-

You must provide a short description of the new slice -as well as a link to a project website before creating it. -
-Do not 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. +

+

Important: Please provide a short description, as well as a +link to a project website, before creating your slice.

+

+PlanetLab's security model requires that anyone who is concerned about a slice's activity be able to immediately learn about that slice. The details that you provide are your public explanation about why the slice behaves as it does. Be sure to describe the kind of traffic that your slice generates, and how it handles material that is under copyright, if relevant. +

+The PlanetLab Operations Centres regularly respond to concerns raised by third parties about site behaviour. Most incidents are resolved rapidly based upon the publicly posted slice details. However, when these details are not sufficiently clear or accurate, and we cannot immediately reach the slice owner, we must delete the slice.

-

NOTE: -All PlanetLab users are strongly encouraged to join the PlanetLab +

NOTE: All PlanetLab users are strongly + encouraged to join the PlanetLab Users mailing list. Most questions about running software on PlanetLab can be answered by posting to this list. @@ -202,12 +214,15 @@ New software releases and available services are announced here as well.

EOF; +$toggle = new PlekitToggle ('create-slice-details','Slice Details', + array ('visible'=>get_arg('show_slice'))); $details = new PlekitDetails(TRUE); $form_variables = array('site_id'=>plc_my_site_id()); $form = $details -> form_start("/db/slices/slice_add.php",$form_variables); print $form->hidden_html("site_id",$site_id); +$toggle->start(); $details->start(); $running=count($site['slice_ids']); @@ -225,28 +240,48 @@ $selectors=array(array('display'=>"PLC",'value'=>'plc-instantiated'), array('display'=>"Controller",'value'=>'nm-controller'), array('display'=>"None",'value'=>'not-instantiated')); -$instanciation_select = $form->select_html ("instantiation", $selectors); -$details->th_td("Instanciation",$instanciation_select,"instantiation", +$instantiation_select = $form->select_html ("instantiation", $selectors); +$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)); -$details->end(); - -print <<< EOF -
-

There are three possible "instantiation" states for a slice.

+$instantiation_text = <<< EOF +
+

There are four possible "instantiation" states for a slice.

    -
  • PLC creates a slice with default settings.
  • -
  • Delegated creates a ticket to use on each node.
  • -
  • None allows you to reserve a slice name; you may instantiate the slice later.
  • +
  • PLC creates a slice with default settings.
  • +
  • Delegated creates a ticket to use on each node.
  • +
  • Controller creates a slice on all nodes to manipulate Delegated slices.
  • +
  • None allows you to reserve a slice name; you may instantiate the slice later.
+

PLC instantiated slices can be defined as OMF friendly, +in which case slivers come with the OMF Resource Controller pre-installed and pre-configured. +Such slivers can then be easily managed through a centralized tool, the OMF Experiment Controller. +Using these OMF tools, a user can describe, instrument, +and automatically execute their experiments across many slivers. +Please refer to the OMF User Guide +to learn more on how to use this feature. +

EOF; +$details->tr($instantiation_text); + +$details->end(); +$toggle->end(); + if ($persons) { $title = count($persons) . " people can be added in slice"; - $toggle=new PlekitToggle ('persons',$title, - array('visible'=>get_arg('show_persons',true))); + $toggle=new PlekitToggle ('create-slice-persons',$title, + array('visible'=>get_arg('show_persons'))); $toggle->start(); $headers = array();