wireless-rb 0.9.0 → 0.10.0
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 +7 -0
- data/README.md +2 -0
- data/lib/wireless/ap_collection.rb +1 -1
- data/lib/wireless/cli/options.rb +1 -1
- data/lib/wireless/collector.rb +1 -1
- data/lib/wireless/h3c/profile.rb +0 -2
- data/lib/wireless/huawei/profile.rb +0 -2
- data/lib/wireless/parser_registry.rb +1 -1
- data/lib/wireless/recommendations.rb +1 -1
- data/lib/wireless/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66b1a0660dbbcabaa575faa0ffb1634f70f832033c0489b3fe67a78c7115d515
|
|
4
|
+
data.tar.gz: c00d2bce82a7e1986a3c481ca2fa98569e8e1fa374a17763d5c752b16f5cc396
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e51be5bd6f8eb9277ed1b2c38b7bb522c60bb1cb483638fc5effcb02cfbbeb9020176d8a8f8a1d9caaa4eecbb1ccdcb15525b9f7a61f1156d4cf8103516fdea5
|
|
7
|
+
data.tar.gz: 382fa4ee70b9d0ffc7210149e24a5d4b2dc5f8baad8332a9fb4443680dc8d1ab6867937768938907192668d5f9a950bcabb84ed450e6c56839632a61159aa010
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ Changes to the public contract are recorded here. Versions follow Semantic Versi
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.10.0 (2026-10-30)
|
|
8
|
+
|
|
9
|
+
- Migrate H3C/Huawei profiles and consumers to ctx_parser 0.5 Commands declarations; remove Profile COMMANDS/PARSERS aliases.
|
|
10
|
+
- Require the parser-compatible ctx_driver/ctx_runner patch releases while retaining shared-view and AP collection contracts.
|
|
11
|
+
|
|
12
|
+
- Allow the Ruby 4 / expect-pty 0.10 compatible net-connector 0.22.x alongside 0.21.x for optional collection.
|
|
13
|
+
|
|
7
14
|
## 0.9.0 (2026-10-30)
|
|
8
15
|
|
|
9
16
|
- Adopt schema 4 Target/Source contracts, canonical `h3c` identity and shared configuration sessions. AP provenance stores domain metadata under `context`; operational status is `:online`, `:offline` or `:unknown`. Use explicit `channel_width_mhz` and `utilization_percent`. Reuse an immutable duplicate-aware configuration index for change candidates; reject unknown change fields. Require connector 0.21 for collection.
|
data/README.md
CHANGED
|
@@ -182,3 +182,5 @@ Dynamic inventory uses `Netdisco::Catalog`. Any duplicate row for a selected add
|
|
|
182
182
|
## Domain contract migration (2026-10-30)
|
|
183
183
|
|
|
184
184
|
Adopt schema 4 Target/Source contracts, canonical `h3c` identity and shared configuration sessions. AP provenance stores domain metadata under `context`; operational status is `:online`, `:offline` or `:unknown`. Use explicit `channel_width_mhz` and `utilization_percent`. Reuse an immutable duplicate-aware configuration index for change candidates; reject unknown change fields. Require connector 0.21 for collection. See the [schema 4 migration and module contracts](https://github.com/gatework/ctx_runner/blob/main/docs/contracts-2026-10-30.md). Regenerate old collection reports and change plans; changing only their version number is not supported.
|
|
185
|
+
|
|
186
|
+
Platform profiles use ctx_parser 0.5 `Commands` declarations. Replace `Profile::COMMANDS` / `Profile::PARSERS` with `Profile::DECLARATIONS.by_dimension` / `.parsers`; instance query methods remain available. See the [parser 0.5 migration](https://github.com/gatework/ctx_parser/blob/main/docs/contracts-0.5.md).
|
|
@@ -71,7 +71,7 @@ module Wireless
|
|
|
71
71
|
# 单个 AP 脚本或解析失败不能丢弃其他 AP 的邻居观测。
|
|
72
72
|
def read_ap_neighbors(ap_session, ap)
|
|
73
73
|
stage = :execute
|
|
74
|
-
source = { kind: :ap_lldp_result, ap_name: ap[:name], command: H3c::Profile::
|
|
74
|
+
source = { kind: :ap_lldp_result, ap_name: ap[:name], command: H3c::Profile::DECLARATIONS.by_dimension.fetch(:lldp),
|
|
75
75
|
attempted: true, status: :failed, neighbor_count: 0 }
|
|
76
76
|
outcome = ap_session.read(access_point: ap)
|
|
77
77
|
stage = :response
|
data/lib/wireless/cli/options.rb
CHANGED
|
@@ -5,7 +5,7 @@ require "optparse"
|
|
|
5
5
|
require "ctx_cli/options"
|
|
6
6
|
require "ctx_cli/terminal"
|
|
7
7
|
require "ctx_cli/initializer"
|
|
8
|
-
gem "net-connector", "
|
|
8
|
+
gem "net-connector", ">= 0.21.0", "< 0.23"
|
|
9
9
|
require "net/connector/inventory/filters"
|
|
10
10
|
require "yaml"
|
|
11
11
|
require "ipaddr"
|
data/lib/wireless/collector.rb
CHANGED
|
@@ -10,7 +10,7 @@ require_relative "ap_collection"
|
|
|
10
10
|
module Wireless
|
|
11
11
|
# 按单控制器顺序采集,去重共享查询,并区分失败与跳过维度。
|
|
12
12
|
class Collector
|
|
13
|
-
H3C_COMMANDS = H3c::Profile::
|
|
13
|
+
H3C_COMMANDS = H3c::Profile::DECLARATIONS.by_dimension.except(:lldp).freeze
|
|
14
14
|
DEFAULT_DIMENSIONS = H3C_COMMANDS.keys.freeze
|
|
15
15
|
|
|
16
16
|
# 注入时钟和可选 AP 会话工厂;核心采集不加载具体传输。
|
data/lib/wireless/h3c/profile.rb
CHANGED
|
@@ -28,8 +28,6 @@ module Wireless
|
|
|
28
28
|
{ dimensions: [ :blocked_clients ], command: "display wlan client-security block-mac", parser: Parsers::DisplayWlanClientSecurityBlockMac },
|
|
29
29
|
{ dimensions: [ :lldp ], command: "display lldp neighbor-information verbose", parser: Parsers::DisplayLldpNeighborInformationVerbose }
|
|
30
30
|
])
|
|
31
|
-
COMMANDS = DECLARATIONS.by_dimension
|
|
32
|
-
PARSERS = DECLARATIONS.parsers
|
|
33
31
|
|
|
34
32
|
# 本平台在当前控制器会话禁用分页。
|
|
35
33
|
def preparation_command = "screen-length disable"
|
|
@@ -12,8 +12,6 @@ module Wireless
|
|
|
12
12
|
{ dimensions: [ :access_points ], command: "display ap all", parser: Parsers::DisplayApAll },
|
|
13
13
|
{ dimensions: [ :clients ], command: "display station all", parser: Parsers::DisplayStationAll }
|
|
14
14
|
])
|
|
15
|
-
COMMANDS = DECLARATIONS.by_dimension
|
|
16
|
-
PARSERS = DECLARATIONS.parsers
|
|
17
15
|
|
|
18
16
|
# 本平台使用临时会话分页设置。
|
|
19
17
|
def preparation_command = "screen-length 0 temporary"
|
|
@@ -9,7 +9,7 @@ module Wireless
|
|
|
9
9
|
PROFILES = { h3c: H3c::Profile, huawei: Huawei::Profile }.freeze
|
|
10
10
|
PLATFORM_ALIASES = { h3c_wireless: :h3c }.freeze
|
|
11
11
|
SUPPORTED_PLATFORMS = (PROFILES.keys + PLATFORM_ALIASES.keys).map { |platform| platform.to_s.freeze }.freeze
|
|
12
|
-
SUPPORTED_DIMENSIONS = PROFILES.values.flat_map { |profile| profile::
|
|
12
|
+
SUPPORTED_DIMENSIONS = PROFILES.values.flat_map { |profile| profile::DECLARATIONS.by_dimension.keys }.uniq.freeze
|
|
13
13
|
|
|
14
14
|
# 将 h3c_wireless 视为 H3C 无线平台策略的连接器别名。
|
|
15
15
|
ParserRegistry = CtxParser::Registry.new(profiles: PROFILES, aliases: PLATFORM_ALIASES)
|
|
@@ -119,7 +119,7 @@ module Wireless
|
|
|
119
119
|
next if observation["status"] == "complete"
|
|
120
120
|
item("evidence_incomplete", name, "证据不完整,先补采", category: "evidence",
|
|
121
121
|
evidence: { status: observation["status"], issues: observation.fetch("issues", []).map { |issue| issue["code"] } },
|
|
122
|
-
verify: @h3c ? Array(H3c::Profile::
|
|
122
|
+
verify: @h3c ? Array(H3c::Profile::DECLARATIONS.by_dimension[name.to_sym]) : [])
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
125
|
|
data/lib/wireless/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wireless-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gatework contributors
|
|
@@ -49,7 +49,7 @@ dependencies:
|
|
|
49
49
|
requirements:
|
|
50
50
|
- - ">="
|
|
51
51
|
- !ruby/object:Gem::Version
|
|
52
|
-
version: 0.5.
|
|
52
|
+
version: 0.5.1
|
|
53
53
|
- - "<"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
55
|
version: '0.6'
|
|
@@ -59,7 +59,7 @@ dependencies:
|
|
|
59
59
|
requirements:
|
|
60
60
|
- - ">="
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: 0.5.
|
|
62
|
+
version: 0.5.1
|
|
63
63
|
- - "<"
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
65
|
version: '0.6'
|
|
@@ -69,27 +69,27 @@ dependencies:
|
|
|
69
69
|
requirements:
|
|
70
70
|
- - ">="
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: 0.
|
|
72
|
+
version: 0.5.0
|
|
73
73
|
- - "<"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0.
|
|
75
|
+
version: '0.6'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 0.
|
|
82
|
+
version: 0.5.0
|
|
83
83
|
- - "<"
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: '0.
|
|
85
|
+
version: '0.6'
|
|
86
86
|
- !ruby/object:Gem::Dependency
|
|
87
87
|
name: ctx_driver
|
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements:
|
|
90
90
|
- - ">="
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
|
-
version: 0.5.
|
|
92
|
+
version: 0.5.1
|
|
93
93
|
- - "<"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: '0.6'
|
|
@@ -99,7 +99,7 @@ dependencies:
|
|
|
99
99
|
requirements:
|
|
100
100
|
- - ">="
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 0.5.
|
|
102
|
+
version: 0.5.1
|
|
103
103
|
- - "<"
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
105
|
version: '0.6'
|