remove unneeded libraries

httplibrary is replicated with requests so replacing the few places that
use it with the requests. also removing kafkalibrary since it isnt used
and we dont want to use it since its not python 3 compatible.

Change-Id: I4acd09e4f0f776ebf99f386d17637712551b3243
Issue-ID: TEST-155
Signed-off-by: DR695H <dr695h@att.com>
diff --git a/robot/assets/service_mappings.py b/robot/assets/service_mappings.py
index a6af36d..908c540 100644
--- a/robot/assets/service_mappings.py
+++ b/robot/assets/service_mappings.py
@@ -44,7 +44,6 @@
 GLOBAL_VALIDATE_NAME_MAPPING2 = {} 
 
 
-
 folder=os.path.join('./demo/service_mapping')
 subfolders = [d for d in os.listdir(folder) if os.path.isdir(os.path.join(folder, d))]
 
diff --git a/robot/resources/aai/network.robot b/robot/resources/aai/network.robot
index 6bda4e2..51b0df4 100644
--- a/robot/resources/aai/network.robot
+++ b/robot/resources/aai/network.robot
@@ -8,7 +8,6 @@
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    JSONUtils
-Library    HttpLibrary.HTTP
 
 Resource          ../json_templater.robot
 
diff --git a/robot/resources/aai/service_instance.robot b/robot/resources/aai/service_instance.robot
index 31a4a61..bd399a2 100644
--- a/robot/resources/aai/service_instance.robot
+++ b/robot/resources/aai/service_instance.robot
@@ -8,7 +8,6 @@
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    JSONUtils
-Library    HttpLibrary.HTTP
 Library    StringTemplater
 Resource          ../json_templater.robot
 Resource          ../stack_validation/validate_vlb.robot
diff --git a/robot/resources/aai/volume_group.robot b/robot/resources/aai/volume_group.robot
index 40674a5..de3e28d 100644
--- a/robot/resources/aai/volume_group.robot
+++ b/robot/resources/aai/volume_group.robot
@@ -8,7 +8,6 @@
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    JSONUtils
-Library    HttpLibrary.HTTP
 
 Resource          ../json_templater.robot
 
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index 6ffc17e..35eab12 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -6,7 +6,6 @@
 Library           OperatingSystem
 Library           Collections
 Library           SeleniumLibrary
-Library           HttpLibrary.HTTP
 Library           String
 Library           StringTemplater
 Library           ArchiveLibrary
@@ -84,7 +83,6 @@
     #   Save the resource_id in a dictionary keyed byt the resource NAme in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip)
     #   Create the resources but dont immediately add resource
     #   Add Resource to Service in a separate FOR loop
-    #  TODO: CHECK vCPE models to make sure they aren't broken with the split
     ${resource_types}=   Create Dictionary
 
     :FOR    ${zip}     IN     @{model_zip_path}
@@ -178,12 +176,12 @@
     # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs
     Create Allotted Resource Data File
     ${vcpe_ar_data_file}    OperatingSystem.Get File    /tmp/vcpe_allotted_resource_data.json
-    ${tunnelxconn_invariant_uuid}    Get Json Value    ${vcpe_ar_data_file}    /tunnelxconn/invariantUUID
-    ${tunnelxconn_uuid}    Get Json Value    ${vcpe_ar_data_file}    /tunnelxconn/UUID
-    ${tunnelxconn_node_type}    Get Json Value    ${vcpe_ar_data_file}    /tunnelxconn/node_type
-    ${brg_invariant_uuid}    Get Json Value    ${vcpe_ar_data_file}    /brg/invariantUUID
-    ${brg_uuid}    Get Json Value    ${vcpe_ar_data_file}    /brg/UUID
-    ${brg_node_type}    Get Json Value    ${vcpe_ar_data_file}    /brg/node_type
+    ${tunnelxconn_invariant_uuid}=    Catenate    ${vcpe_ar_data_file.json()['tunnelxconn']['invariantUUID']}
+    ${tunnelxconn_uuid}=    Catenate    ${vcpe_ar_data_file.json()['tunnelxconn']['UUID']}
+    ${tunnelxconn_node_type}=    Catenate    ${vcpe_ar_data_file.json()['tunnelxconn']['node_type']}
+    ${brg_invariant_uuid}=    Catenate    ${vcpe_ar_data_file.json()['brg']['invariantUUID']}
+    ${brg_uuid}=    Catenate    ${vcpe_ar_data_file.json()['brg']['UUID']}
+    ${brg_node_type}=    Catenate    ${vcpe_ar_data_file.json()['brg']['node_type']}
     ${tunnelxconn_dict}=   Create Dictionary      invariantUUID=${tunnelxconn_invariant_uuid}  UUID=${tunnelxconn_uuid}  node_type=${tunnelxconn_node_type}
     ${brg_dict}=   Create Dictionary      invariantUUID=${brg_invariant_uuid}   UUID=${brg_uuid}  node_type=${brg_node_type}
     ${xoffset}=    Set Variable    ${100}
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index ef8bbab..dd16bfc 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -13,7 +13,6 @@
 Library	        UUID
 Library	        Collections
 Library         OperatingSystem
-Library         HttpLibrary.HTTP
 Library         SeleniumLibrary
 Library         RequestsLibrary
 
diff --git a/robot/resources/openstack/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot
index 03e94bb..3fe13c7 100644
--- a/robot/resources/openstack/keystone_interface.robot
+++ b/robot/resources/openstack/keystone_interface.robot
@@ -7,7 +7,6 @@
 Library	          Collections
 Library    OperatingSystem
 Library    String
-Library    HttpLibrary.HTTP
 Resource    ../global_properties.robot
 Resource    ../json_templater.robot
 Resource    openstack_common.robot
@@ -54,8 +53,7 @@
     ${resp}=    Get Request    keystone  /   headers=${headers}
     Log    Received response from keystone ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    300
-    ${json}=    Parse Json    ${resp.content}
-    ${versions}=   Get From Dictionary    ${json}   versions
+    ${versions}=   Get From Dictionary    ${resp.json()}   versions
     ${values}=   Get From Dictionary    ${versions}   values
     :FOR    ${value}    IN    @{values}
        \  ${status}=    Get Variable Value    ${value["status"]}
diff --git a/robot/resources/ssh/files.robot b/robot/resources/ssh/files.robot
index fcfffbb..9ccdd71 100644
--- a/robot/resources/ssh/files.robot
+++ b/robot/resources/ssh/files.robot
@@ -2,7 +2,6 @@
 Documentation     Some handy Keywords for accessing log files over SSH.  Assumptions are that logs will belong to users other than the currently logged in user and that sudo will be required
 Library           OperatingSystem
 Library 	      SSHLibrary
-Library           HttpLibrary.HTTP
 Library           String
 Library           Collections
 
diff --git a/robot/resources/ssh/processes.robot b/robot/resources/ssh/processes.robot
index 8b5cf15..44d82c8 100644
--- a/robot/resources/ssh/processes.robot
+++ b/robot/resources/ssh/processes.robot
@@ -2,7 +2,6 @@
 Documentation     Some handy Keywords for accessing log files over SSH.  Assumptions are that logs will belong to users other than the currently logged in user and that sudo will be required
 Library           OperatingSystem
 Library 	      SSHLibrary    60 seconds
-Library           HttpLibrary.HTTP
 Library           String
 Library           Collections
 
diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot
index 5853abf..dcbb7e6 100644
--- a/robot/resources/test_templates/closedloop_test_template.robot
+++ b/robot/resources/test_templates/closedloop_test_template.robot
@@ -7,7 +7,6 @@
 Resource        vnf_orchestration_test_template.robot
 
 Library    String
-Library    HttpLibrary.HTTP
 LIbrary    Process
 
 *** Variables ***
@@ -82,9 +81,7 @@
     ${output} =     Fill JSON Template File     ${GECONFIG_VFW_TEMPLATE}    ${configpolicy_name}
     ${get_resp} =    Run Policy Get Configs Request    ${RESOURCE_PATH_GET_CONFIG}   ${output}
 	Should Be Equal As Strings 	${get_resp.status_code} 	200
-
-	${json}=    Parse Json    ${get_resp.content}
-    ${config}=    Parse Json    ${json[0]["config"]}
+    ${config}=    Catenate    ${get_resp.json()[0]["config"]}
     ${thresholds}=    Get Variable Value      ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"]}
 
     # Extract object1 from Array
@@ -104,8 +101,7 @@
     ${output} =     Fill JSON Template File     ${GECONFIG_VFW_TEMPLATE}    ${configpolicy_name}
     ${get_resp} =    Run Policy Get Configs Request    ${RESOURCE_PATH_GET_CONFIG}   ${output}
 	Should Be Equal As Strings 	${get_resp.status_code} 	200
-    ${json}=    Parse Json    ${get_resp.content}
-    ${config}=    Parse Json    ${json[0]["config"]}
+    ${config}=    Catenate    ${get_resp.json()[0]["config"]}
     ${thresholds}=    Get Variable Value      ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"]}
 
     # Extract object1 from Array
diff --git a/robot/resources/test_templates/hvves_template.robot b/robot/resources/test_templates/hvves_template.robot
index 622cacb..74f04dc 100644
--- a/robot/resources/test_templates/hvves_template.robot
+++ b/robot/resources/test_templates/hvves_template.robot
@@ -1,10 +1,10 @@
 *** Settings ***
 Documentation   Template contains stuff for HV-VES use case.
 Library     OperatingSystem
