You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
# Copyright (C) 2005-2024 Splunk Inc. All Rights Reserved.
|
|
|
|
class Precheck:
|
|
# Abstract class for precheck scenarios
|
|
def precheck_result(self):
|
|
pass
|
|
|
|
def auto_remediation(self):
|
|
pass
|
|
|
|
def get_precheck_details(self):
|
|
pass
|
|
|
|
def get_auto_remediation_details(self):
|
|
pass
|
|
|
|
def get_logging_details(self, itsi_muh, remediation_results):
|
|
# precheck details which needs to be logged
|
|
precheck_id = itsi_muh.dict_for_mapping_precheck_ids[self.__class__.__name__]
|
|
category = itsi_muh.dict_for_mapping_category[precheck_id]
|
|
failure_severity = itsi_muh.precheck_failure_severity[precheck_id]
|
|
block_upgrade = False
|
|
|
|
# if severity is Major, then it will block the upgrade else will not
|
|
if failure_severity == 'Major':
|
|
block_upgrade = True
|
|
|
|
logging_details = itsi_muh.make_logging_details(
|
|
precheck_id,
|
|
len(remediation_results),
|
|
failure_severity,
|
|
category,
|
|
block_upgrade)
|
|
|
|
return logging_details
|