1. 09 Apr, 2012 1 commit
  2. 27 Mar, 2012 2 commits
  3. 28 Sep, 2011 1 commit
  4. 20 Sep, 2011 1 commit
  5. 12 May, 2011 1 commit
  6. 11 May, 2011 1 commit
  7. 05 May, 2011 2 commits
  8. 22 Jul, 2010 1 commit
  9. 26 Feb, 2010 1 commit
  10. 23 Feb, 2010 1 commit
  11. 12 Jan, 2010 2 commits
  12. 07 Oct, 2009 1 commit
  13. 22 Sep, 2009 1 commit
  14. 18 Sep, 2009 1 commit
  15. 23 Jul, 2009 1 commit
  16. 11 Jun, 2009 1 commit
  17. 27 Feb, 2009 1 commit
  18. 07 Jan, 2009 1 commit
  19. 02 Jan, 2009 1 commit
  20. 10 Sep, 2008 1 commit
  21. 03 Sep, 2008 1 commit
  22. 09 Jul, 2008 1 commit
  23. 18 Jul, 2006 1 commit
    • Leigh B. Stoller's avatar
      Changes necessary for moving most of the stuff in the node_types · 624a0364
      Leigh B. Stoller authored
      table, into a new table called node_type_attributes, which is intended
      to be a more extensible way of describing nodes.
      
      The only things left in the node_types table will be type,class and the
      various isXXX boolean flags, since we use those in numerous joins all over
      the system (ie: when discriminating amongst nodes).
      
      For the most part, all of that other stuff is rarely used, or used in
      contexts where the information is needed, but not for type descrimination.
      Still, it made for a lot of queries to change!
      
      Along the way I added a NodeType library module that represents the type
      info as a perl object. I also beefed up the existing Node module, and
      started using it in more places. I also added an Interfaces module, but I
      have not done much with that yet.
      
      I have not yet removed all the slots from the node_types table; I plan to
      run the new code for a few days and then remove the slots.
      
      Example using the new NodeType object:
      
      	use NodeType;
      
      	my $typeinfo = NodeType->Lookup($type);
      
              if ($typeinfo->control_interface(\$control_iface) ||
                  !$control_iface) {
        	    warn "No control interface for $type is defined in the DB!\n";
              }
      
      or using the Node:
      
      	use Node;
      
              my $nodeobject = Node->Lookup($node_id);
              my $imageable  = $nodeobject->NodeTypeInfo()->imageable();
      or
              my $rebootable = $nodeobject->isrebootable();
      or
              $nodeobject->NodeTypeAttribute("control_interface", \$control_iface);
      
      Lots of way to accomplish the same thing, but the main point is that the
      Node is able to override the NodeType (if it wants to), which I think is
      necessary for flexibly describing one/two of a kind things like switches, etc.
      624a0364