1 from sfa.util.enumeration import Enum
3 # recognized top level rspec elements
4 RSpecElements = Enum(NETWORK='NETWORK',
5 COMPONENT_MANAGER='COMPONENT_MANAGER',
7 SLIVER_TYPE='SLIVER_TYPE',
10 INTERFACE_REF='INTERFACE_REF',
12 LINK_TYPE='LINK_TYPE',
18 def __init__(self, element_type, path):
19 if not element_type in RSpecElements:
20 raise InvalidRSpecElement(element_type)
21 self.type = element_type