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

View File

@ -237,10 +237,14 @@ class RedfishConnection(object):
# =================================================================== # ===================================================================
# standard # standard
# Gen-Z simulator has no SessionService for now so handle this case
try:
self.SessionService = standard.SessionService( self.SessionService = standard.SessionService(
self.Root.get_link_url( self.Root.get_link_url(
mapping.redfish_mapper.map_sessionservice()), mapping.redfish_mapper.map_sessionservice()),
self.connection_parameters) 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.