some reordering

This commit is contained in:
Robin Müller 2022-05-24 17:07:13 +02:00
parent 96c6feb746
commit e6eee0d518
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 18 additions and 20 deletions

View File

@ -29,16 +29,15 @@ LOGGER = get_console_logger()
class OpCodes: class OpCodes:
SWITCH_ON = ["0", "on"] SWITCH_HPA_ON_PROC = ["0", "proc-hpa"]
SWITCH_OFF = ["1", "off"] SWITCH_ON = ["2", "on"]
NORMAL_SSR = ["2", "nml-ssr"] SWITCH_OFF = ["3", "off"]
NORMAL_DRO = ["3", "nml-dro"] NORMAL_SSR = ["4", "nml-ssr"]
NORMAL_X8 = ["4", "nml-x8"] NORMAL_DRO = ["5", "nml-dro"]
NORMAL_TX = ["5", "nml-tx"] NORMAL_X8 = ["6", "nml-x8"]
NORMAL_MPA = ["6", "nml-mpa"] NORMAL_TX = ["7", "nml-tx"]
NORMAL_HPA = ["7", "nml-hpa"] NORMAL_MPA = ["8", "nml-mpa"]
NORMAL_HPA = ["9", "nml-hpa"]
SWITCH_HPA_ON_PROC = ["12", "proc-hpa"]
INJECT_SSR_TO_DRO_FAILURE = ["15", "inject-ssr-dro-fault"] INJECT_SSR_TO_DRO_FAILURE = ["15", "inject-ssr-dro-fault"]
INJECT_DRO_TO_X8_FAILURE = ["16", "inject-dro-x8-fault"] INJECT_DRO_TO_X8_FAILURE = ["16", "inject-dro-x8-fault"]
@ -111,9 +110,17 @@ class ParamIds(enum.IntEnum):
def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT): def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
op_code_dict = dict() op_code_dict = dict()
add_op_code_entry(
op_code_dict=op_code_dict,
keys=OpCodes.SWITCH_HPA_ON_PROC,
info=Info.SWITCH_HPA_ON_PROC,
)
add_op_code_entry( add_op_code_entry(
op_code_dict=op_code_dict, keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON op_code_dict=op_code_dict, keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON
) )
add_op_code_entry(
op_code_dict=op_code_dict, keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF
)
add_op_code_entry( add_op_code_entry(
op_code_dict=op_code_dict, op_code_dict=op_code_dict,
keys=OpCodes.NORMAL_SSR, keys=OpCodes.NORMAL_SSR,
@ -144,14 +151,6 @@ def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
keys=OpCodes.NORMAL_HPA, keys=OpCodes.NORMAL_HPA,
info=Info.NORMAL_HPA, info=Info.NORMAL_HPA,
) )
add_op_code_entry(
op_code_dict=op_code_dict,
keys=OpCodes.SWITCH_HPA_ON_PROC,
info=Info.SWITCH_HPA_ON_PROC,
)
add_op_code_entry(
op_code_dict=op_code_dict, keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF
)
add_op_code_entry( add_op_code_entry(
op_code_dict=op_code_dict, op_code_dict=op_code_dict,
keys=OpCodes.INJECT_SSR_TO_DRO_FAILURE, keys=OpCodes.INJECT_SSR_TO_DRO_FAILURE,
@ -245,7 +244,6 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
) )
if op_code in OpCodes.SWITCH_HPA_ON_PROC: if op_code in OpCodes.SWITCH_HPA_ON_PROC:
hpa_on_procedure(tc_queue) hpa_on_procedure(tc_queue)
if op_code in OpCodes.INJECT_ALL_ON_FAILURE: if op_code in OpCodes.INJECT_ALL_ON_FAILURE:
pack_failure_injection_cmd( pack_failure_injection_cmd(
tc_queue=tc_queue, tc_queue=tc_queue,

@ -1 +1 @@
Subproject commit d0c3f4a802c3cddc5be2919af763b08fe6a6b05c Subproject commit 9ee7922bf7b7a678f8e5ebd5926001defac9a3d4