renaming SliceAttribute into SliceTag and InterfaceSetting into InterfaceTag
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 28 Nov 2008 14:36:02 +0000 (14:36 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 28 Nov 2008 14:36:02 +0000 (14:36 +0000)
planetlab/includes/plc_sorts.php
planetlab/nodes/interfaces.php
planetlab/nodes/node_actions.php
planetlab/nodes/setting_action.php
planetlab/nodes/settings.php
planetlab/nodes/sliver_action.php
planetlab/nodes/slivers.php
planetlab/slices/attrib_action.php
planetlab/slices/attributes.php
planetlab/slices/index.php
planetlab/slices/test.php

index b135754..c29bc5f 100644 (file)
@@ -62,7 +62,7 @@ function sort_peers (&$peers) {
   return usort ($peers, "__cmp_peers");
 }
 
-function __cmp_interface_settings($a,$b) {
+function __cmp_interface_tags($a,$b) {
   $cat=strcmp($a['category'],$b['category']);
   if ($cat != 0) {
     return $cat;
@@ -71,8 +71,8 @@ function __cmp_interface_settings($a,$b) {
   }
 }
 
-function sort_interface_settings (&$interface_settings) {
-  return usort ($interface_settings,"__cmp_interface_settings");
+function sort_interface_tags (&$interface_tags) {
+  return usort ($interface_tags,"__cmp_interface_tags");
 }
 
 ?>
index f8b7f58..7bada08 100644 (file)
@@ -189,35 +189,35 @@ echo <<<EOF
 EOF;
 
 // displays related settings, if supported by the API
-if (method_exists ($api,'GetInterfaceSettings')) {
+if (method_exists ($api,'GetInterfaceTags')) {
 
   $is_admin=in_array( 10, $_roles );
   $is_pi=in_array( 20, $_roles );
   print "<hr />";
 
-  if (empty ($interface['interface_setting_ids'])) {
+  if (empty ($interface['interface_tag_ids'])) {
     print "<p> This network interface has no additional setting</p>";
     if( $is_admin || $is_pi )
       echo "<p><a href='settings.php?add=$id'>Add a Network Setting</a></p>\n";
   } else {
-    $interface_settings = $api->GetInterfaceSettings($interface['interface_setting_ids']);
-    sort_interface_settings ($interface_settings);
+    $interface_tags = $api->GetInterfaceTags($interface['interface_tag_ids']);
+    sort_interface_tags ($interface_tags);
     print "<table cellpadding='5' cellspacing='5' class='list_set'><caption class='list_set'>Additional Settings</caption>";
     print "<thead><tr class='list_set'>";
     // the column for the delete button
     if( $is_admin )
       print "<th></th>";
     print "<th class='list_set'>Name</th><th class='list_set'>Category</th><th class='list_set'>Description</th><th class='list_set'>Value</th></tr></thead><tbody>";
-    foreach ($interface_settings as $setting) {
+    foreach ($interface_tags as $setting) {
       echo "<tr class='list_set'>";
       if ($is_admin) {
        echo("<td>");
-       echo plc_delete_link_button('setting_action.php?rem_id=' . $setting['interface_setting_id'],
+       echo plc_delete_link_button('setting_action.php?rem_id=' . $setting['interface_tag_id'],
                                    '\\n [ ' . $setting['name'] . ' = ' . $setting['value']);
        echo("</td>");
     }
       if ($is_admin || $is_pi) 
-       printf ("<td class='list_set'> <a href='settings.php?id=%s'>%s </a></td>",$setting['interface_setting_id'],$setting['name']);
+       printf ("<td class='list_set'> <a href='settings.php?id=%s'>%s </a></td>",$setting['interface_tag_id'],$setting['name']);
       else
        printf ("<td class='list_set'> %s </td>",$setting['name']);
       printf ("<td class='list_set'> %s</td><td class='list_set'> %s</td><td class='list_set'> %s </td></tr>",
index 8fc8165..5d17aa0 100644 (file)
@@ -406,7 +406,7 @@ if( $has_primary ) {
 
   print ("<tr><th colspan=2><a href='interfaces.php?id=$nn_id'>Additional Settings</a></th></tr>\n");
   $nn_id = $interface_detail['interface_id'];
-  $settings=$api->GetInterfaceSettings(array("interface_id" => array($nn_id)));
+  $settings=$api->GetInterfaceTags(array("interface_id" => array($nn_id)));
   foreach ($settings as $setting) {
     $category=$setting['category'];
     $name=$setting['name'];
index 41e852d..22b5a79 100644 (file)
@@ -29,14 +29,14 @@ $_roles= $_person['role_ids'];
 
 // attribute type updates
 if( $_POST['edit_type'] ) {
-  $setting_type_id= intval( $_POST['interface_setting_type_id'] );
+  $setting_type_id= intval( $_POST['interface_tag_type_id'] );
   $setting_type = array ('category' => $_POST['category'],
                         'name' => $_POST['name'],
                         'min_role_id' => intval( $_POST['min_role_id'] ),
                         'description' => $_POST['description']);
   
   // Update it!
-  $api->UpdateInterfaceSettingType( $setting_type_id, $setting_type );
+  $api->UpdateTagType( $setting_type_id, $setting_type );
   $api_error=$api->error();
   if (!empty($api_error)) {
     print "<div class='plc-error'>" . $api_error . "</div>";
@@ -53,7 +53,7 @@ if( $_POST['add_type'] ) {
                         'min_role_id' => intval( $_POST['min_role_id'] ),
                         'description' => $_POST['description']);
   // add it!!
-  $api->AddInterfaceSettingType( $setting_type );
+  $api->AddTagType( $setting_type );
 
   header( "location: settings.php" );
   exit();
@@ -66,11 +66,11 @@ if( $_GET['rem_id'] ) {
   $setting_id= intval( $_GET['rem_id'] );
 
   // get interface_id 
-  $setting= $api->GetInterfaceSettings( array( $setting_id ), array( "interface_id" ) );
+  $setting= $api->GetInterfaceTags( array( $setting_id ), array( "interface_id" ) );
   $interface_id= $setting[0]['interface_id'];
   
   // delete the attribute
-  $api->DeleteInterfaceSetting( $setting_id );
+  $api->DeleteInterfaceTag( $setting_id );
 
   header( "location: interfaces.php?id=$interface_id" );
   exit();
@@ -80,11 +80,11 @@ if( $_GET['rem_id'] ) {
 if( $_POST['add_setting'] ) {
   // get the interface_id, attribute_type_id, and value from POST
   $interface_id= intval( $_POST['interface_id'] );
-  $interface_setting_type_id= intval( $_POST['interface_setting_type_id'] );
+  $interface_tag_type_id= intval( $_POST['interface_tag_type_id'] );
   $value= $_POST['value'];
 
   // add it!
-  $api->AddInterfaceSetting( $interface_id, $interface_setting_type_id, $value );
+  $api->AddInterfaceTag( $interface_id, $interface_tag_type_id, $value );
 
   header( "location: interfaces.php?id=$interface_id" );
   exit();
@@ -98,13 +98,13 @@ if( $_POST['edit_setting'] ) {
   $interface_id= $_POST['interface_id'];
 
   // update it!
-  $api->UpdateInterfaceSetting($setting_id, $value );
+  $api->UpdateInterfaceTag($setting_id, $value );
 
   header( "location: interfaces.php?id=$interface_id" );
   exit();
 }
 
-// down here is some codqe from attrib_action.php that was not converted yet
+// down here is some code from attrib_action.php that was not converted yet
 // Settings -------------------------------------------------
 
 // ATTRIBUTE TYPES ---------------------------------------------------
@@ -115,7 +115,7 @@ if( $_GET['del_type'] ) {
   $type_id= intval( $_GET['del_type'] );
 
   // delete it!
-  $api->DeleteInterfaceSettingType( $type_id );
+  $api->DeleteTagType( $type_id );
   
   header( "location: settings.php" );
   exit();
index 386658e..a9c9d53 100644 (file)
@@ -24,7 +24,7 @@ $_roles= $_person['role_ids'];
 
 //plc_debug("person", $_person );
 
-$columns=array( "interface_setting_type_id", "category", "name", "description", "min_role_id" );
+$columns=array( "interface_tag_type_id", "category", "name", "description", "min_role_id" );
 
 // prepare dict role_id => role_name
 global $roles;
@@ -45,7 +45,7 @@ foreach ($_person['role_ids'] as $role_id) {
 }
 //plc_debug("person_role",$person_role);
 
-// post-process results from GetInterfaceSettingTypes
+// post-process results from GetTagTypes
 // with planetlab 4.2, we've moved to php-5.2
 // with the former 5.0 reelase, I could invoke array_map 
 // with a function that took a reference and could do side-effects
@@ -65,9 +65,9 @@ if( !$_GET['id'] && !$_GET['add'] && !$_GET['add_type'] && !$_GET['edit_type'] )
   // get types
   global $person_role;
   $filter = array (']min_role_id'=>$person_role);
-  $setting_types= $api->GetInterfaceSettingTypes( $filter, $columns );
+  $setting_types= $api->GetTagTypes( $filter, $columns );
   $setting_types = array_map(layout_setting_type,$setting_types);
-  sort_interface_settings ($setting_types);
+  sort_interface_tags ($setting_types);
   
   // list them
   
@@ -90,13 +90,13 @@ if( !$_GET['id'] && !$_GET['add'] && !$_GET['add_type'] && !$_GET['edit_type'] )
     // if admin display delete links
     if(  in_array( "10", $_person['role_ids'] ) ) {
       echo "<td>";
-      echo plc_delete_link_button('setting_action.php?del_type='. $type['interface_setting_type_id'],
+      echo plc_delete_link_button('setting_action.php?del_type='. $type['interface_tag_type_id'],
                                  $type['name']);
       echo "</td>";
     }
     // if admin, the name is a link to edition
     if (in_array( "10", $_person['role_ids'])) {
-      echo "<td><a href='settings.php?edit_type=". $type['interface_setting_type_id'] . "'>" . $type['name'] . "</a></td>";
+      echo "<td><a href='settings.php?edit_type=". $type['interface_tag_type_id'] . "'>" . $type['name'] . "</a></td>";
     } else {
       echo "<td>" . $type['name'] . "</td>";
     }
@@ -119,7 +119,7 @@ elseif( $_GET['add_type'] || $_GET['edit_type'] ) {
   // if its edit get the attribute info
   if( $_GET['edit_type'] ) {
     $type_id= intval( $_GET['edit_type'] );
-    $type= $api->GetInterfaceSettingTypes( array( $type_id ) );
+    $type= $api->GetTagTypes( array( $type_id ) );
     
     $category=$type[0]['category'];
     $name= $type[0]['name'];
@@ -151,7 +151,7 @@ elseif( $_GET['add_type'] || $_GET['edit_type'] ) {
   echo "</td></tr>\n";
   echo "<tr><td colspan=2 align=center>";
   if( $_GET['edit_type'] ) {
-    echo "<input type=hidden name='interface_setting_type_id' value='$type_id'>\n";
+    echo "<input type=hidden name='interface_tag_type_id' value='$type_id'>\n";
     echo "<input type=submit name='edit_type' value='Edit Setting Type'>\n";
   } else {
     echo "<input type=submit name='add_type' value='Add Interface Type'>\n";
@@ -171,11 +171,11 @@ elseif( $_GET['add'] ) {
   // get all setting types 
   global $person_role;
   $filter = array (']min_role_id'=>$person_role);
-  $setting_types= $api->GetInterfaceSettingTypes( $filter, array( "interface_setting_type_id", "name" , "category") );
-  sort_interface_settings($setting_types);
+  $setting_types= $api->GetTagTypes( $filter, array( "interface_tag_type_id", "name" , "category") );
+  sort_interface_tags($setting_types);
     
   // get interface's settings
-  $interface = $api->GetInterfaces( array( $interface_id ), array( "interface_setting_ids","ip" ) );
+  $interface = $api->GetInterfaces( array( $interface_id ), array( "interface_tag_ids","ip" ) );
   
   drupal_set_title("Add a setting to  ". $interface[0]['ip']);
 
@@ -185,10 +185,10 @@ elseif( $_GET['add'] ) {
   
   echo "<table cellpadding='2'> <caption> New Setting </caption>";
 
-  echo "<tr><th>Select</th><td><select name='interface_setting_type_id'><option value=''>Choose a type to add</option>\n";
+  echo "<tr><th>Select</th><td><select name='interface_tag_type_id'><option value=''>Choose a type to add</option>\n";
   
   foreach( $setting_types as $setting_type ) {
-    echo "<option value='". $setting_type['interface_setting_type_id'] ."'>". $setting_type['category'] . ":" . $setting_type['name'] ."</option>\n";
+    echo "<option value='". $setting_type['interface_tag_type_id'] ."'>". $setting_type['category'] . ":" . $setting_type['name'] ."</option>\n";
   
   }
   echo "</select></td</tr>\n";
@@ -204,7 +204,7 @@ else {
   $setting_id= intval( $_GET['id'] );
   
   // get setting info
-  $setting= $api->GetInterfaceSettings( array( $setting_id ));
+  $setting= $api->GetInterfaceTags( array( $setting_id ));
   
   // interface info
   $interface= $api->GetInterfaces( array( $setting[0]['interface_id'] ), array( "ip" ) );
@@ -213,7 +213,7 @@ else {
 
   // start form and put values in to be edited.
   echo "<form action='setting_action.php' method='post'>\n";
-  echo "<input type=hidden name='setting_id' value='". $setting[0]['interface_setting_id'] ."'>\n";
+  echo "<input type=hidden name='setting_id' value='". $setting[0]['interface_tag_id'] ."'>\n";
   echo "<input type=hidden name='interface_id' value='". $setting[0]['interface_id'] ."'>\n";
   
   echo "<table cellpadding='2'> <caption> Edit Setting </caption>";
index 0817d3c..262530d 100644 (file)
@@ -29,7 +29,7 @@ if( !empty( $_POST['add_sub'] ) ) {
   $node_id= $_POST['node_id'];
   $slice_id= $_POST['slice_id'];
 
-  $api->AddSliceAttribute( intval( $slice_id ), intval( $attrib_type ), $value, intval( $node_id ) );
+  $api->AddSliceTag( intval( $slice_id ), intval( $attrib_type ), $value, intval( $node_id ) );
 
   header( "location: slivers.php?slice=$slice_id&node=$node_id" );
   exit();
@@ -42,9 +42,9 @@ if( $_GET['rem_id'] ) {
   $attrib_id= $_GET['rem_id'];
   
   // get the slivers for this node
-  $sliver_info= $api->GetSliceAttributes( array( "slice_attribute_id"=>intval( $attrib_id ) ), array( "slice_id", "node_id" ) );
+  $sliver_info= $api->GetSliceTags( array( "slice_tag_id"=>intval( $attrib_id ) ), array( "slice_id", "node_id" ) );
   
-  $api->DeleteSliceAttribute( intval( $attrib_id ) );
+  $api->DeleteSliceTag( intval( $attrib_id ) );
 
   header( "location: slivers.php?slice=". $sliver_info[0]['slice_id'] ."&node=". $sliver_info[0]['node_id'] );
   exit();
index cca34a7..035a307 100644 (file)
@@ -35,10 +35,10 @@ if( $_GET['add'] ) {
   $node_info= $api->GetNodes( array( intval( $node_id ) ), array( "hostname" ) );
 
   // get attribute types
-  $type_info= $api->GetSliceAttributeTypes( NULL, array( "attribute_type_id", "name" ) );
+  $type_info= $api->GetSliceTagTypes( NULL, array( "attribute_type_id", "name" ) );
   
   // get the slivers for this node
-  $sliver_info= $api->GetSliceAttributes( array( "node_id"=>intval( $node_id ), "slice_id"=>intval( $slice_id ) ), array( "attribute_type_id", "name" ) );
+  $sliver_info= $api->GetSliceTags( array( "node_id"=>intval( $node_id ), "slice_id"=>intval( $slice_id ) ), array( "attribute_type_id", "name" ) );
 
     $types_left= $type_info;
 
@@ -77,10 +77,10 @@ if( $_GET['slice'] && $_GET['node'] ) {
   $node_info= $api->GetNodes( array( intval( $node_id ) ), array( "hostname" ) );
 
   // get the slivers for this node
-  $sliver_info= $api->GetSliceAttributes( array( "node_id"=>intval( $node_id ), "slice_id"=>intval( $slice_id ) ), array( "slice_attribute_id", "name", "value", "min_role_id", "description" ) );
+  $sliver_info= $api->GetSliceTags( array( "node_id"=>intval( $node_id ), "slice_id"=>intval( $slice_id ) ), array( "slice_tag_id", "name", "value", "min_role_id", "description" ) );
 
   // get the attrbibutes for this slice
-  $attrib_info= $api->GetSliceAttributes( array( intval( $slice_id ) ), array( "slice_attribute_id", "name", "value", "min_role_id", "description" ) );
+  $attrib_info= $api->GetSliceTags( array( intval( $slice_id ) ), array( "slice_tag_id", "name", "value", "min_role_id", "description" ) );
 
 
   // start form
@@ -97,7 +97,7 @@ if( $_GET['slice'] && $_GET['node'] ) {
 
     foreach( $sliver_info AS $sliver ) {
       echo "<tr><td>". $sliver['name'] ."</td><td>". $sliver['value'] ."</td><td>". $sliver['min_role_id'] ."</td><td>". $sliver['description'] ."</td>";
-      if ( in_array( 10, $_roles ) || ( in_array( 20, $_roles ) && in_array( $node_info, $_person['site_ids'] ) ) ) echo "<td><a href='/db/slices/attributes.php?id=". $sliver['slice_attribute_id'] ."'>Edit</a></td><td><a href='sliver_action.php?rem_id=". $sliver['slice_attribute_id'] ."' onclick=\"javascript:return confirm('Are you sure you want to remove ". $sliver['name'] ." from node ". $node_info[0]['hostname'] ."?')\">Remove</a></td>";
+      if ( in_array( 10, $_roles ) || ( in_array( 20, $_roles ) && in_array( $node_info, $_person['site_ids'] ) ) ) echo "<td><a href='/db/slices/attributes.php?id=". $sliver['slice_tag_id'] ."'>Edit</a></td><td><a href='sliver_action.php?rem_id=". $sliver['slice_tag_id'] ."' onclick=\"javascript:return confirm('Are you sure you want to remove ". $sliver['name'] ." from node ". $node_info[0]['hostname'] ."?')\">Remove</a></td>";
       echo "</tr>\n";
 
 
@@ -122,7 +122,7 @@ if( $_GET['slice'] && $_GET['node'] ) {
 
     foreach( $attrib_info AS $attrib ) {
       echo "<tr><td>". $attrib['name'] ."</td><td>". $attrib['value'] ."</td><td>". $attrib['min_role_id'] ."</td><td>". $attrib['description'] ."</td>";
-      if ( in_array( 10, $_roles ) || ( in_array( 20, $_roles ) && in_array( $node_info, $_person['site_ids'] ) ) ) echo "<td><a href='attributes.php?id=". $attrib['slice_attribute_id'] ."'>Edit</a></td>";
+      if ( in_array( 10, $_roles ) || ( in_array( 20, $_roles ) && in_array( $node_info, $_person['site_ids'] ) ) ) echo "<td><a href='attributes.php?id=". $attrib['slice_tag_id'] ."'>Edit</a></td>";
       echo "</tr>\n";
 
 
index 789695a..230bb53 100644 (file)
@@ -31,11 +31,11 @@ if( $_GET['rem_id'] ) {
   $attribute_id= intval( $_GET['rem_id'] );
 
   // get slice_id 
-  $attrib_info= $api->GetSliceAttributes( array( $attribute_id ), array( "slice_id" ) );
+  $attrib_info= $api->GetSliceTags( array( $attribute_id ), array( "slice_id" ) );
   $slice_id= $attrib_info[0]['slice_id'];
   
   // delete the attribute
-  $api->DeleteSliceAttribute( $attribute_id );
+  $api->DeleteSliceTag( $attribute_id );
 
 
   header( "location: index.php?id=$slice_id" );
@@ -51,7 +51,7 @@ if( $_POST['edit_attribute'] ) {
   $slice_id= $_POST['slice_id'];
 
   // update it!
-  $api->UpdateSliceAttribute( $attribute_id, $value );
+  $api->UpdateSliceTag( $attribute_id, $value );
 
   header( "location: index.php?id=$slice_id" );
   exit();
@@ -66,7 +66,7 @@ if( $_POST['add_attribute'] ) {
   $value= $_POST['value'];
 
   // add it!
-  $api->AddSliceAttribute( $slice_id, $attribute_type_id, $value );
+  $api->AddSliceTag( $slice_id, $attribute_type_id, $value );
 
   header( "location: index.php?id=$slice_id" );
   exit();
@@ -85,7 +85,7 @@ if( $_POST['add_type'] ) {
   $attribute_type_fields= array( "min_role_id" => $min_role_id, "name" => $name, "description" => $description );
   
   // add it!!
-  $api->AddSliceAttributeType( $attribute_type_fields );
+  $api->AddSliceTagType( $attribute_type_fields );
 
   header( "location: attributes.php" );
   exit();
@@ -104,7 +104,7 @@ if( $_POST['edit_type'] ) {
   $attribute_type_fields= array( "min_role_id" => $min_role_id, "name" => $name, "description" => $description );
 
   // Update it!
-  $api->UpdateSliceAttributeType( $attribute_type_id, $attribute_type_fields );
+  $api->UpdateSliceTagType( $attribute_type_id, $attribute_type_fields );
   
   header( "location: attributes.php" );
   exit();
@@ -117,7 +117,7 @@ if( $_GET['del_type'] ) {
   $type_id= intval( $_GET['del_type'] );
 
   // delete it!
-  $api->DeleteSliceAttributeType( $type_id );
+  $api->DeleteSliceTagType( $type_id );
   
   header( "location: attributes.php" );
   exit();
index f7479e1..b134a87 100644 (file)
@@ -25,7 +25,7 @@ $_roles= $_person['role_ids'];
 // if no id, display list of attributes types
 if( !$_GET['id'] && !$_GET['add'] && !$_GET['add_type'] && !$_GET['edit_type'] ) {
   // get types
-  $attrib_types= $api->GetSliceAttributeTypes( NULL, array( "attribute_type_id", "name", "description", "min_role_id" ) );
+  $attrib_types= $api->GetSliceTagTypes( NULL, array( "attribute_type_id", "name", "description", "min_role_id" ) );
   
   // get role names for the min role_ids
   foreach( $attrib_types as $attrib_type ) {
@@ -71,7 +71,7 @@ elseif( $_GET['add_type'] || $_GET['edit_type'] ) {
   // if its edit get the attribute info
   if( $_GET['edit_type'] ) {
     $type_id= intval( $_GET['edit_type'] );
-    $type_info= $api->GetSliceAttributeTypes( array( $type_id ) );
+    $type_info= $api->GetSliceTagTypes( array( $type_id ) );
     
     $name= $type_info[0]['name'];
     $min_role_id= $type_info[0]['min_role_id'];
@@ -107,15 +107,15 @@ elseif( $_GET['add'] ) {
   $slice_id= intval( $_GET['add'] );
   
   // get all attribute types 
-  $attrib_types= $api->GetSliceAttributeTypes( NULL, array( "attribute_type_id", "name" ) );
+  $attrib_types= $api->GetSliceTagTypes( NULL, array( "attribute_type_id", "name" ) );
   
   foreach( $attrib_types as $attrib_type ) {
     $all_attribs[$attrib_type['attribute_type_id']]= $attrib_type['name'];
   }
   
   // get slice's attribute types
-  $slice_info= $api->GetSlices( array( $slice_id ), array( "slice_attribute_ids" ) );
-  $attrib_info= $api->GetSliceAttributes( $slice_info[0]['slice_attribute_ids'], array( "attribute_type_id", "name" ) );
+  $slice_info= $api->GetSlices( array( $slice_id ), array( "slice_tag_ids" ) );
+  $attrib_info= $api->GetSliceTags( $slice_info[0]['slice_tag_ids'], array( "attribute_type_id", "name" ) );
   
   foreach( $attrib_info as $info ) {
     $slice_attrib_types[$info['attribute_type_id']]= $info['name'];
@@ -147,10 +147,10 @@ else {
   $attribute_id= intval( $_GET['id'] );
   
   // get attribute info
-  $slice_attib= $api->GetSliceAttributes( array( $attribute_id ), array( "slice_id", "slice_attribute_id", "attribute_type_id", "value", "description", "min_role_id" ) );
+  $slice_attib= $api->GetSliceTags( array( $attribute_id ), array( "slice_id", "slice_tag_id", "attribute_type_id", "value", "description", "min_role_id" ) );
   
   // get type info 
-  $attrib_type= $api->GetSliceAttributeTypes( array( $slice_attib[0]['attribute_type_id'] ), array( "attribute_type_id", "name", "description" ) );
+  $attrib_type= $api->GetSliceTagTypes( array( $slice_attib[0]['attribute_type_id'] ), array( "attribute_type_id", "name", "description" ) );
   
   // slice info
   $slice_info= $api->GetSlices( array( $slice_attib[0]['slice_id'] ), array( "name" ) );
index 5ffa1ed..1df026a 100644 (file)
@@ -224,7 +224,7 @@ else {
 
   $person_ids= $slice_info[0]['person_ids'];
   $node_ids= $slice_info[0]['node_ids'];
-  $slice_attribute_ids= $slice_info[0]['slice_attribute_ids'];
+  $slice_tag_ids= $slice_info[0]['slice_tag_ids'];
 
 
   // node info
@@ -253,17 +253,17 @@ else {
   }
 
   // slice attribute info
-  if( !empty( $slice_attribute_ids ) )
-    $slice_attibs= $api->GetSliceAttributes( $slice_attribute_ids, 
-                                            array( "slice_attribute_id", "attribute_type_id", "value", "description", "min_role_id", "node_id" ) );
+  if( !empty( $slice_tag_ids ) )
+    $slice_attibs= $api->GetSliceTags( $slice_tag_ids, 
+                                            array( "slice_tag_id", "attribute_type_id", "value", "description", "min_role_id", "node_id" ) );
 
   // gets attrib type info and combines it to form all attrib info array
   if( $slice_attibs ) {
     foreach( $slice_attibs as $slice_attib ) {
-      $attrib_type= $api->GetSliceAttributeTypes( array( $slice_attib['attribute_type_id'] ), 
+      $attrib_type= $api->GetSliceTagTypes( array( $slice_attib['attribute_type_id'] ), 
                                                  array( "attribute_type_id", "name", "description" ) );
       
-      $attributes[]= array( "slice_attribute_id" => $slice_attib['slice_attribute_id'], 
+      $attributes[]= array( "slice_tag_id" => $slice_attib['slice_tag_id'], 
                            "attribute_type_id" => $slice_attib['attribute_type_id'], 
                            "name" => $attrib_type[0]['name'], 
                            "value" => $slice_attib['value'], 
@@ -408,13 +408,13 @@ else {
         if( $is_admin ) {
          printf("<td>");
          sprintf($label,"\\n [ %s = %s] \\n from %s",$attribute['name'],$attribute['value'],$name);
-         echo plc_delete_link_button ('attrib_action.php?rem_id=' . $attribute['slice_attribute_id'],
+         echo plc_delete_link_button ('attrib_action.php?rem_id=' . $attribute['slice_tag_id'],
                                       $label);
          echo "</td>";
        }
        if( $is_admin || ($is_pi && $is_in_slice) ) {
           printf ("<td><a href='attributes.php?id=%s'>%s</a></td>",
-                 $attribute['slice_attribute_id'],$attribute['name']);
+                 $attribute['slice_tag_id'],$attribute['name']);
        } else {
          printf("<td>%s</td>",$attribute['name']);
        }
@@ -451,12 +451,12 @@ else {
          echo("<td>");
          $label=sprintf("\\n [ %s = %s ] \\n from %s \\n on node %s",
                         $attribute['name'],$attribute['value'],$name,$nodename);
-         echo plc_delete_link_label('/db/nodes/sliver_action.php?rem_id=' . $attribute['slice_attribute_id'], 
+         echo plc_delete_link_label('/db/nodes/sliver_action.php?rem_id=' . $attribute['slice_tag_id'], 
                                     $label);
          echo "</td>";
        }
         if( $is_admin ) {
-          printf("<td><a href='attributes.php?id=%s'>%s</a></td>",$attribute['slice_attribute_id'],$attribute['name']);
+          printf("<td><a href='attributes.php?id=%s'>%s</a></td>",$attribute['slice_tag_id'],$attribute['name']);
        } else {
          printf("<td>%s</td>",$attribute['name']);
        }
index e293eb7..bb9c115 100644 (file)
   //Database error 52cfdd40-b57e-43cb-ace0-406d49408527:
   //unindexable object
   //Query:
-  //SELECT creator_person_id, instantiation, slice_attribute_ids, name, slice_id, created, url, max_nodes, person_ids, expires, site_id, peer_slice_id, node_ids, peer_id, description FROM view_slices WHERE is_deleted IS False AND expires > 1175085968 AND (True AND name LIKE 'o%' AND  ( NOT expires = 0 ) )
+  //SELECT creator_person_id, instantiation, slice_tag_ids, name, slice_id, created, url, max_nodes, person_ids, expires, site_id, peer_slice_id, node_ids, peer_id, description FROM view_slices WHERE is_deleted IS False AND expires > 1175085968 AND (True AND name LIKE 'o%' AND  ( NOT expires = 0 ) )
   //Params:
   //{'api': <PLC.API.PLCAPI instance at 0xb7b466ac>,
   // 'columns': None,
   // 'expires': 1175085968,
   // 'self': [],
   // 'slice_filter': {'creator_person_id': (<type 'int'>, [<type 'int'>]), 'instantiation': (<type 'str'>, [<type 'str'>]), 'name': (<type 'str'>, [<type 'str'>]), 'slice_id': (<type 'int'>, [<type 'int'>]), 'created': (<type 'int'>, [<type 'int'>]), 'url': (<type 'str'>, [<type 'str'>]), 'max_nodes': (<type 'int'>, [<type 'int'>]), 'expires': (<type 'int'>, [<type 'int'>]), 'site_id': (<type 'int'>, [<type 'int'>]), 'peer_slice_id': (<type 'int'>, [<type 'int'>]), 'peer_id': (<type 'int'>, [<type 'int'>]), 'description': (<type 'str'>, [<type 'str'>])},
-  // 'sql': "SELECT creator_person_id, instantiation, slice_attribute_ids, name, slice_id, created, url, max_nodes, person_ids, expires, site_id, peer_slice_id, node_ids, peer_id, description FROM view_slices WHERE is_deleted IS False AND expires > 1175085968 AND (True AND name LIKE 'o%' AND  ( NOT expires = 0 ) )"}
+  // 'sql': "SELECT creator_person_id, instantiation, slice_tag_ids, name, slice_id, created, url, max_nodes, person_ids, expires, site_id, peer_slice_id, node_ids, peer_id, description FROM view_slices WHERE is_deleted IS False AND expires > 1175085968 AND (True AND name LIKE 'o%' AND  ( NOT expires = 0 ) )"}
   //Traceback (most recent call last):
   //  File "/usr/bin/plcsh", line 139, in ?
   //    result = eval(command)