X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetSliceSshKeys.py;fp=PLC%2FMethods%2FGetSliceSshKeys.py;h=393d94f407618c13115471c920dcc0b2cb1e6366;hb=05cc869ac1b972416a371d02ded9f47bcaab8067;hp=e1517131e5936477e0f8e181fd023e7f56e28576;hpb=8ebeada1eebab2cd38615b8b13134189d9c42003;p=plcapi.git diff --git a/PLC/Methods/GetSliceSshKeys.py b/PLC/Methods/GetSliceSshKeys.py index e151713..393d94f 100644 --- a/PLC/Methods/GetSliceSshKeys.py +++ b/PLC/Methods/GetSliceSshKeys.py @@ -4,6 +4,7 @@ from PLC.Filter import Filter from PLC.Auth import Auth from PLC.Nodes import Node, Nodes from PLC.SliceTags import SliceTag, SliceTags +from PLC.Slices import Slice, Slices class GetSliceSshKeys(Method): """ @@ -45,6 +46,6 @@ class GetSliceSshKeys(Method): # fetch nodes nodes=Nodes(api,node_ids) # hash on node_id - nodes_hash=dict([n['node_id'],n['hostname'] for n in nodes]) + nodes_hash=dict( [ (n['node_id'],n['hostname']) for n in nodes]) # return values hashed on hostname return dict([ (nodes_hash[nodes_hash[st['node_id']]],st['value']) for st in slice_tags])