Hi, I see this is already implemented in https://gerrit.onap.org/r/54793https://gerrit.onap.org/r/54793
Thanks A. Seaudi ________________________________ From: SEAUDI Abdelmuhaimen OBS/CSO Sent: Wednesday, June 27, 2018 2:10 PM To: FORSYTH, JAMES; [email protected] Subject: RE: [onap-discuss] robot initdemo issue - hardcoded region in add_complex_body.template Hi James, My region is “fr1”, and I get error 404 from AAI when trying the default template, I corrected this manually in order to run the robot script. root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# python -m robot.run -L TRACE -d /share/logs/demo/InitDemo -V /tmp/tt.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py -P ./robot/library:./robot/library/eteutils:./robot/library/heatbridge -i InitDemo /var/opt/OpenECOMP_ETE ============================================================================== OpenECOMP ETE ============================================================================== OpenECOMP ETE.Robot ============================================================================== OpenECOMP ETE.Robot.Testsuites ============================================================================== OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestration Test ... ============================================================================== Initialize Customer And Models | FAIL | '404' does not match '^(201|200)$' ------------------------------------------------------------------------------ OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestrat... | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed ============================================================================== OpenECOMP ETE.Robot.Testsuites | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed ============================================================================== OpenECOMP ETE.Robot | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed ============================================================================== OpenECOMP ETE | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed ============================================================================== Output: /share/logs/demo/InitDemo/output.xml Log: /share/logs/demo/InitDemo/log.html Report: /share/logs/demo/InitDemo/report.html root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# cat robot/assets/templates/aai/add_complex_body.template { "complex-name": "${complex_name}", "physical-location-id": "${physical_location_id}", "data-center-code": "example-data-center-code-val-5556", "identity-url": "example-identity-url-val-56898", "physical-location-type": "example-physical-location-type-val-7608", "street1": "example-street1-val-34205", "street2": "example-street2-val-99210", "city": "example-city-val-27150", "state": "example-state-val-59487", "postal-code": "68871", "country": "example-country-val-94173", "region": "example-region-val-13893", "latitude": "example-latitude-val-89101", "longitude": "32.89948", "elevation": "97.045443", "lata": "example-lata-val-46073", "relationship-list": { "relationship": [ { "related-to": "cloud-region", "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne", "relationship-data": [ { "relationship-key": "cloud-region.cloud-owner", "relationship-value": "${cloud_owner}" }, { "relationship-key": "cloud-region.cloud-region-id", "relationship-value": "${region}" } ], "related-to-property": [ { "property-key": "cloud-region.owner-defined-type", "property-value": "${owner_defined_type}" } ] } ] } } root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# cat > robot/assets/templates/aai/add_complex_body.template { "complex-name": "${complex_name}", "physical-location-id": "${physical_location_id}", "data-center-code": "example-data-center-code-val-5556", "identity-url": "example-identity-url-val-56898", "physical-location-type": "example-physical-location-type-val-7608", "street1": "example-street1-val-34205", "street2": "example-street2-val-99210", "city": "example-city-val-27150", "state": "example-state-val-59487", "postal-code": "68871", "country": "example-country-val-94173", "region": "example-region-val-13893", "latitude": "example-latitude-val-89101", "longitude": "32.89948", "elevation": "97.045443", "lata": "example-lata-val-46073", "relationship-list": { "relationship": [ { "related-to": "cloud-region", "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/fr1", "relationship-data": [ { "relationship-key": "cloud-region.cloud-owner", "relationship-value": "${cloud_owner}" }, { "relationship-key": "cloud-region.cloud-region-id", "relationship-value": "${region}" } ], "related-to-property": [ { "property-key": "cloud-region.owner-defined-type", "property-value": "${owner_defined_type}" } ] } ] } } root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# python -m robot.run -L TRACE -d /share/logs/demo/InitDemo -V /tmp/tt.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py -P ./robot/library:./robot/library/eteutils:./robot/library/heatbridge -i InitDemo /var/opt/OpenECOMP_ETE ============================================================================== OpenECOMP ETE ============================================================================== OpenECOMP ETE.Robot ============================================================================== OpenECOMP ETE.Robot.Testsuites ============================================================================== OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestration Test ... ============================================================================== Initialize Customer And Models | PASS | ------------------------------------------------------------------------------ OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestrat... | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE.Robot.Testsuites | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE.Robot | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== Output: /share/logs/demo/InitDemo/output.xml Log: /share/logs/demo/InitDemo/log.html Report: /share/logs/demo/InitDemo/report.html root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# Thanks Abdelmuhaimen Seaudi Orange Labs Egypt Email: [email protected]<mailto:[email protected]> Mobile: +2012 84644 733 From: FORSYTH, JAMES [mailto:[email protected]] Sent: Wednesday, June 27, 2018 2:07 PM To: SEAUDI Abdelmuhaimen OBS/CSO; [email protected] Subject: Re: [onap-discuss] robot initdemo issue - hardcoded region in add_complex_body.template Hi, Seaudi, Functionally it’s the same, that attribute is ignored when setting up the relationship, AAI uses the relationship-data block. Perhaps for coherence it could be left out entirely or changed to this: “aai/v11/cloud-infrastructure/cloud-regions/cloud-region/${cloud_owner}/${region}” I think that would be up to Marco and the owners of the robot scripts. Thanks, jimmy From: <[email protected]> on behalf of Abdelmuhaimen Seaudi <[email protected]> Date: Wednesday, June 27, 2018 at 3:48 AM To: "[email protected]" <[email protected]> Subject: [onap-discuss] robot initdemo issue - hardcoded region in add_complex_body.template Hi, The Robot Initdemo checks if AAI has the regions, complexes, etc … and if not found the robot scripts adds the items to AAI. However, when adding the complex called clli1, the script uses a data json from the file : The file has a hard-coded "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne", however I think it’s better to have "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/${region}" root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# cat robot/assets/templates/aai/add_complex_body.template { "complex-name": "${complex_name}", "physical-location-id": "${physical_location_id}", "data-center-code": "example-data-center-code-val-5556", "identity-url": "example-identity-url-val-56898", "physical-location-type": "example-physical-location-type-val-7608", "street1": "example-street1-val-34205", "street2": "example-street2-val-99210", "city": "example-city-val-27150", "state": "example-state-val-59487", "postal-code": "68871", "country": "example-country-val-94173", "region": "example-region-val-13893", "latitude": "example-latitude-val-89101", "longitude": "32.89948", "elevation": "97.045443", "lata": "example-lata-val-46073", "relationship-list": { "relationship": [ { "related-to": "cloud-region", "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne", "relationship-data": [ { "relationship-key": "cloud-region.cloud-owner", "relationship-value": "${cloud_owner}" }, { "relationship-key": "cloud-region.cloud-region-id", "relationship-value": "${region}" } ], "related-to-property": [ { "property-key": "cloud-region.owner-defined-type", "property-value": "${owner_defined_type}" } ] } ] } } root@dev-robot-7d4f958f67-9j24p:/var/opt/OpenECOMP_ETE# Abdelmuhaimen Seaudi Orange Labs Egypt Email: [email protected]<mailto:[email protected]> Mobile: +2012 84644 733 _________________________________________________________________________________________________________________________ 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. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10637): https://lists.onap.org/g/onap-discuss/message/10637 Mute This Topic: https://lists.onap.org/mt/22721313/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
