Ejemplo n.º 1
0
    def put(self, type_name, environment_name, object_name):
        session_id = get_session_id(session, request)
        dao = ValueTypeDAO(session_id)
        upd_vt = dao.from_json(request)
        dao.update_value_type(upd_vt, type_name, environment_name, object_name)
        dao.close()

        resp_dict = {"message": "Value Type successfully updated"}
        resp = make_response(json_serialize(resp_dict), httplib.OK)
        resp.contenttype = "application/json"
        return resp
Ejemplo n.º 2
0
    def put(self, type_name, environment_name, object_name):
        session_id = get_session_id(session, request)
        dao = ValueTypeDAO(session_id)
        upd_vt = dao.from_json(request)
        dao.update_value_type(upd_vt, type_name, environment_name, object_name)
        dao.close()

        resp_dict = {'message': 'Value Type successfully updated'}
        resp = make_response(json_serialize(resp_dict), OK)
        resp.contenttype = 'application/json'
        return resp
Ejemplo n.º 3
0
    def post(self):
        session_id = get_session_id(session, request)

        dao = ValueTypeDAO(session_id)
        new_vt = dao.from_json(request)
        dao.add_value_type(new_vt)
        dao.close()

        resp_dict = {"message": "Value Type successfully added"}
        resp = make_response(json_serialize(resp_dict, session_id=session_id), httplib.OK)
        resp.contenttype = "application/json"
        return resp
Ejemplo n.º 4
0
    def post(self):
        session_id = get_session_id(session, request)

        dao = ValueTypeDAO(session_id)
        new_vt = dao.from_json(request)
        dao.add_value_type(new_vt)
        dao.close()

        resp_dict = {'message': 'Value Type successfully added'}
        resp = make_response(json_serialize(resp_dict, session_id=session_id),
                             OK)
        resp.contenttype = 'application/json'
        return resp