when omf friendly is selected:
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 2 Feb 2011 15:35:27 +0000 (16:35 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 2 Feb 2011 15:35:27 +0000 (16:35 +0100)
vref cannot safely be set automagically by the API, so set both tags here

planetlab/slices/slice_add.php

index d932212..f258bda 100644 (file)
@@ -95,6 +95,11 @@ if ( $_POST['add-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) {