X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Frspecs%2Fsfa_rspec.py;h=2c8a0c93a196530f4460be2fc6d8ab6c27ef483c;hb=refs%2Fheads%2Frspec_extension;hp=830c8535adf59d7a609d9c4ee99ce91b4a577507;hpb=0ae6f1e2beecf53d48b7d5e049b4f54e7953a675;p=sfa.git diff --git a/sfa/rspecs/sfa_rspec.py b/sfa/rspecs/sfa_rspec.py index 830c8535..2c8a0c93 100755 --- a/sfa/rspecs/sfa_rspec.py +++ b/sfa/rspecs/sfa_rspec.py @@ -202,8 +202,17 @@ class SfaRSpec(RSpec): bwlimit = etree.SubElement(node_tag, 'bw_limit', units='kbps').text = 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 tag['tagname'] in ['fcdistro', 'arch'] or 'sfa' in tag['category'].split('/'): + #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']) + + #panos expose tags only if requested by the user using the -i option + if self.user_options: + #print "[sfa rspec] found tag ",tag," and have info ",self.user_options.get('info') + if self.user_options.get('info') and tag['tagname'] in self.user_options.get('info'): + tag_element = etree.SubElement(node_tag, tag['tagname'], value=tag['value']) + + if 'sfa' in tag['category'].split('/'): tag_element = etree.SubElement(node_tag, tag['tagname'], value=tag['value']) if 'site' in node: