+ def add_site(self, site, peer_site_id, commit = True):
+ """
+ Associate a local site entry with this peer.
+ """
+
+ add = Row.add_object(Site, 'peer_site')
+ add(self, site,
+ {'peer_id': self['peer_id'],
+ 'site_id': site['site_id'],
+ 'peer_site_id': peer_site_id},
+ commit = commit)
+
+ def add_person(self, person, peer_person_id, commit = True):
+ """
+ Associate a local user entry with this peer.
+ """
+
+ add = Row.add_object(Person, 'peer_person')
+ add(self, person,
+ {'peer_id': self['peer_id'],
+ 'person_id': person['person_id'],
+ 'peer_person_id': peer_person_id},
+ commit = commit)
+
+ def add_key(self, key, peer_key_id, commit = True):
+ """
+ Associate a local key entry with this peer.
+ """
+
+ add = Row.add_object(Key, 'peer_key')
+ add(self, key,
+ {'peer_id': self['peer_id'],
+ 'key_id': key['key_id'],
+ 'peer_key_id': peer_key_id},
+ commit = commit)
+
+ def add_node(self, node, peer_node_id, commit = True):
+ """
+ Associate a local node entry with this peer.
+ """
+
+ add = Row.add_object(Node, 'peer_node')
+ add(self, node,
+ {'peer_id': self['peer_id'],
+ 'node_id': node['node_id'],
+ 'peer_node_id': peer_node_id},
+ commit = commit)
+
+ def add_slice(self, slice, peer_slice_id, commit = True):
+ """
+ Associate a local slice entry with this peer.
+ """
+
+ add = Row.add_object(Slice, 'peer_slice')
+ add(self, slice,
+ {'peer_id': self['peer_id'],
+ 'slice_id': slice['slice_id'],
+ 'peer_slice_id': peer_slice_id},
+ commit = commit)
+