diff --git a/lib/gen_call_robot.py b/lib/gen_call_robot.py
index e873c52..91231bf 100755
--- a/lib/gen_call_robot.py
+++ b/lib/gen_call_robot.py
@@ -164,22 +164,10 @@
                 # Use to the apollo dir path.
                 ROBOT_TEST_BASE_DIR_PATH = apollo_dir_path + suffix
 
-    OBMC_TOOLS_BASE_DIR_PATH = (
-        os.path.dirname(ROBOT_TEST_BASE_DIR_PATH.rstrip("/"))
-        + "/openbmc-tools/"
-    )
-    OPENBMCTOOL_DIR_PATH = OBMC_TOOLS_BASE_DIR_PATH + "openbmctool/"
-    JSON_CHECKER_TOOLS_DIR_PATH = (
-        OBMC_TOOLS_BASE_DIR_PATH + "expectedJsonChecker/"
-    )
-
     gv.valid_value(ROBOT_TEST_BASE_DIR_PATH)
     gp.dprint_vars(
         ROBOT_TEST_RUNNING_FROM_SB,
         ROBOT_TEST_BASE_DIR_PATH,
-        OBMC_TOOLS_BASE_DIR_PATH,
-        OPENBMCTOOL_DIR_PATH,
-        JSON_CHECKER_TOOLS_DIR_PATH,
     )
     gv.valid_dir_path(ROBOT_TEST_BASE_DIR_PATH)
 
@@ -190,17 +178,6 @@
     gm.set_mod_global(ROBOT_TEST_RUNNING_FROM_SB)
     os.environ["ROBOT_TEST_RUNNING_FROM_SB"] = str(ROBOT_TEST_RUNNING_FROM_SB)
 
-    gm.set_mod_global(OBMC_TOOLS_BASE_DIR_PATH)
-    os.environ["OBMC_TOOLS_BASE_DIR_PATH"] = str(OBMC_TOOLS_BASE_DIR_PATH)
-
-    gm.set_mod_global(OPENBMCTOOL_DIR_PATH)
-    os.environ["OPENBMCTOOL_DIR_PATH"] = str(OPENBMCTOOL_DIR_PATH)
-
-    gm.set_mod_global(JSON_CHECKER_TOOLS_DIR_PATH)
-    os.environ["JSON_CHECKER_TOOLS_DIR_PATH"] = str(
-        JSON_CHECKER_TOOLS_DIR_PATH
-    )
-
 
 raw_robot_file_search_path = (
     "${ROBOT_TEST_BASE_DIR_PATH}:"
@@ -467,7 +444,6 @@
     ROBOT_TEST_RUNNING_FROM_SB = gm.get_mod_global(
         "ROBOT_TEST_RUNNING_FROM_SB"
     )
-    OPENBMCTOOL_DIR_PATH = gm.get_mod_global("OPENBMCTOOL_DIR_PATH")
 
     if robot_jail == "":
         if ROBOT_TEST_RUNNING_FROM_SB:
@@ -511,7 +487,6 @@
                 "/usr/bin",
                 "/sbin",
                 "/bin",
-                OPENBMCTOOL_DIR_PATH.rstrip("/"),
             ]
         )
         PATH = ":".join(NEW_PATH_LIST)
@@ -523,12 +498,7 @@
             + "lib"
         )
         PATH = (
-            os.environ.get("PATH", "")
-            + ":"
-            + ROBOT_TEST_BASE_DIR_PATH
-            + "bin"
-            + ":"
-            + OPENBMCTOOL_DIR_PATH.rstrip("/")
+            os.environ.get("PATH", "") + ":" + ROBOT_TEST_BASE_DIR_PATH + "bin"
         )
 
     os.environ["PYTHONPATH"] = PYTHONPATH
