ctx_checker 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d95beb419abda45520199da4d2ff6e3dadb09bab77899cfd6bd1334c9339a18
4
- data.tar.gz: 2cad06880a8e500923fa9eee2827c7e0785e202b61cd913f7fe7d983aac3a99e
3
+ metadata.gz: 27d69767a8d7c7e74c06bd7e5cd100398242fd3ca8fd318b50ea8bf75a17270c
4
+ data.tar.gz: 8f597b91e7ed1d537500af1c855a6d1ab76afd785dbb8948ebae51801f3c7e0e
5
5
  SHA512:
6
- metadata.gz: 539e11fad3fb062f19d5ee52feaf3bc0a0807a01eba514e7a5fa7b06615a42633484df640555633541b2f5061cc17b60a241d80c13f14b6f406bfa99d179a464
7
- data.tar.gz: e63f4994f63289f449452221523234cbcbc0387d1048e77ce3439029f49f6910bdb5fcf46d120ef8d650d4fdf887d19366736fbf22966135eeade1311609b42c
6
+ metadata.gz: 7dd0b709a7c85517e4122d9ffd783b55183d9fcb76fa31b27c51cb0a949e865f4c36909ffbf77316c87f3fb34de73694f3fd0b071ea9260b013caffee2cd2226
7
+ data.tar.gz: c5a3cb181abeee13f57af951f22762be5b1e2729b2f7afaf36338a1714c66152ee11515d3fceb343e54c59f1b656611270bd46cb9c78b0857a40457f28e20ed6
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Changes to the public contract are recorded here. Versions follow Semantic Versi
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.7.0 (2026-10-30)
8
+
9
+ - Migrate all platform profiles to ctx_parser 0.5 Commands declarations; remove Profile COMMANDS/PARSERS aliases.
10
+ - Derive Alteon discovery and firmware profiles through with_declarations, preserving model overrides and the original catalog.
11
+ - Require the parser-compatible ctx_driver/ctx_runner patch releases.
12
+
7
13
  ## 0.6.0 (2026-10-30)
8
14
 
9
15
  - Inherit shared Observation value semantics with domain validation on construction and replacement. Use `peer_address` for BGP/NTP endpoints and public Target values in snapshots; expose `records(name)`. Require Runner/Driver 0.5.
data/README.md CHANGED
@@ -118,3 +118,5 @@ Snapshot access uses `observations` and `observation(name)`: known missing dimen
118
118
  ## Domain contract migration (2026-10-30)
119
119
 
120
120
  Inherit shared Observation value semantics with domain validation on construction and replacement. Use `peer_address` for BGP/NTP endpoints and public Target values in snapshots; expose `records(name)`. Require Runner/Driver 0.5. 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.
121
+
122
+ 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).
@@ -32,8 +32,6 @@ module CtxChecker
32
32
  { dimensions: [ :alarms ], command: "show facility-alarm status", parser: Parsers::ShowFacilityAlarmStatus },
33
33
  { dimensions: [ :device_counters ], command: "show ip traffic", parser: Parsers::ShowIpTraffic }
34
34
  ])
35
- COMMANDS = DECLARATIONS.by_dimension
36
- PARSERS = DECLARATIONS.parsers
37
35
  end
38
36
  end
39
37
  end
@@ -28,8 +28,6 @@ module CtxChecker
28
28
  { dimensions: [ :ntp ], command: "show ntp peer-status", parser: Parsers::ShowNtpPeerStatus },
29
29
  { dimensions: [ :device_counters ], command: "show ip traffic", parser: Parsers::ShowIpTraffic }
30
30
  ])
31
- COMMANDS = DECLARATIONS.by_dimension
32
- PARSERS = DECLARATIONS.parsers
33
31
  end
34
32
  end
35
33
  end
@@ -39,8 +39,6 @@ module CtxChecker
39
39
  { dimensions: [ :ntp ], command: "display ntp-service status", parser: Parsers::DisplayNtpServiceStatus },
40
40
  { dimensions: [ :alarms ], command: "display alarm active", parser: Parsers::DisplayAlarmActive }
41
41
  ], multi_command: true)
42
- COMMANDS = DECLARATIONS.by_dimension
43
- PARSERS = DECLARATIONS.parsers
44
42
 
45
43
  # 每个已观察接口都必须保留入站与出站两个方向的证据状态。
46
44
  def counter_metrics = %i[in_errors out_errors].freeze
@@ -30,8 +30,6 @@ module CtxChecker
30
30
  { dimensions: [ :ntp ], command: "show ntp status", parser: Parsers::ShowNtpStatus },
31
31
  { dimensions: [ :device_counters ], command: "show cpu-cntr", parser: Parsers::ShowCpuCntr }
32
32
  ])
33
- COMMANDS = DECLARATIONS.by_dimension
34
- PARSERS = DECLARATIONS.parsers
35
33
 
