sandbox/drawings/cisco asa/policies_serialization_results_parsing.wsd

52 lines
1.8 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@startuml
!define RESULT <font color="blue">result</font>
!define CONCAT_RESULTS <font color="Violet">concat_results</font>
!define TMP_ENTRY <font color="YellowGreen">tmp_entry</font>
start
:Начинаем проходить по элементам RESULT;
:Создаем массив CONCAT_RESULTS;
:Создаем словарь TMP_ENTRY\nв которм будет собираться правило\nпо шаблону <font style="Monochrome">ace_template</font>;
note
ace_template = {
"rule_id": 0,
"enabled": True,
"rule_numbers": [],
"action": "",
"source": [],
"destination": [],
"destination_service": "",
"source_service": "",
"hit_count": 0,
"users": [],
"logging": "",
"logging_interval": "",
"time_range": "",
"description": "",
"raw_entry": "",
"raw_entries": [],
"hash": "",
"protocol": "",
}
endnote
repeat
:Берем следующий элемент RESULT;
if (RESULT entry = ACE)
:Записываем в поля TMP_ENTRY данные из RESULT entry
согласно правилам ace;
note
_fill_template_with_ace_data()
endnote
:Добавяем TMP_ENTRY в CONCAT_RESULTS;
:Сбрасываем ace_template в исходное значение;
elseif (RESULT = remark)
:Записываем в поля TMP_ENTRY данные из RESULT entry
согласно правилам remark;
note right
_fill_template_with_remark_data()
endnote
endif
repeat while (В RESULT есть еще элементы?)
:Возвращаем CONCAT_RESULTS;
stop
@enduml