Hi Guangrong,

It is an payload issue with in the following PUT request

PUT 
/aai/v11/network/generic-vnfs/generic-vnf/example-vnf-id-val-92494/relationship-list/relationship

You currently have the payload as following:

{
                "related-to": "vserver",
                "relationship-data": [
                                {
                                                "relationship-key": 
"cloud-region.cloud-region-id",
                                                "relationship-value": 
"example-cloud-region-id-val-56689"
                                },
                                {
                                                "relationship-key": 
"tenant.tenant-id",
                                                "relationship-value": 
"example-tenant-id-val-51834"
                                },
                                {
                                                "relationship-key": 
"vserver.vserver-id",
                                                "relationship-value": 
"example-vserver-id-val-51834"
                                }
                ]
}

You are missing the cloud-owner which is part of the key so you should have 
sent the payload as below:

{
                "related-to": "vserver",
                "relationship-data": [
                                {
                                                "relationship-key": 
"cloud-region.cloud-region-id",
                                                "relationship-value": 
"example-cloud-region-id-val-56689"
                                },
                                {
                                                "relationship-key": 
"cloud-region.cloud-owner",
                                                "relationship-value": 
"example-cloud-owner-val-45051"
                                },
                                {
                                                "relationship-key": 
"tenant.tenant-id",
                                                "relationship-value": 
"example-tenant-id-val-51834"
                                },
                                {
                                                "relationship-key": 
"vserver.vserver-id",
                                                "relationship-value": 
"example-vserver-id-val-51834"
                                }
                ]
}

In order to avoid these kind of issues in the future, there is a much simpler 
way to create the relationship with the following payload:

{
                "related-to": "vserver",
                "related-link": 
"/cloud-infrastructure/cloud-regions/cloud-region/example-cloud-owner-val-45051/example-cloud-region-id-val-56689/tenants/tenant/example-tenant-id-val-51834/vservers/vserver/example-vserver-id-val-51834"
}

In the payload to the relationship, you can choose either the related-link or 
the relationship-data.

Thanks,
Harish

From: [email protected] <[email protected]> On Behalf Of 
FORSYTH, JAMES
Sent: Tuesday, April 23, 2019 11:17 PM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [onap-discuss] [aai]Re:Failed to Create Relationship in AAI

***Security Advisory: This Message Originated Outside of AT&T ***
Reference http://cso.att.com/EmailSecurity/IDSP.html for more information.
Hi, Guangrong,

I will try your postman request; I’m not sure what could be wrong but it looks 
like a payload issue.  Can you try with v13 or v14 and tell me what the AAI 
logs say?

Thanks,
jimmy

From: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, April 23, 2019 at 9:38 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>, "FORSYTH, JAMES" 
<[email protected]<mailto:[email protected]>>
Subject: [aai]Re:Failed to Create Relationship in AAI












Guangrong Fu

Software Development Engineer

Network Management & Service Development Dept. II/Central R&D Institute/System 
Product



ZTE Corporation

No. 800, Middle Section of Tianfu Avenue, Chengdu, 610041, P. R. China

M: +86 18981880855<tel:+86%2018981880855>

E: [email protected]<mailto:[email protected]>

www.zte.com.cn<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.zte.com.cn_&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Oej6QUk5p2KdqNEWySpOHA&m=CnK0HNGq8zpfOSNB2bJp4Rq-IXBn8ZvcQkRPf1jbHfY&s=RuYuoY1MD0kLXYCCk4aTDWruCDz5mS9dYRhqXCv0hxk&e=>
原始邮件
发件人:付光荣10144542
收件人:[email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>;
抄送人:[email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>;
日 期 :2019年04月23日 08:52
主 题 :Re:Failed to Create Relationship in AAI

Hi Jimmy,



I'm re-sending this in case you didn't see my previous email.



Thanks,

Guangrong










发件人:付光荣10144542
收件人:[email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>;
抄送人:[email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>;
日 期 :2019年04月19日 14:56
主 题 :Failed to Create Relationship in AAI

Greetings Jimmy,



I'm trying to mock some data into AAI to complete the pairwising testing 
between Holmes, AAI and Policy. When I was creating vnf data and vserver data, 
everything seemed to be okay. But when I tried to create the relationship among 
those resources, an error occurred:



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<Fault>

    <requestError>

        <serviceException>

            <messageId>SVC3000</messageId>

            <text>Invalid input performing %1 on %2 (msg=%3) (ec=%4)</text>

            <variables>

                <variable>PUT_EDGE</variable>

                
<variable>network/generic-vnfs/generic-vnf/example-vnf-id-val-92494</variable>

                <variable>Invalid input performing %1 on %2:Could not parse 
relationship-list object: null</variable>

                <variable>ERR.5.2.3000</variable>

            </variables>

        </serviceException>

    </requestError>

</Fault>



Attached is the Postman config file I used for testing (I'd created Model, VNF 
and VM before I tried to create the relationship). Could you please help to 
solve the problem so that I could proceed with my work?



Thanks,

Guangrong










-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16668): https://lists.onap.org/g/onap-discuss/message/16668
Mute This Topic: https://lists.onap.org/mt/31317665/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to