aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/docker
diff options
context:
space:
mode:
authorSudarshan Kumar <sudarshan.kumar@att.com>2020-09-18 14:06:32 +0530
committerSudarshan Kumar <sudarshan.kumar@att.com>2020-09-25 15:03:17 +0530
commitdea84ed1e2c4a2cc2220d22695d2b03cad130e4f (patch)
treed5950a0ef806ff02220dfa23d1ad5f0a61da9070 /kubernetes/portal/docker
parentdafa291f98366a0709c093e6fcc5f675f2451b3e (diff)
[PORTAL] Deprecate the Policy Engine GUI
The policy/engine GUI is being deprecated in Guilin and needs to be removed from Portal project as that docker image will no longer be shipped and will be removed from OOM charts soon. Issue-ID: PORTAL-978 Change-Id: I8242f734dfd67c55146ea2952cad82bbd259da5b Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'kubernetes/portal/docker')
0 files changed, 0 insertions, 0 deletions
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   Validate A&AI Serivce Instance
...
...               Validate A&AI Serivce Instance

Resource          aai_interface.robot
Library    Collections
Library    OperatingSystem
Library    RequestsLibrary
Library    ONAPLibrary.JSON
Library    ONAPLibrary.Templating
Resource          ../stack_validation/validate_vlb.robot
Resource          ../stack_validation/validate_vfw.robot
Resource          ../stack_validation/validate_vvg.robot
Resource          ../aai/aai_interface.robot

