예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
    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
예제 #4
0
    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
예제 #5
0
  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