Hi Michael,
I have some questions.
Q1: How is the value of'authorization'generated? Can it be fixed to 'Basic
YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU='?
Q2: How do I download the Tosca CSAR package using rest API? May I access the
API of
'http://{sdc_be_ip}:8080/sdc/v1/catalog/resources/a7090bf8-b0f4-4925-9a68-f53000821fde/toscaModel'
to download the Tosca CSAR package?
Thanks,
Yuan Hu
原始邮件
发件人:
收件人: 傅锦华10108953
抄送人:
日 期 :2017年09月01日 00:26
主 题 :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 -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] On Behalf Of rene.rob...@orange.com
Sent: Thursday, August 31, 2017 9:25 AM
To: Lando,Michael fu.jin...@zte.com.cn
Cc: 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 \
-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
René Robert
ORANGE/IMT/OLN/CNC/NCA/SINA
Fixe : +33 2 96 07 39 29
Mobile : +33 6 74 78 68 43
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 ROBERT René IMT/OLN
Cc : 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
LINK to sdc external API’s:
https://wiki.onap.org/display/DW/SDC+API
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 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
From: onap-discuss-boun...@lists.onap.org
[mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of fu.jin...@zte.com.cn
Sent: Wednesday, August 30, 2017 6:17 AM
To: rene.rob...@orange.com
Cc: 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),
I just use GET
http://10.74.148.219:8080/sdc2/rest/v1/catalog/resources/fc006225-1364-43f2-a905-3ef08f211ea0,
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