X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FPeers.py;h=a80d87f60862f7ed53f176b1f1e9dd636aef8833;hb=dfd614ed44d424d6677599d55dc8ccf76f274a2b;hp=684361f388c418ed3c74eca934b9ee0f26c73570;hpb=93a6ed94c2f71f4f44a4d4487c442efe9df0c435;p=plcapi.git diff --git a/PLC/Peers.py b/PLC/Peers.py index 684361f..a80d87f 100644 --- a/PLC/Peers.py +++ b/PLC/Peers.py @@ -25,7 +25,11 @@ class Peer (Row): 'peer_id' : Parameter (int, "Peer identifier"), 'peername' : Parameter (str, "Peer name"), 'peer_url' : Parameter (str, "Peer API url"), - 'person_id' : Parameter (int, "Person_id of the account storing credentials - temporary"), + ### xxx this trick is temporary, for peer authentication + 'auth_person_id' : Parameter (int, "Person_id of the account storing credentials - temporary"), + ### cross refs + 'site_ids' : Parameter ([int], "This peer's sites ids"), + 'person_ids' : Parameter ([int], "This peer's persons ids"), 'node_ids' : Parameter ([int], "This peer's nodes ids"), 'slice_ids' : Parameter ([int], "This peer's slices ids"), } @@ -39,6 +43,12 @@ class Peer (Row): raise invalid_url return url + ### for use by RefreshPeer, *not* a method of the API + def update_name (self,peername): + if self['peername'] != peername: + self['peername']=peername + self.sync() + def delete (self, commit=True): """ Delete peer