added component manager element type
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Mon, 24 Oct 2011 20:56:58 +0000 (16:56 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Mon, 24 Oct 2011 21:06:40 +0000 (17:06 -0400)
sfa/rspecs/rspec_elements.py

index 2eb0d8c..aae4055 100644 (file)
@@ -1,10 +1,17 @@
 from sfa.util.enumeration import Enum
 
 # recognized top level rspec elements
-RSpecElements = Enum('NETWORK', 'NODE', 'SLIVER', 'INTERFACE', 'LINK', 'VLINK')
+RSpecElements = Enum(NETWORK='NETWORK', 
+                     COMPONENT_MANAGER='COMPONENT_MANAGER', 
+                     SLIVER='SLIVER', 
+                     NODE='NODE', 
+                     INTERFACE='INTERFACE', 
+                     LINK='LINK', 
+                     SERVICE='SERVICE'
+                )
 
 class RSpecElement:
-    def __init__(self, element_type, name, path):
+    def __init__(self, element_type, path):
         if not element_type in RSpecElements:
             raise InvalidRSpecElement(element_type)
         self.type = element_type