summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-12 16:12:14 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-12 16:21:43 +0100
commitcce09d08ead0c7cf152b2e63374a18e04b280b61 (patch)
treeebbe32d73198da6f842eab41eac0e600195bcad9 /plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src
parent2b5cf360ba9b494a7df1d2c06c7a736b9d557d47 (diff)
Fix soft stop and start of engine
Stopping an apexc engine is a soft stop, allowing the engine to be restarted again. However, when a model upgrade is carried out the engine must be stopped and cleared to clear the previous model, loaded with the new model and started again. THis handling must work over the Web Socket admin interface and also when apex is started as a service. This change fixes the handling so that it is consistent and works the same when apex is stopped/started/upgraded from the command line or over the management web socket interface Issue-ID: POLICY-1101 Change-Id: I1fe619641cb6ecd34d0669b4b7df105280e5e2c0 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src')
0 files changed, 0 insertions, 0 deletions
d */ .highlight .kt { color: #66d9ef } /* Keyword.Type */ .highlight .ld { color: #e6db74 } /* Literal.Date */ .highlight .m { color: #ae81ff } /* Literal.Number */ .highlight .s { color: #e6db74 } /* Literal.String */ .highlight .na { color: #a6e22e } /* Name.Attribute */ .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ .highlight .nc { color: #a6e22e } /* Name.Class */ .highlight .no { color: #66d9ef } /* Name.Constant */ .highlight .nd { color: #a6e22e } /* Name.Decorator */ .highlight .ni { color: #f8f8f2 } /* Name.Entity */ .highlight .ne { color: #a6e22e } /* Name.Exception */ .highlight .nf { color: #a6e22e } /* Name.Function */ .highlight .nl { color: #f8f8f2 } /* Name.Label */ .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* 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   Initializes ONAP Test Web Page and Password

Library    Collections
Library    OperatingSystem
Library    StringTemplater
Resource          ../resources/openstack/keystone_interface.robot
Resource          ../resources/openstack/nova_interface.robot


Test Timeout    5 minutes

*** Variables ***
${URLS_HTML_TEMPLATE}   robot/assets/templates/web/index.html.template


${WEB_USER}       test
${WEB_PASSWORD}

${URLS_HTML}   html/index.html
${CREDENTIALS_FILE}   /etc/lighttpd/authorization
#${CREDENTIALS_FILE}   authorization

*** Test Cases ***
Update ONAP Page
    [Tags]   UpdateWebPage
    Run Keyword If   '${WEB_PASSWORD}' == ''   Fail   "WEB Password must not be empty"
    Run Openstack Auth Request    auth
    ${server_map}=    Get Openstack Servers    auth
    ${oam_ip_map}=   Create Dictionary
    Set To Dictionary    ${oam_ip_map}   10.0.0.1=onapdns
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_AAI1_IP_ADDR}=aai1
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_AAI2_IP_ADDR}=aai2
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_APPC_IP_ADDR}=appc
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_DCAE_IP_ADDR}=dcae_controller
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_SO_IP_ADDR}=mso
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_MR_IP_ADDR}=message_router
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_POLICY_IP_ADDR}=policy
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_PORTAL_IP_ADDR}=portal
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_SDC_IP_ADDR}=sdc
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_SDNC_IP_ADDR}=sdnc
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_OPENO_IP_ADDR}=openo
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_CLAMP_IP_ADDR}=clamp
    Set To Dictionary    ${oam_ip_map}   ${GLOBAL_INJECTED_VID_IP_ADDR}=vid
    Set To Dictionary    ${oam_ip_map}   10.0.4.105=dcae_cdap
    Set To Dictionary    ${oam_ip_map}   10.0.4.102=dcae_coll
    Set To Dictionary    ${oam_ip_map}   10.0.10.1=robot

    ${values}=   Create Dictionary
    ${keys}=    Get Dictionary Keys    ${oam_ip_map}
    :for   ${oam_ip}   in    @{keys}
    \    ${value_name}=   Get From Dictionary    ${oam_ip_map}   ${oam_ip}
    \    Set Public Ip    ${server_map}    ${oam_ip}   ${value_name}   ${values}
    Log    ${values}
    Run Keyword If   '${WEB_PASSWORD}' != ''   Create File   ${CREDENTIALS_FILE}   ${WEB_USER}:${WEB_PASSWORD}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_ARTIFACTS_VERSION=${GLOBAL_INJECTED_ARTIFACTS_VERSION}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_NETWORK=${GLOBAL_INJECTED_NETWORK}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_NEXUS_DOCKER_REPO=${GLOBAL_INJECTED_NEXUS_DOCKER_REPO}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_NEXUS_REPO=${GLOBAL_INJECTED_NEXUS_REPO}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_OPENSTACK_TENANT_ID=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_REGION=${GLOBAL_INJECTED_REGION}
    Set To Dictionary    ${values}   GLOBAL_INJECTED_KEYSTONE=${GLOBAL_INJECTED_KEYSTONE}
    Create File From Template   ${URLS_HTML_TEMPLATE}   ${URLS_HTML}   ${values}

