Why isn't OpenStack CLI run with SSHLibrary.Execute Command in csit libraries in ODL integration test?


Yi Yang
 

Hi, all

 

I find all the Openstack cmds aren’t run in SSH session, I’m wondering why ODL csit suite can work normally. Per my test, Process.Run Process will never run in current SSH connection, so anybody knows where the magic is? The only workable way is to run csit suites in Openstack controller node. But Jamo told me I could run them in non-openstack controller node.

 

OpenStack CLI

    [Arguments]    ${cmd}

    [Documentation]    Run the given OpenStack ${cmd} and log the output.

    ${result} =    Process.Run Process    ${cmd}    shell=True

    BuiltIn.Log    ${result.stdout}

    BuiltIn.Log    ${result.stderr}

    BuiltIn.Should Be True    '${result.rc}' == '0'

[Return]    ${result.stdout}

 

I think the right way should look like this:

 

OpenStack CLI

    [Arguments]    ${cmd}

[Documentation]    Run the given OpenStack ${cmd} and log the output.

SSHLibrary.Switch Connection    ${OS_CNTL_CONN_ID}

${stdout}    ${stderr}    $rc =    SSHLibrary.Execute Command    ${cmd}    return_stderr=True    return_rc=True

    BuiltIn.Log    ${stdout}

    BuiltIn.Log    ${stderr}

    BuiltIn.Should Be True    '${rc}' == '0'

[Return]    ${stdout}

 

Because I’m trying to run csit suite in my local integration environment, I find many keywords should run in SSH session, but they obviously call OpenStack CLI to execute, Jamo told me to use a opnfv cperf container to run csit suite, this cperf container did have openstack cmds available, but it isn’t Openstack controller node of the tested openstack integration environment.

 

Join {integration-dev@lists.opendaylight.org to automatically receive all group messages.