2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 01:26:38 +00:00

OpenBMC fixes for OP940 changes [Python]

This commit is contained in:
Mark Gurevich 2019-10-07 13:25:26 -04:00
parent 6b6c094773
commit dbb6640822
2 changed files with 7 additions and 5 deletions

View File

@ -15,10 +15,12 @@ from . import exceptions as xcat_exception
class RestSession(object):
def __init__(self):
def __init__(self, auth=None):
self.session = requests.Session()
self.cookies = None
self.auth = None
# If userid and password were passed in, use them for basic authorization
# This is required to connect to BMC with OP940 level, ignored for lower OP levels
self.auth = auth
def request(self, method, url, headers, data=None, timeout=30):

View File

@ -248,12 +248,12 @@ RSPCONFIG_APIS = {
EVENTLOG_URLS = {
"list": "/logging/enumerate",
"clear_all": "/logging/action/deleteAll",
"clear_all": "/logging/action/DeleteAll",
"resolve": "/logging/entry/{}/attr/Resolved",
}
RAS_POLICY_TABLE = "/opt/ibm/ras/lib/policyTable.json"
RAS_POLICY_MSG = "Install the OpenBMC RAS package to obtain more details logging messages."
RAS_POLICY_MSG = "Install the OpenBMC RAS package to obtain more detailed logging messages."
RAS_NOT_FOUND_MSG = " Not found in policy table: "
RESULT_OK = 'ok'
@ -279,7 +279,7 @@ class OpenBMCRest(object):
# print back to xcatd or just stdout
self.messager = kwargs.get('messager')
self.session = rest.RestSession()
self.session = rest.RestSession((self.username,self.password))
self.root_url = HTTP_PROTOCOL + self.bmcip + PROJECT_URL
self.download_root_url = HTTP_PROTOCOL + self.bmcip + '/'