git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b07c1ba
)
fix typo
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Tue, 17 May 2011 16:40:21 +0000
(12:40 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Tue, 17 May 2011 16:40:21 +0000
(12:40 -0400)
sfa/rspecs/sfa_rspec.py
patch
|
blob
|
history
diff --git
a/sfa/rspecs/sfa_rspec.py
b/sfa/rspecs/sfa_rspec.py
index
ae83328
..
8cf1c8b
100755
(executable)
--- a/
sfa/rspecs/sfa_rspec.py
+++ b/
sfa/rspecs/sfa_rspec.py
@@
-4,15
+4,21
@@
from StringIO import StringIO
from sfa.rspecs.rspec import RSpec
from sfa.util.xrn import *
from sfa.util.plxrn import hostname_to_urn
from sfa.rspecs.rspec import RSpec
from sfa.util.xrn import *
from sfa.util.plxrn import hostname_to_urn
-from sfa.util.config import Config
+from sfa.util.config import Config
+from sfa.rspecs.rspec_version import RSpecVersion
+_version = { 'type': 'SFA',
+ 'version': '1'
+}
+
+sfa_rspec_version = RSpecVersion(_sfa_rspec_version)
+
class SfaRSpec(RSpec):
xml = None
header = '<?xml version="1.0"?>\n'
class SfaRSpec(RSpec):
xml = None
header = '<?xml version="1.0"?>\n'
- namespaces = {}
- format = 'sfa'
- type = 'sfa'
+ version = sfa_rspec_version
+
###################
# Parser
###################
###################
# Parser
###################
@@
-193,7
+199,7
@@
class SfaRSpec(RSpec):
if 'interfaces' in node:
for interface in node['interfaces']:
if 'bwlimit' in interface and interface['bwlimit']:
if 'interfaces' in node:
for interface in node['interfaces']:
if 'bwlimit' in interface and interface['bwlimit']:
- bwlimit = etree.SubElement(node_tag, 'bw_limit', units='kbps').tet = str(interface['bwlimit']/1000)
+ bwlimit = etree.SubElement(node_tag, 'bw_limit', units='kbps').te
x
t = str(interface['bwlimit']/1000)
if 'tags' in node:
for tag in node['tags']:
# expose this hard wired list of tags, plus the ones that are marked 'sfa' in their category
if 'tags' in node:
for tag in node['tags']:
# expose this hard wired list of tags, plus the ones that are marked 'sfa' in their category