minor and harmless cosmetic changes
[sfa.git] / sfa / rspecs / rspec_elements.py
1 from sfa.util.enumeration import Enum
2
3 # recognized top level rspec elements
4 RSpecElements = Enum(
5     AVAILABLE='AVAILABLE',
6     BWLIMIT='BWLIMIT',
7     EXECUTE='EXECUTE',
8     NETWORK='NETWORK',
9     COMPONENT_MANAGER='COMPONENT_MANAGER',
10     HARDWARE_TYPE='HARDWARE_TYPE',
11     INSTALL='INSTALL',
12     INTERFACE='INTERFACE',
13     INTERFACE_REF='INTERFACE_REF',
14     LOCATION='LOCATION',
15     LOGIN='LOGIN',
16     LINK='LINK',
17     LINK_TYPE='LINK_TYPE',
18     NODE='NODE',
19     PROPERTY='PROPERTY',
20     SERVICES='SERVICES',
21     SLIVER='SLIVER',
22     SLIVER_TYPE='SLIVER_TYPE',
23     LEASE='LEASE',
24     GRANULARITY='GRANULARITY',
25     SPECTRUM='SPECTRUM',
26     CHANNEL='CHANNEL',
27     POSITION_3D='POSITION_3D',
28 )
29
30
31 class RSpecElement:
32
33     def __init__(self, element_type, path):
34         if not element_type in RSpecElements:
35             raise InvalidRSpecElement(element_type)
36         self.type = element_type
37         self.path = path