Exemple #1
0
 def allowed(self, op, body):
     """Raise exception if op is not a valid operation on entity."""
     op = op.upper()
     if not op in self.operations:
         raise NotImplementedStatus(
             "Operation '%s' not implemented for '%s' %s" %
             (op, self.name, self.operations))
Exemple #2
0
def not_implemented(operation, entity_type):
    """Raise NOT_IMPLEMENTED exception"""
    raise NotImplementedStatus("Operation '%s' not implemented on %s"  % (operation, entity_type))