Yang:
I use GET like this:
root@onap-robot:~# curl -i -X GET
'https://10.0.1.1:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne?depth=all'
-H 'accept: application/json' -H 'authorization: Basic QUFJOkFBSQ==' -H
'cache-control: no-cache' -H 'content-type: application/json' -H
'x-fromappid: jimmy-postman' -H 'x-transactionid: 9999' -k
HTTP/1.1 200 OK
Date: Thu, 24 Jan 2019 03:11:36 GMT
vertex-id: 4224
Content-Type: application/json
X-AAI-TXID: 1-aai-resources.api.simpledemo.onap.org-190124-03:11:36:071-77577
Content-Length: 2202
Strict-Transport-Security: max-age=16000000; includeSubDomains; preload;
{"cloud-owner":"CloudOwner","cloud-region-id":"RegionOne","cloud-type":"SharedNode","owner-defined-type":"OwnerType","cloud-region-version":"v1","cloud-zone":"CloudZone","sriov-automation":false,"resource-version":"1548125975476","tenants":{"tenant":[{"tenant-id":"9849a948355747c2ae5933d195065973","tenant-name":"onap-r2","resource-version":"1548125975550","relationship-list":{"relationship":[{"related-to":"service-subscription","related-link":"/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vIMS","relationship-data":[{"relationship-key":"customer.global-customer-id","relationship-value":"Demonstration"},{"relationship-key":"service-subscription.service-type","relationship-value":"vIMS"}]},{"related-to":"service-subscription","related-link":"/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB","relationship-data":[{"relationship-key":"customer.global-customer-id","relationship-value":"Demonstration"},{"relationship-key":"service-subscription.service-type","relationship-value":"vLB"}]},{"related-to":"service-subscription","related-link":"/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL","relationship-data":[{"relationship-key":"customer.global-customer-id","relationship-value":"Demonstration"},{"relationship-key":"service-subscription.service-type","relationship-value":"vFWCL"}]},{"related-to":"service-subscription","related-link":"/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE","relationship-data":[{"relationship-key":"customer.global-customer-id","relationship-value":"Demonstration"},{"relationship-key":"service-subscription.service-type","relationship-value":"vCPE"}]}]}}]},"availability-zones":{"availability-zone":[{"availability-zone-name":"nova","hypervisor-type":"KVM","operational-status":"Active","resource-version":"1548233389761"}]},"relationship-list":{"relationship":[{"related-to":"complex","related-link":"/aai/v11/cloud-infrastructure/complexes/complex/clli1","relationship-data":[{"relationship-key":"complex.physical-location-id","relationship-value":"clli1"}]}]}}root@onap-robot:~#
I can get some data from A&AI1 and Yes the
"availability-zones":{"availability-zone":[{"availability-zone-name":"nova","hypervisor-type":"KVM","operational-status":"Active","resource-version":"1548233389761”}
exist.
SO you means that we don’t do the two curl operation and goto next step
for vcpe use case? and we need do some another operation for this ?
----------------------------------------------
Regards,
Liu Chenglong
[email protected]
> 在 2019年1月24日,11:38,Yang Xu <[email protected]> 写道:
>
> Chenglong,
>
> If the resource already exists, you would get an error like this. So check if
> the availability zone nova already exists in A&AI by sending a GET request.
>
> Thanks,
> -Yang
>
> From: Liu Chenglong [mailto:[email protected]]
> Sent: Wednesday, January 23, 2019 10:00 PM
> To: FREEMAN, BRIAN D <[email protected]>; Yang Xu (Yang, Fixed Network)
> <[email protected]>
> Cc: Liu Chenglong <[email protected]>; [email protected];
> [email protected]
> Subject: [onap-discuss] [integration] vcpe use case: Add an availability zone
> to AAI ERROR
>
> hi,Brian and Yang:
> When we Initial Configuration of ONAP to Deploy vCPE by url:
> https://wiki.onap.org/display/DW/vCPE+Use+Case+Tutorial%3A+Design+and+Deploy+based+on+ONAP#vCPEUseCaseTutorial:DesignandDeploybasedonONAP-InitialConfigurationofONAPtoDeployvCPE
>
> <https://wiki.onap.org/display/DW/vCPE+Use+Case+Tutorial%3A+Design+and+Deploy+based+on+ONAP#vCPEUseCaseTutorial:DesignandDeploybasedonONAP-InitialConfigurationofONAPtoDeployvCPE>,
>
> We occur a issue by this step : "Add an availability zone to AAI by
> executing the following”。
> When we send PUT request to AAI1, but AAI1 return a 412 error number
> and we didn’t appear the error number before。The error information is:
> "Precondition Required:resource-version not passed for update of
> /availability-zones/availability-zone/nova"
>
> root@onap-robot:~# curl -i -u 'AAI:AAI' -X PUT
> 'https://10.0.1.1:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova'
> --header 'accept:application/json' --header 'content-type:application/json'
> --header 'cache-control:no-cache
> <https://10.0.1.1:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova'%20--header%20'accept:application/json'%20--header%20'content-type:application/json'%20--header%20'cache-control:no-cache>'
> --header 'x-fromappid:jimmy-postman' --header 'X-TransactionId:9999' -d
> '{"availability-zone-name":"nova","hypervisor-type":"KVM","operational-status":"Active"}'
> -k
> HTTP/1.1 412 Precondition Failed
> Date: Thu, 24 Jan 2019 02:02:11 GMT
> Content-Type: application/json
> X-AAI-TXID: 0-aai-resources.api.simpledemo.onap.org
> <http://0-aai-resources.api.simpledemo.onap.org/>-190124-02:02:11:839-13439
> Content-Length: 378
> Strict-Transport-Security: max-age=16000000; includeSubDomains; preload;
>
> {"requestError":{"serviceException":{"messageId":"SVC3000","text":"Invalid
> input performing %1 on %2 (msg=%3)
> (ec=%4)","variables":["PUT","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova","Precondition
> Required:resource-version not passed for update of
> /availability-zones/availability-zone/nova","ERR.5.4.6130"]}}}
>
>
> How can we solve this issue and continue to deploy vcpe use case?
>
>
>
> ----------------------------------------------
> Regards,
> Liu Chenglong
> [email protected] <mailto:[email protected]>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15133): https://lists.onap.org/g/onap-discuss/message/15133
Mute This Topic: https://lists.onap.org/mt/29521825/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-