36
34
  # 在线接口丢弃表不提供错误包或 CRC 测量。
37
35
  def counter_metrics = %i[in_errors out_errors crc_errors].freeze
@@ -32,8 +32,6 @@ module CtxChecker
32
32
  { dimensions: [ :alarms ], command: "show system state | match alarm", parser: Parsers::ShowSystemStateAlarms },
33
33
  { dimensions: [ :device_counters ], command: "show counter global", parser: Parsers::ShowCounterGlobal }
34
34
  ])
35
- COMMANDS = DECLARATIONS.by_dimension
36
- PARSERS = DECLARATIONS.parsers
37
35
  end
38
36
  end
39
37
  end
@@ -41,34 +41,22 @@ module CtxChecker
41
41
  { dimensions: [ :clock ], command: "/info/sys/general", parser: Parsers::InfoSysGeneral },
42
42
  { dimensions: %i[ntp device_counters], command: "/stats/sys/ntp", parser: Parsers::StatsSysNtp }
43
43
  ], multi_command: true)
44
- COMMANDS = DECLARATIONS.by_dimension
45
- PARSERS = DECLARATIONS.parsers
46
44
 
47
45
  # 打开连接器前,拒绝已知不兼容的产品系列。
48
- def initialize(model: nil)
46
+ def initialize(model: nil, declarations: self.class::DECLARATIONS)
49
47
  super
50
48
  raise ArgumentError, "DefensePro requires a separate checker profile" if /defen[cs]e[\s_-]*pro/i.match?(model.to_s)
51
-
52
- @declarations = DECLARATIONS
53
49
  end
54
50
 
55
- # 扩展后的实例保留不可变命令与实现索引。
56
- def commands = @declarations.by_dimension
57
-
58
- # 绑定端口的解析器复用基础型号覆盖及命令选择契约。
59
- def parsers = @declarations.parsers
60
-
61
51
  # 已知光模块命令缺陷根据固件事实判断,不依据型号名称猜测。
62
52
  def with_software_version(value)
63
53
  raise ArgumentError, "Software version must be text" unless value.nil? || value.is_a?(String)
64
54
 
65
- entries = @declarations.entries.reject { |entry| entry[:dimensions].include?(:optics) }
55
+ entries = declarations.entries.reject { |entry| entry[:dimensions].include?(:optics) }
66
56
  if transceiver_fixed?(value)
67
57
  entries += [ { dimensions: [ :optics ], command: "/info/transceiver", parser: Parsers::InfoTransceiver } ]
68
58
  end
69
- expanded = dup
70
- expanded.instance_variable_set(:@declarations, CtxParser::Commands.new(entries, multi_command: true))
71
- expanded
59
+ with_declarations(CtxParser::Commands.new(entries, multi_command: true))
72
60
  end
73
61
 
74
62
  # Alteon 不提供全端口叶级查询,计数器采集必须依赖完整端口清单。
@@ -90,9 +78,7 @@ module CtxChecker
90
78
  [ { dimensions: [ :counters ], command: "/stats/port #{port}/if", parser: Parsers::StatsPortIf.for_port(port) },
91
79
  { dimensions: [ :counters ], command: "/stats/port #{port}/ether", parser: Parsers::StatsPortEther.for_port(port) } ]
92
80
  end
93
- expanded = dup
94
- expanded.instance_variable_set(:@declarations, CtxParser::Commands.new(@declarations.entries + additions, multi_command: true))
95
- expanded
81
+ with_declarations(CtxParser::Commands.new(declarations.entries + additions, multi_command: true))
96
82
  end
97
83
 
98
84
  # 每个发现端口均需标准计数器和以太网错误计数器证据。
@@ -2,5 +2,5 @@
2
2
 
3
3
  module CtxChecker
4
4
  # 公开包版本,供 RubyGems 元数据和运行时调用方共用。
5
- VERSION = "0.6.0"
5
+ VERSION = "0.7.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ctx_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gatework contributors
@@ -29,7 +29,7 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.5.0
32
+ version: 0.5.1
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0.6'
@@ -39,7 +39,7 @@ dependencies:
39
39
  requirements:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 0.5.0
42
+ version: 0.5.1
43
43
  - - "<"
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0.6'
@@ -49,27 +49,27 @@ dependencies:
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 0.4.0
52
+ version: 0.5.0
53
53
  - - "<"
54
54
  - !ruby/object:Gem::Version
55
- version: '0.5'
55
+ version: '0.6'
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 0.4.0
62
+ version: 0.5.0
63
63
  - - "<"
64
64
  - !ruby/object:Gem::Version
65
- version: '0.5'
65
+ version: '0.6'
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: ctx_driver
68
68
  requirement: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 0.5.0
72
+ version: 0.5.1
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.6'
@@ -79,7 +79,7 @@ dependencies:
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.5.0
82
+ version: 0.5.1
83
83
  - - "<"
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0.6'