X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplanetlab%2Fplaggregate.py;h=69ea426465e220e1b4522f04795c76501f88a0cd;hb=4a9e6751f9f396f463932133b9d62fc925a99ef6;hp=dfae5d5a5820641cc40c17559814ff415f564307;hpb=fd26148b4dca05308c3678e3cd27f56294757650;p=sfa.git diff --git a/sfa/planetlab/plaggregate.py b/sfa/planetlab/plaggregate.py index dfae5d5a..69ea4264 100644 --- a/sfa/planetlab/plaggregate.py +++ b/sfa/planetlab/plaggregate.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 from collections import defaultdict from sfa.util.xrn import Xrn, hrn_to_urn, urn_to_hrn, get_authority, get_leaf from sfa.util.sfatime import utcparse, datetime_to_string @@ -215,12 +215,12 @@ class PlAggregate: pltags_dict = self.get_pltags_by_node_id(slice) nodes_dict = self.get_slice_nodes(slice, options) slivers = [] - for node in nodes_dict.values(): + for node in list(nodes_dict.values()): node.update(slice) # slice-global tags node['slice-tags'] = pltags_dict['slice-global'] # xxx - # this is where we chould maybe add the nodegroup slice tags, + # this is where we should maybe add the nodegroup slice tags, # but it's tedious... # xxx # sliver tags @@ -281,7 +281,7 @@ class PlAggregate: ] # only doing this because protogeni rspec needs # to advertise available initscripts - rspec_node['pl_initscripts'] = pl_initscripts.values() + rspec_node['pl_initscripts'] = list(pl_initscripts.values()) # add site/interface info to nodes. # assumes that sites, interfaces and tags have already been prepared. if site['longitude'] and site['latitude']: