summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorlijia <[email protected]>2020-01-07 18:04:44 +0800
committerlijia <[email protected]>2020-01-07 18:04:44 +0800
commit5ca1b86905f90c748574d9718fc33333df746934 (patch)
tree514f7dde110e0ceb4d500245c016ac7ef4060f6d /roles
parent76d3a99a062c838873e5b48dd26d4017014f7bfa (diff)
更新rpm文件; 修改uninstall流程; 修改配置文件更新参数.
Diffstat (limited to 'roles')
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpmbin12092 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpmbin0 -> 12004 bytes
-rw-r--r--roles/sled-mcn0/tasks/main.yml8
-rw-r--r--roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j24
-rw-r--r--roles/sled-mcn0/templates/sapp.toml.j26
-rw-r--r--roles/sled-mcn0/templates/send_raw_pkt.conf.j217
6 files changed, 28 insertions, 7 deletions
diff --git a/roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm
deleted file mode 100644
index 55d1d9c..0000000
--- a/roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm
new file mode 100644
index 0000000..1ce9e5f
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/tasks/main.yml b/roles/sled-mcn0/tasks/main.yml
index 6748a71..14fe5d4 100644
--- a/roles/sled-mcn0/tasks/main.yml
+++ b/roles/sled-mcn0/tasks/main.yml
@@ -51,14 +51,18 @@
packages:
- /tmp/houyi_deploy/{{ houyi_global.rpm_files.net_flood_rpm_file }}
-
-
- name: "Template the sapp.toml"
template:
src: "{{ role_path }}/templates/sapp.toml.j2"
dest: /home/mesasoft/sapp_run/etc/sapp.toml
tags: template
+- name: "Template the send_raw_pkt.conf"
+ template:
+ src: "{{ role_path }}/templates/send_raw_pkt.conf.j2"
+ dest: /home/mesasoft/sapp_run/etc/send_raw_pkt.conf
+ tags: template
+
- name: "Template the conflist.inf"
template:
src: "{{ role_path }}/templates/conflist.inf.j2"
diff --git a/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2 b/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2
index 068b289..247dac2 100644
--- a/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2
+++ b/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2
@@ -4,5 +4,5 @@
#dir network mask-bit-num mac-addr
#dir: 0:C2I, 1:I2C
#example:
-0 192.168.10.0 24 46:9d:8e:37:53:11
-1 192.168.10.128 24 46:9d:8e:37:53:22 \ No newline at end of file
+0 192.168.10.0 255.255.255.128 46:9d:8e:37:53:11
+1 192.168.10.128 255.255.255.128 46:9d:8e:37:53:22 \ No newline at end of file
diff --git a/roles/sled-mcn0/templates/sapp.toml.j2 b/roles/sled-mcn0/templates/sapp.toml.j2
index a281849..77f9a2e 100644
--- a/roles/sled-mcn0/templates/sapp.toml.j2
+++ b/roles/sled-mcn0/templates/sapp.toml.j2
@@ -18,7 +18,7 @@ bind_mask=[]
### because it comes from other 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=0
+inbound_route_dir={{houyi_global.sapp.packet_io.inbound_route_dir}}
### note, BSD_packet_filter, if you do not want to set any filter rule, keep it empty as ""
BSD_packet_filter=""
@@ -32,11 +32,11 @@ BSD_packet_filter=""
### receive from external interface, route dir is 1.
[packet_io.internal.interface]
type=pcap
- name={{houyi_global.sapp.packet_io.inbound_device}}
+ name={{houyi_global.sapp.packet_io.internal_device}}
[packet_io.external.interface]
type=pcap
- name={{houyi_global.sapp.packet_io.outbound_device}}
+ name={{houyi_global.sapp.packet_io.external_device}}
[packet_io.polling]
### note, polling_priority = call sapp_recv_pkt every call polling_entry times,
diff --git a/roles/sled-mcn0/templates/send_raw_pkt.conf.j2 b/roles/sled-mcn0/templates/send_raw_pkt.conf.j2
new file mode 100644
index 0000000..f69d1da
--- /dev/null
+++ b/roles/sled-mcn0/templates/send_raw_pkt.conf.j2
@@ -0,0 +1,17 @@
+#发送原始报文配置,
+#因平台可能运行在不同环境下, 底层参数类型也不同,
+#如普通模式下使用网卡名称, DPDK模式下使用端口号, PFRING模式下使用index号, 还可能扩充其他模式.
+#target_id用于表示给哪个接收端发送,
+#至于发送的数据包底层MAC、目标IP等, 由上层插件负责填充, 平台只负责发送完整原始包.
+#target_id相当于数据库表的外键
+
+# (0:pag,1:pcap,2:dumpfile,3:pfring,4:DPDK,5:ppf,6:NPacket,7:qnf,8:N95,9:pcap-dumpfile-list,10:topsec,
+## (11:ipfile, 12:marsio4, 13:agent_smith, 14:dpdk_vxlan, 15:marsio_vxlan, 16:pag_marsio
+
+#target_id
+0 pag {{houyi_global.sapp.packet_io.internal_device}} ens4 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 vxlan_user smith dpdk dpdk pag
+1 pag {{houyi_global.sapp.packet_io.external_device}} ens5 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 vxlan_user smith dpdk dpdk pag
+#1 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p1 smith dpdk dpdk pag
+#2 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p1 smith dpdk dpdk pag
+#3 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p2 smith dpdk dpdk pag
+#4 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p2 smith dpdk dpdk pag