Remove REST support partially
Changes:
- REST flag initialization code is being
deprecated here.
Tested:
- Tested from the sandbox with the changes
Robot Framework 7.2.2 (Python 3.12.9 on linux)
- Tested in boot test environment
Change-Id: Ifa646d20f35ee0a20b5116ec057903246526aeba
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish.py b/lib/bmc_redfish.py
index 1fe66c3..7570c9b 100644
--- a/lib/bmc_redfish.py
+++ b/lib/bmc_redfish.py
@@ -65,7 +65,6 @@
BuiltIn().log_to_console(error_response)
BuiltIn().set_global_variable("${REDFISH_SUPPORTED}", self.__inited__)
- BuiltIn().set_global_variable("${REDFISH_REST_SUPPORTED}", True)
def login(self, *args, **kwargs):
r"""
diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index 099345a..5a0400e 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -35,20 +35,9 @@
if MTLS_ENABLED == "True":
self.__inited__ = True
else:
- # There is a possibility that a given driver support both redfish and
- # legacy REST.
+ # initialized if only login succeed.
self._redfish_.login()
- self._rest_response_ = self._redfish_.get(
- "/xyz/openbmc_project/", valid_status_codes=[200, 404]
- )
-
- # If REST URL /xyz/openbmc_project/ is supported.
- if self._rest_response_.status == 200:
- self.__inited__ = True
-
- BuiltIn().set_global_variable(
- "${REDFISH_REST_SUPPORTED}", self.__inited__
- )
+ self.__inited__ = True
def get_redfish_session_info(self):
r"""
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 5550277..96d9a39 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -86,9 +86,6 @@
redfish_supported = BuiltIn().get_variable_value(
"${REDFISH_SUPPORTED}", default=False
)
-redfish_rest_supported = BuiltIn().get_variable_value(
- "${REDFISH_REST_SUPPORTED}", default=False
-)
redfish_delete_sessions = int(
BuiltIn().get_variable_value("${REDFISH_DELETE_SESSIONS}", default=1)
)
@@ -332,7 +329,6 @@
"ffdc_summary_list_path",
"execdir",
"redfish_supported",
- "redfish_rest_supported",
"redfish_support_trans_state",
]