max aggregate manager as a class
[sfa.git] / sfa / client / sfiListSlivers.py
index 08173ec..cf76823 100755 (executable)
@@ -2,7 +2,7 @@
 
 import sys
 from sfa.client.sfi_commands import Commands
-from sfa.rspecs.rspec_parser import parse_rspec
+from sfa.rspecs.rspec import RSpec
 
 command = Commands(usage="%prog [options]",
                    description="List all slivers in the RSpec. " + 
@@ -12,11 +12,11 @@ command.add_show_attributes_option()
 command.prep()
 
 if command.opts.infile:
-    rspec = parse_rspec(command.opts.infile)
-    nodes = rspec.get_nodes_with_slivers()
+    rspec = RSpec(command.opts.infile)
+    nodes = rspec.version.get_nodes_with_slivers()
     
     if command.opts.showatt:
-        defaults = rspec.get_default_sliver_attributes()
+        defaults = rspec.version.get_default_sliver_attributes()
         if defaults:
             print "ALL NODES"
             for (name, value) in defaults:
@@ -25,7 +25,7 @@ if command.opts.infile:
     for node in nodes:
         print node
         if command.opts.showatt:
-            atts = rspec.get_sliver_attributes(node)
+            atts = rspec.version.get_sliver_attributes(node)
             for (name, value) in atts:
                 print "  %s: %s" % (name, value)