vxlan 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README-zh.md +8 -0
- data/README.md +8 -0
- data/docs/architecture-zh.md +1 -1
- data/lib/vxlan/bgp_neighbors.rb +4 -1
- data/lib/vxlan/cisco_nxos/configuration.rb +3 -77
- data/lib/vxlan/cisco_nxos/configuration_state.rb +87 -0
- data/lib/vxlan/cisco_nxos/document.rb +1 -1
- data/lib/vxlan/cisco_nxos/evpn_l2route.rb +31 -22
- data/lib/vxlan/cisco_nxos/parser.rb +7 -7
- data/lib/vxlan/cisco_nxos/parsers/show_bgp_l2vpn_evpn_summary.rb +5 -5
- data/lib/vxlan/cisco_nxos/parsers/show_cdp_neighbors_detail.rb +7 -7
- data/lib/vxlan/cisco_nxos/parsers/show_interface_brief.rb +8 -8
- data/lib/vxlan/cisco_nxos/parsers/show_ip_ospf_neighbors.rb +4 -4
- data/lib/vxlan/cisco_nxos/parsers/show_mac_address_table.rb +4 -4
- data/lib/vxlan/cisco_nxos/parsers/show_nve_peers.rb +2 -2
- data/lib/vxlan/cisco_nxos/parsers/show_nve_vni.rb +3 -3
- data/lib/vxlan/cisco_nxos/parsers/show_port_channel_summary.rb +7 -7
- data/lib/vxlan/cisco_nxos/parsers/show_running_config.rb +46 -35
- data/lib/vxlan/cisco_nxos/parsers/show_vpc_brief.rb +9 -9
- data/lib/vxlan/cisco_nxos/syntax/interfaces.rb +3 -3
- data/lib/vxlan/cisco_nxos/syntax/policies.rb +35 -13
- data/lib/vxlan/cisco_nxos/syntax/routing.rb +45 -6
- data/lib/vxlan/cisco_nxos/terminal.rb +3 -1
- data/lib/vxlan/collector.rb +4 -4
- data/lib/vxlan/configuration_review.rb +13 -2
- data/lib/vxlan/prefix_list_references.rb +3 -3
- data/lib/vxlan/version.rb +1 -1
- metadata +2 -1
|
@@ -14,7 +14,7 @@ module Vxlan
|
|
|
14
14
|
def call(address_family: "ipv4")
|
|
15
15
|
raise ArgumentError, "Unsupported address family" unless %w[ipv4 ipv6].include?(address_family)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
consumers_by_route_map = route_map_consumers.transform_values(&:uniq)
|
|
18
18
|
references = @configuration.fetch(:route_maps).each_with_object({}) do |(name, entries), result|
|
|
19
19
|
entries.sort_by { |entry| entry.fetch(:sequence) }.each do |entry|
|
|
20
20
|
matches = entry.fetch(:prefix_list_matches) do
|
|
@@ -22,7 +22,7 @@ module Vxlan
|
|
|
22
22
|
end
|
|
23
23
|
matches.select { |match| match[:address_family] == address_family }.each do |match|
|
|
24
24
|
route_map_reference = { type: "route_map", name: name, sequence: entry.fetch(:sequence), action: entry.fetch(:action),
|
|
25
|
-
bindings:
|
|
25
|
+
bindings: consumers_by_route_map.fetch(name, []).dup }
|
|
26
26
|
route_map_reference[:selector] = match[:selector] unless match[:selector] == "address"
|
|
27
27
|
match.fetch(:names).uniq.each do |prefix_list|
|
|
28
28
|
(result[prefix_list] ||= []) << route_map_reference
|
|
@@ -37,7 +37,7 @@ module Vxlan
|
|
|
37
37
|
private
|
|
38
38
|
|
|
39
39
|
# 关联关系保留协议、VRF、地址族及对等体,避免共享策略被混用。
|
|
40
|
-
def
|
|
40
|
+
def route_map_consumers
|
|
41
41
|
result = Hash.new { |hash, key| hash[key] = [] }
|
|
42
42
|
bgp = @configuration.fetch(:bgp)
|
|
43
43
|
{ "default" => bgp }.merge(bgp.fetch(:vrfs, {})).each do |vrf, settings|
|
data/lib/vxlan/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vxlan
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gatework contributors
|
|
@@ -81,6 +81,7 @@ files:
|
|
|
81
81
|
- lib/vxlan.rb
|
|
82
82
|
- lib/vxlan/bgp_neighbors.rb
|
|
83
83
|
- lib/vxlan/cisco_nxos/configuration.rb
|
|
84
|
+
- lib/vxlan/cisco_nxos/configuration_state.rb
|
|
84
85
|
- lib/vxlan/cisco_nxos/document.rb
|
|
85
86
|
- lib/vxlan/cisco_nxos/evpn_l2route.rb
|
|
86
87
|
- lib/vxlan/cisco_nxos/parser.rb
|