diff --git a/lib/openbmctool_utils.py b/lib/openbmctool_utils.py
deleted file mode 100755
index f89683d..0000000
--- a/lib/openbmctool_utils.py
+++ /dev/null
@@ -1,625 +0,0 @@
-#!/usr/bin/env python3
-
-r"""
-This module provides many valuable openbmctool.py functions such as
-openbmctool_execute_command.
-"""
-
-import collections
-import json
-import re
-import tempfile
-
-import gen_cmd as gc
-import gen_misc as gm
-import gen_print as gp
-import gen_valid as gv
-import utils as utils
-import var_funcs as vf
-from robot.libraries.BuiltIn import BuiltIn
-
-
-def openbmctool_execute_command(command_string, *args, **kwargs):
-    r"""
-    Run the command string as an argument to the openbmctool.py program and
-    return the stdout and the return code.
-
-    This function provides several benefits versus calling shell_cmd directly:
-    - This function will obtain the global values for OPENBMC_HOST,
-      OPENBMC_USERNAME, etc.
-    - This function will compose the openbmctool.py command string which
-      includes the caller's command_string.
-    - The openbmctool.py produces additional text that clutters the output.
-      This function will remove such text.  Example:
-        Attempting login...
-        <actual output>
-        User root has been logged out
-
-    NOTE: If you have pipe symbols in your command_string, they must be
-    surrounded by a single space on each side (see example below).
-
-    Example code:
-    ${rc}  ${output}=  Openbmctool Execute Command  fru status | head -n 2
-
-    Example output:
-    #(CDT) 2018/09/19 15:16:58 - Issuing: set -o pipefail ; openbmctool.py -H hostname -U root -P ********
-    ...  fru status | tail -n +1 | egrep -v 'Attempting login|User [^ ]+ hasbeen logged out' | head -n 2
-    Component     | Is a FRU  | Present  | Functional  | Has Logs
-    cpu0          | Yes       | Yes      | Yes         | No
-
-    Description of arguments:
-    command_string                  The command string to be passed to the
-                                    openbmctool.py program.
-    All remaining arguments are passed directly to shell_cmd.  See the
-    shell_cmd prolog for details on allowable arguments.  The caller may code
-    them directly as in this example:
-    openbmctool_execute_command("my command", quiet=1, max_attempts=2).
-    Python will do the work of putting these values into args/kwargs.
-    """
-
-    if not gv.valid_value(command_string):
-        return "", "", 1
-
-    # Get global BMC variable values.
-    openbmc_host = BuiltIn().get_variable_value("${OPENBMC_HOST}", default="")
-    https_port = BuiltIn().get_variable_value("${HTTPS_PORT}", default="443")
-    openbmc_username = BuiltIn().get_variable_value(
-        "${OPENBMC_USERNAME}", default=""
-    )
-    openbmc_password = BuiltIn().get_variable_value(
-        "${OPENBMC_PASSWORD}", default=""
-    )
-    if not gv.valid_value(openbmc_host):
-        return "", "", 1
-    if not gv.valid_value(openbmc_username):
-        return "", "", 1
-    if not gv.valid_value(openbmc_password):
-        return "", "", 1
-    if not gv.valid_value(https_port):
-        return "", "", 1
-
-    # Break the caller's command up into separate piped commands.  For
-    # example, the user may have specified "fru status | head -n 2" which
-    # would be broken into 2 list elements.  We will also break on ">"
-    # (re-direct).
-    pipeline = list(
-        map(str.strip, re.split(r" ([\|>]) ", str(command_string)))
-    )
-    # The "tail" command below prevents a "egrep: write error: Broken pipe"
-    # error if the user is piping the output to a sub-process.
-    # Use "egrep -v" to get rid of editorial output from openbmctool.py.
-    pipeline.insert(
-        1,
-        (
-            "| tail -n +1 | egrep -v 'Attempting login|User [^ ]+"
-            " has been logged out'"
-        ),
-    )
-
-    command_string = (
-        "set -o pipefail ; python3 $(which openbmctool.py) -H "
-        + openbmc_host
-        + ":"
-        + https_port
-        + " -U "
-        + openbmc_username
-        + " -P "
-        + openbmc_password
-        + " "
-        + " ".join(pipeline)
-    )
-
-    return gc.shell_cmd(command_string, *args, **kwargs)
-
-
-def openbmctool_execute_command_json(command_string, *args, **kwargs):
-    r"""
-    Run the command string as an argument to the openbmctool.py program, parse
-    the JSON output into a dictionary and return the dictionary.
-
-    This function is a wrapper for openbmctool_execute_command (defined
-    above).  The caller may provide any command string where the output will
-    be JSON data.  This function will convert the JSON data to a python
-    object, verify that the 'status' field = "ok" and return the 'data'
-    sub-field to the caller.
-
-    See openbmctool_execute_command (above) for all field descriptions.
-    """
-
-    rc, output = openbmctool_execute_command(command_string, *args, **kwargs)
-    try:
-        json_object = utils.to_json_ordered(output)
-    except json.JSONDecodeError:
-        BuiltIn().fail(gp.sprint_error(output))
-
-    if json_object["status"] != "ok":
-        err_msg = "Error found in JSON data returned by the openbmctool.py "
-        err_msg += "command. Expected a 'status' field value of \"ok\":\n"
-        err_msg += gp.sprint_var(json_object, 1)
-        BuiltIn().fail(gp.sprint_error(err_msg))
-
-    return json_object["data"]
-
-
-def get_fru_status():
-    r"""
-    Get the fru status and return as a list of dictionaries.
-
-    Example robot code:
-
-    ${fru_status}=  Get Fru Status
-    Rprint Vars  fru_status  fmt=1
-
-    Example result (excerpt):
-
-    fru_status:
-      fru_status[0]:
-        [component]:             cpu0
-        [is_a]:                  Yes
-        [fru]:                   Yes
-        [present]:               Yes
-        [functional]:            No
-      fru_status[1]:
-        [component]:             cpu0-core0
-        [is_a]:                  No
-        [fru]:                   Yes
-        [present]:               Yes
-        [functional]:            No
-    ...
-    """
-    rc, output = openbmctool_execute_command(
-        "fru status", print_output=False, ignore_err=False
-    )
-    # Example value for output (partial):
-    # Component     | Is a FRU  | Present  | Functional  | Has Logs
-    # cpu0          | Yes       | Yes      | Yes         | No
-    # cpu0-core0    | No        | Yes      | Yes         | No
-    # ...
-
-    # Replace spaces with underscores in field names (e.g. "Is a FRU" becomes
-    # "Is_a_FRU").
-    output = re.sub("([^ \\|])[ ]([^ ])", "\\1_\\2", output)
-    output = re.sub("([^ \\|])[ ]([^ ])", "\\1_\\2", output)
-
-    return vf.outbuf_to_report(output, field_delim="|")
-
-
-def get_fru_print(parse_json=True):
-    r"""
-    Get the output of the fru print command and return it either as raw JSON
-    data or as a list of dictionaries.
-
-    Example robot code:
-
-    ${fru_print}=  Get Fru Print  parse_json=${False}
-    Log to Console  ${fru_print}
-
-    Example result (excerpt):
-
-    {
-      "data": {
-        "/xyz/openbmc_project/inventory/system": {
-          "AssetTag": "",
-          "BuildDate": "",
-          "Cached": false,
-          "FieldReplaceable": false,
-          "Manufacturer": "",
-          "Model": "xxxxxxxx",
-          "PartNumber": "",
-          "Present": true,
-          "PrettyName": "",
-          "SerialNumber": "13183FA"
-        },
-        "/xyz/openbmc_project/inventory/system/chassis": {
-          "AirCooled": true,
-          "WaterCooled": false
-        },
-    ...
-
-    Example robot code:
-
-    ${fru_print}=  Get Fru Print
-    Rprint Vars  fru_print  fmt=1
-
-    Example result (excerpt):
-
-    fru_print:
-      fru_print[0]:
-        [data]:
-          [/xyz/openbmc_project/inventory/system]:
-            [AssetTag]:          <blank>
-            [BuildDate]:         <blank>
-            [Cached]:            False
-            [FieldReplaceable]:  False
-            [Manufacturer]:      <blank>
-            [Model]:             xxxxxxxx
-            [PartNumber]:        <blank>
-            [Present]:           True
-            [PrettyName]:        <blank>
-            [SerialNumber]:      13183FA
-          [/xyz/openbmc_project/inventory/system/chassis]:
-            [AirCooled]:         True
-            [WaterCooled]:       False
-    ...
-
-    Description of argument(s):
-    parse_json                      Indicates that the raw JSON data should
-                                    parsed into a list of dictionaries.
-    """
-
-    rc, output = openbmctool_execute_command(
-        "fru print", print_output=False, ignore_err=False
-    )
-    if parse_json:
-        return gm.json_loads_multiple(output)
-    else:
-        return output
-
-
-def get_fru_list(parse_json=True):
-    r"""
-    Get the output of the fru list command and return it either as raw JSON
-    data or as a list of dictionaries.
-
-    Example robot code:
-
-    ${fru_list}=  Get Fru List  parse_json=${False}
-    Log to Console  ${fru_list}
-
-    Example result (excerpt):
-
-    {
-      "data": {
-        "/xyz/openbmc_project/inventory/system": {
-          "AssetTag": "",
-          "BuildDate": "",
-          "Cached": false,
-          "FieldReplaceable": false,
-          "Manufacturer": "",
-          "Model": "xxxxxxxx",
-          "PartNumber": "",
-          "Present": true,
-          "PrettyName": "",
-          "SerialNumber": "13183FA"
-        },
-        "/xyz/openbmc_project/inventory/system/chassis": {
-          "AirCooled": true,
-          "WaterCooled": false
-        },
-    ...
-
-    Example robot code:
-
-    ${fru_list}=  Get Fru List
-    Rprint Vars  fru_list  fmt=1
-
-    Example result (excerpt):
-
-    fru_list:
-      fru_list[0]:
-        [data]:
-          [/xyz/openbmc_project/inventory/system]:
-            [AssetTag]:          <blank>
-            [BuildDate]:         <blank>
-            [Cached]:            False
-            [FieldReplaceable]:  False
-            [Manufacturer]:      <blank>
-            [Model]:             xxxxxxxx
-            [PartNumber]:        <blank>
-            [Present]:           True
-            [PrettyName]:        <blank>
-            [SerialNumber]:      13183FA
-          [/xyz/openbmc_project/inventory/system/chassis]:
-            [AirCooled]:         True
-            [WaterCooled]:       False
-    ...
-
-    Description of argument(s):
-    parse_json                      Indicates that the raw JSON data should
-                                    parsed into a list of dictionaries.
-    """
-
-    rc, output = openbmctool_execute_command(
-        "fru list", print_output=False, ignore_err=False
-    )
-    if parse_json:
-        return gm.json_loads_multiple(output)
-    else:
-        return output
-
-
-def get_sensors_print():
-    r"""
-    Get the output of the sensors print command and return as a list of
-    dictionaries.
-
-    Example robot code:
-
-    ${sensors_print}=  Get Sensors Print
-    Rprint Vars  sensors_print  fmt=1
-
-    Example result (excerpt):
-
-    sensors_print:
-      sensors_print[0]:
-        [sensor]:                OCC0
-        [type]:                  Discrete
-        [units]:                 N/A
-        [value]:                 Active
-        [target]:                Active
-      sensors_print[1]:
-        [sensor]:                OCC1
-        [type]:                  Discrete
-        [units]:                 N/A
-        [value]:                 Active
-        [target]:                Active
-    ...
-    """
-    rc, output = openbmctool_execute_command(
-        "sensors print", print_output=False, ignore_err=False
-    )
-    # Example value for output (partial):
-    # sensor                 | type         | units     | value    | target
-    # OCC0                   | Discrete     | N/A       | Active   | Active
-    # OCC1                   | Discrete     | N/A       | Active   | Active
-
-    return vf.outbuf_to_report(output, field_delim="|")
-
-
-def get_sensors_list():
-    r"""
-    Get the output of the sensors list command and return as a list of
-    dictionaries.
-
-    Example robot code:
-
-    ${sensors_list}=  Get Sensors List
-    Rprint Vars  sensors_list  fmt=1
-
-    Example result (excerpt):
-
-    sensors_list:
-      sensors_list[0]:
-        [sensor]:                OCC0
-        [type]:                  Discrete
-        [units]:                 N/A
-        [value]:                 Active
-        [target]:                Active
-      sensors_list[1]:
-        [sensor]:                OCC1
-        [type]:                  Discrete
-        [units]:                 N/A
-        [value]:                 Active
-        [target]:                Active
-    ...
-    """
-    rc, output = openbmctool_execute_command(
-        "sensors list", print_output=False, ignore_err=False
-    )
-    # Example value for output (partial):
-    # sensor                 | type         | units     | value    | target
-    # OCC0                   | Discrete     | N/A       | Active   | Active
-    # OCC1                   | Discrete     | N/A       | Active   | Active
-
-    return vf.outbuf_to_report(output, field_delim="|")
-
-
-def get_openbmctool_version():
-    r"""
-    Get the openbmctool.py version and return it.
-
-    Example robot code:
-    ${openbmctool_version}=  Get Openbmctool Version
-    Rprint Vars  openbmctool_version
-
-    Example result (excerpt):
-    openbmctool_version:         1.06
-    """
-    rc, output = openbmctool_execute_command(
-        "-V | cut -f 2 -d ' '", print_output=False, ignore_err=False
-    )
-    return output
-
-
-def service_data_files():
-    r"""
-    Return a complete list of file names that are expected to be created by
-    the collect_service_data command.
-    """
-
-    return [
-        "inventory.txt",
-        "sensorReadings.txt",
-        "ledStatus.txt",
-        "SELshortlist.txt",
-        "parsedSELs.txt",
-        "bmcFullRaw.txt",
-    ]
-
-
-def collect_service_data(verify=False):
-    r"""
-    Run the collect_service_data command and return a list of files generated
-    by the command.
-
-    Description of argument(s):
-    verify                          If set, verify that all files which can be
-                                    created by collect_service_data did, in
-                                    fact, get created.
-    """
-
-    # Route the output of collect_service_data to a file for easier parsing.
-    temp = tempfile.NamedTemporaryFile()
-    temp_file_path = temp.name
-    openbmctool_execute_command(
-        "collect_service_data > " + temp_file_path, ignore_err=False
-    )
-    # Isolate the file paths in the collect_service_data output.  We're
-    # looking for output lines like this from which to extract the file paths:
-    # Inventory collected and stored in /tmp/dummy--2018-09-26_17.59.18/inventory.txt
-    rc, file_paths = gc.shell_cmd(
-        "egrep 'collected and' " + temp_file_path
-        # + " | sed -re 's#.*/tmp#/tmp#g'",
-        + " | sed -re 's#[^/]*/#/#'",
-        quiet=1,
-        print_output=0,
-    )
-    # Example file_paths value:
-    # /tmp/dummy--2018-09-26_17.59.18/inventory.txt
-    # /tmp/dummy--2018-09-26_17.59.18/sensorReadings.txt
-    # etc.
-    # Convert from output to list.
-    collect_service_data_file_paths = list(
-        filter(None, file_paths.split("\n"))
-    )
-    if int(verify):
-        # Create a list of files by stripping the dir names from the elements
-        # of collect_service_data_file_paths.
-        files_obtained = [
-            re.sub(r".*/", "", file_path)
-            for file_path in collect_service_data_file_paths
-        ]
-        files_expected = service_data_files()
-        files_missing = list(set(files_expected) - set(files_obtained))
-        if len(files_missing) > 0:
-            gp.printn(
-                "collect_service_data output:\n"
-                + gm.file_to_str(temp_file_path)
-            )
-            err_msg = "The following files are missing from the list of files"
-            err_msg += " returned by collect_service_data:\n"
-            err_msg += gp.sprint_var(files_missing)
-            err_msg += gp.sprint_var(collect_service_data_file_paths)
-            BuiltIn().fail(gp.sprint_error(err_msg))
-
-    return collect_service_data_file_paths
-
-
-def health_check_fields():
-    r"""
-    Return a complete list of field names returned by the health_check command.
-    """
-
-    return ["hardware_status", "performance"]
-
-
-def get_health_check(verify=False):
-    r"""
-    Get the health_check information and return as a dictionary.
-
-    Example robot code:
-
-    ${health_check}=  Get Health Check
-    Rprint Vars  health_check  fmt=1
-
-    Example result:
-
-    health_check:
-      [hardware_status]:         OK
-      [performance]:             OK
-
-    Description of argument(s):
-    verify                          If set, verify that all all expected
-                                    field_names are generated by the
-                                    health_check command.
-    """
-
-    rc, output = openbmctool_execute_command(
-        "health_check", print_output=False, ignore_err=False
-    )
-    health_check = vf.key_value_outbuf_to_dict(output, delim=":")
-    if int(verify):
-        err_msg = gv.valid_dict(health_check, health_check_fields())
-        if err_msg != "":
-            BuiltIn().fail(gp.sprint_error(err_msg))
-
-    return health_check
-
-
-def remote_logging_view_fields():
-    r"""
-    Return a complete list of field names returned by the logging
-    remote_logging view command.
-    """
-
-    return ["Address", "Port"]
-
-
-def get_remote_logging_view(verify=False):
-    r"""
-    Get the remote_logging view information and return as a dictionary.
-
-    Example robot code:
-
-    ${remote_logging_view}=  Get Remote Logging View
-    Rprint Vars  remote_logging_view  fmt=1
-
-    Example result:
-
-    remote_logging_view:
-      [Address]:                 <blank>
-      [AddressFamily]:           xyz.openbmc_project.Network.Client.IPProtocol.IPv4
-      [Port]:                    0
-
-    Description of argument(s):
-    verify                          If set, verify that all all expected field
-                                    names are generated by the 'logging
-                                    remote_logging view' command.
-    """
-
-    remote_logging_view = openbmctool_execute_command_json(
-        "logging remote_logging view", print_output=False, ignore_err=False
-    )
-
-    if int(verify):
-        err_msg = gv.valid_dict(
-            remote_logging_view, remote_logging_view_fields()
-        )
-        if err_msg != "":
-            BuiltIn().fail(gp.sprint_error(err_msg))
-
-    return remote_logging_view
-
-
-def network(sub_command, **options):
-    r"""
-    Run an openbmctool.py network command and return the results as a dictionary.
-
-    Note that any valid network argument may be specified as a function argument.
-
-    Example robot code:
-
-    ${ip_records}=  Network  getIP  I=eth0
-    Rprint Vars  ip_records
-
-    Resulting output:
-
-    ip_records:
-      [/xyz/openbmc_project/network/eth0/ipv4/23d41d48]:
-        [Address]:                  n.n.n.n
-        [Gateway]:
-        [Origin]:                   xyz.openbmc_project.Network.IP.AddressOrigin.Static
-        [PrefixLength]:             24
-        [Type]:                     xyz.openbmc_project.Network.IP.Protocol.IPv4
-      [/xyz/openbmc_project/network/eth0/ipv4/24ba5feb]:
-        [Address]:                  n.n.n.n
-      (etc.)
-
-    Description of argument(s):
-    sub_command                     The sub-command accepted by the network
-                                    command (e.g. "view-config", "getIP",
-                                    etc.).
-    options                         Zero or more options accepted by the network command.
-    """
-
-    if gm.python_version < gm.ordered_dict_version:
-        new_options = collections.OrderedDict(options)
-    else:
-        new_options = options
-
-    command_string = gc.create_command_string(
-        "network " + sub_command, new_options
-    )
-    return openbmctool_execute_command_json(
-        command_string, print_output=False, ignore_err=False
-    )
diff --git a/openpower/tests_openbmctool/test_openbmctool.robot b/openpower/tests_openbmctool/test_openbmctool.robot
deleted file mode 100755
index ae9582b..0000000
--- a/openpower/tests_openbmctool/test_openbmctool.robot
+++ /dev/null
@@ -1,290 +0,0 @@
-*** Settings ***
-Documentation    Verify openbmctool.py functionality.
-
-# This module tests the functionality of openbmctool.py.
-# The following tests are performed:
-#
-# FRU status
-# FRU print
-# FRU list
-# FRU list of a single FRU
-# sensors print
-# sensors list
-# sensors list of a single sensor
-# health check
-# service data
-# remote logging
-# local_users queryenabled
-#
-# It is the responsibility of the user to include openbmctool.py's
-# directory PATH in $PATH.
-#
-# Test Parameters:
-# OPENBMC_HOST          The BMC host name or IP address.
-# OPENBMC_USERNAME      The username to login to the BMC.
-# OPENBMC_PASSWORD      Password for OPENBMC_USERNAME.
-# LOGGING_HOST          The hostname or IP address of the remote
-#                       logging server.  The default value is
-#                       '10.10.10.10'.
-# LOGGING_PORT          The port number for remote logging on the
-#                       LOGGING_HOST.  The default value is '514'.
-
-
-Library                 String
-Library                 OperatingSystem
-Library                 ../../lib/gen_print.py
-Library                 ../../lib/gen_robot_print.py
-Library                 ../../lib/openbmctool_utils.py
-Library                 ../../lib/gen_misc.py
-Library                 ../../lib/gen_robot_valid.py
-Resource                ../../syslib/utils_os.robot
-Resource                ../../lib/resource.robot
-
-
-Suite Setup             Suite Setup Execution
-Test Setup              Printn
-
-*** Variables ***
-
-${min_number_items}     ${30}
-${min_number_sensors}   ${15}
-${LOGGING_HOST}         10.10.10.10
-${LOGGING_PORT}         514
-
-
-
-*** Test Cases ***
-
-Verify Openbmctool FRU Commands
-    [Documentation]  Verify FRU commands work.
-    [Tags]  Verify_Openbmctool_FRU_Commands
-
-    Verify FRU Status
-    Verify FRU Print
-    Verify FRU List
-    # Verify FRU List With Single FRU
-    # Known issue - openbmctool.py FRU list with single FRU is not working yet.
-    # See https://github.com/openbmc/openbmc-tools/issues/32.
-
-
-Verify Openbmctool Sensors Commands
-    [Documentation]  Verify sensors commands work.
-    [Tags]  Verify_Openbmctool_Sensors_Commands
-
-    Verify Sensors Print
-    Verify Sensors List
-    # Verify Sensors List With Single Sensor
-    # Known issue - openbmctool.py sensors list with single sensor is
-    # not working yet.  See https://github.com/openbmc/openbmc-tools/issues/33.
-
-
-Verify Openbmctool Health Check Commands
-    [Documentation]  Verify health check command works.
-    [Tags]  Verify_Openbmctool_Health_Check_Commands
-
-    ${health_results}=  Get Health Check  verify=${1}
-    Rprint Vars  health_results
-
-
-Verify Openbmctool Service Data Commands
-    [Documentation]  Verify collect service data command works.
-    [Tags]  Verify_Openbmctool_Service_Data_Commands
-
-    ${service_paths}=  Collect Service Data  verify=${1}
-    Rprint Vars  service_paths
-
-
-Verify Openbmctool Remote Logging Operations
-    [Documentation]  Verify logging commands work.
-    [Tags]  Verify_Openbmctool_Remote_Logging_Operations
-
-    # Verify Logging View
-    ${remote_logging_view}=  Get Remote Logging View  verify=${True}
-
-    # Save previous remote logging settings, if any.
-    ${remote_config}=  Get Remote Logging Settings
-
-    # Enable remote logging and verify.
-    Verify Logging Parameters  ${LOGGING_HOST}  ${LOGGING_PORT}
-
-    # Disable remote logging and verify.  Disable will clear any
-    # previous settings.
-    Verify Logging Disable  ${LOGGING_HOST}
-
-    # Set original parameters back, if any.
-    Run Keyword If  ${remote_config}
-    ...  Verify Logging Parameters
-    ...  ${remote_config['Address']}  ${remote_config['Port']}
-
-
-Verify Openbmctool Local Users Queryenabled
-    [Documentation]  Verify "local_users queryenabled" function.
-    [Tags]  Verify_Openbmctool_Local_Users_Queryenabled
-
-    # Example output from "queryenabled":
-    # User: root  Enabled: 1
-    # User: freddy  Enabled: 1
-    # User: ldap4  Enabled: {'description': "The ..."
-
-    ${rc}  ${num_users}=  Openbmctool Execute Command
-    ...  local_users queryenabled | grep -c 'User.*Enabled'
-    Rprint Vars  num_users
-    Check Greater Than Minimum  ${num_users}  ${0}  local users
-
-
-*** Keywords ***
-
-
-Verify FRU Status
-    [Documentation]  Verify that the 'fru status' command works.
-
-    ${fru_status}=  Get Fru Status
-    ${num_frus}=  Get Length  ${fru_status}
-    Rprint Vars  num_frus
-    Check Greater Than Minimum  ${num_frus}  ${min_number_items}  frus
-
-
-Verify FRU Print
-    [Documentation]  Verify that the 'fru print' command works.
-
-    ${rc}  ${num_frus}=  Openbmctool Execute Command
-    ...  fru print | wc -l
-    Rprint Vars  num_frus
-    Check Greater Than Minimum  ${num_frus}  ${min_number_items}  frus
-
-
-Verify FRU List
-    [Documentation]  Verify that the 'fru list' command works.
-
-    # Note: The output from 'fru list' is the same as 'fru print'.
-    ${rc}  ${num_frus}=  Openbmctool Execute Command
-    ...  fru list | wc -l
-    Rprint Vars  num_frus
-    Check Greater Than Minimum  ${num_frus}  ${min_number_items}  frus
-
-
-Verify FRU List With Single FRU
-    [Documentation]  Verify that 'fru list' with parameter works.
-
-    # Get the name of one FRU, in this case the first one listed.
-    ${fru_status}=  Get Fru Status
-    ${fruname}=  Set Variable  ${fru_status[0]['component']}
-    Rprint Vars  fruname
-    Should Not Be Empty  ${fruname}  msg=Could not find a FRU.
-    # Get a fru list specifying just the FRU.
-    ${rc}  ${output}=  Openbmctool Execute Command
-    ...  fru list ${fruname} | wc -l
-    ${fru_detail}=  Convert to Integer  ${output}
-    Rprint Vars  fru_detail
-    Should Be True  ${fru_detail} <= ${min_number_items}
-    ...  msg=Too many lines reported for fru status ${fruname}
-    Should Be True  ${fru_detail} > ${4}
-    ...  msg=Too few lines reported for fru status ${fruname}
-
-
-Verify Sensors Print
-    [Documentation]  Verify that sensors print works.
-
-    ${sensor_status}=  Get Sensors Print
-    ${num_sensors}=  Get Length  ${sensor_status}
-    Rprint Vars  num_sensors
-    Check Greater Than Minimum  ${num_sensors}  ${min_number_sensors}  sensors
-
-
-Verify Sensors List
-    [Documentation]  Verify that sensors list works.
-
-    # Note: The output from 'sensors list' is the same as 'sensors print'.
-    ${sensor_status}=  Get Sensors List
-    ${num_sensors}=  Get Length  ${sensor_status}
-    Rprint Vars  num_sensors
-    Check Greater Than Minimum  ${num_sensors}  ${min_number_sensors}  sensors
-
-
-Verify Sensors List With Single Sensor
-    [Documentation]  Verify that sensors list with parameter works.
-
-    ${sensor}=  Set Variable  ambient
-    ${rc}  ${num_sensors}=  Openbmctool Execute Command
-    ...  sensors list ${sensor} | wc -l
-    Rprint Vars  sensor  num_sensors
-    ${num_sensors}=  Convert to Integer  ${num_sensors}
-    Should Be True  ${num_sensors} < ${10}
-    ...  msg=Too many lines reported for list sensor ${sensor}
-
-
-Verify Logging Parameters
-    [Documentation]  Verify remote_logging_config.
-    [Arguments]  ${log_host}  ${log_port}
-
-    # Description of argument(s):
-    # log_host  The host name or IP address of remote logging server.
-    # log_port  The port number for remote logging on log_host.
-
-    ${rc}  ${result}=  Openbmctool Execute Command JSON
-    ...  logging remote_logging_config -a ${log_host} -p ${log_port}
-    ...  print_output=${False}  ignore_err=${False}
-
-    ${remote_logging_view}=  Get Remote Logging View  verify=${True}
-
-    Valid Value  remote_logging_view['Address']  valid_values=['${log_host}']
-    Valid Value  remote_logging_view['Port']  valid_values=[int(${log_port})]
-
-
-Verify Logging Disable
-    [Documentation]  Verify remote_logging disable
-    [Arguments]  ${log_host}
-
-    # Description of argument(s):
-    # log_host  The host name or IP address of remote logging server.
-
-    ${rc}  ${result}=  Openbmctool Execute Command JSON
-    ...  logging remote_logging disable
-
-    ${remote_logging_view}=  Get Remote Logging View  verify=${True}
-    Valid Value  remote_logging_view['Address']  valid_values=['']
-
-
-Get Remote Logging Settings
-    [Documentation]  Return the remote config settings as a dictionary
-    ...              if active.  Otherwise, return ${False}.
-
-    ${remote_config}=  Read Properties  ${BMC_LOGGING_URI}config/remote
-    Return From Keyword If
-    ...  '${remote_config["Address"]}' == '' or '${remote_config["Port"]}' == '0'
-    ...  ${False}
-
-    [Return]  ${remote_config}
-
-
-Check Greater Than Minimum
-    [Documentation]  Value should be greater than minimum, otherwise fail.
-    [Arguments]  ${value_to_test}  ${minimum_value}  ${label}
-
-    # Description of argument(s):
-    # value_to_test  Value to compare to the minimum.
-    # minimum_value  The minimum acceptable value.
-    # label          Name to print if failure.
-
-    ${value_to_test}=  Convert to Integer  ${value_to_test}
-    Should Be True  ${value_to_test} > ${minimum_value}
-    ...  msg=There should be at least ${minimum_value} ${label}.
-
-
-Suite Setup Execution
-    [Documentation]  Verify connectivity to run openbmctool commands.
-
-    # Verify connectivity to the BMC host.
-    ${bmc_version}=  Run Keyword And Ignore Error  Get BMC Version
-    Run Keyword If  '${bmc_version[0]}' == 'FAIL'  Fail
-    ...  msg=Could not connect to BMC ${OPENBMC_HOST} to get firmware version.
-
-    # Verify can find the openbmctool.
-    ${openbmctool_file_path}=  which  openbmctool.py
-    Printn
-    Rprint Vars  openbmctool_file_path
-
-    # Get the version number from openbmctool.
-    ${openbmctool_version}=  Get Openbmctool Version
-
-    Rprint Vars  openbmctool_version  OPENBMC_HOST  bmc_version[1]
diff --git a/openpower/tests_openbmctool/test_openbmctool_network.robot b/openpower/tests_openbmctool/test_openbmctool_network.robot
deleted file mode 100755
index f154c9f..0000000
--- a/openpower/tests_openbmctool/test_openbmctool_network.robot
+++ /dev/null
@@ -1,242 +0,0 @@
-*** Settings ***
-Documentation  Verify OBMC tool's network functionality.
-
-
-Library                 String
-Library                 OperatingSystem
-Library                 ../../lib/bmc_network_utils.py
-Library                 ../../lib/gen_print.py
-Library                 ../../lib/gen_robot_print.py
-Library                 ../../lib/openbmctool_utils.py
-Library                 ../../lib/gen_misc.py
-Library                 ../../lib/gen_robot_valid.py
-Resource                ../../syslib/utils_os.robot
-Resource                ../../lib/resource.robot
-Resource                ../../lib/bmc_network_utils.robot
-Resource                ../../lib/utils.robot
-Resource                ../../lib/common_utils.robot
-
-
-Suite Setup             Suite Setup Execution
-Test Setup              Printn
-
-*** Variables ***
-
-${ip}                   10.5.5.5
-${dns_ip}               10.10.10.10
-${domain_name}          randomName.com
-${mac_address}          76:e2:84:14:87:91
-${ntp_server}           pool.ntp.org
-${parser}               |grep "ipv4"|awk -F/ 'NR==1{print$5}'
-${ignore_err}           ${0}
-
-
-*** Test Cases ***
-
-Verify GetIP
-     [Documentation]  Verify that openbmctool can run the getIP command.
-     [Tags]  Verify_GetIP
-
-     ${ip_records}=  Network  getIP  I=eth0
-     ${addresses}=  Nested Get  Address  ${ip_records}
-     Verify IP On BMC  ${addresses}[${0}]
-
-
-Verify AddIP
-    [Documentation]  Verify that openbmctool can run the addIP command.
-    [Tags]  Verify_AddIP
-
-    Network  addIP  I=${interface}  a=${ip}  l=24  p=ipv4
-    Wait And Verify IP On BMC  ${ip}
-
-
-Verify GetDefaultGW
-    [Documentation]  Verify that openbmctool can run the getDefaultGW command.
-    [Tags]  Verify_GetDefaultGW
-
-    ${default_gw}=  Network  getDefaultGW
-    Verify Gateway On BMC  ${default_gw}
-
-
-Verify RemoveIP
-    [Documentation]  Verify that openbmctool can run the rmIP command.
-    [Tags]  Verify_RemoveIP
-
-    Network  addIP  I=${interface}  a=${ip}  l=24  p=ipv4
-    Wait And Verify IP On BMC  ${ip}
-    Network  rmIP  I=${interface}  a=${ip}
-    ${status}=  Run Keyword And Return Status  Wait And Verify IP On BMC  ${ip}
-    Should Be Equal  ${status}  ${False}
-
-
-Verify SetDNS
-     [Documentation]  Verify that openbmctool can run the setDNS command.
-     [Tags]  Verify_SetDNS
-
-     Network  setDNS  I=eth0  d=${dns_ip}
-     ${dns_config}=  CLI Get Nameservers
-     Should Contain  ${dns_config}  ${dns_ip}
-
-
-Verify GetDNS
-     [Documentation]  Verify that openbmctool can run the getDNS command.
-     [Tags]  Verify_GetDNS
-
-     Network  setDNS  I=eth0  d=${dns_ip}
-     ${dns_data}=  Network  getDNS  I=eth0
-     ${dns_config}=  CLI Get Nameservers
-     Should Contain  ${dns_config}  ${dns_data}[${0}]
-
-
-Verify SetHostName
-     [Documentation]  Verify that openbmctool can run the setHostName command.
-     [Tags]  Verify_SetHostName
-
-     Network  setHostName  H=randomName
-     ${bmc_hostname}=  Get BMC Hostname
-     Should Be Equal As Strings  ${bmc_hostname}  randomName
-
-
-Verify GetHostName
-     [Documentation]  Verify that openbmctool can run the getHostName command.
-     [Tags]  Verify_GetHostName
-
-     ${tool_hostname}=  Network  getHostName
-     ${bmc_hostname}=  Get BMC Hostname
-     Should Be Equal As Strings  ${bmc_hostname}  ${tool_hostname}
-
-
-Verify SetMACAddress
-     [Documentation]  Verify that openbmctool can set a new MAC address.
-     [Tags]  Verify_SetMACAddress
-
-     Network  setMACAddress  I=eth0  MA=${mac_address}
-     Validate MAC On BMC  ${mac_address}
-
-
-Verify GetMACAddress
-     [Documentation]  Verify that openbmctool can get the MAC address.
-     [Tags]  Verify_GetMACAddress
-
-     ${mac_addr}=  Network  getMACAddress  I=eth0
-     Validate MAC On BMC  ${mac_addr}
-
-
-Verify SetNTP
-     [Documentation]  Verify that openbmctool can run the setNTP command.
-     [Tags]  Verify_SetNTP
-
-     Network  setNTP  I=eth0  N=${ntp_server}
-     # Get NTP server details via REDFISH.
-     ${eth0}=  Redfish.Get Properties  ${REDFISH_NW_PROTOCOL_URI}
-     Valid Value  eth0['NTP']['NTPServers'][0]  ['${ntp_server}']
-
-
-Verify GetNTP
-     [Documentation]  Verify that openbmctool can run the getNTP command.
-     [Tags]  Verify_GetNTP
-
-     Network  setNTP  I=eth0  N=${ntp_server}
-     # Get NTP server details via REDFISH.
-     ${eth0}=  Redfish.Get Properties  ${REDFISH_NW_PROTOCOL_URI}
-     ${tool_ntp}=  Network  getNTP  I=eth0
-     Valid Value  eth0['NTP']['NTPServers'][0]  ['${tool_ntp}']
-
-
-Verify SetDomainName
-     [Documentation]  Verify set domain name via openbmctool.
-     [Tags]  Verify_SetDomainName
-
-     Network  setDomainName  I=eth0  D=${domain_name}
-     ${eth0}=  Redfish.Get Properties  ${REDFISH_NW_ETH0_URI}
-     ${eth0_domain_name}=  Strip String  ${eth0['FQDN']}
-     ...  characters=${eth0['HostName']}.  mode=left
-     Valid Value  eth0_domain_name  ['${domain_name}']
-
-
-Verify GetDomainName
-     [Documentation]  Verify get domain name via openbmctool.
-     [Tags]  Verify_GetDomainName
-
-     Network  setDomainName  I=eth0  D=${domain_name}
-     ${eth0}=  Redfish.Get Properties  ${REDFISH_NW_ETH0_URI}
-     ${eth0_domain_name}=  Strip String  ${eth0['FQDN']}
-     ...  characters=${eth0['HostName']}.  mode=left
-     ${tool_domain_name}=  Network  getDomainName  I=eth0
-     Valid Value  eth0_domain_name  ['${tool_domain_name}']
-
-
-Verify Add VLAN
-     [Documentation]  Verify add VLAN via openbmctool.
-     [Tags]  Verify_Add_VLAN
-     [Teardown]  Network  deleteVLAN  I=eth0_35
-
-     Network  addVLAN  I=eth0  n=35
-     ${eth0_vlan}=  Redfish.Get Properties  ${REDFISH_NW_ETH0_URI}VLANs/eth0_35
-     Valid Value  eth0_vlan['Id']  ['eth0_35']
-
-
-Verify Delete VLAN
-     [Documentation]  Verify delete VLAN via openbmctool.
-     [Tags]  Verify_Delete_VLAN
-
-     Network  addVLAN  I=eth0  n=35
-     ${eth0_vlan}=  Redfish.Get Properties  ${REDFISH_NW_ETH0_URI}VLANs/eth0_35
-     Valid Value  eth0_vlan['Id']  ['eth0_35']
-     Network  deleteVLAN  I=eth0_35
-     Redfish.Get Properties
-     ...  ${REDFISH_NW_ETH0_URI}VLANs/eth0_35  valid_status_codes=[${HTTP_NOT_FOUND}]
-
-
-*** Keywords ***
-
-Suite Setup Execution
-    [Documentation]  Verify connectivity to run openbmctool commands.
-
-    Valid Value  OPENBMC_HOST
-    Valid Value  OPENBMC_USERNAME
-    Valid Value  OPENBMC_PASSWORD
-    Redfish.Login
-
-    # Verify connectivity to the BMC host.
-    ${bmc_version}=  Get BMC Version
-
-    # Verify can find the openbmctool.
-    ${openbmctool_file_path}=  which  openbmctool.py
-    Printn
-    Rprint Vars  openbmctool_file_path
-
-    # Get the version number from openbmctool.
-    ${openbmctool_version}=  Get Openbmctool Version
-
-    ${rc}  ${res}=  Openbmctool Execute Command  network view-config${parser}
-    Set Suite Variable  ${interface}  ${res.strip()}
-
-    Rprint Vars  openbmctool_version  OPENBMC_HOST  bmc_version[1]
-
-
-Validate Non Existence Of IP On BMC
-    [Documentation]  Verify that IP address is not present in set of IP addresses.
-    [Arguments]  ${ip_address}  ${ip_data}
-
-    # Description of argument(s):
-    # ip_address  IP address to check (e.g. xx.xx.xx.xx).
-    # ip_data     Set of the IP addresses present.
-
-    Should Not Contain Match  ${ip_data}  ${ip_address}/*
-    ...  msg=${ip_address} found in the list provided.
-
-
-Wait And Verify IP On BMC
-    [Documentation]  Wait and verify if system IP exists.
-    [Arguments]  ${ip}
-
-    # Description of argument(s):
-    # ip  IP address to verify (e.g. xx.xx.xx.xx).
-
-    # Note:Network restart takes around 15-18s after network-config with openbmctool.
-
-    Sleep  ${NETWORK_TIMEOUT}s
-    Wait For Host To Ping  ${OPENBMC_HOST}  ${NETWORK_TIMEOUT}
-
-    Verify IP On BMC  ${ip}
