aboutsummaryrefslogtreecommitdiffstats
path: root/version.properties
diff options
context:
space:
mode:
authorBengt Thuree <bthuree@linuxfoundation.org>2022-08-10 20:22:38 +1000
committerBengt Thuree <bthuree@linuxfoundation.org>2022-08-10 20:23:04 +1000
commit5207c650ce4550ae5af8aa737f6e25cb87817e67 (patch)
treeb9c1c47ff8bc6f098b3ecfedae579cf506373d68 /version.properties
parentf0ccc8a7ab518e4a60af62f7b6a9b51a41694451 (diff)
Chore: Fix wrong userid in INFO
Issue-ID: CIMAN-33 Signed-off-by: Bengt Thuree <bthuree@linuxfoundation.org> Change-Id: Iba6e2db5a402a419a6dae8f31205f52a44346b45
Diffstat (limited to 'version.properties')
0 files changed, 0 insertions, 0 deletions
36699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
*** Settings ***
Documentation     The private interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields

Library           Collections
Library           ONAPLibrary.Openstack
Library         RequestsLibrary
Library           ONAPLibrary.Utilities
Resource    ../global_properties.robot

*** Keywords ***
Internal Get Openstack
    [Documentation]    Runs an Openstack Get Request and returns the response
    [Arguments]    ${alias}    ${service_type}    ${url_ext}   ${data_path}=
    ${region}=   Get Openstack Region
    ${resp}=   Internal Get Openstack With Region   ${alias}    ${service_type}    ${region}   ${url_ext}   ${data_path}
    [Return]    ${resp}

Internal Get Openstack With Region
    [Documentation]    Runs an Openstack Get Request and returns the response
    [Arguments]    ${alias}    ${service_type}    ${region}   ${url_ext}   ${data_path}=
    Log    Internal Get Openstack values alias=${alias} service_type=${service_type} region=${region} url_ext=${url_ext} data_path=${data_path}
    ${url}=    Get Openstack Service Url    ${alias}     ${service_type}    ${region}
    ${uuid}=    Generate UUID4
    ${session_alias}=    Catenate    openstack-${uuid}
    ${session}=    Create Session   ${session_alias}  ${url}${url_ext}        verify=True
    ${token}=    Get Openstack Token    ${alias}
    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}     X-Auth-Token=${token}
    ${resp}=  Get Request   ${session_alias}  ${data_path}     headers=${headers}
    Log    Received response from openstack ${resp.text}
    [Return]    ${resp}

Internal Post Openstack
    [Documentation]    Runs an Openstack Post Response and returns the response
    [Arguments]    ${alias}    ${service_type}    ${url_ext}   ${data_path}=    ${data}=
    ${region}=   Get Openstack Region
    Log    Internal Post Openstack values alias=${alias} service_type=${service_type} region=${region} url_ext=${url_ext} data_path=${data_path}
    ${url}=    Get Openstack Service Url    ${alias}     ${service_type}    ${region}
    ${uuid}=    Generate UUID4
    ${session_alias}=    Catenate    openstack-${uuid}
    ${session}=    Create Session   ${session_alias}  ${url}${url_ext}        verify=True
    ${token}=    Get Openstack Token    ${alias}
    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}     X-Auth-Token=${token}
    ${resp}=  Post Request  ${session_alias}  ${data_path}     data=${data}    headers=${headers}
    Log    Received response from openstack ${resp.text}
    [Return]    ${resp}

Internal Delete Openstack
    [Documentation]    Runs an Openstack Delete Request and returns the response
    [Arguments]    ${alias}    ${service_type}    ${url_ext}   ${data_path}=
    ${region}=   Get Openstack Region
    Log    Internal Post Openstack values alias=${alias} service_type=${service_type} region=${region} url_ext=${url_ext} data_path=${data_path}
    ${url}=    Get Openstack Service Url    ${alias}     ${service_type}    ${region}
    ${uuid}=    Generate UUID4
    ${session_alias}=    Catenate    openstack-${uuid}
    ${session}=    Create Session   ${session_alias}  ${url}${url_ext}        verify=True
    ${token}=    Get Openstack Token    ${alias}
    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}     X-Auth-Token=${token}
    ${resp}=  Delete Request  ${session_alias}  ${data_path}    headers=${headers}
    Log    Received response from openstack ${resp.text}
    [Return]    ${resp}

Get Openstack Region
    [Documentation]   Returns the current openstack region test variable
    ...               Defaults to the openstack region of the Robot VM
    [Return]   ${GLOBAL_INJECTED_REGION}