Re: How to add new object and a new region in AAI ?

Ahmad, Munir

Hi Shubhra,

Please see my responses to your questions below:

The directories you listed are all we have. All the files you see in /dockerdata-nfs path are intended to persistent data and we may not have covered everything if you have specific files or directories please create a story and you can put a patch in.

Here is the deployment file template for aai-service and it lists all the files that are currently persistent:;a=blob;f=kubernetes/aai/templates/aai-deployment.yaml;h=c2220cacdef9f2b7a376e2e235ac26d831156f3b;hb=refs/heads/release-1.1.0

Here is the path where logs are captured, please note this within the aai-service container:


Here is the audit log after I created a cloud owner:

</logs/rest$ cat audit.log |grep CloudOwerNameGoesHere
2018-01-02T14:50:59.092+0000|2018-01-02T14:50:59.113+0000|026c2483-ff28-4c0f-a7b8-708f7fa68292||||REST PUT region/CloudOwerNameGoesHere/RegionOne|AAI|COMPLETE||||INFO|||21|aai-service-3092422908-8p402||AAILogJAXRSOutInterceptor$LoggingCallback|||||||co=aairest::HTTP Response Code=201|

Audit log seems to be enabled out of the box but I will let AAI team comment on this.

Here is curl for adding a new CloudOwner you will need to replace CloudOwerNameGoesHere both in your URL and payload:

curl -X PUT \
https://<compute-node-ip-address>:30233/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/CloudOwerNameGoesHere/RegionOne \
-H 'Accept: application/json' \
-H 'Authorization: Basic QUFJOkFBSQ==' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 5e5504e5-7f3a-6ac5-1bc1-4ed866cd9e7d' \
-H 'X-FromAppId: AAI' \
-H 'X-TransactionId: get_aai_subscr' \
-d '{
"cloud-owner": "CloudOwerNameGoesHere",
"cloud-region-id": "RegionOne",
"cloud-region-version": "v1",
"cloud-type": "SharedNode",
"cloud-zone": "CloudZone",
"owner-defined-type": "OwnerType"


On 2017-12-26, 5:02 AM, "onap-discuss-bounces@... on behalf of Shubhra Garg" <onap-discuss-bounces@... on behalf of shubhra.garg@...> wrote:

Hi ONAP discuss Team,

1. AAI services sub-component missing : We have installed OOM version 1.1.0 but I can notice for AAI, the aai-services folder is missing. While other AAI sub-components like aai-resources,aai-traversal etc are present.
Not sure why the aai-services component/folder is missing.
2. AAI logs are missing : We were interested in checking the logs for AAI component, to understand the details like - after putting curl queries to AAI, how it is interacting with openstack. But, it was found that logs for AAI services in the AAI container are missing.
3. Not sure if there is any specific way to enable the AAI logs?
4. Can we add a new user ( say TEST1 ) into AAI , instead of the default value ( CloudOwner). Currently all the curl queries are making use of CloudOwner as a default user. Any AAI API or curl query to add a new user and a new region into the AAI database?

Any help would be appreciated!


root@ubuntu:/dockerdata-nfs/onap/aai# ls -lrt
total 48
drwxr-xr-x 4 501 staff 4096 Dec 1 22:15 sparky-be
drwxr-xr-x 4 501 staff 4096 Dec 1 22:15 search-data-service
drwxr-xr-x 4 501 staff 4096 Dec 1 22:15 model-loader
drwxr-xr-x 3 501 staff 4096 Dec 1 22:15 etc
drwxr-xr-x 4 501 staff 4096 Dec 1 22:15 elasticsearch
drwxr-xr-x 5 501 staff 4096 Dec 1 22:15 data-router
drwxrwxrwx 4 9001 9001 4096 Dec 1 22:15 aai-data
drwxrwxrwx 3 501 staff 4096 Dec 1 22:15 aai-config
drwxr-xr-x 3 root root 4096 Dec 21 14:54 opt
drwxr-xr-x 3 root root 4096 Dec 21 14:54 aai-traversal
drwxr-xr-x 3 root root 4096 Dec 21 14:54 aai-resources
drwxr-xr-x 2 501 staff 4096 Dec 21 15:15 haproxy

AAI curl queries :
echo "run partial vFW"
echo "curl with aai cert to cloud-region PUT"

curl -X PUT --data "@aai-cloud-region-put.json" -H "authorization: Basic TW9kZWxMb2FkZXI6TW9kZWxMb2FkZXI=" -H "X-TransactionId:jimmy-postman" -H "X-FromAppId:AAI" -H "Content-Type:application/json" -H "Accept:application/json" --cacert aaiapisimpledemoopenecomporg_20171003.crt -k

echo "get the cloud region back"
curl -X GET -H "authorization: Basic TW9kZWxMb2FkZXI6TW9kZWxMb2FkZXI=" -H "X-TransactionId:jimmy-postman" -H "X-FromAppId:AAI" -H "Content-Type:application/json" -H "Accept:application/json" --cacert aaiapisimpledemoopenecomporg_20171003.crt -k

Best Regards,

Sent: Tuesday, December 19, 2017 9:01 PM
Subject: FW: How to add new object and a new region in AAI ?

Hi Manish/Colin,

Could you please let us know - how to add a new object ( cloud-owner )and a new region in AAI ?

The CURL query and the json file required to add a new object and a new region is needed.

In our steup of openstack , we have "admin" as a user/cloud-owner, we are trying to add our openstack details into AAI.

Also, we require the CURL query to add a new region , " say " RegionFour" as mentioned in the "cloud-region-id".

our openstack details:


"cloud-owner": "admin",

"cloud-region-id": "RegionFour",

"cloud-region-version": "2",

"cloud-type": "openstack",

"cloud-zone": "nova",

"owner-defined-type": "publicURL"


Original aai-cloud-region-put.json file:

cat aai-cloud-region-put.json


"cloud-owner": "CloudOwner",

"cloud-region-id": "RegionOne",

"cloud-region-version": "v2",

"cloud-type": "SharedNode",

"cloud-zone": "CloudZone",

"owner-defined-type": "OwnerType",

"tenants": {

"tenant": [{

"tenant-id": "{TENANT_ID}",

"tenant-name": "ecomp-dev"




Best Regards,


Join { to automatically receive all group messages.