git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fbdeb52
)
try fixing cyclic import
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Fri, 12 Mar 2010 10:28:40 +0000
(10:28 +0000)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Fri, 12 Mar 2010 10:28:40 +0000
(10:28 +0000)
PLC/Peers.py
patch
|
blob
|
history
diff --git
a/PLC/Peers.py
b/PLC/Peers.py
index
13eaabc
..
d6eef65
100644
(file)
--- a/
PLC/Peers.py
+++ b/
PLC/Peers.py
@@
-13,7
+13,7
@@
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
from PLC.Table import Row, Table
import PLC.Auth
from PLC.Filter import Filter
from PLC.Table import Row, Table
import PLC.Auth
-from PLC.Shell import *
+
from PLC.Sites import Site, Sites
from PLC.Persons import Person, Persons
from PLC.Keys import Key, Keys
from PLC.Sites import Site, Sites
from PLC.Persons import Person, Persons
from PLC.Keys import Key, Keys
@@
-164,12
+164,11
@@
class Peer(Row):
'peer_node_id': peer_node_id},
commit = commit)
'peer_node_id': peer_node_id},
commit = commit)
- # calling UpdateNode with the node's hostname
- # will force the 'hrn' tag to be updated with the
+ # calling UpdateNode with the node's hostname
+ # will force the 'hrn' tag to be updated with the
# correct root auth
# correct root auth
- shell = Shell()
- UpdateNode = self.api.callable('UpdateNode')
- UpdateNode(shell.auth, node['node_id'], {'hostname': node['hostname']})
+ from PLC.Methods.UpdateNode import UpdateNode
+ UpdateNode.__call__(UpdateNode(self.api), auth, node['node_id'], {'hostname': node['hostname']})
def remove_node(self, node, commit = True):
"""
def remove_node(self, node, commit = True):
"""
@@
-182,9
+181,8
@@
class Peer(Row):
# calling UpdateNode with the node's hostname
# will force the 'hrn' tag to be updated with the
# correct root auth
# calling UpdateNode with the node's hostname
# will force the 'hrn' tag to be updated with the
# correct root auth
- shell = Shell()
- UpdateNode = self.api.callable('UpdateNode')
- UpdateNode(shell.auth, node['node_id'], {'hostname': node['hostname']})
+ from PLC.Methods.UpdateNode import UpdateNode
+ UpdateNode.__call__(UpdateNode(self.api), auth, node['node_id'], {'hostname': node['hostname']})
def add_slice(self, slice, peer_slice_id, commit = True):
"""
def add_slice(self, slice, peer_slice_id, commit = True):
"""