extensible set of exposed tags - use 'sfa' in the category
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 3 May 2011 06:23:54 +0000 (08:23 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 3 May 2011 06:23:54 +0000 (08:23 +0200)
sfa/rspecs/sfa_rspec.py

index 7663e0c..dba7821 100755 (executable)
@@ -192,7 +192,8 @@ class SfaRSpec(RSpec):
                         bwlimit = etree.SubElement(node_tag, 'bwlimit', units='kbps').tet = str(interface['bwlimit']/1000)
             if 'tags' in node:
                 for tag in node['tags']:
-                   if tag['tagname'] in ['fcdistro', 'arch']:
+                   # expose this hard wired list of tags, plus the ones that are marked 'sfa' in their category 
+                   if tag['tagname'] in ['fcdistro', 'arch'] or 'sfa' in tag['category'].split('/'):
                         tag_element = etree.SubElement(node_tag, tag['tagname'], value=tag['value'])           
 
     def add_interfaces(self, interfaces):