from datetime import datetime, timedelta
from sfa.util.xrn import *
from sfa.util.plxrn import hostname_to_urn
-from sfa.util.enumeration import Enum
+from sfa.rspecs.rspec_elements import RSpecElement, RSpecElements
from sfa.util.faults import SfaNotImplemented, InvalidRSpec, InvalidRSpecElement
xpath = '[' + xpath + ']'
return xpath
-# recognized top level rspec elements
-RSpecElements = Enum('NETWORK', 'NODE', 'SLIVER', 'INTERFACE', 'LINK', 'VLINK')
-
-class RSpecElement:
- def __init__(self, element_type, name, path):
- if not element_type in RSpecElements:
- raise InvalidRSpecElement(element_type)
- self.type = element_type
- self.name = name
- self.path = path
-
class RSpec:
header = '<?xml version="1.0"?>\n'
template = """<RSpec></RSpec>"""