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))]
 
 
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    JSONUtils
-Library    HttpLibrary.HTTP
 
 Resource          ../json_templater.robot
 
 
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    JSONUtils
-Library    HttpLibrary.HTTP
 Library    StringTemplater
 Resource          ../json_templater.robot
 Resource          ../stack_validation/validate_vlb.robot
 
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    JSONUtils
-Library    HttpLibrary.HTTP
 
 Resource          ../json_templater.robot
 
 
 Library           OperatingSystem
 Library           Collections
 Library           SeleniumLibrary
-Library           HttpLibrary.HTTP
 Library           String
 Library           StringTemplater
 Library           ArchiveLibrary
     #   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}
     # 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}
 
 Library                UUID
 Library                Collections
 Library         OperatingSystem
-Library         HttpLibrary.HTTP
 Library         SeleniumLibrary
 Library         RequestsLibrary
 
 
 Library                  Collections
 Library    OperatingSystem
 Library    String
-Library    HttpLibrary.HTTP
 Resource    ../global_properties.robot
 Resource    ../json_templater.robot
 Resource    openstack_common.robot
     ${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"]}
 
 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
 
 
 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
 
 
 Resource        vnf_orchestration_test_template.robot
 
 Library    String
-Library    HttpLibrary.HTTP
 LIbrary    Process
 
 *** Variables ***
     ${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
     ${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
 
 *** 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
 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
 
 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
     ${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
 
 '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'
 
 
                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