def put(self,environment_name,head_name,tail_name): session_id = get_session_id(session, request) dao = AssetAssociationDAO(session_id) assoc = dao.from_json(request) dao.update_asset_association(environment_name,head_name,tail_name,assoc) dao.close() resp_dict = {'message': 'Asset Association successfully updated'} resp = make_response(json_serialize(resp_dict), OK) resp.contenttype = 'application/json' return resp
def put(self, environment_name, head_name, tail_name): session_id = get_session_id(session, request) dao = AssetAssociationDAO(session_id) assoc = dao.from_json(request) dao.update_asset_association(environment_name, head_name, tail_name, assoc) dao.close() resp_dict = {'message': 'Asset Association successfully updated'} resp = make_response(json_serialize(resp_dict), OK) resp.contenttype = 'application/json' return resp
def put(self): session_id = get_session_id(session, request) dao = AssetAssociationDAO(session_id) assoc = dao.from_json(request) dao.update_asset_association(assoc) dao.close() resp_dict = {"message": "Asset Association successfully updated"} resp = make_response(json_serialize(resp_dict), httplib.OK) resp.contenttype = "application/json" return resp
def post(self): session_id = get_session_id(session, request) dao = AssetAssociationDAO(session_id) assoc = dao.from_json(request) dao.add_asset_association(assoc) dao.close() resp_dict = {'message': 'Asset Association successfully added'} resp = make_response(json_serialize(resp_dict), OK) resp.contenttype = 'application/json' return resp