@ -196,81 +196,6 @@ class MockKwargsException(Exception):
self . kwargs = kwargs
sushy = importutils . try_import ( ' sushy ' )
if not sushy :
sushy = mock . MagicMock (
spec_set = mock_specs . SUSHY_SPEC ,
BOOT_SOURCE_TARGET_PXE = ' Pxe ' ,
BOOT_SOURCE_TARGET_HDD = ' Hdd ' ,
BOOT_SOURCE_TARGET_CD = ' Cd ' ,
BOOT_SOURCE_TARGET_BIOS_SETUP = ' BiosSetup ' ,
INDICATOR_LED_LIT = ' indicator led lit ' ,
INDICATOR_LED_BLINKING = ' indicator led blinking ' ,
INDICATOR_LED_OFF = ' indicator led off ' ,
INDICATOR_LED_UNKNOWN = ' indicator led unknown ' ,
SYSTEM_POWER_STATE_ON = ' on ' ,
SYSTEM_POWER_STATE_POWERING_ON = ' powering on ' ,
SYSTEM_POWER_STATE_OFF = ' off ' ,
SYSTEM_POWER_STATE_POWERING_OFF = ' powering off ' ,
RESET_ON = ' on ' ,
RESET_FORCE_OFF = ' force off ' ,
RESET_GRACEFUL_SHUTDOWN = ' graceful shutdown ' ,
RESET_GRACEFUL_RESTART = ' graceful restart ' ,
RESET_FORCE_RESTART = ' force restart ' ,
RESET_NMI = ' nmi ' ,
BOOT_SOURCE_ENABLED_CONTINUOUS = ' continuous ' ,
BOOT_SOURCE_ENABLED_ONCE = ' once ' ,
BOOT_SOURCE_MODE_BIOS = ' bios ' ,
BOOT_SOURCE_MODE_UEFI = ' uefi ' ,
PROCESSOR_ARCH_x86 = ' x86 or x86-64 ' ,
PROCESSOR_ARCH_IA_64 = ' Intel Itanium ' ,
PROCESSOR_ARCH_ARM = ' ARM ' ,
PROCESSOR_ARCH_MIPS = ' MIPS ' ,
PROCESSOR_ARCH_OEM = ' OEM-defined ' ,
PROTOCOL_TYPE_iSCSI = ' Internet SCSI ' ,
PROTOCOL_TYPE_SAS = ' Serial Attached SCSI ' ,
PROTOCOL_TYPE_SATA = ' Serial AT Attachment ' ,
STATE_ENABLED = ' enabled ' ,
STATE_DISABLED = ' disabled ' ,
STATE_ABSENT = ' absent ' ,
VIRTUAL_MEDIA_CD = ' cd ' ,
VIRTUAL_MEDIA_FLOPPY = ' floppy ' ,
VIRTUAL_MEDIA_USBSTICK = ' usb ' ,
APPLY_TIME_IMMEDIATE = ' immediate ' ,
APPLY_TIME_ON_RESET = ' on reset ' ,
TASK_STATE_COMPLETED = ' completed ' ,
HEALTH_OK = ' ok ' ,
HEALTH_WARNING = ' warning ' ,
SECURE_BOOT_RESET_KEYS_TO_DEFAULT = " ResetAllKeysToDefault " ,
SECURE_BOOT_RESET_KEYS_DELETE_ALL = " DeleteAllKeys " ,
VOLUME_TYPE_RAW_DEVICE = ' rawdevice ' ,
SEVERITY_OK = ' ok ' ,
SEVERITY_WARNING = ' warning ' ,
SEVERITY_CRITICAL = ' critical '
)
sys . modules [ ' sushy ' ] = sushy
sys . modules [ ' sushy.exceptions ' ] = sushy . exceptions
sushy . exceptions . SushyError = (
type ( ' SushyError ' , ( MockKwargsException , ) , { } ) )
sushy . exceptions . ConnectionError = (
type ( ' ConnectionError ' , ( sushy . exceptions . SushyError , ) , { } ) )
sushy . exceptions . ResourceNotFoundError = (
type ( ' ResourceNotFoundError ' , ( sushy . exceptions . SushyError , ) , { } ) )
sushy . exceptions . MissingAttributeError = (
type ( ' MissingAttributeError ' , ( sushy . exceptions . SushyError , ) , { } ) )
sushy . exceptions . OEMExtensionNotFoundError = (
type ( ' OEMExtensionNotFoundError ' , ( sushy . exceptions . SushyError , ) , { } ) )
sushy . exceptions . ServerSideError = (
type ( ' ServerSideError ' , ( sushy . exceptions . SushyError , ) , { } ) )
sushy . exceptions . BadRequestError = (
type ( ' BadRequestError ' , ( sushy . exceptions . SushyError , ) , { } ) )
sushy . auth = mock . MagicMock ( spec_set = mock_specs . SUSHY_AUTH_SPEC )
sys . modules [ ' sushy.auth ' ] = sushy . auth
if ' ironic.drivers.modules.redfish ' in sys . modules :
importlib . reload ( sys . modules [ ' ironic.drivers.modules.redfish ' ] )
xclarity_client = importutils . try_import ( ' xclarity_client ' )
if not xclarity_client :
xclarity_client = mock . MagicMock ( spec_set = mock_specs . XCLARITY_SPEC )