From 43e25a5004e8489d048f20afd31d8a44fd15a384 Mon Sep 17 00:00:00 2001 From: aaron <462826@qq.com> Date: Tue, 22 Sep 2020 08:47:30 +0800 Subject: [PATCH] combine build-in public and private IP address definition --- demo/default.yaml | 1 + yaml/ip/v1.yaml | 54 ++++++++++++++++++++++++++++++++++++++++++++--- yaml/ip/v2.yaml | 54 ----------------------------------------------- 3 files changed, 52 insertions(+), 57 deletions(-) delete mode 100644 yaml/ip/v2.yaml diff --git a/demo/default.yaml b/demo/default.yaml index 235b236..2b66612 100644 --- a/demo/default.yaml +++ b/demo/default.yaml @@ -64,6 +64,7 @@ author: zentao version: 1.0 fields: + - field: field_common # 默认的列表类型,通过逗号隔成若干区间。 range: 1-10, 20-25, 27, 29, 30 # 1,2,3...,10,20,21,22...,25,27,29.30 prefix: "" # 前缀 diff --git a/yaml/ip/v1.yaml b/yaml/ip/v1.yaml index 6b626e9..e9f5666 100644 --- a/yaml/ip/v1.yaml +++ b/yaml/ip/v1.yaml @@ -6,7 +6,7 @@ version: 1.0 field: ip instances: - instance: privateC - note: C类IP地址 + note: 私有C类IP地址 prefix: 192.168. fields: - field: part3 @@ -16,7 +16,7 @@ instances: range: 1-254 - instance: privateB - note: B类IP地址 + note: 私有B类IP地址 prefix: 172. fields: - field: part2 @@ -29,9 +29,57 @@ instances: range: 1-254 - instance: privateA - note: A类IP地址 + note: 私有A类IP地址 prefix: 10. fields: + - field: part2 + range: 0-254 + postfix: . + - field: part3 + range: 0-254 + postfix: . + - field: part4 + range: 1-254 + + - instance: publicC + note: 公有C类IP地址 + mode: r + fields: + - field: part1 + range: 192-223 + postfix: . + - field: part2 + range: 0-254 + postfix: . + - field: part3 + range: 0-254 + postfix: . + - field: part4 + range: 1-254 + + - instance: publicB + note: 公有B类IP地址 + mode: r + fields: + - field: part1 + range: 128-191 + postfix: . + - field: part2 + range: 0-254 + postfix: . + - field: part3 + range: 0-254 + postfix: . + - field: part4 + range: 1-254 + + - instance: publicA + note: 公有A类IP地址 + mode: r + fields: + - field: part1 + range: 1-126 + postfix: . - field: part2 range: 0-254 postfix: . diff --git a/yaml/ip/v2.yaml b/yaml/ip/v2.yaml deleted file mode 100644 index 4e67586..0000000 --- a/yaml/ip/v2.yaml +++ /dev/null @@ -1,54 +0,0 @@ -title: 公有IP地址 -desc: -author: wwccss -version: 1.0 - -field: ip -instances: - - instance: ipC - note: C类IP地址 - mode: r - fields: - - field: part1 - range: 192-223 - postfix: . - - field: part2 - range: 0-254 - postfix: . - - field: part3 - range: 0-254 - postfix: . - - field: part4 - range: 1-254 - - - instance: ipB - note: B类IP地址 - mode: r - fields: - - field: part1 - range: 128-191 - postfix: . - - field: part2 - range: 0-254 - postfix: . - - field: part3 - range: 0-254 - postfix: . - - field: part4 - range: 1-254 - - - instance: ipA - note: A类IP地址 - mode: r - fields: - - field: part1 - range: 1-126 - postfix: . - - field: part2 - range: 0-254 - postfix: . - - field: part3 - range: 0-254 - postfix: . - - field: part4 - range: 1-254 \ No newline at end of file -- GitLab