FYI, I had this issue fixed (and verified with HEAT based ONAP) with the patch: 
https://gerrit.onap.org/r/49695

Thanks.

Best Regards,
Bin Yang,    Solution Readiness Team,    Wind River
Direct +86,10,84777126    Mobile +86,13811391682    Fax +86,10,64398189
Skype: yangbincs993

From: [email protected] 
[mailto:[email protected]] On Behalf Of Yang, Bin
Sent: Wednesday, May 30, 2018 2:49 PM
To: [email protected]; Sonsino, Ofir; Yunxia Chen 
<[email protected]> ([email protected])
Cc: Huang, Yun
Subject: [onap-discuss] [integration][vid] vFWCL preload VNF failure, robot and 
VID concerned

Dear team,

               Not sure if anyone else has encountered this issue, I was trying 
to exercise the vFWCL demo with the latest ONAP deployment (both HEAT and OOM 
based), but get blocked by the issue of "preload VNF data" with robot script. 
As I investigate this issue, I found there seems the root cause is the 
mismatching between the robot script and the VID portal output, could someone 
from VID and Integration team shed a light on this issue?

Please chime in if anyone observes the same issue recently. In case that it is 
a well known issue observed by others as well , I can try to fix it as well.

Please refer to the log and analysis below for your reference, Thanks

Preload VNF data for vFWCL demo:

root@rancher:~/oom/kubernetes/robot# ./demo-k8s.sh onap preload vFWSNK-1 
vFWSNK-Module-1
+ echo 'Number of parameters:'
Number of parameters:
+ echo 4
4
+ '[' 4 -lt 2 ']'
+ NAMESPACE=onap
+ shift
+ '[' 3 -gt 0 ']'
+ key=preload
+ echo KEY:
KEY:
+ echo preload
preload
+ case $key in
+ TAG=PreloadDemo
+ shift
+ '[' 2 -ne 2 ']'
+ VARIABLES=' -v VNF_NAME:vFWSNK-1'
+ shift
+ VARIABLES=' -v VNF_NAME:vFWSNK-1 -v MODULE_NAME:vFWSNK-Module-1'
+ shift
+ '[' 0 -gt 0 ']'
+ ETEHOME=/var/opt/OpenECOMP_ETE
+ VARIABLEFILES='-V /share/config/vm_properties.py -V 
/share/config/integration_robot_properties.py -V 
/share/config/integration_preload_parameters.py'
++ kubectl --namespace onap get pods
++ sed 's/ .*//'
++ grep robot
+ POD=dev-robot-845547fc88-pnfcz
+ kubectl --namespace onap exec dev-robot-845547fc88-pnfcz -- 
/var/opt/OpenECOMP_ETE/runTags.sh -V /share/config/vm_properties.py -V 
/share/config/integration_robot_properties.py -V 
/share/config/integration_preload_parameters.py -v VNF_NAME:vFWSNK-1 -v 
MODULE_NAME:vFWSNK-Module-1 -d /share/logs/demo/PreloadDemo -i PreloadDemo 
--display 89
Starting Xvfb on display :89 with res 1280x1024x24
Executing robot tests at log level TRACE
==============================================================================
OpenECOMP ETE
==============================================================================
OpenECOMP ETE.Robot
==============================================================================
OpenECOMP ETE.Robot.Testsuites
==============================================================================
OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestration Test ...
==============================================================================
Preload VNF                                                           | FAIL |
TypeError: string indices must be integers
------------------------------------------------------------------------------
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/PreloadDemo/output.xml
Log:     /share/logs/demo/PreloadDemo/log.html
Report:  /share/logs/demo/PreloadDemo/report.html


Error log:

               KEYWORD ${vf_modules} = vid_interface . Get Module Names from 
VID ${invariantUUID}
Documentation:
Must use UI since rest call get redirect to portal and get DNS error

Start / End / Elapsed:       20180529 12:58:37.006 / 20180529 12:58:37.464 / 
00:00:00.458
00:00:00.458KEYWORD ${id} = vid_interface . Get Model UUID from VID 
${invariantUUID}
Documentation:
Must use UI since rest call get redirect to portal and get DNS error

