def pop_fw_state(self, compl_result, os_status, dcnm_status):
res_list = compl_result.split('<STR_LIT:(>')<EOL>state_num = None<EOL>if len(res_list) > <NUM_LIT:1>:<EOL><INDENT>state_num = int(res_list[<NUM_LIT:1>].split('<STR_LIT:)>')[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>if res_list[<NUM_LIT:0>] == fw_const.RESULT_FW_CREATE_INIT:<EOL><INDENT>if os_status is None:<EOL><INDENT>state_num = fw_const.INIT_STATE<EOL><DEDENT><DEDENT>elif res_list[<NUM_LIT:0>] == fw_const.RESULT_FW_CREATE_DONE:<EOL><INDENT>state_num = fw_const.FABRIC_PREPARE_DONE_STATE<EOL><DEDENT>elif res_list[<NUM_LIT:0>] == fw_const.RESULT_FW_DELETE_INIT:<EOL><INDENT>if os_status == fw_const.OS_CREATE_SUCCESS and (<EOL>dcnm_status == fw_const.DCNM_CREATE_SUCCESS):<EOL><INDENT>state_num = fw_const.FABRIC_PREPARE_DONE_STATE<EOL><DEDENT><DEDENT><DEDENT>return state_num<EOL>
Populate the state information in the cache.

        Check if state information is embedded in result
        If not:
        a. It's still in Init state and no SM is called yet
        b. The SM has completely run
        c. Delete has started and before any SM is run, it restarted.