2 Documentation CMPv2 Usecase functionality
4 Library RequestsLibrary
5 Library OperatingSystem
9 Library ONAPLibrary.JSON
10 Library ONAPLibrary.Utilities
11 Library ONAPLibrary.Templating WITH NAME Templating
12 Resource ../resources/global_properties.robot
13 Resource ../resources/test_templates/cmpv2.robot
14 Suite Setup Suite setup ${initial entry}
15 Suite Teardown Usecase Teardown
18 ${MONGO_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/cmpv2/k8s-mongo-ves-client.yaml
19 ${PNF_SIMULATOR_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/cmpv2/k8s-ves-client.yaml
20 ${VES_INPUTS} deployment/VesTlsCmpv2Inputs.jinja
21 ${pnf_ves_integration_request} ves/pnf_registration_request.jinja
22 ${NEXUS3} ${GLOBAL_INJECTED_NEXUS_DOCKER_REPO}
23 &{initial entry} correlation_id=dummy PNF_IPv4_address=11.11.11.1 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
27 Send registration request to CMPv2 VES
29 ... This test case triggers registration request from VES Client (where is present only CMPv2 certificate) to VES collector
30 ... with enabled CMPv2 (both CMPv2 and AAF certificates are present).
31 ... Test expects successful registration
33 ${pnf_correlation_id}= Generate Random String 20 [LETTERS][NUMBERS]
34 ${PNF_entry_dict}= Create Dictionary correlation_id=${pnf_correlation_id} PNF_IPv4_address=13.13.13.13 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
35 Wait Until Keyword Succeeds 10x 5s Check VES_PNFREG_OUTPUT topic presence in MR
36 Create PNF initial entry in A&AI ${PNF_entry_dict}
37 Templating.Create Environment ves ${GLOBAL_TEMPLATE_FOLDER}
38 ${template}= Templating.Apply Template ves ${pnf_ves_integration_request} ${PNF_entry_dict}
39 VES Client send single VES event ${template} dcae-ves-collector-cmpv2-cert 8443 ves-client-cmpv2 5000
40 Verify PNF Integration Request in A&AI ${PNF_entry_dict}
42 Send registration request to CMPv2 VES with wrong SAN-s
44 ... This test case triggers registration request from VES Client (where is present only CMPv2 certificate) to VES collector
45 ... ith enabled CMPv2 (both CMPv2 and AAF certificates are present). CMPv2 certificate has wrong SANs.
47 ${pnf_correlation_id}= Generate Random String 20 [LETTERS][NUMBERS]
48 ${PNF_entry_dict}= Create Dictionary correlation_id=${pnf_correlation_id} PNF_IPv4_address=14.14.14.14 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
49 Templating.Create Environment ves ${GLOBAL_TEMPLATE_FOLDER}
50 ${template}= Templating.Apply Template ves ${pnf_ves_integration_request} ${PNF_entry_dict}
51 ${resp}= VES Client send single VES event ${template} dcae-ves-collector-cmpv2-cert-wrong-sans 8443 ves-client-cmpv2 5000 421
52 Should Contain ${resp.json().get('message')} wrong-sans
54 Send registration request to VES without CMPv2 certificate
56 ... This test case triggers registration request from VES Client (where is present only CMPv2 certificate) to VES collector
57 ... with disabled CMPv2 (only AAF certificate is present - VES collector deployed during whole ONAP deploy).
59 Uninstall helm charts ${ONAP_HELM_RELEASE}-ves-client
60 Install VES Client wrongCert
61 ${pnf_correlation_id}= Generate Random String 20 [LETTERS][NUMBERS]
62 ${PNF_entry_dict}= Create Dictionary correlation_id=${pnf_correlation_id} PNF_IPv4_address=14.14.14.14 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
63 Templating.Create Environment ves ${GLOBAL_TEMPLATE_FOLDER}
64 ${template}= Templating.Apply Template ves ${pnf_ves_integration_request} ${PNF_entry_dict}
65 ${resp}= VES Client send single VES event ${template} dcae-ves-collector 8443 ves-client-cmpv2 5000 421
66 Should Contain ${resp.json().get('message')} certificate_unknown