*** Variables ***
${INDEX PATH}     /aai/v11
${GENERIC_QUERY_PATH}  /search/generic-query?
${SYSTEM USER}    robot-ete
${CUSTOMER SPEC PATH}    /business/customers/customer/
${SERVICE SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
${SERVICE INSTANCE}    /service-instances?service-instance-id=
${SERVCE INSTANCE TEMPLATE}    aai/service_subscription.jinja

${GENERIC_VNF_PATH_TEMPLATE}   /network/generic-vnfs/generic-vnf/\${vnf_id}/vf-modules/vf-module/\${vf_module_id}
${GENERIC_VNF_QUERY_TEMPLATE}   /network/generic-vnfs/generic-vnf/\${vnf_id}/vf-modules/vf-module?vf-module-name=\${vf_module_name}
${VLB_CLOSED_LOOP_HACK_BODY}    aai/vlb_closed_loop_hack.jinja

#*************** Test Case Variables *************
${VLB_CLOSED_LOOP_DELETE}
${VLB_CLOSED_LOOP_VNF_ID}

*** Keywords ***
Validate Service Instance
    [Documentation]    Query and Validates A&AI Service Instance
    [Arguments]    ${service_instance_name}    ${service_type}  ${customer_name}
    ${cust_resp}=    Run A&AI Get Request      ${INDEX PATH}/business/customers?subscriber-name=${customer_name}
  ${resp}=    Run A&AI Get Request      ${INDEX PATH}${CUSTOMER SPEC PATH}${cust_resp.json()['customer'][0]['global-customer-id']}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
    Dictionary Should Contain Value ${resp.json()['service-instance'][0]}    ${service_instance_name}

Validate Generic VNF
    [Documentation]    Query and Validates A&AI Service Instance
    [Arguments]    ${vnf_name}  ${vnf_type}    ${service_instance_id}
    ${generic_vnf}=    Run A&AI Get Request      ${INDEX PATH}/network/generic-vnfs/generic-vnf?vnf-name=${vnf_name}
    Dictionary Should Contain Value ${generic_vnf.json()}    ${vnf_name}
    ${returned_vnf_type}=    Get From Dictionary    ${generic_vnf.json()}    vnf-type
    Should Contain  ${returned_vnf_type}    ${vnf_type}
    ${vnf_id}=    Get From Dictionary    ${generic_vnf.json()}    vnf-id
    ${generic_vnf}=    Run A&AI Get Request      ${INDEX PATH}/network/generic-vnfs/generic-vnf/${vnf_id}?depth=all
    [Return]    ${generic_vnf.json()}

VLB Closed Loop Hack
    [Arguments]    ${service}    ${generic_vnf}   ${closedloop_vf_module}
    Return From Keyword If    '${service}' != 'vLB'
    ${vnf_id}=     Get From Dictionary    ${generic_vnf}    vnf-id
    ${vf_modules}=    Get From Dictionary    ${generic_vnf}    vf-modules
    ${list}=    Get From Dictionary    ${vf_modules}   vf-module
    ${vfmodule}=    Get From List    ${list}    0
    ${persona_model_id}=    Get From Dictionary    ${closedloop_vf_module}    invariantUUID
    ${persona_model_version}=   Get From Dictionary    ${closedloop_vf_module}    version
    ${dummy}=    Catenate   dummy_${vnf_id}
    ${dict}=    Create Dictionary   vnf_id=${vnf_id}   vf_module_id=${dummy}   persona_model_id=${persona_model_id}   persona_model_version=${persona_model_version}
    ${datapath}=    Template String    ${GENERIC_VNF_PATH_TEMPLATE}    ${dict}
    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
    ${data}=   Apply Template    aai   ${VLB_CLOSED_LOOP_HACK_BODY}    ${dict}
  ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${datapath}   ${data}
    ${status_string}=    Convert To String    ${put_resp.status_code}
    Should Match Regexp    ${status_string}    ^(201|412)$
    Set Test Variable   ${VLB_CLOSED_LOOP_DELETE}    ${datapath}
    Set Test Variable   ${VLB_CLOSED_LOOP_VNF_ID}    ${vnf_id}


VLB Closed Loop Hack Update
    [Documentation]   Update the A&AI vDNS scaling vf module to have persona-model-version 1 rather than 1.0
    [Arguments]   ${stack_name}
    ${dict}=    Create Dictionary   vnf_id=${VLB_CLOSED_LOOP_VNF_ID}   vf_module_name=${stack_name}
    ${query}=   Template String   ${GENERIC_VNF_QUERY_TEMPLATE}   ${dict}
    ${get_resp}=    Run A&AI Get Request     ${INDEX_PATH}${query}
    ${json}=   Set Variable   ${get_resp.json()}
    Set to Dictionary    ${json}   persona-model-version   1
    ${vf_module_id}=   Get From Dictionary   ${json}   vf-module-id
    Set to Dictionary   ${dict}   vf_module_id=${vf_module_id}
    ${uri}=   Template String   ${GENERIC_VNF_PATH_TEMPLATE}   ${dict}
    ${resp}=   Run A&AI Put Request    ${INDEX_PATH}${uri}   ${json}
    ${get_resp}=    Run A&AI Get Request     ${INDEX_PATH}${query}


Teardown VLB Closed Loop Hack
    Return From Keyword If    ' ${VLB_CLOSED_LOOP_DELETE}' == ''
  Delete A&AI Entity    ${VLB_CLOSED_LOOP_DELETE}


Validate VF Module
    [Documentation]    Query and Validates A&AI Service Instance
    [Arguments]    ${vf_module_name}    ${stack_type}
  Run Keyword If    '${stack_type}'=='vLB'    Validate vLB Stack    ${vf_module_name}
  Run Keyword If    '${stack_type}'=='vFW'    Validate Firewall Stack    ${vf_module_name}
  Run Keyword If    '${stack_type}'=='vVG'    Validate vVG Stack    ${vf_module_name}

*** Keywords ***
Create AAI Service Instance
    [Documentation]    Query and Validates A&AI Service Instance
    [Arguments]    ${customer_id}    ${service_type}    ${service_instance_id}    ${service_instance_name}
    ${json_string}=    Catenate     { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
  ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}/{service_type}   ${json_string}
    Should Be Equal As Strings  ${put_resp.status_code}   201
  [Return]  ${put_resp.status_code}