+
+####################
+# shorthands to check various types of objects for localness (are we authoritative)
+def PLCCheckLocalNode (node,method_name):
+ if node['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,node['hostname'],node['peer_id'])
+
+def PLCCheckLocalPerson (person,method_name):
+ if person['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,person['email'],person['peer_id'])
+
+def PLCCheckLocalSite (site,method_name):
+ if site['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,site['name'],site['peer_id'])
+
+def PLCCheckLocalSlice (slice,method_name):
+ if slice['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,slice['name'],slice['peer_id'])
+
+def PLCCheckLocalKey (key,method_name):
+ if key['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,key['key_id'],key['peer_id'])
+
+def PLCCheckLocalSliceAttributeType (sliceAttributeType,method_name):
+ if sliceAttributeType['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,sliceAttributeType['name'],sliceAttributeType['peer_id'])
+
+def PLCCheckLocalSliceAttribute (sliceAttribute,method_name):
+ if sliceAttribute['peer_id'] is not None:
+ raise PLCLocalObjectRequired(method_name,sliceAttribute['name'],sliceAttribute['peer_id'])
+
+