Update 2026-01-20 20:47:44
This commit is contained in:
@@ -98,13 +98,23 @@ def fetch_idrac_info(idrac_ip: str, output_dir: Path) -> None:
|
||||
slots_in_match_order.append(s)
|
||||
|
||||
# 검색된 슬롯 개수에 따라 출력 순서 결정
|
||||
total_slots = len(slots_in_match_order)
|
||||
if total_slots == 4:
|
||||
desired_order = ['38', '37', '32', '34']
|
||||
elif total_slots == 10:
|
||||
desired_order = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
|
||||
# 환경변수에서 슬롯 우선순위 읽기 (GUIDtxtT0Execl.py와 동일)
|
||||
slot_priority_str = os.getenv("GUID_SLOT_PRIORITY", "")
|
||||
|
||||
if slot_priority_str:
|
||||
# 사용자 지정 슬롯 우선순위 사용
|
||||
desired_order = [s.strip() for s in slot_priority_str.split(",") if s.strip()]
|
||||
logging.info(f"사용자 지정 슬롯 우선순위 사용: {desired_order}")
|
||||
else:
|
||||
desired_order = slots_in_match_order
|
||||
# 기본 우선순위 (슬롯 개수에 따라)
|
||||
total_slots = len(slots_in_match_order)
|
||||
if total_slots == 4:
|
||||
desired_order = ['38', '37', '32', '34']
|
||||
elif total_slots == 10:
|
||||
desired_order = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
|
||||
else:
|
||||
desired_order = slots_in_match_order
|
||||
logging.info(f"기본 슬롯 우선순위 사용 (슬롯 {total_slots}개): {desired_order}")
|
||||
|
||||
# 지정된 순서대로 파일에 기록 + GUID 요약 생성
|
||||
hex_guid_list: list[str] = []
|
||||
@@ -115,7 +125,10 @@ def fetch_idrac_info(idrac_ip: str, output_dir: Path) -> None:
|
||||
hex_guid_list.append(f"0x{guid.replace(':', '').upper()}")
|
||||
|
||||
if hex_guid_list:
|
||||
# GUID 순서: 사용자 지정 순서대로 세미콜론으로 연결
|
||||
f.write(f"GUID: {';'.join(hex_guid_list)}\n")
|
||||
logging.info(f"GUID 합치기 완료: {len(hex_guid_list)}개 슬롯")
|
||||
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"Error processing IP {idrac_ip}: {e}")
|
||||
|
||||
Reference in New Issue
Block a user