#
#
# @param cred credential object specifying rights of the caller
- # @return record to register
+ # @param record to register
#
# @return GID object for the newly-registered record
- def register(self, cred, record):
- gid_str = self.server.register(cred.save_to_string(save_parents=True), record.as_dict())
+ def register(self, cred, record, caller_cred=None):
+ gid_str = self.server.register(cred.save_to_string(save_parents=True), record.as_dict(), caller_cred)
return GID(string = gid_str)
+
+ ##
+ # Register a peer object with the registry.
+ #
+ #
+ # @param cred credential object specifying rights of the caller
+ # @param record to register
+ #
+ # @return GID object for the newly-registered record
+
+ def register_peer_object(self, cred, record, caller_cred=None):
+ return self.server.register_peer_object(cred.save_to_string(save_parents=True), record, caller_cred)
+
##
# Remove an object from the registry. If the object represents a PLC object,
# then the PLC records will also be removed.
# @param type
# @param hrn
- def remove(self, cred, type, hrn):
- result = self.server.remove(cred.save_to_string(save_parents=True), type, hrn)
+ def remove(self, cred, type, hrn, caller_cred=None):
+ return self.server.remove(cred.save_to_string(save_parents=True), type, hrn, caller_cred)
+
+ ##
+ # Remove a peer object from the registry. If the object represents a PLC object,
+ # then the PLC records will also be removed.
+ #
+ # @param cred credential object specifying rights of the caller
+ # @param type
+ # @param hrn
+
+ def remove_peer_object(self, cred, record, caller_cred=None):
+ result = self.server.remove_peer_object(cred.save_to_string(save_parents=True), record, caller_cred)
return result
##
# @param cred credential object specifying rights of the caller
# @param name human readable name of object
- def resolve(self, cred, name):
- result_dict_list = self.server.resolve(cred.save_to_string(save_parents=True), name)
+ def resolve(self, cred, name, caller_cred=None):
+ result_dict_list = self.server.resolve(cred.save_to_string(save_parents=True), name, caller_cred)
result_rec_list = []
for dict in result_dict_list:
if dict['type'] in ['authority']:
# @param cred credential object specifying rights of the caller
# @param record a record object to be updated
- def update(self, cred, record):
- result = self.server.update(cred.save_to_string(save_parents=True), record.as_dict())
+ def update(self, cred, record, caller_cred=None):
+ result = self.server.update(cred.save_to_string(save_parents=True), record.as_dict(), caller_cred)
return result
return result
+ def remove_remote_object(self, cred, hrn, record):
+ result = self.server.remove_remote_object(cred.save_to_string(save_parents=True), hrn, record)
+ return result