Deprecate older redfish code.

Change-Id: I75e2a282c014d627ea139dc1f5149e37d6351d14
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/redfish_client.robot b/lib/redfish_client.robot
deleted file mode 100644
index e548b22..0000000
--- a/lib/redfish_client.robot
+++ /dev/null
@@ -1,158 +0,0 @@
-*** Settings ***
-Library           Collections
-Library           String
-Library           RequestsLibrary.RequestsKeywords
-Library           OperatingSystem
-Resource          resource.txt
-Library           disable_warning_urllib.py
-Resource          rest_response_code.robot
-
-*** Variables ***
-
-# Assign default value to QUIET for programs which may not define it.
-${QUIET}          ${0}
-
-*** Keywords ***
-
-Redfish Login Request
-    [Documentation]  Do REST login and return authorization token.
-    [Arguments]  ${openbmc_username}=${OPENBMC_USERNAME}
-    ...          ${openbmc_password}=${OPENBMC_PASSWORD}
-    ...          ${alias_session}=openbmc
-    ...          ${timeout}=20
-
-    # Description of argument(s):
-    # openbmc_username  The username to be used to login to the BMC.
-    #                   This defaults to global ${OPENBMC_USERNAME}.
-    # openbmc_password  The password to be used to login to the BMC.
-    #                   This defaults to global ${OPENBMC_PASSWORD}.
-    # alias_session     Session object name.
-    #                   This defaults to "openbmc"
-    # timeout           REST login attempt time out.
-
-    Create Session  openbmc  ${AUTH_URI}  timeout=${timeout}
-    ${headers}=  Create Dictionary  Content-Type=application/json
-
-    ${data}=  Create Dictionary
-    ...  UserName=${openbmc_username}  Password=${openbmc_password}
-
-    ${resp}=  Post Request  openbmc
-    ...  ${REDFISH_SESSION}  data=${data}  headers=${headers}
-
-    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_CREATED}
-    ${content} =  To JSON  ${resp.content}
-
-    Log  ${content["Id"]}
-    Log  ${resp.headers["X-Auth-Token"]}
-
-    [Return]  ${content["Id"]}  ${resp.headers["X-Auth-Token"]}
-
-
-Redfish Get Request
-    [Documentation]  Do REST GET request and return the result.
-    [Arguments]  ${uri_suffix}
-    ...          ${session_id}=${None}
-    ...          ${xauth_token}=${None}
-    ...          ${resp_check}=${1}
-    ...          ${timeout}=30
-
-    # Description of argument(s):
-    # uri_suffix       The URI to establish connection with
-    #                  (e.g. 'Systems').
-    # session_id       Session id.
-    # xauth_token      Authentication token.
-    # resp_check       By default check the response status and return JSON.
-    # timeout          Timeout in seconds to establish connection with URI.
-
-    ${uri} =  Catenate  SEPARATOR=  ${REDFISH_BASE_URI}  ${uri_suffix}
-
-    # Create session, token list [vIP8IxCQlQ, Nq9l7fgP8FFeFg3QgCpr].
-    ${id_auth_list} =  Create List  ${session_id}  ${xauth_token}
-
-    # Set session and auth token variable.
-    ${session_id}  ${xauth_token} =
-    ...  Run Keyword If  "${xauth_token}" == "${None}"
-    ...    Redfish Login Request
-    ...  ELSE
-    ...    Set Variable  ${id_auth_list}
-
-    # Example: "X-Auth-Token: 3la1JUf1vY4yN2dNOwun"
-    ${headers} =  Create Dictionary  Content-Type=application/json
-    ...  X-Auth-Token=${xauth_token}
-
-    ${resp}=  Get Request
-    ...  openbmc  ${uri}  headers=${headers}  timeout=${timeout}
-
-    Return From Keyword If  ${resp_check} == ${0}   ${resp}
-
-    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
-
-    ${content} =  To JSON  ${resp.content}
-    [Return]  ${content}
-
-
-Redfish Post Request
-    [Documentation]  Do redfish POST request.
-    [Arguments]  ${uri_suffix}
-    ...          ${timeout}=30
-    ...          &{kwargs}
-
-    # Description of argument(s):
-    # uri_suffix  The URI to establish connection with
-    #             (e.g. '/Systems/1/Actions/ComputerSystem.Reset').
-    # kwargs      Any additional arguments to be passed directly to the
-    #             Post Request. For example, the caller might
-    #             set kwargs as follows:
-    #             ${kwargs}=  Create Dictionary  allow_redirect=${True}.
-    # timeout     Timeout in seconds to establish connection with URI.
-
-    ${uri}=  Catenate  SEPARATOR=  ${REDFISH_BASE_URI}  ${uri_suffix}
-    # Set session and auth token variable.
-    ${session_id}  ${xauth_token}=  Redfish Login Request
-
-    # Set session URI path.
-    ${session_uri}=
-    ...  Catenate  SEPARATOR=  ${REDFISH_SESSION_URI}  ${session_id}
-
-    # Example: "X-Auth-Token: 3la1JUf1vY4yN2dNOwun"
-    ${headers}=  Create Dictionary  Content-Type=application/json
-    ...  X-Auth-Token=${xauth_token}
-
-    ${resp}=  Post Request
-    ...  openbmc  ${uri}  &{kwargs}  headers=${headers}  timeout=${timeout}
-
-    Redfish Delete Request  ${session_uri}  ${xauth_token}
-
-    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
-
-
-Redfish Delete Request
-    [Documentation]  Delete the resource identified by the URI.
-    [Arguments]  ${uri_suffix}
-    ...          ${xauth_token}
-    ...          ${timeout}=10
-    ...          ${resp_check}=${1}
-
-    # Description of argument(s):
-    # uri_suffix   The URI to establish connection with
-    #             (e.g. 'SessionService/Sessions/XIApcw39QU').
-    # xauth_token  Authentication token.
-    # timeout      Timeout in seconds to establish connection with URI.
-    # resp_check   By default check the response status.
-
-    ${uri} =  Catenate  SEPARATOR=  ${REDFISH_BASE_URI}  ${uri_suffix}
-
-    # Example: "X-Auth-Token: 3la1JUf1vY4yN2dNOwun"
-    ${headers} =  Create Dictionary  Content-Type=application/json
-    ...  X-Auth-Token=${xauth_token}
-
-    # Delete server session.
-    ${resp}=  Delete Request  openbmc
-    ...  ${uri}  headers=${headers}  timeout=${timeout}
-
-    Return From Keyword If  ${resp_check} == ${0}  ${resp}
-
-    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
-
-    # Delete client sessions.
-    Delete All Sessions
diff --git a/lib/redfish_resource_model_crawler.py b/lib/redfish_resource_model_crawler.py
deleted file mode 100644
index 544abda..0000000
--- a/lib/redfish_resource_model_crawler.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/env python
-
-r"""
-Redfish function for traversing the resource model.
-"""
-
-
-def get_url_list(json_data):
-    r"""
-    Return list of fully qualified URI paths.
-
-    Description of argument(s):
-    json_data        Dictionary data from "GET" request.
-
-    Resource model tree layout:
-    root("/redfish/v1/") -> "/redfish/v1/Chassis" -> End resource
-
-    Example: JSON response data input
-    {
-        "@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
-        "@odata.id": "/redfish/v1/",
-        "@odata.type": "#ServiceRoot.v1_1_1.ServiceRoot",
-        "AccountService": {
-            "@odata.id": "/redfish/v1/AccountService"
-        },
-        "Chassis": {
-            "@odata.id": "/redfish/v1/Chassis"
-        },
-        "Id": "RootService",
-        "Links": {
-            "Sessions": {
-                "@odata.id": "/redfish/v1/SessionService/Sessions"
-            }
-        },
-        "Managers": {
-            "@odata.id": "/redfish/v1/Managers"
-        },
-        "Name": "Root Service",
-        "RedfishVersion": "1.1.0",
-        "SessionService": {
-            "@odata.id": "/redfish/v1/SessionService/"
-        },
-        "Systems": {
-            "@odata.id": "/redfish/v1/Systems"
-        },
-        "UUID": "00000000-0000-0000-0000-000000000000",
-        "UpdateService": {
-            "@odata.id": "/redfish/v1/UpdateService"
-        }
-    }
-
-    Returns list of URI's ['/redfish/v1/Managers',
-                           '/redfish/v1/Links',
-                           '/redfish/v1/AccountService',
-                           '/redfish/v1/UpdateService',
-                           '/redfish/v1/Chassis',
-                           '/redfish/v1/Systems',
-                           '/redfish/v1/SessionService']
-    """
-
-    base_uri = "/redfish/v1/"
-    qualified_uri_list = []
-
-    # Example of non-root child resource object schema.
-    # {
-    #    "@odata.context": "/redfish/v1/$metadata#ChassisCollection.ChassisCollection",
-    #    "@odata.id": "/redfish/v1/Chassis",
-    #    "@odata.type": "#ChassisCollection.ChassisCollection",
-    #    "Members": [
-    #        {
-    #            "@odata.id": "/redfish/v1/Chassis/motherboard"
-    #        },
-    #        {
-    #            "@odata.id": "/redfish/v1/Chassis/system"
-    #        }
-    #     ],
-    #     "Members@odata.count": 2,
-    #     "Name": "Chassis Collection"
-    # }
-
-    # If non-root resource schema.
-    if "Members" in json_data:
-        for member in json_data["Members"]:
-            qualified_uri_list.extend(member.values())
-        return qualified_uri_list
-
-    # Example of non-root and is the last child resource in the tree.
-    # {
-    #     "@odata.context": "/redfish/v1/$metadata#Chassis.Chassis",
-    #     "@odata.id": "/redfish/v1/Chassis",
-    #     "@odata.type": "#Chassis.v1_4_0.Chassis",
-    #     "BuildDate": "1996-01-01 - 00:00:00",
-    #     "ChassisType": "RackMount",
-    #     "Id": "motherboard",
-    #     "Manufacturer": "0000000000000000",
-    #     "Model": "",
-    #     "Name": "motherboard",
-    #     "PartNumber": "00VK525         ",
-    #     "SerialNumber": "Y130UF72700J    ",
-    #     "Thermal": {
-    #         "@odata.id": "/redfish/v1/Chassis/motherboard/Thermal"
-    #     }
-    # }
-
-    # If non-root and is the last child resource.
-    if json_data["Name"] != "Root Service" and "Members" not in json_data:
-        # Return empty list.
-        return qualified_uri_list
-
-    # If root "/redfish/v1/" path resource schema.
-    for k, v in json_data.items():
-        # Find if the dictionary contains a nested dict.
-        # The instance existence indicates a sub-uri which hold by that
-        # dictionary is a resource object for next sub tree elements.
-        if isinstance(v, dict):
-            # Example : 'Managers', 'Links', 'AccountService' etc.
-            # into qualified URI '/redfish/v1/Managers'
-            qualified_uri = base_uri + str(k)
-            qualified_uri_list.append(qualified_uri)
-
-    return qualified_uri_list
diff --git a/lib/redfish_utility.robot b/lib/redfish_utility.robot
deleted file mode 100644
index feb0560..0000000
--- a/lib/redfish_utility.robot
+++ /dev/null
@@ -1,18 +0,0 @@
-*** Settings ***
-
-Documentation  Utilities keywords for BMC redfish.
-
-Resource       resource.txt
-Resource       redfish_client.robot
-
-*** Keywords ***
-
-Boot Action
-    [Documentation]  Host boot to power on, off or reboot.
-    [Arguments]  ${boot_option}
-
-    # Description of argument(s):
-    # boot_option   On/GracefulShutdown/ForceOff
-
-    ${args}=  Create Dictionary  ResetType=${boot_option}
-    ${resp}=  Redfish Post Request  ${REDFISH_POWER_URI}  data=${args}