mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	OpenBMC fixes for OP940 changes [Python]
This commit is contained in:
		| @@ -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): | ||||
|  | ||||
|   | ||||
| @@ -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 + '/' | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user