svn keywords
[plcapi.git] / PLC / Peers.py
index 2d464bb..80265bf 100644 (file)
@@ -1,4 +1,5 @@
 # $Id$
+# $URL$
 #
 # Thierry Parmentelat - INRIA
 # 
@@ -37,6 +38,7 @@ class Peer(Row):
        'key': Parameter(str, "Peer GPG public key"),
        'cacert': Parameter(str, "Peer SSL public certificate"),
         'shortname' : Parameter(str, "Peer short name"),
+        'hrn_root' : Parameter(str, "Root of this peer in a hierarchical naming space"),
         ### cross refs
         'site_ids': Parameter([int], "List of sites for which this peer is authoritative"),
         'person_ids': Parameter([int], "List of users for which this peer is authoritative"),
@@ -64,7 +66,9 @@ class Peer(Row):
         (scheme, netloc, path, params, query, fragment) = urlparse(url)
         if scheme != "https":
             raise PLCInvalidArgument, "Peer URL scheme must be https"
-
+        if path[-1] != '/':
+            raise PLCInvalidArgument, "Peer URL should end with /"
+        
        return url
 
     def delete(self, commit = True):