Start / End / Elapsed:       20180529 12:58:37.006 / 20180529 12:58:37.464 / 
00:00:00.458
00:00:00.416KEYWORD ExtendedSelenium2Library . Go To 
${VID_ENDPOINT}${VID_ENV}/rest/models/services
Documentation:
Navigates the active browser instance to the provided URL.

Start / End / Elapsed:       20180529 12:58:37.007 / 20180529 12:58:37.423 / 
00:00:00.416
12:58:37.008      TRACE   Arguments: [ 
'http://vid.onap:8080/vid/rest/models/services' ]
12:58:37.008      INFO      Opening url 
'http://vid.onap:8080/vid/rest/models/services'
12:58:37.008      DEBUG  POST 
http://127.0.0.1:54336/session/f0dc095f66fe0fa857b6325d10001398/url {"url": 
"http://vid.onap:8080/vid/rest/models/services";, "sessionId": 
"f0dc095f66fe0fa857b6325d10001398"}
12:58:37.423      DEBUG  Finished Request
12:58:37.423      TRACE   Return: None
00:00:00.037KEYWORD ${resp} = ExtendedSelenium2Library . Get Text 
xpath=//body/pre
00:00:00.002KEYWORD ${json} = RequestsLibrary . To Json ${resp}
Documentation:
Convert a string to a JSON object

Start / End / Elapsed:       20180529 12:58:37.461 / 20180529 12:58:37.463 / 
00:00:00.002
12:58:37.461      TRACE   Arguments: [ 
'{"services":[{"uuid":"3dcb5407-d698-4cb5-a8af-2de4dffe3fc5","invariantUUID":"c69a0d2d-6c48-4577-9233-a812d42533ea","name":"demoVFWCL","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"fd3b399b-ccdd-4449-9d49-10d5b06d1f79","invariantUUID":"a9594a77-02bb-4db3-9795-78660f5ef30c","name":"demoVCPE","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"97f3ad17-2acc-483d-8177-3f975122f0e7","invariantUUID":"b1e75122-06a8-45bb-b404-cae998beb3af","name":"demoVLB","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null}],"readOnly":false}'
 ]
