2 Resource ./resources/dcae_keywords.robot
4 Enable VESC HTTPS with certBasicAuth
5 [Tags] DCAE-VESC-R1 DCAE-VESC-HC
6 [Documentation] Enable VESC Https and Authentication and Run Health Check
7 Override Collector Properties ${VES_CERT_BASIC_AUTH_COLLECTOR_PROPERTIES}
8 Run Healthcheck ${https_basic_auth_session}
10 VES Collector HTTP Health Check with certBasicAuth
11 [Tags] DCAE-VESC-R1 DCAE-VESC-HC
12 [Documentation] Run healthcheck over HTTP with certBasicAuth
13 Run Healthcheck ${http_session}
15 Healthcheck with Outdated Cert
16 [Tags] DCAE-VESC-R1 DCAE-VESC-HC
17 [Documentation] Run healthcheck with outdated cert
18 ${uuid}= Generate UUID
19 ${headers}= Create Dictionary Accept=*/* X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
20 ${err_msg}= Run Keyword And Expect Error SSLError:* Get Request ${https_outdated_cert_session} /healthcheck headers=${headers}
21 Should Contain ${err_msg} certificate unknown
22 Log Recieved error message ${err_msg}
24 Publish Single VES Fault Event Over HTTPS
26 [Documentation] Post single event with valid data to /eventListener/v5 endpoint over HTTPS and expect 202 Response Status Code
27 Log Login User=${VESC_HTTPS_USER}, Pd=${VESC_HTTPS_PD}
28 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
30 Publish Single VES Measurement Event Over HTTPS
32 [Documentation] Post single measurement event with valid data to /eventListener/v5 endpoint over HTTPS and expect 202 Response Status Code
33 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_ANY_EVENT_PATH} ${EVENT_MEASURE_FILE} 202 0b2b5790-3673-480a-a4bd-5a00b88e5af6
35 Publish VES Fault Batch Events Over HTTPS
37 [Documentation] Post single event with valid data to /eventListener/v5/eventBatch endpoint over HTTPS and expect 202 Response Status Code
38 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_BATCH_EVENT_PATH} ${EVENT_BATCH_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546025
40 Publish VES Event With Invalid URL Path HTTPS
42 [Documentation] Post single event to invalid url path over HTTPS and expect 404 response Status Code
43 Log Send HTTP Request with invalid /eventlistener/v5/ instead of /eventListener/v5 path
44 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} /eventlistener/v5 ${EVENT_DATA_FILE} 404
46 Publish Single VES VNF Measurement Event over HTTP
48 [Documentation] Post single event over HTTP with authentication enabled and expect 400 Response Status Code
49 Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 400
51 Publish Single VES VNF Measurement Event with certBasicAuth over HTTPS
53 [Documentation] Post single event with valid data and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
54 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
56 Publish Single VES VNF Measurement Event over HTTPS with wrong JSON
58 [Documentation] Post single event with invalid data and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 400 Response Status Code
59 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_INVALID_JSON_V7} 400
61 Publish Single VES VNF Measurement Event With Wrong Auth
63 [Documentation] Post single event with valid data and invalid username/password to /eventListener/v7 endpoint over HTTPS and expect 401 Response Status Code
64 Send Request And Validate Response Publish Event To VES Collector ${https_wrong_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 401
66 Publish Single VES VNF Measurement Event With Cert
68 [Documentation] Post single event with valid data and valid certificate to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
69 Send Request And Validate Response Publish Event To VES Collector ${https_valid_cert_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
71 Publish Single VES VNF Measurement Event With Wrong Cert
73 [Documentation] Post single event with valid data and invalid certificate to /eventListener/v7 endpoint over HTTPS and expect SSLError with certificate unknown
74 @{err_content} Create List certificate unknown
75 Send Request And Expect Error Publish Event To VES Collector ${https_invalid_cert_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} SSLError:* @{err_content}
77 Publish Single VES VNF Measurement Event With Outdated Cert
79 [Documentation] Post single event with valid data and outdated certificate to /eventListener/v7 endpoint over HTTPS and expect SSLError with certificate unknown
80 @{err_content} Create List certificate unknown
81 Send Request And Expect Error Publish Event To VES Collector ${https_outdated_cert_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} SSLError:* @{err_content}
83 Publish Single VES VNF Measurement Event Without Auth And Cert
85 [Documentation] Post single event with valid data and without certificate or username/password to /eventListener/v7 endpoint over HTTPS and expect 401 Response Status Code
86 Send Request And Validate Response Publish Event To VES Collector ${https_no_cert_no_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 401
88 Publish V7 Batch Event with certBasicAuth over HTTPS
90 [Documentation] Post single event with valid data and valid username/password to /eventListener/v7/eventBatch endpoint over HTTPS and expect 202 Response Status Code
91 Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 202 Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion
93 Publish V7 Batch Event With Wrong Auth
95 [Documentation] Post single event with valid data and invalid username/password to /eventListener/v7/eventBatch endpoint over HTTPS and expect 401 Response Status Code
96 Send Request And Validate Response Publish Event To VES Collector ${https_wrong_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 401
98 Publish V7 Batch Event With Cert
100 [Documentation] Post single event with valid data and valid certificate to /eventListener/v7/eventBatch endpoint over HTTPS and expect 202 Response
101 Send Request And Validate Response Publish Event To VES Collector ${https_valid_cert_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 202 Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion
103 Publish V7 Batch With Wrong Cert
105 [Documentation] Post single event with valid data and invalid certificate to /eventListener/v7/eventBatch endpoint over HTTPS and expect SSLError with certificate unknown
106 @{err_content} Create List certificate unknown
107 Send Request And Expect Error Publish Event To VES Collector ${https_invalid_cert_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} SSLError:* @{err_content}
109 Publish V7 Batch Event With Outdated Cert
111 [Documentation] Post single event with valid data and outdated certificate to /eventListener/v7/eventBatch endpoint over HTTPS and expect SSLError with certificate unknown
112 @{err_content} Create List certificate unknown
113 Send Request And Expect Error Publish Event To VES Collector ${https_outdated_cert_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} SSLError:* @{err_content}
115 Publish V7 Batch Event Without Auth And Cert
117 [Documentation] Post single event with valid data and without certificate or username/password to /eventListener/v7/eventBatch endpoint over HTTPS and expect 401 Response Status Code
118 Send Request And Validate Response Publish Event To VES Collector ${https_no_cert_no_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 401