feat(h3c-secpath): add H3C SecPath Comware 7 RESTCONF service package#230
Open
K6gg wants to merge 1 commit into
Open
feat(h3c-secpath): add H3C SecPath Comware 7 RESTCONF service package#230K6gg wants to merge 1 commit into
K6gg wants to merge 1 commit into
Conversation
Member
|
Review 阻塞:这个 service package PR 有测试文件,但我没有在 PR 描述、评论或改动文件中找到真实的测试截图证据(图片链接或提交的图片文件)。请补充能证明该 service package 跑通的截图,例如 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
接入设备
H3C SecPath 系列安全产品(防火墙/UTM/NGFW),基于 Comware 7 操作系统,提供 RESTCONF 标准 REST API(RFC 8040),覆盖安全策略、安全域、NAT、会话、接口、ACL 等核心安全管控能力。服务包
services/h3c__secpath,proto 包H3C_SECPATH。设备版本
H3C SecPath Comware 7(V7.1.075),REST API 基础路径
https://<device-ip>[:port],RESTCONF 数据路径前缀/restconf/data/,YANG 模块遵循comware-<module>:<Resource>命名。认证方式
HTTP Basic Auth(
secret.username/secret.password):每次请求携带
Authorization: Basic base64(username:password)header,无需预登录获取 token。设备通常使用自签名证书,建议配置skipTlsVerify: true。实现方法
方式:RPC(gRPC,10 个方法)
GetDeviceBaseGET /restconf/data/comware-device:Device/BaseGetSecurityZonesGET /restconf/data/comware-securityzone:SecurityZone/ZonesGetZonePairsGET /restconf/data/comware-securityzone:SecurityZone/ZonePairsGetIPv4SecurityPoliciesGET /restconf/data/comware-securitypolicies:SecurityPolicies/IPv4RulesGetIPv4ObjectGroupsGET /restconf/data/comware-oms:OMS/IPv4GroupsGetServiceGroupsGET /restconf/data/comware-oms:OMS/ServGroupsGetSessionsGET /restconf/data/comware-session:SESSION/SessionsGetInterfacesGET /restconf/data/comware-ifmgr:Ifmgr/InterfacesGetACLGroupsGET /restconf/data/comware-acl:ACL/GroupsGetNATStaticMappingsGET /restconf/data/comware-nat:NAT/Static/StaticMappingsgoogle.protobuf.Value原样透传。INVALID_ARGUMENT,HTTP 401/403→PERMISSION_DENIED,HTTP 5xx/网络错误→UNAVAILABLE,非 JSON 响应→UNKNOWN。测试命令
已知限制
GetSessions会话表数据量大时响应较慢;建议在低峰期调用或使用 max_count 参数限制。comware-securityzone:SecurityZone)由设备版本决定,若提取不到数据请检查 extractList() 的 key 遍历逻辑。真实设备验证
联调证据:GetDeviceBase 跑通
联调证据:GetSecurityZones 跑通
联调证据:GetZonePairs 跑通
联调证据:GetIPv4SecurityPolicies 跑通
联调证据:GetIPv4ObjectGroups 跑通
联调证据:GetServiceGroups 跑通
联调证据:GetSessions 跑通
联调证据:GetInterfaces 跑通
联调证据:GetACLGroups 跑通
联调证据:GetNATStaticMappings 跑通