echo DR_NODE_IP=${DR_NODE_IP}
echo DR_GATEWAY_IP=${DR_GATEWAY_IP}
-docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP"
docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP"
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count
${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate
-${ROUTED_MESSAGES_TOPIC} test-hv-ran-meas
+${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP
${VES_HV_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources
${VES_HV_CONFIGURATION_JSON_FILEPATH} ${VES_HV_RESOURCES}/ves-hv-configuration.json
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "PERF3GPP",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
"dmaap.kafkaBootstrapServers": "kafka:9092",
"collector.routing": [
{
- "fromDomain": "HVMEAS",
- "toTopic": "test-hv-ran-meas"
+ "fromDomain": "PERF3GPP",
+ "toTopic": "TEST_HV_VES_PERF3GPP"
}
]
}
\ No newline at end of file
--- /dev/null
+{
+ "event": {
+ "commonEventHeader": {
+ "sourceName":"NOK6061ZW9"
+ },
+ "pnfRegistrationFields": {
+ "oamV4IpAddress":"10.17.123.24"
+ }
+ }
+}
${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json
${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json
${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json
+${EVENT_WITHOUT_IPV6_FILED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
${Not_json_format} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json
*** Test Cases ***
${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
${EVENT_WITH_IPV4}
${EVENT_WITH_IPV6}
+ ${EVENT_WITHOUT_IPV6_FILED}
Invalid DMaaP event cannot be converted to PNF_READY notification
[Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification
@staticmethod
def create_pnf_ready_notification(json_file):
json_to_python = json.loads(json_file)
- ipv4 = json_to_python["event"]["pnfRegistrationFields"]["oamV4IpAddress"]
- ipv6 = json_to_python["event"]["pnfRegistrationFields"]["oamV6IpAddress"]
- correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"]
- str_json = '{"correlationId":"' + correlationId + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}'
+ ipv4 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV4IpAddress")
+ ipv6 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV6IpAddress") if "oamV6IpAddress" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName")
+ str_json = '{"correlationId":"' + correlation_id + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}'
python_to_json = json.dumps(str_json)
return python_to_json.replace("\\", "")[1:-1]
@staticmethod
def create_pnf_name(json_file):
json_to_python = json.loads(json_file)
- correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"]
- return correlationId
+ correlation_id = json_to_python.get("sourceName")
+ return correlation_id
@staticmethod
def stop_aai():
${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1
${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1
${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1
-${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test
+${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test
+${TARGET_URL_PUBLISH_NODE} https://${DR_NODE_IP}:8443/publish/1/csit_test
${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}}
${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}}
${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"}
[Documentation] Publish to Feed
[Timeout] 1 minute
Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent
- ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
- log ${TARGET_URL_PUBLISH}
- log ${resp.text}
+ ${resp}= PutCall ${TARGET_URL_PUBLISH_PROV} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
+ log ${TARGET_URL_PUBLISH_PROV}
+ Should Contain ${resp.headers['Location']} https://dmaap-dr-node:8443/publish/1/csit_test
+ ${resp}= PutCall ${TARGET_URL_PUBLISH_NODE} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
Should Be Equal As Strings ${resp.status_code} 204
log 'JSON Response Code:'${resp}
PostCall
[Arguments] ${url} ${data} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type}
- ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, verify=False) requests
[Return] ${resp}
PutCall
[Arguments] ${url} ${data} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ==
- ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, verify=False, allow_redirects=False) requests
[Return] ${resp}
GetCall
[Arguments] ${url} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type}
- ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests
[Return] ${resp}
DeleteCall
[Arguments] ${url} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user}
- ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.delete('${url}', headers=${headers}, verify=False) requests
[Return] ${resp}