Gen-Z support

Fix for Gen-Z simulator which doesn't provide the SessionService entrypoint

Change-Id: I3b17c9db8c12605cd70c1034bbb138743325dbd1
This commit is contained in:
Bruno Cornec 2019-06-07 02:29:06 +02:00 committed by Bruno Cornec
parent 72bb353f00
commit 9e20fd158b
1 changed files with 8 additions and 4 deletions

View File

@ -237,10 +237,14 @@ class RedfishConnection(object):
# =================================================================== # ===================================================================
# standard # standard
self.SessionService = standard.SessionService( # Gen-Z simulator has no SessionService for now so handle this case
self.Root.get_link_url( try:
mapping.redfish_mapper.map_sessionservice()), self.SessionService = standard.SessionService(
self.connection_parameters) self.Root.get_link_url(
mapping.redfish_mapper.map_sessionservice()),
self.connection_parameters)
except AttributeError:
self.SessionService = None
# Moonshot m510 cartridge has neither Managers nor Chassis, so handle # Moonshot m510 cartridge has neither Managers nor Chassis, so handle
# this case in the code. # this case in the code.