summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--red.xml2
-rw-r--r--robot/resources/dcae/hvves.robot25
-rw-r--r--robot/testsuites/hvves.robot5
-rwxr-xr-xsetup.sh4
4 files changed, 11 insertions, 25 deletions
diff --git a/red.xml b/red.xml
index 182c4f62..dd831443 100644
--- a/red.xml
+++ b/red.xml
@@ -22,8 +22,8 @@
<referencedLibrary type="PYTHON" name="ArchiveLibrary" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="HeatBridge" path="testsuite/robot/library/heatbridge"/>
<referencedLibrary type="PYTHON" name="KafkaLibrary" path="testsuite/robot/library"/>
- <referencedLibrary type="PYTHON" name="Rammbock" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="DateTime" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="SocketUtils" path="testsuite/robot/library/eteutils"/>
<pythonpath>
<path location="robot/library"/>
</pythonpath>
diff --git a/robot/resources/dcae/hvves.robot b/robot/resources/dcae/hvves.robot
index 74f04dc0..68230355 100644
--- a/robot/resources/dcae/hvves.robot
+++ b/robot/resources/dcae/hvves.robot
@@ -2,12 +2,14 @@
Documentation Template contains stuff for HV-VES use case.
Library OperatingSystem
Library RequestsLibrary
-Library Rammbock
Library BuiltIn
Library Collections
+Library SocketUtils
+Library String
+Resource ../mr_interface.robot
*** Variables ***
-${hvves_message} 0x0a94020a0e73616d706c652d76657273696f6e12087065726633677070180120012a0a70657266334750503232321173616d706c652d6576656e742d6e616d653a1173616d706c652d6576656e742d7479706540f19afddd0548f19afddd05521573616d706c652d6e662d6e616d696e672d636f64655a1673616d706c652d6e66632d6e616d696e672d636f6465621573616d706c652d6e662d76656e646f722d6e616d656a1a73616d706c652d7265706f7274696e672d656e746974792d6964721c73616d706c652d7265706f7274696e672d656e746974792d6e616d657a1073616d706c652d736f757263652d696482010f73616d706c652d786e662d6e616d658a01095554432b30323a3030920105372e302e32120e7465737420746573742074657374
+${hvves_message} \xaa\x01\x00\x00\x00\x00\x00\x01\x00\x00\x01'\n\x94\x02\n\x0esample-version\x12\x08perf3gpp\x18\x01 \x01*\nperf3GPP222\x11sample-event-name:\x11sample-event-type@\xf1\x9a\xfd\xdd\x05H\xf1\x9a\xfd\xdd\x05R\x15sample-nf-naming-codeZ\x16sample-nfc-naming-codeb\x15sample-nf-vendor-namej\x1asample-reporting-entity-idr\x1csample-reporting-entity-namez\x10sample-source-id\x82\x01\x0fsample-xnf-name\x8a\x01\tUTC+02:00\x92\x01\x057.0.2\x12\x0etest test test
${hvves_kafka_topic} HV_VES_PERF3GPP
${security_protocol} SASL_PLAINTEXT
${sasl_mechanisms} PLAIN
@@ -29,29 +31,16 @@ Check If Topic Exists
${value}= Catenate ${resp.json()['topics']}
Should Contain ${value} ${topic}
-Define WTP Protocol
- [Documentation] Defines Wire Transfer Protocol.
- New Protocol WireTransferProtocol
- u8 magic 0xAA
- u8 versionMajor 0x01
- u8 versionMinor 0x00
- u24 reserved 0x000000
- u16 payloadId 0x0001
- u32 payloadLength 0x00000127
- uint 295 payload ${hvves_message}
- End Protocol
-
Start HV-VES TCP Client And Send Message
[Documentation] Starts HV-VES TCP client sends message to the collector.
[Arguments] ${hvves_server_ip} ${hvves_server_port}
- Start Tcp Client timeout=5 protocol=WireTransferProtocol
- Connect ${hvves_server_ip} ${hvves_server_port}
- New Message HvVesMessage protocol=WireTransferProtocol
- Client Sends Message
+ ${msg}= Convert To Bytes ${hvves_message}
+ Send Binary Data ${hvves_server_ip} ${hvves_server_port} ${msg}
Decode Last Message From Topic
[Documentation] Decode last message from Kafka topic.
[Arguments] ${kafka_server} ${kafka_port} ${kafka_topic} ${sec_protocol} ${mechanisms} ${username} ${password}
+ #Catenate http://message-router.onap:3904/events/${kafka_topic}/group1/C1?timeout=5000?limit=1
${msg}= Run kafkacat -C -b ${kafka_server}:${kafka_port} -t ${kafka_topic} -X security.protocol=${sec_protocol} -X sasl.mechanisms=${mechanisms} -X sasl.username=${username} -X sasl.password=${password} -D "" -o -1 -c 1 | protoc --decode_raw
[Return] ${msg}
diff --git a/robot/testsuites/hvves.robot b/robot/testsuites/hvves.robot
index d72a60a5..ea9d678f 100644
--- a/robot/testsuites/hvves.robot
+++ b/robot/testsuites/hvves.robot
@@ -4,17 +4,14 @@ Default Tags hvves ete
Test Timeout 3m
Resource ../resources/global_properties.robot
Resource ../resources/dcae/hvves.robot
-Library Rammbock
Library OperatingSystem
*** Test Cases ***
HV-VES test case
Check Message Router Api ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${hvves_kafka_topic}
- Define WTP Protocol
Start HV-VES TCP Client And Send Message ${GLOBAL_DCAE_HVVES_SERVER_NAME} ${GLOBAL_DCAE_HVVES_SERVER_PORT}
Wait Until Keyword Succeeds 30s 5s Check If Topic Exists ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${hvves_kafka_topic}
Check Message Router Api ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${hvves_kafka_topic}
${msg_decoded}= Decode Last Message From Topic ${GLOBAL_DMAAP_KAFKA_SERVER_NAME} ${GLOBAL_DMAAP_KAFKA_SERVER_PORT} ${hvves_kafka_topic} ${security_protocol} ${sasl_mechanisms} ${GLOBAL_DMAAP_KAFKA_JAAS_USERNAME} ${GLOBAL_DMAAP_KAFKA_JAAS_PASSWORD}
${msg_decoded_template}= Get File ${EXECDIR}/robot/assets/templates/hvves/hvves_decoded_msg.template
- Should Be Equal As Strings ${msg_decoded} ${msg_decoded_template}
- [Teardown] Reset Rammbock
+ Should Be Equal As Strings ${msg_decoded} ${msg_decoded_template} \ No newline at end of file
diff --git a/setup.sh b/setup.sh
index 5bcea11d..3ed762a3 100755
--- a/setup.sh
+++ b/setup.sh
@@ -24,9 +24,9 @@ pip install \
'robotframework-requests==0.5.0' \
'robotframework-sshlibrary==3.3.0' \
'robotframework-ftplibrary==1.6' \
-'robotframework-rammbock==0.4.0.1' \
+'robotframework-pykafka==0.10' \
'robotframework-archivelibrary==0.4.0' \
-'robotframework-onap==0.4'
+'robotframework-onap==0.5'
if [ -d $path/testsuite/heatbridge ]