Hi Harish, Thanks for the detailed info, now it's clearer. Ofir
From: KAJUR, HARISH V Sent: Tuesday, October 24, 2017 6:37 PM To: Sonsino, Ofir <[email protected]>; onap-discuss <[email protected]> Cc: FORSYTH, JAMES <[email protected]>; LAMONT, WILLIAM <[email protected]> Subject: RE: [aai] partial query result Hi Ofir, The reason you are missing the inventory response items is due to missing service design and model. Lets say if this was your customer: { "global-customer-id": "Demonstration", "service-subscriptions": { "service-subscription": [ { "service-instances": { "service-instance": [ { "model-invariant-id": "ef176121-f02c-4ee3-927c-22131d48446a", "model-version-id": "2d65ac65-b410-4d19-a20f-66bf0dc4a9d0", "service-instance-id": "da5fd1a4-b5ed-4dd6-99a0-63b7e8972f42-vk250x", "service-instance-name": "bLQKb" } ] }, "service-type": "vFW" } ] }, "subscriber-name": "subscriber-name-123", "subscriber-type": "INFRA" } You needed to have the service design and model created before the previous request to create the customer like this: https://{{hostname}}:{{port}}/aai/{{version}}/service-design-and-creation/models/model/ef176121-f02c-4ee3-927c-22131d48446a<https://%7b%7bhostname%7d%7d:%7b%7bport%7d%7d/aai/%7b%7bversion%7d%7d/service-design-and-creation/models/model/ef176121-f02c-4ee3-927c-22131d48446a> { "model-invariant-id": "ef176121-f02c-4ee3-927c-22131d48446a", "model-type": "fake-type", "model-vers": { "model-ver": [ { "model-version-id": "2d65ac65-b410-4d19-a20f-66bf0dc4a9d0", "model-name": "example-model-name-val-23731", "model-version": "fake-model-version" } ] } } Ensure the customer has the same model invariant id and model version id as in the service design and model. Once you do this, you should see this type of output from the named query. { "inventory-response-item": [ { "service-subscription": { "service-type": "vFW", "resource-version": "1508859107522" }, "extra-properties": {}, "inventory-response-items": { "inventory-response-item": [ { "model-name": "example-model-name-val-23731", "service-instance": { "service-instance-id": "da5fd1a4-b5ed-4dd6-99a0-63b7e8972f42-vk250x", "service-instance-name": "bLQKb", "model-invariant-id": "ef176121-f02c-4ee3-927c-22131d48446a", "model-version-id": "2d65ac65-b410-4d19-a20f-66bf0dc4a9d0", "resource-version": "1508859107590" }, "extra-properties": { "extra-property": [ { "property-name": "model-ver.model-description" }, { "property-name": "model-ver.model-version-id", "property-value": "2d65ac65-b410-4d19-a20f-66bf0dc4a9d0" }, { "property-name": "model-ver.model-name", "property-value": "example-model-name-val-23731" }, { "property-name": "model.model-type", "property-value": "fake-type" }, { "property-name": "model.model-invariant-id", "property-value": "ef176121-f02c-4ee3-927c-22131d48446a" }, { "property-name": "model.model-description" }, { "property-name": "model-ver.model-version", "property-value": "fake-model-version" } ] } } ] } } ] } Thanks, Harish From: SONSINO, OFIR Sent: Tuesday, October 24, 2017 10:51 AM To: KAJUR, HARISH V <[email protected]<mailto:[email protected]>>; onap-discuss <[email protected]<mailto:[email protected]>> Cc: FORSYTH, JAMES <[email protected]<mailto:[email protected]>>; LAMONT, WILLIAM <[email protected]<mailto:[email protected]>> Subject: RE: [aai] partial query result Hi Harish, I expect it to look more like this (so inventory-response-item holds an array of services): { "inventory-response-item":[ { "service-subscription":{ "service-type":"vMNS", "resource-version":"1507044344705" }, "extra-properties":{ }, "inventory-response-items":{ "inventory-response-item":[ { "service-instance":{ "service-instance-id":"634a6344-877b-48de-b1eb-d52536842ca6", "service-instance-name":"si_1213_test", "model-invariant-id":"b6f85c0e-2a62-49b5-8ea1-3bc36c5aab33", "resource-version":"1494001792605" }, "extra-properties":{ } }, { "model-name":"1707vidnf", "service-instance":{ "service-instance-id":"59f12e71-9093-471c-9654-1f522f02e59b", "service-instance-name":"teste4eterxc", "model-invariant-id":"709d1be4-9a3f-4a29-8c4d-a20465e808a3", "model-version-id":"240376de-870e-48df-915a-31f140eedd2c", "resource-version":"1499867751104", "orchestration-status":"Active" }, "extra-properties":{ "extra-property":[ { "property-name":"model-ver.model-description", "property-value":"1707 Models that contain: nf_type,nf_role,nf_function,nf_code." }, { "property-name":"model-ver.model-version-id", "property-value":"240376de-870e-48df-915a-31f140eedd2c" }, { "property-name":"model-ver.model-name", "property-value":"1707vidnf" }, { "property-name":"model.model-type", "property-value":"service" }, { "property-name":"model.model-invariant-id", "property-value":"709d1be4-9a3f-4a29-8c4d-a20465e808a3" }, { "property-name":"model.model-description" }, { "property-name":"model-ver.model-version", "property-value":"5.0" } ] } } ] } } ] } Any idea? Thanks, Ofir From: KAJUR, HARISH V Sent: Tuesday, October 24, 2017 5:24 PM To: Sonsino, Ofir <[email protected]<mailto:[email protected]>>; onap-discuss <[email protected]<mailto:[email protected]>> Cc: FORSYTH, JAMES <[email protected]<mailto:[email protected]>>; LAMONT, WILLIAM <[email protected]<mailto:[email protected]>> Subject: RE: [aai] partial query result Hi Ofir, Can you please send me what response are you expecting from the named query? Also, send what objects and relationships that you created to check if the problem is with your data. Thanks, Harish From: SONSINO, OFIR Sent: Monday, October 23, 2017 6:13 AM To: KAJUR, HARISH V <[email protected]<mailto:[email protected]>>; onap-discuss <[email protected]<mailto:[email protected]>> Cc: FORSYTH, JAMES <[email protected]<mailto:[email protected]>> Subject: [aai] partial query result Hi Harish, all, I query A&AI with POST to this url: https://10.12.25.72:8443/aai/search/named-query (integration lab) With the following request body: { "instance-filters":{ "instance-filter":[ { "customer":{ "global-customer-id":"Demonstration" }, "service-subscription":{ "service-type":"vFW" } } ] }, "query-parameters":{ "named-query":{ "named-query-uuid":"6e806bc2-8f9b-4534-bb68-be91267ff6c8" } } } The response is: {"inventory-response-item":[{"service-subscription":{"service-type":"vFW","resource-version":"1508744915155"},"extra-properties":{}}]} While it should have an "inventory-response-items" key under each object inside the inventory-response-item array. That key is missing, it should contain list of possible services to deploy. Any thoughts ? Thanks, Ofir Sonsino Project Technical Lead, VID AT&T Network Application Development * NetCom Tel Aviv | Tampa | Atlanta | New Jersey |Chicago *************************************************************************** Office: +972 (3) 5451417 Mobile: +972 (52) 4377782 E-mail: [email protected]<mailto:[email protected]>
_______________________________________________ onap-discuss mailing list [email protected] https://lists.onap.org/mailman/listinfo/onap-discuss