12:58:37.462      INFO      To JSON using : 
content={"services":[{"uuid":"3dcb5407-d698-4cb5-a8af-2de4dffe3fc5","invariantUUID":"c69a0d2d-6c48-4577-9233-a812d42533ea","name":"demoVFWCL","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"fd3b399b-ccdd-4449-9d49-10d5b06d1f79","invariantUUID":"a9594a77-02bb-4db3-9795-78660f5ef30c","name":"demoVCPE","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"97f3ad17-2acc-483d-8177-3f975122f0e7","invariantUUID":"b1e75122-06a8-45bb-b404-cae998beb3af","name":"demoVLB","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null}],"readOnly":false}
12:58:37.462      INFO      To JSON using : pretty_print=False
12:58:37.462      TRACE   Return: {'readOnly': False,
'services': [{'artifacts': None, 'category': 'service', 'distributionStatus': 
'DISTRIBUTION_COMPLETE_OK', 'invariantUUID': 
'c69a0d2d-6c48-4577-9233-a812d42533ea', 'lastUpdaterFullName': None, 
'lastUpdaterUserId': None, 'lifecycleState': None, 'name': 'demoVFWCL', 
'resources': None, 'toscaModelURL': None, 'uuid': 
'3dcb5407-d698-4cb5-a8af-2de4dffe3fc5', 'version': '1.0'},
              {'artifacts': None, 'category': 'service', 'distributionStatus': 
'DISTRIBUTION_COMPLETE_OK', 'invariantUUID': 
'a9594a77-02bb-4db3-9795-78660f5ef30c', 'lastUpdaterFullName': None, 
'lastUpdaterUserId': None, 'lifecycleState': None, 'name': 'demoVCPE', 
'resources': None, 'toscaModelURL': None, 'uuid': 
'fd3b399b-ccdd-4449-9d49-10d5b06d1f79', 'version': '1.0'},
              {'artifacts': None, 'category': 'service', 'distributionStatus': 
'DISTRIBUTION_COMPLETE_OK', 'invariantUUID': 
'b1e75122-06a8-45bb-b404-cae998beb3af', 'lastUpdaterFullName': None, 
'lastUpdaterUserId': None, 'lifecycleState': None, 'name': 'demoVLB', 
'resources': None, 'toscaModelURL': None, 'uuid': 
'97f3ad17-2acc-483d-8177-3f975122f0e7', 'version': '1.0'}]}
12:58:37.463      INFO      ${json} = {u'services': [{u'category': u'service', 
u'lastUpdaterFullName': None, u'uuid': u'3dcb5407-d698-4cb5-a8af-2de4dffe3fc5', 
u'distributionStatus': u'DISTRIBUTION_COMPLETE_OK', u'lastUpdaterUserId': 
None,...
00:00:00.001FOR ${dict} IN [ @{json} ]
Start / End / Elapsed:       20180529 12:58:37.463 / 20180529 12:58:37.464 / 
00:00:00.001
00:00:00.001VAR ${dict} = services
Start / End / Elapsed:       20180529 12:58:37.463 / 20180529 12:58:37.464 / 
00:00:00.001
00:00:00.001KEYWORD ${uuid} = Collections . Get From Dictionary ${dict}, uuid
Documentation:
Returns a value from the given dictionary based on the given key.

Start / End / Elapsed:       20180529 12:58:37.463 / 20180529 12:58:37.464 / 
00:00:00.001
12:58:37.463      TRACE   Arguments: [ 'services' | 'uuid' ]
12:58:37.464      FAIL       TypeError: string indices must be integers
12:58:37.464      DEBUG  Traceback (most recent call last):
  None

Further debug:
               Robot script:
                              testsuite/robot/resources/vid/vid_interface.robot

                                             Get Model UUID from VID
                                                            [Documentation]    
Must use UI since rest call get redirect to portal and get DNS error
                                                            ...    Search all 
services and match on the invariantUUID
                                                            [Arguments]   
${invariantUUID}
                                                            Go To     
${VID_ENDPOINT}${VID_ENV}/rest/models/services
                                                            ${resp}=   Get Text 
  xpath=//body/pre
                                                            ${json}=   To Json  
  ${resp}
                                                            :for   ${dict}  in  
@{json}
                                                            \    ${uuid}=   Get 
From DIctionary   ${dict}   uuid
                                                            \    ${inv}=   Get 
From DIctionary   ${dict}    invariantUUID
                                                            \    Return From 
Keyword If   "${invariantUUID}" == "${inv}"   ${uuid}
                                                            [Return]    ""

               Output of VID portal:
                              
http://vid.api.simpledemo.onap.org:30200/vid/rest/models/services

                                             
{"services":[{"uuid":"3dcb5407-d698-4cb5-a8af-2de4dffe3fc5","invariantUUID":"c69a0d2d-6c48-4577-9233-a812d42533ea","name":"demoVFWCL","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"fd3b399b-ccdd-4449-9d49-10d5b06d1f79","invariantUUID":"a9594a77-02bb-4db3-9795-78660f5ef30c","name":"demoVCPE","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"7a8fabe6-11e8-4dea-8f29-f3acad35ef0c","invariantUUID":"49dba176-181f-4274-9c56-8e0d5edb7945","name":"vFW
 2018-05-29 
05:07:36","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null},{"uuid":"97f3ad17-2acc-483d-8177-3f975122f0e7","invariantUUID":"b1e75122-06a8-45bb-b404-cae998beb3af","name":"demoVLB","version":"1.0","toscaModelURL":null,"category":"service","lifecycleState":null,"lastUpdaterUserId":null,"lastUpdaterFullName":null,"distributionStatus":"DISTRIBUTION_COMPLETE_OK","artifacts":null,"resources":null}],"readOnly":false}

Root Cause analysis:
               mismatch between the robot script and the VID portal output.
                              robot script expects a single service object to 
be returned by the VID portal: ${VID_ENDPOINT}${VID_ENV}/rest/models/services 
with format of {"uuid":"3dcb5407-d698-4cb5-a8af-2de4dffe3fc5",...}

                              However, the VID returns a list of services in 
format: {"services":[{"uuid":"3dcb5407-d698-4cb5-a8af-2de4dffe3fc5",...},{}]}



Best Regards,
Bin Yang,    Solution Readiness Team,    Wind River
Direct +86,10,84777126    Mobile +86,13811391682    Fax +86,10,64398189
Skype: yangbincs993
_______________________________________________
onap-discuss mailing list
[email protected]
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to