Keep in mind that on the latest version asdc will not work for you since this 
was changed between the versions.

-------- Original Message --------
From: rene.rob...@orange.com
Date: Fri, Sep 1, 2017, 11:36
To: "Yang Xu (Yang, Fixed Network)" <yang....@huawei.com>, "Lando,Michael" 
<ml6...@intl.att.com>, fu.jin...@zte.com.cn
CC: onap-discuss@lists.onap.org
Subject: RE: [onap-discuss]  Re: [SDC] Access sdc api failed.

Many Thanks.

It works with that password
I had also to change my URI to 
http://sdc:8080/asdc/v1/catalog/resources<https://urldefense.proofpoint.com/v2/url?u=http-3A__sdc-3A8080_asdc_v1_catalog_resources&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=262pinxaURO6d0povxNvP5h0nZvlhWwrswSNeWRmn04&e=>
 (I imagine it is a question of SDC version used in our docker installation…)

About 'x-ecomp-instanceid’, a value is required but it is possible to put 
anything we want.


curl -X GET \
  
http://84.39.46.92:8080/asdc/v1/catalog/resources<https://urldefense.proofpoint.com/v2/url?u=http-3A__84.39.46.92-3A8080_asdc_v1_catalog_resources&d=DwQGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=3IqewTcAKh_dcnd57nEroD_0yR1fKGfJBt7FqggQ9nQ&e=>
 \
  -H 'authorization: Basic 
YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \
  -H 'cache-control: no-cache' \
  -H 'postman-token: 04df66b7-47a2-ff53-ef33-74eeb8d9870b' \
  -H 'x-ecomp-instanceid: Rene'

René

[Logo 
Orange]<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.orange.com_&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=Q2ewbxXc10x8QYgXWwwwIvhI7sbiVb1RDUOaFgLncWQ&e=>

René Robert
Network to IT transformation Architect
ORANGE/IMT/OLN/CNC/NCA/SINA

Fixe : +33 2 96 07 39 29 
<https://urldefense.proofpoint.com/v2/url?u=https-3A__monsi.sso.francetelecom.fr_index.asp-3Ftarget-3Dhttp-253A-252F-252Fclicvoice.sso.francetelecom.fr-252FClicvoiceV2-252FToolBar.do-253Faction-253Ddefault-2526rootservice-253DSIGNATURE-2526to-253D-2B33-25202-252096-252007-252039-252029&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=ID9Cf7yBGcfzRPGksRjJHuu0doIK5q5Ag4zitN8dtH8&e=>
Mobile : +33 6 74 78 68 43 
<https://urldefense.proofpoint.com/v2/url?u=https-3A__monsi.sso.francetelecom.fr_index.asp-3Ftarget-3Dhttp-253A-252F-252Fclicvoice.sso.francetelecom.fr-252FClicvoiceV2-252FToolBar.do-253Faction-253Ddefault-2526rootservice-253DSIGNATURE-2526to-253D-2B33-25206-252074-252078-252068-252043&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=18Jv2yjrd18V2uuPCNIrIv6LmGD0TEznG45e7m-fA0Q&e=>
rene.rob...@orange.com<mailto:rene.rob...@orange.com>



De : Yang Xu (Yang, Fixed Network) [mailto:yang....@huawei.com]
Envoyé : jeudi 31 août 2017 18:26
À : ROBERT René IMT/OLN; Lando,Michael; fu.jin...@zte.com.cn
Cc : onap-discuss@lists.onap.org
Objet : RE: [onap-discuss]  Re: [SDC] Access sdc api failed.

Robert,

It seems your password is wrong. Try:

windriver yang$ curl -X GET 
http://sdc:8080/sdc/v1/catalog/resources<https://urldefense.proofpoint.com/v2/url?u=http-3A__sdc-3A8080_sdc_v1_catalog_resources&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=OVFv4YaBN45qdlIxB_hxlM2FRt6qNwMW4yjjyhr-gEs&e=>
 -H "authorization: Basic 
YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" -H 
"x-ecomp-instanceid:AAI"
[{"uuid":"a7090bf8-b0f4-4925-9a68-f53000821fde","invariantUUID":"df44abc8-eb14-4f07-a6fa-3e42521a0a30","name":"ContrailPort","version":"2.0","toscaModelURL":"/sdc/v1/catalog/resources/a7090bf8-b0f4-4925-9a68-f53000821fde/toscaModel","category":"Generic","subCategory":"Network
 
Elements","resourceType":"CP","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jh0003"},{"uuid":"438bde39-77bf-48b2-9298-df934786b2e6","invariantUUID":"3606a911-ae3f-472d-a113-8508df40d739","name":"NeutronPort","version":"2.0","toscaModelURL":"/sdc/v1/catalog/resources/438bde39-77bf-48b2-9298-df934786b2e6/toscaModel","category":"Generic","subCategory":"Network….

Thanks,
-Yang

From: 
onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org> 
[mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of 
rene.rob...@orange.com<mailto:rene.rob...@orange.com>
Sent: Thursday, August 31, 2017 9:25 AM
To: Lando,Michael; fu.jin...@zte.com.cn<mailto:fu.jin...@zte.com.cn>
Cc: onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>
Subject: Re: [onap-discuss]  Re: [SDC] Access sdc api failed.

Hi Michael,

Trying to test SDC “external” API, what’s wrong with that :

curl -X GET \
  
http://{{server_ip}}:8080/sdc/v1/catalog/resources<https://urldefense.proofpoint.com/v2/url?u=http-3A__-257b-257bserver-5Fip-257d-257d-3A8080_sdc_v1_catalog_resources&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=yb5MMQX57LgTkqQTOkVNGwVA6m6wrYNycQMrofCwH_M&e=>
 \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'x-ecomp-instanceid: AAI'

It doesn’t work.

I am using existing default “aai” consumer.

I have some doubt about :
http versus https ?
port : 8080 ?
aai consumer
value for x-ecomp-instanceid



[Logo 
Orange]<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.orange.com_&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=Q2ewbxXc10x8QYgXWwwwIvhI7sbiVb1RDUOaFgLncWQ&e=>

René Robert
ORANGE/IMT/OLN/CNC/NCA/SINA

Fixe : +33 2 96 07 39 29 
<https://urldefense.proofpoint.com/v2/url?u=https-3A__monsi.sso.francetelecom.fr_index.asp-3Ftarget-3Dhttp-253A-252F-252Fclicvoice.sso.francetelecom.fr-252FClicvoiceV2-252FToolBar.do-253Faction-253Ddefault-2526rootservice-253DSIGNATURE-2526to-253D-2B33-25202-252096-252007-252039-252029&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=ID9Cf7yBGcfzRPGksRjJHuu0doIK5q5Ag4zitN8dtH8&e=>
Mobile : +33 6 74 78 68 43 
<https://urldefense.proofpoint.com/v2/url?u=https-3A__monsi.sso.francetelecom.fr_index.asp-3Ftarget-3Dhttp-253A-252F-252Fclicvoice.sso.francetelecom.fr-252FClicvoiceV2-252FToolBar.do-253Faction-253Ddefault-2526rootservice-253DSIGNATURE-2526to-253D-2B33-25206-252074-252078-252068-252043&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=18Jv2yjrd18V2uuPCNIrIv6LmGD0TEznG45e7m-fA0Q&e=>
rene.rob...@orange.com<mailto:rene.rob...@orange.com>






De : Lando,Michael [mailto:ml6...@intl.att.com]
Envoyé : mercredi 30 août 2017 21:33
À : fu.jin...@zte.com.cn<mailto:fu.jin...@zte.com.cn>; ROBERT René IMT/OLN
Cc : onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>
Objet : RE: [onap-discuss]  Re: [SDC] Access sdc api failed.

Hi,

As described before SDC has two sets of API’s:
Internal:

Internal API’s use a header called user_id to check if the user is provisioned 
in the system and if his role allows him to execute this API.
The internal API’s are provided to the SDC UI and should not be used by 
external components.

External:

This is a set of API’s provide to external component access to the SDC catalog 
this API’s are protected by basic authentication.
In order to use them you will first need to create a consumer in the system.
After one is created you will add the user and password to the request as a 
basic authentication header.
Please take a look here on how to generate the consumer and input him into the 
system: 
https://wiki.onap.org/display/DW/Consumer+creation<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Consumer-2Bcreation&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=jkc5K1xo1oM9KprYIEhuWKoGy-zTfxF9Rf5hTIrOUOg&e=>
LINK to sdc external API’s:
https://wiki.onap.org/display/DW/SDC+API<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_SDC-2BAPI&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=MT6pEAFwGcvTCsauOcg5B6n1jOklWRirv71ZbT3N-Qs&s=LvDbJTtvGdV8rWdh8ToRVW6Oxx6BUzDfZm7S9P-ASx0&e=>

Now in your case option 1 is missing the USER_ID header
And option two you did not create a consumer in the system.

Hope this helps



BR,

Michael Lando
Opensource & Frontend Team Lead, SDC
AT&T Network Application Development · NetCom
Tel Aviv | Tampa | Atlanta | New Jersey |Chicago
···········································································
Office: +972 (3) 5451487
Mobile: +972 (54) 7833603
e-mail: ml6...@intl.att.com<mailto:ml6...@intl.att.com>


From: 
onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org> 
[mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of 
fu.jin...@zte.com.cn<mailto:fu.jin...@zte.com.cn>
Sent: Wednesday, August 30, 2017 6:17 AM
To: rene.rob...@orange.com<mailto:rene.rob...@orange.com>
Cc: onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>
Subject: [onap-discuss]  Re: [SDC] Access sdc api failed.


Hi Rene,

Can you give me more details about the rest call for sdc catalog, such as 
Header info, Auth info(user&passwd),

I just use GET 
http://10.74.148.219:8080/sdc2/rest/v1/catalog/resources/fc006225-1364-43f2-a905-3ef08f211ea0,<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.74.148.219-3A8080_sdc2_rest_v1_catalog_resources_fc006225-2D1364-2D43f2-2Da905-2D3ef08f211ea0-2C&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=ANqXRjkBGS0YdyBYcfhN4WoEbiYK6tgwKHqens_ZqHE&s=mLjTbt-Zjg5qqJt_HXVXd18Q2REVfrFOyG8MMvdiFmA&e=>
 but got the following msg:

status=403,resp_body={

  "requestError": {

    "serviceException": {

      "messageId": "SVC4002",

      "text": "Error: Missing information.",

      "variables": []

    }

  }

}

Is there something need to be added to the request header?

And I have another question, I have downloaded the 
SDC_Catalog_External_API_AID_v1.1.0.docx from wikipage of sdc, In the document,

I see the rest api for get list of resoures or services which is different from 
your sample, should I use your sample or ref the api document?

6.1.2     Request (GET)

https://{serverRoot}/sdc/v1/catalog/{assetType}<https://urldefense.proofpoint.com/v2/url?u=https-3A__-257BserverRoot-257D_sdc_v1_catalog_-257BassetType-257D&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=ANqXRjkBGS0YdyBYcfhN4WoEbiYK6tgwKHqens_ZqHE&s=nEkq8y2AjWNBrWL0ix1t3NDAVLB46VZ1XL9FFuWftx4&e=>



Thanks,

Jinhua





发件人: <rene.rob...@orange.com<mailto:rene.rob...@orange.com>>;
收件人:袁虎10090474; <ml6...@intl.att.com<mailto:ml6...@intl.att.com>>;
抄送人: <onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>>;
日 期 :2017年08月29日 20:26
主 题 :Re: [onap-discuss] [SDC] Access sdc api failed.


Hi,

Try that kind of uri to get a resource by its name :

GET {{your SDC server 
IP}}/8080/sdc2/rest/v1/catalog/resources/resourceName/vEPC/resourceVersion/1.1

Or this uri to get a resource by its unique id :

GET {{your SDC server 
IP}}/8080/sdc2/rest/v1/catalog/resources/b5c6cc2c-30c8-4212-8b42-75d2875e8f9f

I do not think that exist an uri to get all resources. Trying your uri, I have 
the same response than you.

Best regards.


[Logo 
Orange]<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.orange.com_&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=ANqXRjkBGS0YdyBYcfhN4WoEbiYK6tgwKHqens_ZqHE&s=HfvDqTvPRo7ghhettJmbwESvVEHvlNFSfPXwxRtYasg&e=>

René Robert
rene.rob...@orange.com<mailto:rene.rob...@orange.com>



De : 
onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org> 
[mailto:onap-discuss-boun...@lists.onap.org] De la part de 
yuan....@zte.com.cn<mailto:yuan....@zte.com.cn>
Envoyé : mardi 29 août 2017 10:32
À : ml6...@intl.att.com<mailto:ml6...@intl.att.com>
Cc : onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>
Objet : [onap-discuss] [SDC] Access sdc api failed.


Hi Michael,



I'm trying to get the existing resources of sdc used the SDC Catalog External 
API.

But its returns some error message.

Do you know the reason for the failure? And how to resolve this problem?



Request Url (GET):

http://{sdc_ip}:8080/sdc/v1/catalog/resources<https://urldefense.proofpoint.com/v2/url?u=http-3A__-257bsdc-5Fip-257d-3A8080_sdc_v1_catalog_resources&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=FYvXSElfSmWIXOeZxWIxQysejuz9-TXmaL6uftBh8MY&m=ANqXRjkBGS0YdyBYcfhN4WoEbiYK6tgwKHqens_ZqHE&s=4yS9tqsBBgni16BS_iyZ1RpFiYQpgt2aNDxL9Vx1CDA&e=>



Login User Id:

cs0008 or gv0001



Request Body:

N/A



Response:

{

    "requestError": {

        "policyException": {

            "messageId": "POL5003",

            "text": "Error: Not authorized to use the API.",

            "variables": []

        }

    }

}



Thanks,

Yuan Hu

_________________________________________________________________________________________________________________________
  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.






_________________________________________________________________________________________________________________________



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.

_________________________________________________________________________________________________________________________

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.

_______________________________________________
onap-discuss mailing list
onap-discuss@lists.onap.org
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to