+Library     RequestsLibrary
 Library     Rammbock
 Library     BuiltIn
 Library     Collections
-Library     HttpLibrary.HTTP
 
 *** Variables ***
 ${hvves_message}    0x0a94020a0e73616d706c652d76657273696f6e12087065726633677070180120012a0a70657266334750503232321173616d706c652d6576656e742d6e616d653a1173616d706c652d6576656e742d7479706540f19afddd0548f19afddd05521573616d706c652d6e662d6e616d696e672d636f64655a1673616d706c652d6e66632d6e616d696e672d636f6465621573616d706c652d6e662d76656e646f722d6e616d656a1a73616d706c652d7265706f7274696e672d656e746974792d6964721c73616d706c652d7265706f7274696e672d656e746974792d6e616d657a1073616d706c652d736f757263652d696482010f73616d706c652d786e662d6e616d658a01095554432b30323a3030920105372e302e32120e7465737420746573742074657374
@@ -16,20 +16,17 @@
 Check Message Router Api
     [Documentation]    Checks message via message router API.
     [Arguments]    ${message_router}    ${message_router_port}    ${topic}
-    ${status}    ${response}=    Run Keyword And Ignore Error    GET    http://${message_router}:${message_router_port}/events/${topic}/1/1
-    ${response_code}=    Get Response Status
-    ${response_body}=    Get Response Body
-    Run Keyword If    '${status}'=='FAIL'    Should Start With    ${response_code}    404
-    Run Keyword If    '${status}'=='FAIL'    Log    Topic ${topic} does not exist.
-    Run Keyword If    '${status}'=='PASS'    Should Start With    ${response_code}    200
-    Run Keyword If    '${status}'=='PASS'    Log    Topic ${topic} exists.
+    ${session}=    Create Session   session   http://${message_router}:${message_router_port}/events
+    ${resp}=   Get Request   session   /${topic}/1/1
+    Run Keyword If    400 <= ${resp.status_code} < 500    Log    Topic ${topic} does not exist.
+    Run Keyword If    200 <= ${resp.status_code} < 300    Log    Topic ${topic} exists.
 
 Check If Topic Exists
     [Documentation]      Checks if specific topic exists on kafka.
     [Arguments]      ${message_router}      ${message_router_port}      ${topic}
-    ${response}=    GET    http://${message_router}:${message_router_port}/topics
-    ${body}=    Get Response Body
-    ${value}=    Get Json Value    ${body}    /topics
+    ${session}=    Create Session   session   http://${message_router}:${message_router_port}/topics
+    ${resp}=   Get Request   session   /
+    ${value}=    Catenate    ${resp.json()['topics']}    
     Should Contain    ${value}    ${topic}
 
 Define WTP Protocol
diff --git a/robot/testsuites/hvves.robot b/robot/testsuites/hvves.robot
index 62be1b7..57b2744 100644
--- a/robot/testsuites/hvves.robot
+++ b/robot/testsuites/hvves.robot
@@ -4,9 +4,8 @@
 Test Timeout    3m
 Resource    ${EXECDIR}/robot/resources/global_properties.robot
 Resource    ${EXECDIR}/robot/resources/test_templates/hvves_template.robot
-Suite Teardown  Reset Rammbock
-
-*** Variables ***
+Library    Rammbock
+Library    OperatingSystem
 
 *** Test Cases ***
 HV-VES test case
@@ -18,3 +17,4 @@
     ${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
\ No newline at end of file
diff --git a/setup.sh b/setup.sh
index 6ccfddb..5bcea11 100755
--- a/setup.sh
+++ b/setup.sh
@@ -25,9 +25,7 @@
 'robotframework-sshlibrary==3.3.0' \
 'robotframework-ftplibrary==1.6' \
 'robotframework-rammbock==0.4.0.1' \
-'robotframework-httplibrary==0.4.2' \
 'robotframework-archivelibrary==0.4.0' \
-'robotframework-kafkalibrary==0.0.2' \
 'robotframework-onap==0.4'
 
 
@@ -96,4 +94,15 @@
 		unzip $CHROMEDRIVER_TARGET
 	fi
 	rm -rf $CHROMEDRIVER_TARGET
-fi
\ No newline at end of file
+fi
+
+#
+# Install kafkacat : https://github.com/edenhill/kafkacat
+#
+OS=`uname -s`
+case $OS in
+	Darwin)
+		brew install kafkacat ;;
+	Linux)
+		apt-get -y install kafkacat
+esac
\ No newline at end of file