X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplanetlab%2Fplaggregate.py;h=47c637bc5573dc84c2b127aaf771fb747c96ee36;hb=8753f49d0f07c3419b387d798625ad1830c0ba9a;hp=b3ae4596f74bb0e505d75ecba8bc83464f8cb571;hpb=cda6681faefef0c128af45ff325ca671e9bd369c;p=sfa.git diff --git a/sfa/planetlab/plaggregate.py b/sfa/planetlab/plaggregate.py index b3ae4596..47c637bc 100644 --- a/sfa/planetlab/plaggregate.py +++ b/sfa/planetlab/plaggregate.py @@ -238,7 +238,8 @@ class PlAggregate: rspec_node['interfaces'].append(interface) if_count+=1 - tags = [PLTag(node_tags[tag_id]) for tag_id in node['node_tag_ids']] + tags = [PLTag(node_tags[tag_id]) for tag_id in node['node_tag_ids']\ + if tag_id in node_tags] rspec_node['tags'] = tags if node['node_id'] in slivers: # add sliver info @@ -259,6 +260,9 @@ class PlAggregate: def get_leases(self, slice_xrn=None, slice=None, options={}): + if slice_xrn and not slice: + return [] + now = int(time.time()) filter={} filter.update({'clip':now})