-
Sub-task
-
Resolution: Done
-
Medium
-
None
-
None
-
LOG Sprint 7
Reproduction: Clean deployment - do a cloud-region put - the same one that is at the start of vFW testing (before creating a customer) - you should not see a null pointer in the log anymore of AAI resources when tailing the log
see
from postman:code
PUT /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Openstack/RegionOne HTTP/1.1
Host: 34.232.186.178:30233
Accept: application/json
Content-Type: application/json
X-FromAppId: AAI
X-TransactionId: get_aai_subscr
Authorization: Basic QUFJOkFBSQ==
Cache-Control: no-cache
Postman-Token: d5de805a-3053-9fa3-55ba-256a60182458
{
"cloud-owner": "Openstack",
"cloud-region-id": "RegionOne",
"cloud-region-version": "v1",
"cloud-type": "SharedNode",
"cloud-zone": "CloudZone",
"owner-defined-type": "OwnerType",
"tenants": {
"tenant": [{
"tenant-id": "1035021",
"tenant-name": "ecomp-dev"
}]
}
}
Fyi,
The following works out of the box on the 20171004:0800 tag of ONAP deployed to OOM – AAI is working if you have a prepopulated region – or you previously do a PUT request
PUT on
https://aai_ip:aai_port/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/IAD/RegionOne
GET on
https://aai_ip:aai_port/aai/v11/cloud-infrastructure/cloud-regions/
{ "cloud-region": [
{
"cloud-owner": "IAD",
"cloud-region-id": "RegionOne",
"cloud-type": "SharedNode",
"owner-defined-type": "OwnerType",
"cloud-region-version": "v1",
"cloud-zone": "CloudZone",
"sriov-automation": false,
"resource-version": "1507147808029"
} ]}
The NPE looks like a separate bug where the requestId String passed into the static log function is not null checked
org.onap.aai.logging.LoggingContext:117
If(requestId.contains(“:”)
Should be
If(null != requestId && requestId.contains(“:”)
Since the IAE catch block will not generate a UUID for a null requestId
I’ll put in a JIRA to AAI – this is log related
java.lang.NullPointerException: null
at org.onap.aai.logging.LoggingContext.requestId(LoggingContext.java:119)
Thank you
/michael