Hi Daniel,

I get an empty response with a 412 status. So not much info there about what 
would be the error.
Those are the only logs I see:

aaiadmin@aai-service-3204211426-bjlq5:/opt/app/aai/logs/rest$ tail -f *
2017-08-11T19:52:54.284+0000|2017-08-11T19:52:54.284+0000|f12c6fa7-f00f-463c-ab67-7234a2d796c2||||interceptIn|TEST|AAI||COMPLETE|0|Success||INFO||10.42.14.160|0|aai-service-3204211426-bjlq5||AAILogJAXRSInInterceptor||||||||co=aairest::Missing
 requestID. Assigned 
f12c6fa7-f00f-463c-ab67-7234a2d796c2=true:HbaseTxId=0-AutomaticallyOverwritten-20170811-19:52:54:284-71274|
2017-08-11T19:52:54.296+0000|2017-08-11T19:52:54.296+0000|f12c6fa7-f00f-463c-ab67-7234a2d796c2||||interceptOut|TEST|AAI||COMPLETE|0|Success||INFO||10.42.14.160|0|aai-service-3204211426-bjlq5||AAILogJAXRSOutInterceptor$LoggingCallback||||||||co=aairest:|

==> audit.log.2017-08-10 <==
2017-08-11T19:52:54.284+0000|2017-08-11T19:52:54.296+0000|f12c6fa7-f00f-463c-ab67-7234a2d796c2||||REST
 PATCH 
https://<AAI_IP>:<PORT>/aai/v8/business/customers/customer/Desjardins/service-subscriptions/service-subscription/SDWAN/service-instances/service-instance/8128c8ee-13f5-4f0b-9cf5-7932e32664fc|TEST|ERROR||||INFO||10.42.14.160|12|aai-service-3204211426-bjlq5||AAILogJAXRSOutInterceptor$LoggingCallback|||||||co=aairest::HTTP
 Response Code=412|

Thanks,
Rashmi

From: "ROSE, DANIEL V" <[email protected]>
Date: Friday, August 11, 2017 at 3:51 PM
To: "Pujar, Rashmi" <[email protected]>, "[email protected]" 
<[email protected]>
Subject: RE: [AAI] PATCH request in AAI

Can you post the full response from the patch? The body should have more 
details.

I believe that error means the resource versions didn’t match.



Daniel Rose
ECOMP / ONAP
com.att.ecomp
732-420-7308

From: [email protected] 
[mailto:[email protected]] On Behalf Of Pujar, Rashmi
Sent: Friday, August 11, 2017 3:43 PM
To: [email protected]
Subject: [onap-discuss] [AAI] PATCH request in AAI

Hello AAI devs!

I see that AAI supports PATCH requests [1]. I want to update the 
“service-instance-location-id” and “metadata” fields in a specific 
service-instance. However, I get a 412: Pre-requisite failed as response. Below 
is my PATCH request to AAI.
Are there any constraints on the type of attribute that are modifiable? If yes 
is there documentation or some reference in code to get to know that info.

PATCH 
/aai/v8/business/customers/customer/Desjardins/service-subscriptions/service-subscription/SDWAN/service-instances/service-instance/8128c8ee-13f5-4f0b-9cf5-7932e32664fc
 HTTP/1.1
Host: <AAI_IP>:<8443>
Authorization: Basic QUFJOkFBSQ==
X-FromAppId: TEST
Content-Type: application/merge-patch+json
Accept: application/json
Cache-Control: no-cache
Postman-Token: fa51808d-2544-87aa-cb89-1d6842671e3d

{
   "service-instance-id":"8128c8ee-13f5-4f0b-9cf5-7932e32664fc",
   "service-instance-location-id":"siteId",
   "metadata":{
      "metadatum":[
         {
            "metaname":"test1",
            "metaname":"testtest"
         },
         {
            "metaname":"test2",
            "metaname":"testtest"
         }
      ]
   }
}


Thanks,
Rashmi

[1]: 
https://wiki.onap.org/display/DW/AAI+API?preview=/1015849/1017043/AAIRESTAPI_8.pdf<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_AAI-2BAPI-3Fpreview-3D_1015849_1017043_AAIRESTAPI-5F8.pdf&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=2wwdGZ3YcpSivQ2Kio028A&m=P3tQKwJirDdc9zMbuHLPchgz6XOuJ3Arpvu-05mxDWM&s=MTQ9ffX46qFEx0wQkQwCzQY2HG5TQyTuG_Jf21iTjDI&e=>

_______________________________________________
onap-discuss mailing list
[email protected]
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to