Exemplo n.º 1
0
    def delete(self, uuid, user_id=None):
        """Delete a pdp

        :param uuid: uuid of the pdp to delete
        :param user_id: user ID who do the request
        :return: {
            "result": "True or False",
            "message": "optional message (optional)"
        }
        :internal_api: delete_pdp
        """
        data = PDPManager.delete_pdp(user_id=user_id, pdp_id=uuid)
        delete_pod(uuid)

        return {"result": True}
Exemplo n.º 2
0
Arquivo: pdp.py Projeto: Kryndex/moon
    def delete(self, uuid=None, user_id=None):
        """Delete a pdp

        :param uuid: uuid of the pdp to delete
        :param user_id: user ID who do the request
        :return: {
            "result": "True or False",
            "message": "optional message"
        }
        :internal_api: delete_pdp
        """
        try:
            data = PDPManager.delete_pdp(user_id=user_id, pdp_id=uuid)
            delete_pod(uuid)
        except Exception as e:
            logger.error(e, exc_info=True)
            return {"result": False, "error": str(e)}, 500
        return {"result": True}
Exemplo n.º 3
0
def delete_pdp(pdp_id):
    from python_moondb.core import PDPManager
    PDPManager.delete_pdp("", pdp_id)