*** Keywords ***
Create File From Template
    [Arguments]    ${template}   ${file}   ${values}
    ${data}    OperatingSystem.Get File   ${template}
    ${data}=   Template String   ${data}   ${values}
    Create File     ${file}   ${data}

Set Public Ip
    [Arguments]   ${server_map}    ${oam_ip}   ${value_name}   ${values}
    ${status}   ${public_ip}=   Run Keyword And Ignore Error  Get Public Ip   ${server_map}    ${oam_ip}
    ${public_ip}=   Set Variable If   '${status}' == 'PASS'   ${public_ip}   ${oam_ip}
    Set To Dictionary   ${values}   ${value_name}   ${public_ip}

Get Public Ip
    [Arguments]   ${server_map}    ${oam_ip}
    ${servers}   Get Dictionary Values    ${server_map}
    :for   ${server}   in   @{servers}
    \    ${status}   ${public_ip}   Run Keyword And Ignore Error   Search Addresses   ${server}   ${oam_ip}
    \    Return From Keyword If   '${status}'=='PASS'   ${public_ip}
    Fail  ${oam_ip} Server Not Found

Search Addresses
    [Arguments]   ${server}   ${oam_ip}
    ${addresses}   Get From Dictionary   ${server}   addresses
    ${status}   ${public_ip}=   Run Keyword And Ignore Error   Find Rackspace   ${addresses}   ${oam_ip}
    Return From Keyword If   '${status}'=='PASS'   ${public_ip}
    ${status}   ${public_ip}=   Run Keyword And Ignore Error   Find Openstack   ${addresses}   ${oam_ip}
    Return From Keyword If   '${status}'=='PASS'   ${public_ip}
    ${status}   ${public_ip}=   Run Keyword And Ignore Error   Find Openstack 2   ${addresses}   ${oam_ip}
    Return From Keyword If   '${status}'=='PASS'   ${public_ip}
    Fail  ${oam_ip} Server Not Found

Find Rackspace
    [Arguments]   ${addresses}   ${oam_ip}
    ${public_ips}   Get From Dictionary   ${addresses}   public
    ${public_ip}=   Get V4 IP   ${public_ips}
    ${oam_ips}   Get From Dictionary   ${addresses}   ${GLOBAL_INJECTED_NETWORK}
    ${this_oam_ip}=   Get V4 IP   ${oam_ips}
    Return From Keyword If   '${this_oam_ip}' == '${oam_ip}'   ${public_ip}
    Fail  ${oam_ip} Server Not Found

Find Openstack
    [Arguments]   ${addresses}   ${oam_ip}
    ${public_ip}=   Get V4 IP Openstack   ${addresses}   external
    ${this_oam_ip}=    Get V4 IP Openstack   ${addresses}   ${GLOBAL_INJECTED_NETWORK}
    Return From Keyword If   '${this_oam_ip}'=='${oam_ip}'   ${public_ip}
    Fail  ${oam_ip} Server Not Found

Find Openstack 2
    [Arguments]   ${addresses}   ${oam_ip}
    ${ipmaps}=   Get From DIctionary   ${addresses}   ${GLOBAL_INJECTED_NETWORK}
    ${public_ip}=   Get V4 IP Openstack 2  ${ipmaps}   floating
    ${this_oam_ip}=    Get V4 IP Openstack 2   ${ipmaps}   fixed
    Return From Keyword If   '${this_oam_ip}'=='${oam_ip}'   ${public_ip}
    Fail  ${oam_ip} Server Not Found

Get V4 IP
    [Arguments]   ${ipmaps}
    :for   ${ipmap}   in   @{ipmaps}
    \    ${ip}   Get From Dictionary   ${ipmap}   addr
    \    ${version}   Get From Dictionary   ${ipmap}   version
    \    Return from Keyword if   '${version}' == '4'   ${ip}
    Fail  No Version 4 IP

Get V4 IP Openstack
    [Arguments]   ${addresses}   ${testtype}
    ${ipmaps}=   Get From Dictionary   ${addresses}   ${testtype}
    :for   ${ipmap}   in   @{ipmaps}
    \    ${ip}   Get From Dictionary   ${ipmap}   addr
    \    ${version}   Get From Dictionary   ${ipmap}   version
    \    Return from Keyword if   '${version}'=='4'   ${ip}
    Fail  No Version 4 IP

Get V4 IP Openstack 2
    [Arguments]   ${ipmaps}   ${testtype}
    :for   ${ipmap}   in   @{ipmaps}
    \    ${type}   Get From Dictionary   ${ipmap}   OS-EXT-IPS:type
    \    ${ip}   Get From Dictionary   ${ipmap}   addr
    \    ${version}   Get From Dictionary   ${ipmap}   version
    \    Return from Keyword if   '${version}'=='4' and '${type}'=='${testtype}'   ${ip}
    Fail  No Version 4 IP