X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplc%2Fpeers.py;h=f9f80db0e8ca13c9dd2ef7fcc476986ee28f8f6b;hb=c93d4d0631f5a295d209c6cb6f40ead6e2e97913;hp=c95a61f6e0da801ec2145712bebd9e5969b0cc43;hpb=8e64ea1ed231583d3caaf5805272ee47a8f1ab78;p=sfa.git diff --git a/sfa/plc/peers.py b/sfa/plc/peers.py index c95a61f6..f9f80db0 100644 --- a/sfa/plc/peers.py +++ b/sfa/plc/peers.py @@ -1,7 +1,8 @@ -from sfa.util.misc import * +from sfa.util.xrn import get_authority +from types import StringTypes def get_peer(api, hrn): - # Becaues of myplc federation, we first need to determine if this + # Because of myplc native federation, we first need to determine if this # slice belongs to out local plc or a myplc peer. We will assume it # is a local site, unless we find out otherwise peer = None @@ -12,8 +13,7 @@ def get_peer(api, hrn): # get this site's authority (sfa root authority or sub authority) site_authority = get_authority(slice_authority).lower() # check if we are already peered with this site_authority, if so - peers = api.plshell.GetPeers(api.plauth, {}, \ - ['peer_id', 'peername', 'shortname', 'hrn_root']) + peers = api.driver.GetPeers( {}, ['peer_id', 'peername', 'shortname', 'hrn_root']) for peer_record in peers: names = [name.lower() for name in peer_record.values() if isinstance(name, StringTypes)] if site_authority in names: