From: Tony Mack Date: Tue, 3 May 2011 20:27:25 +0000 (-0400) Subject: Merge branch 'master' of ssh://git.planet-lab.org/git/sfa X-Git-Tag: sfa-1.0-21-ckp1~5 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c815253316e79c64ae8f6bb6c4a1a20934857cfc;hp=457cfc8296aacfce33311a6e2ffb0d1e22ee9e7d;p=sfa.git Merge branch 'master' of ssh://git.planet-lab.org/git/sfa --- diff --git a/sfa/rspecs/sfa_rspec.py b/sfa/rspecs/sfa_rspec.py index 1f997eea..dba7821c 100755 --- a/sfa/rspecs/sfa_rspec.py +++ b/sfa/rspecs/sfa_rspec.py @@ -188,12 +188,14 @@ class SfaRSpec(RSpec): hostname_tag = etree.SubElement(node_tag, 'hostname').text = node['hostname'] if 'interfaces' in node: for interface in node['interfaces']: - if 'bwlimit' in interface: + if 'bwlimit' in interface and interface['bwlimit']: 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): pass