1、删除tsg_access_type 变量
2、新增proxy_topo_type,capture_pacakge_type,traffic_addr_type,network_topo_type,traffic_load_type,runtime_env_type 3、删除关于adc,atca的mrzcpd,sapp相关配置文件
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
[Service]
|
||||
ExecStartPre=/bin/bash tera_fake_promisc_setup.sh
|
||||
@@ -1,4 +0,0 @@
|
||||
set -ex
|
||||
dp_adapter_ether_addr=$(ifconfig ens1f2 | grep ether | awk '{print $2}')
|
||||
bpf_rule="ether dst $dp_adapter_ether_addr or ether dst 02:42:c0:a8:fd:03 or ether dst 02:42:c0:a8:fd:83 or ether dst 02:42:c0:a8:fd:82"
|
||||
sed -i "/BSD_packet_filter=/s/=.*/=\"$bpf_rule\"/" etc/sapp.toml
|
||||
@@ -58,19 +58,6 @@
|
||||
dest: /etc/tmpfiles.d/sapp_tmpfile.conf
|
||||
tags: template
|
||||
|
||||
- name: Template the gdev.conf
|
||||
template:
|
||||
src: "{{ role_path }}/templates/gdev.conf.j2"
|
||||
dest: /home/mesasoft/sapp_run/etc/gdev.conf
|
||||
when: tsg_access_type == 1
|
||||
|
||||
- name: Template the vlan_flipping_map.conf
|
||||
template:
|
||||
src: "{{ role_path }}/templates/vlan_flipping_map.conf.j2"
|
||||
dest: /home/mesasoft/sapp_run/etc/vlan_flipping_map.conf
|
||||
when: tsg_access_type == 2
|
||||
|
||||
|
||||
- name: "Template sapp.service destination server"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/sapp.service.j2"
|
||||
@@ -82,20 +69,6 @@
|
||||
src: "{{ role_path }}/files/memory.conf"
|
||||
dest: /etc/systemd/system/sapp.service.d/
|
||||
mode: 0644
|
||||
|
||||
- name: "copy fake promisc tools for tera mode - service file"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/tera_fake_promisc_setup.conf"
|
||||
dest: /etc/systemd/system/sapp.service.d/
|
||||
mode: 0644
|
||||
when: tsg_access_type == 2
|
||||
|
||||
- name: "copy fake promisc tools for tera mode - scripts"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/tera_fake_promisc_setup.sh"
|
||||
dest: /home/mesasoft/sapp_run/tera_fake_promisc_setup.sh
|
||||
mode: 0755
|
||||
when: tsg_access_type == 2
|
||||
|
||||
- name: "enable sapp"
|
||||
systemd:
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[Module]
|
||||
{% if tsg_running_type == 2 %}
|
||||
pcapdevice={{ nic_data_incoming.name }}
|
||||
sendto_gdev_card={{ nic_data_incoming.name }}
|
||||
sendto_gdev_ip={{ inline_device_config.keepalive_ip }}
|
||||
{% else %}
|
||||
pcapdevice={{ inline_device_config.data_incoming }}
|
||||
sendto_gdev_card={{ inline_device_config.data_incoming }}
|
||||
sendto_gdev_ip={{ inline_device_config.keepalive_ip }}
|
||||
{% endif %}
|
||||
gdev_status_switch=1
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=sapp service
|
||||
{% if tsg_running_type != 0 %}
|
||||
{% if proxy_topo_type != 0 %}
|
||||
Requires=mrzcpd.service
|
||||
After=mrzcpd.service
|
||||
{% endif %}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
instance_name = "sapp4"
|
||||
|
||||
[CPU]
|
||||
{% if tsg_access_type == 0 %}
|
||||
{% if capture_packet_type == 0 %}
|
||||
worker_threads=1
|
||||
{% else %}
|
||||
worker_threads={{ sapp.worker_threads }}
|
||||
{% endif %}
|
||||
send_only_threads_max={{ sapp.send_only_threads_max }}
|
||||
### note, bind_mask, if you do not want to bind thread to special CPU core, keep it empty as []
|
||||
{% if tsg_access_type == 0 %}
|
||||
{% if capture_packet_type == 0 %}
|
||||
bind_mask=[]
|
||||
{% else %}
|
||||
bind_mask=[{{ sapp.bind_mask }}]
|
||||
@@ -42,13 +42,6 @@ dictator_enable=0
|
||||
|
||||
[packet_io.feature]
|
||||
|
||||
{% if tsg_access_type == 4 %}
|
||||
### note, used to represent inbound or outbound direction value,
|
||||
### because it comes from Third party device, so it needs to be specified manually,
|
||||
### if inbound_route_dir=1, then outbound_route_dir=0, vice versa,
|
||||
### in other words, outbound_route_dir = 1 ^ inbound_route_dir;
|
||||
inbound_route_dir={{ sapp.inbound_route_dir }}
|
||||
{% endif %}
|
||||
|
||||
### note, BSD_packet_filter, if you do not want to set any filter rule, keep it empty as ""
|
||||
BSD_packet_filter=""
|
||||
@@ -76,7 +69,9 @@ dictator_enable=0
|
||||
|
||||
### note, depolyment.mode options: [mirror, inline, transparent]
|
||||
[packet_io.depolyment]
|
||||
{% if tsg_access_type == 0 %}
|
||||
{% if traffic_attr_type == 0 %}
|
||||
mode=mirror
|
||||
{% elif traffic_addr_type == 1 and network_topo_type == 1 and capture_packet_type == 0 %}
|
||||
mode=transparent
|
||||
{% else %}
|
||||
mode=inline
|
||||
@@ -84,7 +79,7 @@ dictator_enable=0
|
||||
|
||||
### note, interface.type options: [pag,pcap,marsio]
|
||||
[packet_io.internal.interface]
|
||||
{% if tsg_access_type == 0 %}
|
||||
{% if capture_packet_type == 0 %}
|
||||
type=pcap
|
||||
name={{packet_io.internal_interface}}
|
||||
{% else %}
|
||||
@@ -93,7 +88,7 @@ dictator_enable=0
|
||||
{% endif %}
|
||||
|
||||
[packet_io.external.interface]
|
||||
{% if tsg_access_type == 0 %}
|
||||
{% if capture_packet_type == 0 %}
|
||||
type=pcap
|
||||
name={{packet_io.external_interface}}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user