Hi Harish,
It works now, thank you very much. I have upload the schema to gerrit, please
kindly view again. https://gerrit.onap.org/r/#/c/10079/
BTW, you told me to fetch the aai_swagger_v11.html at
aai-common/aai-schema/src/main/resources/aai_swagger_html, But it seems that
the new API related the schema I added is not contained in it. Where can I get
the API document which contains the API related to the newest schema?
Thanks,
LiZi
原始邮件
发件人: <[email protected]>
收件人:李滋00164331 <[email protected]> <[email protected]> <[email protected]>
抄送人: <[email protected]>
日 期 :2017年09月02日 01:42
主 题 :RE: [aai] Still have a problem about PUT/GET the EMS list
Hi Lizi,
When I took your schema and edgerules into my repo, I started and invoked the
examples endpoint:
/aai/v11/examples/esr-ems
{
"ems-id": "example-ems-id-val-69140",
"passive": "example-passive-val-32758",
"remote-path": "example-remotepath-val-11881",
"esr-system-infos": [
{
"esr-system-info": [
{
"esr-system-info-id":
"example-esr-system-info-id-val-69363",
"system-name": "example-system-name-val-35048",
"type": "example-type-val-33962",
"vendor": "example-vendor-val-79133",
"version": "example-version-val-68622",
"url": "example-url-val-66323",
"user-name": "example-user-name-val-65628",
"password": "example-password-val-14027",
"system-type": "example-system-type-val-80540",
"protocal": "example-protocal-val-74096",
"ssl-cacert": "example-ssl-cacert-val-91843",
"ssl-insecure": true,
"ip": "example-ip-val-94411",
"port": "example-port-val-82443",
"cloud-domain": "example-cloud-domain-val-37129",
"default-tenant": "example-default-tenant-val-22459"
}
]
}
]
}
When I changed this line to
<xml-element container-type="java.util.ArrayList"
java-attribute="esrSystemInfos" name="esr-system-infos"
type="inventory.aai.onap.org.v11.EsrSystemInfo" />
to
<xml-element container-type="java.util.ArrayList"
java-attribute="esrSystemInfo" name="esr-system-info"
type="inventory.aai.onap.org.v11.EsrSystemInfo" />
{
"ems-id": "example-ems-id-val-36684",
"passive": "example-passive-val-78646",
"remote-path": "example-remotepath-val-39343",
"esr-system-info": [
{
"esr-system-info-id": "example-esr-system-info-id-val-59347",
"system-name": "example-system-name-val-4738",
"type": "example-type-val-83997",
"vendor": "example-vendor-val-81094",
"version": "example-version-val-63788",
"url": "example-url-val-23218",
"user-name": "example-user-name-val-99348",
"password": "example-password-val-24053",
"system-type": "example-system-type-val-67031",
"protocal": "example-protocal-val-82519",
"ssl-cacert": "example-ssl-cacert-val-34245",
"ssl-insecure": true,
"ip": "example-ip-val-36977",
"port": "example-port-val-38114",
"cloud-domain": "example-cloud-domain-val-72275",
"default-tenant": "example-default-tenant-val-96106"
}
]
}
This is much closer to the intended behavior and I believe you also need to
update the edge rules accordingly.
I noticed other places where it is just:
<xml-element java-attribute="esrSystemInfos" name="esr-system-infos"
type="inventory.aai.onap.org.v11.EsrSystemInfos" />
Please change this accordingly as well.
Thanks,
Harish
From: [email protected] [mailto:[email protected]]
Sent: Friday, September 01, 2017 10:30 AM
To: KAJUR, HARISH V <[email protected]> LAMONT, WILLIAM <[email protected]> NAMBI,
ARUL <[email protected]> FORSYTH, JAMES <[email protected]>
Cc: [email protected]
Subject: [aai] Still have a problem about PUT/GET the EMS list
Hi A&AI expert,
I have another problem after add a container-type="java.util.ArrayList" to
EsrSystemInfos in EsrEms. When I PUT the EMS object to the repository.
The API I used PUT
https://10.74.148.80:8443/aai/v11/external-system/esr-ems-list/esr-ems/example-ems-id-val-640qq
And the object I used as follows:
{
"ems-id": "example-ems-id-val-640qq",
"passive": "example-passive-val-58058",
"remote-path": "example-remotepath-val-280",
"esr-system-infos": [
{
"esr-system-info-id": "example-esr-system-info-id-val-555qq",
"system-name": "example-system-name-val-71969",
"type": "example-type-val-24163",
"vendor": "example-vendor-val-2328",
"version": "example-version-val-71089",
"url": "example-url-val-97389",
"user-name": "example-user-name-val-72428",
"password": "example-password-val-46821",
"system-type": "resource-addr",
"protocal": "example-protocal-val-51560",
"ip": "example-ip-val-84180",
"port": "example-port-val-13010"
},
{
"esr-system-info-id": "example-esr-system-info-id-val-555aa",
"system-name": "example-system-name-val-71960",
"type": "example-type-val-24163",
"vendor": "example-vendor-val-2328",
"version": "example-version-val-71089",
"url": "example-url-val-97389",
"user-name": "example-user-name-val-72428",
"password": "example-password-val-46821",
"system-type": "performance-addr",
"protocal": "example-protocal-val-51560",
"ip": "example-ip-val-84180",
"port": "example-port-val-13010"
},
{
"esr-system-info-id": "example-esr-system-info-id-val-555ss",
"system-name": "example-system-name-val-71961",
"type": "example-type-val-24163",
"vendor": "example-vendor-val-2328",
"version": "example-version-val-71089",
"url": "example-url-val-97389",
"user-name": "example-user-name-val-72428",
"password": "example-password-val-46821",
"system-type": "alarm-addr",
"protocal": "example-protocal-val-51560",
"ip": "example-ip-val-84180",
"port": "example-port-val-13010"
}
]
}
I got an error see bellow. The attachment is the edge file and oxm I used in my
dev envoriment. Could you please help me to check?
{
"requestError": {
"serviceException": {
"messageId": "SVC3003",
"text": "Failed to make edge to missing target node of type %3 with
keys %4 performing %1 on %2 (msg=%5) (ec=%6)",
"variables": [
"PUT",
"external-system/esr-ems-list/esr-ems/example-ems-id-val-640qq",
"null",
"null",
"Error making edge to target node:no TREE edge between esr-ems
and esr-system-infos",
"ERR.5.4.6129"
]
}
}
}
Thank you very much,
LiZi_______________________________________________
onap-discuss mailing list
[email protected]
https://lists.onap.org/mailman/listinfo/onap-discuss