Hello When you create a service or when you "certify" a service, you can get the service unique_id in the response.
Later, the only request I know to find VF or Service "unique_id" is the following curl -X GET \ 'http://sdc.api.fe.simpledemo.onap.org:30206/sdc1/feProxy/rest/v1/screen?excludeTypes=VFCMT&excludeTypes=Configuration' \ -H 'accept: application/json' \ -H 'authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'user_id: cs0008' \ -H 'x-ecomp-instanceid: ONAP-Test' \ -H 'x-fromappid: ONAP-Test' \ -H 'x-transactionid: ONAP-Test' Having that unique_Id you can then request a distribution : curl -X POST \ http://sdc.api.fe.simpledemo.onap.org:30206/sdc1/feProxy/rest/v1/catalog/services/c750fac6-6c23-4b47-aafc-9a32d24a8cc3/distribution/PROD/activate \ -H 'accept: application/json' \ -H 'authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'user_id: op0001' \ -H 'x-ecomp-instanceid: ONAP-Test' \ -H 'x-fromappid: ONAP-Test' \ -H 'x-transactionid: ONAP-Test' Best regards [Logo Orange]<http://www.orange.com/> René Robert «Open and Smart solutions for autOmating Network Services» ORANGE/IMT/OLN/CNC/NARA/OSONS Fixe : +33 2 96 07 39 29 <https://monsi.sso.francetelecom.fr/index.asp?target=http%3A%2F%2Fclicvoice.sso.francetelecom.fr%2FClicvoiceV2%2FToolBar.do%3Faction%3Ddefault%26rootservice%3DSIGNATURE%26to%3D+33%202%2096%2007%2039%2029> Mobile : +33 6 74 78 68 43 <https://monsi.sso.francetelecom.fr/index.asp?target=http%3A%2F%2Fclicvoice.sso.francetelecom.fr%2FClicvoiceV2%2FToolBar.do%3Faction%3Ddefault%26rootservice%3DSIGNATURE%26to%3D+33%206%2074%2078%2068%2043> [email protected]<mailto:[email protected]> De : [email protected] [mailto:[email protected]] De la part de Lianhao Lu Envoyé : vendredi 28 septembre 2018 12:40 À : [email protected]; [email protected]; '[email protected]' Objet : Re: [onap-discuss] [SDC] Questions about the ways to trigger SDC distribute the NS csar Hi SDC team, Thanks for the info. But now I got another problem and hopefully somebody can give me some clues. Thanks very much! I first used the sdc-sim to create a service, then I used restful API to query the service, "GET /sdc/v1/catalog/services" replied with the service UUID db7840a9-6bea-4a9b-8427-fc61a1ce3fe5 Then I tried to use resful api " POST /sdc/v1/catalog/services/db7840a9-6bea-4a9b-8427-fc61a1ce3fe5 distribution/{opEnvId}/activate" to distribute it, however I got a 500 error. I noticed I can use sdc-sim to distribute the service successfully though web GUI, whenI track the http request of sdc-sim, I found that it issued a different restful api with a different service UUID to activate the service: POST sdc2/rest/v1/catalog/services/dd25daf3-a60c-4d12-ba79-c309472dbeb0/distribution/AUTO/activate So my question here is: Where does the serviceUUID dd25daf3 comes from? Here I only created a service with UUID db7840a9 . I noticed that in the response body of the POST, it contains the following things: ... uniqueId": "dd25daf3-a60c-4d12-ba79-c309472dbeb0", "uuid": "db7840a9-6bea-4a9b-8427-fc61a1ce3fe5", .... How can I get that uniqueId if I only knows the service uuid? Best Regards, -Lianhao From: [email protected] [mailto:[email protected]] On Behalf Of Brian Sent: Wednesday, September 26, 2018 9:06 PM To: [email protected]; Lu, Lianhao <[email protected]>; '[email protected]' <[email protected]> Subject: Re: [onap-discuss] [SDC] Questions about the ways to trigger SDC distribute the NS csar Look in the robot code for the sdc_interface.robot. There is an example of how to initiate a distribution sincne robot does it through the SDC API. Brian From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Lianhao Lu Sent: Wednesday, September 26, 2018 1:20 AM To: [email protected]<mailto:[email protected]>; Lu, Lianhao <[email protected]<mailto:[email protected]>>; '[email protected]' <[email protected]<mailto:[email protected]>> Subject: Re: [onap-discuss] [SDC] Questions about the ways to trigger SDC distribute the NS csar I found this RESTful API: POST https://{serverRoot}/sdc/v1/catalog/services/{serviceUUID}/distribution/{opEnvId}/activate<https://urldefense.proofpoint.com/v2/url?u=https-3A__-257bserverRoot-257d_sdc_v1_catalog_services_-257bserviceUUID-257d_distribution_-257bopEnvId-257d_activate&d=DwMFAg&c=LFYZ-o9_HUMeMTSQicvjIg&r=e3d1ehx3DI5AoMgDmi2Fzw&m=V1DIwt6NqtAk9T9x554oAy2aFvtKPOyzj8PxlE5D_JA&s=xQj5jOBXxZaem_sTy_P-fg8iLrq2LT2ZbURjInfNsu4&e=> Is that the correct one to activate the service distribution? Can anyone please tell me what is {opEnvId}? I went through the SDC catalog API reference, and this is the only place need operational environment ID. What kind of value should we put here in this RESTful API call? -Lianhao From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Lianhao Lu Sent: Wednesday, September 26, 2018 10:19 AM To: [email protected]<mailto:[email protected]>; '[email protected]' <[email protected]<mailto:[email protected]>> Subject: [onap-discuss] [SDC] Questions about the ways to trigger SDC distribute the NS csar Hi SDC team, Currently we're trying to do some stability test of policy which is a SDC distribution client user. So I'm wondering besides clicking on the button in SDC GUI, is there other way to trigger SDC to distribute the NS csar to all SDC distribution client users, e.g. is there a SDC RESTful API we can use? Best Regards, -Lianhao _________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12846): https://lists.onap.org/g/onap-discuss/message/12846 Mute This Topic: https://lists.onap.org/mt/26226896/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
