yang完整树管理
2021-04-02 15:26:06 0 举报
AI智能生成
树状结构的看见性操作
作者其他创作
大纲/内容
yang整树
Acls┗YContainer
yangmodels::YList<Acl> acl_;
Acl┗YListNode
yangmodels::YLeaf<std::string> name_;
yangmodels::YLeaf<Owner> nkacl_owner_;
using Owner = std::string;
yangmodels::YLeaf<AclType> type_;
using AclType = std::string;
yangmodels::YLeaf<TableName> nkacl_table_;
using TableName = std::string;
yangmodels::YLeaf<ChainName> nkacl_chain_;
using ChainName = std::string;
yangmodels::YList<Aces> aces_;
Aces┗YListNode
yangmodels::YList<Ace> ace_;
Ace┗YListNode
yangmodels::YLeaf<Priority> nkacl_priority_;
using Priority = int16_t;
yangmodels::YList<Matches> matches_;
Matches┗YListNode
概要
yangmodels::YList<Ipv4> ipv4_;
Ipv4┗YListNode
yangmodels::YLeaf<Protocol> protocol_;
using Protocol = uint8_t;
yangmodels::YLeaf<InetIpv4Prefix> source_ipv4_network_;
using InetIpv4Prefix = std::string;
yangmodels::YLeaf<InetIpv4Prefix> destination_ipv4_network_;
yangmodels::YList<Ipv6> ipv6_;
Ipv6┗YListNode
yangmodels::YLeaf<InetIpv6Prefix> source_ipv6_network_;
using InetIpv6Prefix = std::string;
yangmodels::YLeaf<InetIpv6Prefix> destination_ipv6_network_;
yangmodels::YList<Tcp> tcp_;
Tcp┗L4ProtocolWithPort
yangmodels::YList<SourcePort> source_port_;
SourcePort┗RangeOrMultipleRanges
yangmodels::YLeaf<Port> lower_port_;
using Port = uint16_t;
yangmodels::YLeaf<Port> upper_port_;
yangmodels::YList<MultipleRanges> nkacl_multiple_ranges_;
MultipleRanges┗YListNode
yangmodels::YList<PortRange> port_range_;
PortRange┗YListNode
yangmodels::YList<DestinationPort> destination_port_;
yangmodels::YList<Udp> udp_;
Udp┗L4ProtocolWithPort
yangmodels::YList<Sctp> nkacl_sctp_;
Sctp┗L4ProtocolWithPort
yangmodels::YList<MultipleIcmpTypes> nkacl_multiple_icmp_types_;
MultipleIcmpTypes┗YListNode
yangmodels::YLeafList<IcmpType> type_;
using IcmpType = uint8_t;
yangmodels::YLeaf<bool> match_reversed_;
yangmodels::YLeaf<Interface> egress_interface_;
using Interface = std::string;
yangmodels::YLeaf<Interface> ingress_interface_;
yangmodels::YLeaf<State> nkacl_state_;
using State = std::string;
yangmodels::YList<Actions> actions_;
Actions┗ YListNode
yangmodels::YLeaf<Forwarding> forwarding_;
using Forwarding = std::string;
yangmodels::YList<PayloadStatement> nkacl_payload_statement_;
PayloadStatement┗YListNode
yangmodels::YLeaf<Dscp> dscp_;
using Dscp = uint8_t;
yangmodels::YList<RateLimit> nkacl_ratelimit_;
RateLimit┗YListNode
yangmodels::YLeaf<uint32_t> rate_;
yangmodels::YLeaf<uint32_t> burst_;
yangmodels::YLeaf<std::string> unit_;
yangmodels::YLeaf<std::string> mode_;
yangmodels::YList<JumpGoto> nkacl_jump_goto_;
JumpGoto┗YListNode
yangmodels::YLeaf<std::string> nkacl_next_chain_;
yangmodels::YList<ArpAcl> nkacl_arp_acl_;
ArpAcl┗YListNode
yangmodels::YList<ArpAces> aces_;
ArpAces┗YListNode
yangmodels::YList<ArpAce> ace_;
ArpAce┗YListNode
yangmodels::YList<ArpMatches> matches_;
ArpMatches┗YListNode
yangmodels::YLeaf<std::string> operation_;
yangmodels::YLeaf<std::string> source_network_;
yangmodels::YLeaf<std::string> destination_network_;
yangmodels::YList<ArpActions> actions_;
ArpActions┗YListNode
yangmodels::YLeaf<std::string> forwarding_;
yangmodels::YList<ArpRateLimit> ratelimit_;
ArpRateLimit┗YListNode
yangmodels::YList<ArpJumpGoto> jump_goto_;
ArpJumpGoto┗YListNode
yangmodels::YLeaf<std::string> next_chain_;
yangmodels::YList<AttachmentPoints> attachment_points_;
AttachmentPoints┗YListNode
yangmodels::YList<Table> nkacl_table_;
Table┗YListNode
yangmodels::YLeaf<Owner> owner_;
yangmodels::YLeaf<TableFamily> family_;
using TableFamily = std::string;
yangmodels::YList<Chains> chains_;
Chains┗YListNode
yangmodels::YList<Chain> chain_;
Chain┗YListNode
yangmodels::YLeaf<ChainHook> hook_;
using ChainHook = std::string;
yangmodels::YLeaf<Priority> priority_;
yangmodels::YLeaf<ChainPolicy> policy_;|
using ChainPolicy = std::string;
yangmodels::YLeaf<int16_t> level_;
yangmodels::YList<AclSets> acl_sets_;
AclSets┗YListNode
yangmodels::YList<AclSet> acl_set_;
AclSet┗YListNode
yangmodels::YList<AceStatistics> ace_statistics_;
AceStatistics┗YListNode
yangmodels::YLeaf<uint64_t> matched_packets_;
yangmodels::YLeaf<uint64_t> matched_octets_;
yangmodels::YList<ArpTable> nkacl_arp_table_;
ArpTable┗YListNode
yangmodels::YList<ArpChains> chains_;
ArpChains┗YListNode
yangmodels::YList<ArpChain> chain_;
ArpChain┗YListNode
yangmodels::YLeaf<std::string> hook_;
yangmodels::YLeaf<ChainPolicy> policy_;
yangmodels::YList<ArpAclSets> acl_sets_;
ArpAclSets┗YListNode
yangmodels::YList<ArpAclSet> acl_set_;
ArpAclSet┗YListNode
代码要求
支持自适应解析所有xml配置文件
支持自适应的解析重构或拷贝整树的所有节点
遍历所有节点
确认节点是否存在
完成值的重建或者拷贝
针对某个flowtype的实现
根据用户场景构建key,通过key完成配置文件与场景的映射
构造完整的xml字符串
数据源
TPL注入的可变参数
owner list
IP
port
httpclient获取的ext接口信息
xml配置文件中的固定配置信息
需要解决的问题
XML配置文件的拆分粒度
太大,不够灵活
太小,拼接逻辑比较复杂
0 条评论
下一页