aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml
diff options
context:
space:
mode:
authorMarcus G K Williams <marcus.williams@intel.com>2017-11-06 16:20:54 -0800
committerMarcus G K Williams <marcus.williams@intel.com>2017-11-06 16:21:07 -0800
commit39edb53aa9b16b0175de571111a422087bbe227c (patch)
treeebb042d08056fd027ec40f9021fc138426885623 /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml
parent1290ad1ac4e50b539b823f6ad4cf324a40105c4b (diff)
Fix break in brg-topology-operation-assign DG
Issue-Id: SDNC-173 Change-Id: I78de0cb468e03fa5e621bfbefde34181e2a547bd Signed-off-by: Marcus G K Williams <marcus.williams@intel.com> Former-commit-id: be5b66eb9dcf52daad67e973183a9bcd7ebc011f
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml')
0 files changed, 0 insertions, 0 deletions
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 ***
Resource          ../../common.robot
Library           Collections
Library           json
Library           OperatingSystem
Library           RequestsLibrary
Library           HttpLibrary.HTTP
Library           String


*** Variables ***
${MESSAGE}    Hello, world!
${DBC_URI}    webapi
${DBC_URL}    http://${DMAAPBC_IP}:8080/${DBC_URI}
${TOPIC_NS}     org.onap.dmaap.onapCSIT
${LOC}          csit-sanfrancisco
${PUB_CORE}     "dcaeLocationName": "${LOC}", "clientRole": "org.onap.dmaap.client.pub", "action": [ "pub", "view" ] 
${SUB_CORE}     "dcaeLocationName": "${LOC}", "clientRole": "org.onap.dmaap.client.sub", "action": [ "sub", "view" ] 
${PUB}          { ${PUB_CORE} }
${SUB}          { ${SUB_CORE} }
${TOPIC1_DATA}  { "topicName":"singleMRtopic1", "topicDescription":"generated for CSIT", "owner":"dgl"}
${TOPIC2_DATA}  { "topicName":"singleMRtopic2", "topicDescription":"generated for CSIT", "owner":"dgl", "clients": [ ${PUB}, ${SUB}] }
${TOPIC3_DATA}  { "topicName":"singleMRtopic3", "topicDescription":"generated for CSIT", "owner":"dgl"}
${PUB3_DATA}    { "fqtn": "${TOPIC_NS}.singleMRtopic3", ${PUB_CORE} }
${SUB3_DATA}    { "fqtn": "${TOPIC_NS}.singleMRtopic3", ${SUB_CORE} }



*** Test Cases ***
Url Test
    [Documentation]    Check if www.onap.org can be reached
    Create Session     sanity          http://onap.readthedocs.io
    ${resp}=           Get Request   sanity    /  
    Should Be Equal As Integers  ${resp.status_code}  200

(DMAAP-293)
    [Documentation]        Create Topic w no clients POST ${DBC_URI}/topics endpoint
    ${resp}=         PostCall    ${DBC_URL}/topics    ${TOPIC1_DATA}
    Should Be Equal As Integers  ${resp.status_code}  201   

(DMAAP-294)
    [Documentation]        Create Topic w pub and sub clients POST ${DBC_URI}/topics endpoint
    ${resp}=         PostCall    ${DBC_URL}/topics    ${TOPIC2_DATA}
    Should Be Equal As Integers  ${resp.status_code}  201

(DMAAP-295)
    [Documentation]        Create Topic w no clients and then add a client POST ${DBC_URI}/mr_clients endpoint
    ${resp}=         PostCall    ${DBC_URL}/topics    ${TOPIC3_DATA}
    Should Be Equal As Integers  ${resp.status_code}  201   
    ${resp}=         PostCall    ${DBC_URL}/mr_clients    ${PUB3_DATA}
    Should Be Equal As Integers  ${resp.status_code}  200   
    ${resp}=         PostCall    ${DBC_URL}/mr_clients    ${SUB3_DATA}
    Should Be Equal As Integers  ${resp.status_code}  200   

(DMAAP-297)
    [Documentation]    Query for all topics and specific topic
    Create Session     get          ${DBC_URL}
    ${resp}=           Get Request   get    /topics  
    Should Be Equal As Integers  ${resp.status_code}  200
    ${resp}=           Get Request   get    /topics/${TOPIC_NS}.singleMRtopic3
    Should Be Equal As Integers  ${resp.status_code}  200

(DMAAP-301)
    [Documentation]    Delete a subscriber
    Create Session     get          ${DBC_URL}
    ${resp}=           Get Request   get    /topics/${TOPIC_NS}.singleMRtopic3
    Should Be Equal As Integers  ${resp.status_code}  200
  ${tmp}=            Get Json Value      ${resp.text}           /clients/1/mrClientId
  ${clientId}=       Remove String       ${tmp}         \"
    ${resp}=           DelCall   ${DBC_URL}/mr_clients/${clientId}
    Should Be Equal As Integers  ${resp.status_code}  204

(DMAAP-302)
    [Documentation]    Delete a publisher
    Create Session     get          ${DBC_URL}
    ${resp}=           Get Request   get    /topics/${TOPIC_NS}.singleMRtopic3
    Should Be Equal As Integers  ${resp.status_code}  200
  ${tmp}=            Get Json Value      ${resp.text}           /clients/0/mrClientId
  ${clientId}=       Remove String       ${tmp}         \"
    ${resp}=           DelCall   ${DBC_URL}/mr_clients/${clientId}
    Should Be Equal As Integers  ${resp.status_code}  204


*** Keywords ***
CheckDir
    [Arguments]                 ${path}
    Directory Should Exist      ${path}

CheckUrl
    [Arguments]                  ${session}   ${path}     ${expect}
    ${resp}=                     Get  Request          ${session} ${path} 
    Should Be Equal As Integers  ${resp.status_code}  ${expect}

PostCall
    [Arguments]    ${url}           ${data}
    ${headers}=    Create Dictionary    Accept=application/json    Content-Type=application/json
    ${resp}=       Evaluate    requests.post('${url}',data='${data}', headers=${headers},verify=False)    requests
    [Return]       ${resp}

DelCall
    [Arguments]    ${url}           
    ${headers}=    Create Dictionary    Accept=application/json    Content-Type=application/json
    ${resp}=       Evaluate    requests.delete('${url}', headers=${headers},verify=False)    requests
    [Return]       ${resp}