2 Documentation CMPv2 test cases
3 Library OperatingSystem
4 Library RequestsLibrary
6 Library ONAPLibrary.JSON
7 Library ONAPLibrary.Utilities
8 Library ONAPLibrary.Templating WITH NAME Templating
9 Resource pnf_registration_without_SO_template.robot
10 Resource ../dcae/deployment.robot
11 Resource ../dcae/inventory.robot
12 Resource ../global_properties.robot
16 ${pnf_simulator_single_event}= ves/pnf_simulator_single_event.jinja
17 ${VES_ENDPOINT} ${GLOBAL_DCAE_VES_HTTPS_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VES_HOST}:${GLOBAL_DCAE_VES_HTTPS_SERVER_PORT}
18 ${VES_data_path} eventListener/v7
19 ${single_event_data_path} /simulator/event
20 ${users} ${EXECDIR}/robot/assets/cmpv2/mongo-users.json
24 VES Client send single VES event
25 [Arguments] ${event} ${ves_host} ${ves_port} ${pnf_sim_host} ${pnf_sim_port} ${http_reposnse_code}=202
26 ${pnf_sim_endpoint}= Set Variable http://${pnf_sim_host}.onap:${pnf_sim_port}
27 ${ves_url}= Set Variable ${GLOBAL_DCAE_VES_HTTPS_PROTOCOL}://${ves_host}:${ves_port}/${VES_data_path}
28 ${single_event}= Create Dictionary event=${event} ves_url=${ves_url}
29 Templating.Create Environment pnf ${GLOBAL_TEMPLATE_FOLDER}
30 ${data}= Templating.Apply Template pnf ${pnf_simulator_single_event} ${single_event}
31 ${session}= Create Session pnf_sim ${pnf_sim_endpoint}
32 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
33 ${post_resp}= Post Request pnf_sim ${single_event_data_path} data=${data} headers=${headers}
34 Log PNF registration request ${data}
35 Should Be Equal As Strings ${post_resp.status_code} ${http_reposnse_code}
36 Log VES has accepted event with status code ${post_resp.status_code}
41 Undeploy Service ${mongo-dep}
42 Undeploy Service ${ves-client-dep}
43 Undeploy Service ves-collector-cmpv2-dep
44 Undeploy Service ves-collector-cmpv2-wrong-sans-dep
45 Delete Blueprint From Inventory ${serviceTypeIdMongo}
46 Delete Blueprint From Inventory ${serviceTypeIdPnfSimulator}