class ShowIpv6MldGroupsDetailSchema(MetaParser): """Schema for: show ipv6 mld groups detail show ipv6 mld vrf <vrf> groups detail""" schema = { 'vrf': { Any(): { 'interface': { Any(): { Optional('join_group'): { Any(): { 'group': str, 'source': str, } }, Optional('static_group'): { Any(): { 'group': str, 'source': str, } }, 'group': { Any(): { 'up_time': str, 'filter_mode': str, 'host_mode': str, 'last_reporter': str, Optional('expire'): str, Optional('source'): { Any(): { Optional('expire'): str, 'forward': bool, Optional('flags'): str, 'up_time': str, }, }, } }, } } }, } }
class ShowIpRipNeighborSchema(MetaParser): """Schema for show ip rip neighbor vrf all""" schema = {'interfaces': str, 'process_id': {regexp('rip-(.*)'): {'vrf': {Any(): {'neighbors': {Any(): {'bad_pkts_received': str, 'bad_routes_received': str, 'last_request_received': str, 'last_request_sent': str, 'last_response_received': str, 'last_response_sent': str, 'neighbor': str } }, Optional('number_of_neighbors'): str } } } } }
class ShowIsisNeighborsSchema(MetaParser): """Schema for show isis neighbors""" schema = { 'isis': { Any(): { Optional('neighbors'): { Any(): { 'type': { Any(): { 'interfaces': { Any(): { 'circuit_id': str, 'holdtime': str, 'ip_address': str, 'state': str, } } } } } }, } } }
class ShowPdmSteeringServiceDetailSchema(MetaParser): ''' Schema for "show pdm steering service {steering_service} detail" ''' schema = { 'service_name': str, 'service_id': str, 'ref_count': int, 'stale': str, 'firewall_mode': str, 'service_ip': str, 'service_locator': str, 'vrf_id': int, 'vnid': int, 'rloc_status': str, 'no_of_rlocs': int, 'owner': str, Optional('rloc'): { Any(): { 'rloc_ip': str, 'weight': int, 'priority': int, }, }, }
class ShowPagpNeighborSchema(MetaParser): """Schema for: show pagp neighbor""" schema = { 'interfaces': { Any(): { 'name': str, 'protocol': str, 'members': { Any(): { 'interface': str, Optional('activity'): str, 'partner_name': str, 'partner_id': str, 'partner_port': str, 'age': int, 'flags': str, 'group_cap': str, }, } }, }, }
class ShowL2vpnXconnectSchema(MetaParser): """Schema for show l2vpn xconnect""" schema = { 'groups': { Any(): { 'name': { Any(): { 'status': str, 'segment1': { Any(): { 'status': str, 'segment2': { Any(): { Optional('pw_id'): str, 'status': str, }, }, }, }, }, }, }, }, }
class ShowSystemNtpAllSchema(MetaParser): """schema for show system ntp all""" schema = { 'clock_state': { 'system_status': { 'configured': str, 'admin_status': str, 'server_enabled': str, 'clock_source': str, 'auth_check': str, 'current_date_time': str, 'stratum': int, 'oper_status': str, 'server_authenticate': str, } }, Optional('peer'): { Any(): { # == group['remote'] 'local_mode': { Any(): { # == 'client' 'state': str, 'refid': str, 'stratum': str, 'type': str, 'poll': int, 'reach': str, 'offset': float, 'a': str, 'router': str, 'remote': str, } } } }, }
class ShowSslproxyStatusSchema(MetaParser): ''' Schema for show sslproxy status''' schema = { 'configuration': { Optional('ca_cert_bundle'): str, 'ca_tp_label': str, 'cert_lifetime': int, 'ec_key_type': str, 'rsa_key_modulus': int, 'cert_revocation': str, 'expired_cert': str, 'untrusted_cert': str, 'unknown_status': str, 'unsupported_protocol_ver': str, 'unsupported_cipher_suites': str, 'failure_mode_action': str, 'min_tls_ver': str, }, 'status': { 'ssl_proxy_operational_state': str, 'tcp_proxy_operational_state': str, 'clear_mode': str, } }
def validate_ping_result_list(value): # Pass ping result list of dict in value if not isinstance(value, list): raise SchemaTypeError('ping result is not a list') # Create Arp Entry Schema ping_result_schema = Schema({ 'bytes': int, 'from': str, Optional('icmp-seq'): int, Optional('hlim'): int, Optional('ttl'): int, Optional('time'): str, Optional('message'): str, Optional('mtu'): int, }) # Validate each dictionary in list for item in value: ping_result_schema.validate(item) return value
class ShowSystemInternalSysmgrServiceNameSchema(MetaParser): """Schema for show system internal sysmgr service name <process>""" schema = {'instance': {Any(): {'tag': {Any(): {'process_name': str, 'internal_id': int, 'uuid': str, 'state': str, 'plugin_id': str, 'state_start_date': str, Optional('last_restart_date'): str, Optional('pid'): int, Optional('previous_pid'): int, Optional('sap'): int, Optional('restart_count'): int, Optional('reboot_state'): str, Optional('last_terminate_reason'): str} }, } }, }
class ShowProcessesSchema(MetaParser): """Schema for show processes <process>""" schema = { 'process': { Any(): { Optional('pid'): { Any(): { 'pid': int, 'state': str, Optional('pc'): str, 'start_cnt': int, Optional('tty'): int, 'type': str, 'process': str } }, Optional('state'): str, Optional('start_cnt'): int, Optional('type'): str, Optional('process'): str, }, } }
class RouteSchema(MetaParser): """Schema for route""" # Destination Gateway Genmask Flags Metric Ref Use Iface # 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlo1 schema = { Any(): { 'destination': str, 'gateway': str, 'mask': str, 'flags': str, Optional('metric'): int, Optional('ref'): int, Optional('use'): int, Optional('mss'): int, Optional('window'): int, Optional('irtt'): int, 'interface': str } } schema = { 'routes': { Any(): { # 'destination' 'mask': { Any(): { 'nexthop': { Any(): { # index: 1, 2, 3, etc 'interface': str, 'flags': str, 'gateway': str, 'metric': int, 'ref': int, 'use': int } } } } } } }
class ShowLDPInterfaceSchema(MetaParser): """ Schema for: * show ldp interface {interface} """ schema = { Optional("@xmlns:junos"): str, "ldp-interface-information": { Optional("@xmlns"): str, "ldp-interface": { "interface-name": str, Optional("ldp-interface-local-address"): str, "ldp-label-space-id": str, "ldp-neighbor-count": str, "ldp-next-hello": str, Optional("ldp-holdtime"): str, Optional("ldp-hello-interval"): str, Optional("ldp-transport-address"): str, } } }
class ShowInterfacesTerseSchema(MetaParser): """Schema for show interfaces terse [| match <interface>]""" schema = { Any(): { 'oper_status': str, Optional('link_state'): str, Optional('admin_state'): str, Optional('phys_address'): str, 'enabled': bool, Optional('protocol'): { Any(): { Optional(Any()): { 'local': str, Optional('remote'): str, }, }, }, } }
class ShowTelemetryReceiverNameSchema(MetaParser): '''schema for: * show telemetry receiver name {name} * show telemetry receiver all ''' schema = { "name": { Any(): { 'profile': str, 'state': str, Optional('state_description'): str, Optional('last_change'): str, 'type': str, Optional('protocol'): str, Optional('host'): str, Optional('port'): int, Optional('explanation'): str }, } }
class ShowTelemetryConnectionSchema(MetaParser): """Schema for: show telemetry connection all show telemetry connection {con_idx} detail """ schema = { "index": { int: { "peer_address": str, "port": int, "vrf": int, "source_address": str, Optional("type"): str, "state": str, Optional("state_description"): str, Optional("peer_id"): str, Optional("receiver_name"): str, Optional("transport"): str, Optional("use_count"): int, Optional("state_change_time"): str, }, } }
class ShowIpv6MldLocalGroupsSchema(MetaParser): """Schema for: show ipv6 mld local-groups show ipv6 mld local-groups vrf all show ipv6 mld local-groups vrf <vrf>""" schema = { 'vrfs': { Any(): { Optional('interface'): { Any(): { Optional('join_group'): { Any(): { 'group': str, 'source': str }, }, Optional('static_group'): { Any(): { 'group': str, 'source': str }, }, 'group': { Any(): { Optional('source'): { Any(): { 'last_reported': str, 'type': str, } }, Optional('last_reported'): str, Optional('type'): str, } } }, }, }, } }
class ShowPowerInlineSchema(MetaParser): """Schema for show power inline """ schema = { 'interface': { Any(): { 'admin_state': str, 'oper_state': str, Optional('power'): float, Optional('device'): str, Optional('class'): str, Optional('priority'): str, Optional('max'): float }, }, Optional('watts'): { Any(): { 'module': str, 'available': float, 'used': float, 'remaining': float } } }
class ShowIpMsdpPolicyStatisticsSaPolicyInOutSchema(MetaParser): """Schema for: show ip msdp policy statistics sa-policy <address> in show ip msdp policy statistics sa-policy <address> out""" schema = { 'vrf': { Any(): { 'peer': { Any(): { Optional('in'): { 'total_accept_count': int, 'total_reject_count': int, Any(): { # 'filtera' Any(): { # 'route-map filtera permit 10 match ip address mcast-all-groups' Optional('num_of_comparison'): int, Optional('num_of_matches'): int, 'match': str, }, } }, Optional('out'): { 'total_accept_count': int, 'total_reject_count': int, Any(): { # 'filtera' Any(): { # 'route-map filtera permit 10 match ip address mcast-all-groups' Optional('num_of_comparison'): int, Optional('num_of_matches'): int, 'match': str, }, } } }, }, }, }, }
class ShowVtpStatusSchema(MetaParser): """Schema for show vtp status""" schema = { 'vtp': { Optional('version_capable'): list, 'version': str, Optional('domain_name'): str, 'pruning_mode': bool, 'traps_generation': bool, Optional('device_id'): str, 'conf_last_modified_by': str, 'conf_last_modified_time': str, Optional('updater_id'): str, Optional('updater_interface'): str, Optional('updater_reason'): str, 'operating_mode': str, 'enabled': bool, 'maximum_vlans': int, 'existing_vlans': int, 'configuration_revision': int, 'md5_digest': str, } }
class ShowInterfaceIpBriefSchema(MetaParser): """Schema for * show interface ip brief """ schema = { 'interfaces': { Any(): { Optional('ipv4'): { Any(): { Optional('ip'): str, Optional('prefix_length'): str }, Optional('unnumbered'): { Optional('unnumbered_intf_ref'): str } }, 'check': str, 'method': str, 'link_status': str, Optional('line_protocol'): str }, } }
class ShowIpv6StaticRouteMulticastSchema(MetaParser): """Schema for show ipv6 static-route multicast vrf all""" schema = { 'vrf': { Any(): { 'address_family': { Any(): { Optional('mroute'): { Any(): { Optional('path'): { Any(): { Optional('neighbor_address'): str, Optional('nh_vrf'): str, Optional('reslv_tid'): str, Optional('interface_name'): str, Optional('rnh_status'): str, Optional('bfd_enable'): bool, Optional('vrf_id'): str, Optional('preference'): str, Optional('mroute_int'): str }, }, }, }, }, }, }, }, }
class ShowIpMrouteVrfAllSchema(MetaParser): """Schema for show ip mroute vrf all""" schema = { 'vrf': { Any(): { 'address_family': { Any(): { Optional('multicast_group'): { Any(): { Optional('source_address'): { Any(): { Optional('uptime'): str, Optional('flags'): str, Optional('oil_count'): int, Optional('bidir'): bool, Optional('incoming_interface_list'): { Any(): { Optional('rpf_nbr'): str, }, }, Optional('outgoing_interface_list'): { Any(): { Optional('oil_uptime'): str, Optional('oil_flags'): str, }, }, }, }, }, }, }, }, } }, }
class ShowRouteMapSchema(MetaParser): """Schema for show route-map""" schema = { Any(): { Optional('description'): str, 'statements': { Any(): { 'conditions': { Optional('match_med_eq'): int, Optional('match_nexthop_in'): str, Optional('match_nexthop_in_v6'): str, Optional('match_route_type'): str, Optional('match_community_list'): str, Optional('match_ext_community_list'): str, Optional('match_as_path_list'): str, Optional('match_interface'): str, Optional('match_prefix_list'): str, Optional('match_access_list'): str, Optional('match_as_number_list'): str, Optional('match_prefix_list_v6'): str, Optional('match_access_list_v6'): str, Optional('match_tag_list'): str, }, 'actions': { Optional('set_route_origin'): str, Optional('set_distance'): int, Optional('set_local_pref'): int, Optional('set_next_hop'): list, Optional('set_next_hop_v6'): list, Optional('set_med'): int, Optional('set_as_path_prepend'): str, Optional('set_as_path_group'): list, Optional('set_as_path_prepend_repeat_n'): int, Optional('set_community'): str, Optional('set_community_additive'): bool, Optional('set_community_no_advertise'): bool, Optional('set_community_no_export'): bool, Optional('set_community_delete'): str, Optional('set_ext_community_rt'): str, Optional('set_ext_community_soo'): str, Optional('set_ext_community_vpn'): str, Optional('set_ext_community_rt_additive'): bool, Optional('set_ext_community_delete'): str, Optional('set_level'): str, Optional('set_weight'): int, Optional('set_metric_type'): str, Optional('set_metric'): int, Optional('set_level'): str, 'clause': bool, 'route_disposition': str, Optional('set_tag'): int }, }, }, }, }
class ShowTcpProxyStatisticsSchema(MetaParser): ''' Schema for show tcpproxy statistics''' schema = { 'tcpproxy_statistics': { 'total_connections': int, 'max_concurrent_connections': int, 'flow_entries_created': int, 'flow_entries_deleted': int, 'current_flow_entries': int, 'current_connections': int, 'connections_in_progress': int, 'failed_connections': int, Optional('invalid_flow_entries'): int, 'syncache_added': int, Optional('syncache_not_added_nat_entry_null'): int, Optional('syncache_not_added_mrkd_for_cleanup'): int, Optional('syncache_not_added_flow_entry_null'): int, Optional('syncache_not_added_flow_invalid'): int, Optional('syncache_not_added_flow_is_in_use'): int, 'syn_purge_enqueued': int, 'syn_purge_enqueue_failed': int, 'other_cleanup_enqueued': int, 'other_cleanup_enqueue_failed': int, 'stack_cleanup_enqueued': int, 'stack_cleanup_enqueue_failed': int, 'timer_expire_cleanup_enqueued': int, 'timer_expire_cleanup_enqueue_failed': int, 'proxy_cleanup_enqueued': int, 'proxy_cleanup_enqueue_failed': int, 'cleanup_req_watcher_called': int, 'pre_tcp_flow_list_enq_failed': int, 'pre_tcp_flow_list_deq_failed_timer': int, 'pre_tcp_flow_list_deq_failed_accept': int, 'pre_tcp_flow_list_enq_success': int, 'pre_tcp_flow_list_deq_cleanup': int, 'pre_tcp_flow_list_deq_accept': int, 'pre_tcp_cleanup_timeout_update_count': int, Optional('total_flow_entries_pending_cleanup_0'): int, Optional('total_flow_entries_pending_cleanup'): int, 'total_cleanup_done': int, 'num_stack_cb_with_null_ctx': int, 'vpath_cleanup_from_nmrx_thread': int, 'vpath_cleanup_from_ev_thread': int, Optional('syncache_flow_mismatch'): int, Optional('failed_conn_already_accepted_conn'): int, 'ssl_init_failure': int, 'max_queue_length_work': int, 'current_queue_length_work': int, 'max_queue_length_ism': int, 'current_queue_length_ism': int, 'max_queue_length_sc': int, 'current_queue_length_sc': int, 'total_tx_enq_ign_due_to_conn_close': int, 'current_rx_epoll': int, 'current_tx_epoll': int, 'paused_by_tcp_tx_full': int, 'resumed_by_tcp_tx_below_threshold': int, 'paused_by_tcp_buffer_consumed': int, 'resumed_by_tcp_buffer_released': int, 'ssl_pause_done': int, 'ssl_resume_done': int, 'snort_pause_done': int, 'snort_resume_done': int, 'ev_ssl_pause_process': int, 'ev_snort_pause_process': int, 'ev_ssl_snort_resume_process': int, 'socket_pause_done': int, 'socket_resume_done': int, 'ssl_pause_called': int, 'ssl_resume_called': int, 'async_events_sent': int, 'async_events_processed': int, 'tx_async_events_sent': int, 'tx_async_events_recvd': int, 'tx_async_events_processed': int, 'failed_send': int, 'tcp_ssl_reset_initiated': int, 'tcp_snort_reset_initiated': int, 'tcp_fin_received_from_clnt_svr': int, 'tcp_reset_received_from_clnt_svr': int, 'ssl_fin_received_sc': int, 'ssl_reset_received_sc': int, 'sc_fin_received_ssl': int, 'sc_reset_received_ssl': int, 'ssl_fin_received_tcp': int, 'ssl_reset_received_tcp': int, 'tcp_fin_processed': int, 'tcp_fin_ignored_fd_already_closed': int, 'tcp_reset_processed': int, 'svc_reset_processed': int, 'flow_cleaned_with_client_data': int, 'flow_cleaned_with_server_data': int, 'buffers_dropped_in_tx_socket_close': int, 'tcp_4k_allocated_buffers': int, 'tcp_16k_allocated_buffers': int, 'tcp_32k_allocated_buffers': int, 'tcp_128k_allocated_buffers': int, 'tcp_freed_buffers': int, 'ssl_allocated_buffers': int, 'ssl_freed_buffers': int, 'tcp_received_buffers': int, 'tcp_to_ssl_enqueued_buffers': int, 'ssl_to_svc_enqueued_buffers': int, 'svc_to_ssl_enqueued_buffers': int, 'ssl_to_tcp_enqueued_buffers': int, 'tcp_buffers_sent': int, 'tcp_failed_buffers_allocations': int, 'tcp_failed_16k_buffers_allocations': int, 'tcp_failed_32k_buffers_allocations': int, 'tcp_failed_128k_buffers_allocations': int, 'ssl_failed_buffers_allocations': int, 'rx_sock_bytes_read_512': int, 'rx_sock_bytes_read_1024': int, 'rx_sock_bytes_read_2048': int, 'rx_sock_bytes_read_4096': int, 'ssl_server_init': int, 'flows_dropped_snort_gbl_health_yellow': int, 'flows_dropped_snort_inst_health_yellow': int, 'flows_dropped_wcapi_channel_health_yellow': int, 'total_wcapi_snd_flow_create_svc_chain_failed': int, 'total_wcapi_send_data_svc_chain_failed': int, 'total_wcapi_send_close_svc_chain_failed': int, 'total_tx_enqueue_failed': int, 'total_cleanup_flow_msg_add_to_wk_q_failed': int, 'total_cleanup_flow_msg_added_to_wk_q': int, 'total_cleanup_flow_msg_rcvd_in_wk_q': int, 'total_cleanup_flow_ignored_already_done': int, 'total_cleanup_ssl_msg_add_to_wk_q_failed': int, 'total_uhi_mmap': int, 'total_uhi_munmap': int, Optional('total_uhi_page_alloc'): int, Optional('total_uhi_page_alloc_retry'): int, Optional('total_uhi_page_alloc_failed'): int, Optional('total_uhi_page_alloc_failed_invalid_size'): int, Optional('total_uhi_page_free'): int, 'total_enable_rx_enqueued': int, 'total_enable_rx_called': int, 'total_enable_rx_process_done': int, 'total_enable_rx_enqueue_failed': int, 'total_enable_rx_process_failed': int, 'total_enable_rx_socket_on_client_stack_close': int, 'total_enable_rx_socket_on_server_stack_close': int, Optional('unified_logging_msg_received'): int, Optional('unified_logging_drop_data_too_long'): int, Optional('unified_logging_enqueue_success'): int, Optional('unified_logging_dequeue_success'): int, Optional('unified_logging_deq_fail_not_enough_space'): int, 'flow_stats_add_failure_count': int, 'flow_stats_delete_failure_count': int, Optional('aoim_sync_started'): int, Optional('aoim_sync_completed'): int, Optional('aoim_sync_errored'): int } }
class ShowRunPolicyMapSchema(MetaParser): schema = { 'policy_map': { Any(): { 'class': { Any(): { Optional('qos_set'): { Optional('ip precedence'): str, Optional('qos-group'): str, }, Optional('police'): { Optional('cir_bps'): str, Optional('pir_bps'): str, Optional('cir_bc_bytes'): str, Optional('cir_be_bytes'): str, Optional('conformed'): str, Optional('exceeded'): str, }, Optional('bandwidth_percent'): str, Optional('priority_level'): str, Optional('target_shape_rate'): str, Optional('service_policy'): str, Optional('service_policy_input'): str, Optional('service_policy_output'): str, }, } }, } }
class ShowRunInterfaceSchema(MetaParser): schema = { 'interfaces': { Any(): { Optional('authentication_control_direction'): str, Optional('authentication_event_fail_action'): str, Optional('authentication_fallback'): str, Optional('authentication_host_mode'): str, Optional('authentication_order'): str, Optional('authentication_periodic'): bool, Optional('authentication_port_control'): str, Optional('authentication_priority'): str, Optional('authentication_timer_inactivity'): str, Optional('authentication_timer_reauthenticate_server'): bool, Optional('authentication_violation'): str, Optional('carrier_delay'): list, Optional('shutdown'): bool, Optional('encapsulation_dot1q'): str, Optional('description'): str, Optional('dot1x_pae_authenticator'): bool, Optional('dot1x_timeout_quiet_period'): str, Optional('dot1x_timeout_server_timeout'): str, Optional('dot1x_timeout_tx_period'): str, Optional('ip_arp_inspection_limit_rate'): str, Optional('ip_dhcp_snooping_limit_rate'): str, Optional('ip_ospf'): { Any(): { 'area': str, }, }, Optional('ipv4'): { 'ip': str, 'netmask': str, }, Optional('ipv6'): list, Optional('ipv6_ospf'): { Any(): { 'area': str, }, }, Optional('ipv6_enable'): bool, Optional('ipv6_ospfv3'): { Any(): { 'area': str, }, }, Optional('load_interval'): str, Optional('mab'): bool, Optional('negotiation_auto'): bool, Optional('snmp_trap_link_status'): bool, Optional('snmp_trap_mac_notification_change_added'): bool, Optional('snmp_trap_mac_notification_change_removed'): bool, Optional('spanning_tree_bpduguard'): str, Optional('spanning_tree_portfast'): bool, Optional('spanning_tree_bpdufilter'): str, Optional('switchport_access_vlan'): str, Optional('switchport_trunk_vlans'): str, Optional('switchport_mode'): str, Optional('switchport_nonegotiate'): str, Optional('vrf'): str, Optional('channel_group'): { 'chg': int, 'mode': str, }, Optional('power_inline'): { Optional('state'): str, Optional('max_watts'): str, }, Optional('power_inline_port_priority'): str, Optional('flow_monitor_input'): str, Optional('switchport_protected'): bool, Optional('switchport_block_unicast'): bool, Optional('switchport_block_multicast'): bool, Optional('ip_dhcp_snooping_trust'): bool, Optional('ip_arp_inspection_trust'): bool, } } }
class ShowSpanningTreeSummarySchema(MetaParser): """Schema for show spanning-tree summary""" schema = { Optional('etherchannel_misconfig_guard'): bool, Optional('extended_system_id'): bool, Optional('portfast_default'): bool, 'bpdu_guard': bool, Optional('bpdu_filter'): bool, Optional('bridge_assurance'): bool, Optional('loop_guard'): bool, 'uplink_fast': bool, 'backbone_fast': bool, Optional('root_bridge_for'): str, Optional('pvst_simulation'): bool, Optional('pvst_simulation_status'): str, Optional("configured_pathcost"): { 'method': str, Optional('operational_value'): str, }, Optional('mode'): { Any(): { # mstp, pvst, rapid_pvst Any(): { # <mst_domain>, <pvst_id> 'blocking': int, 'listening': int, 'learning': int, 'forwarding': int, 'stp_active': int, } } }, 'total_statistics': { 'blockings': int, 'listenings': int, 'learnings': int, 'forwardings': int, 'stp_actives': int, Optional('num_of_msts'): int, Optional('num_of_vlans'): int, } }
class ShowSpanningTreeDetailSchema(MetaParser): """Schema for show spanning-tree detail""" schema = { Any(): { # mstp, pvst, rapid_pvst Optional('domain'): str, Optional('pvst_id'): str, Optional('name'): str, Optional('revision'): int, Optional('max_hop'): int, 'hello_time': int, 'max_age': int, 'forwarding_delay': int, Optional('hold_count'): int, Any(): { # mst_instances, vlans Any(): { Optional('mst_id'): int, Optional('vlan'): str, Optional('vlan_id'): int, Optional('hello_time'): int, Optional('max_age'): int, Optional('forwarding_delay'): int, Optional('hold_count'): int, 'bridge_priority': int, 'bridge_sysid': int, 'bridge_address': str, Optional('root_of_spanning_tree'): bool, 'topology_change_flag': bool, 'topology_detected_flag': bool, 'hold_time': int, 'topology_changes': int, 'time_since_topology_change': str, Optional('topology_from_port'): str, 'hello_time': int, 'max_age': int, 'forwarding_delay': int, 'hold_time': int, 'topology_change_times': int, 'notification_times': int, 'hello_timer': int, 'topology_change_timer': int, 'notification_timer': int, Optional('aging_timer'): int, 'interfaces': { Any(): { 'status': str, 'name': str, 'cost': int, 'port_priority': int, 'port_num': int, 'port_identifier': str, 'designated_root_priority': int, 'designated_root_address': str, 'designated_path_cost': int, 'designated_port_id': str, 'designated_bridge_priority': int, 'designated_bridge_address': str, 'number_of_forward_transitions': int, 'message_age': int, 'forward_delay': int, 'hold': int, 'link_type': str, Optional('boundary'): str, Optional('peer'): str, Optional('loop_guard'): bool, 'counters': { 'bpdu_sent': int, 'bpdu_received': int, } } } }, }, } }
class ShowRunRouterIsisSchema(MetaParser): """Schema for show run router isis""" schema = { 'isis': { Any(): { Optional('segment_routing'): OrderedDict({ Optional(Any()): Any(), }), Optional('lsp_gen_interval'): OrderedDict({ Optional(Any()): Any(), }), Optional('address_family'): { Optional(Any()): OrderedDict({ Optional('fast_reroute'): OrderedDict({ Optional('per_prefix'): OrderedDict({ Optional('tiebreaker'): OrderedDict({ Optional(Any()): Any(), }), }), }), Optional('mpls'): OrderedDict({ Optional('traffic_eng'): Any(), }), Optional('spf_interval'): OrderedDict({ Optional(Any()): Any(), }), Optional('spf_prefix_priority'): OrderedDict({ Optional(Any()): Any(), }), Optional('segment_routing'): OrderedDict({ Optional(Any()): Any(), }), Optional(Any()): Any(), }) }, Optional('interfaces'): { Optional(Any()): OrderedDict({ Optional('bfd'): OrderedDict({ Optional(Any()): Any(), }), Optional('address_family'): OrderedDict({ Optional(Any()): OrderedDict({ Optional(Any()): Any(), Optional(Any()): OrderedDict({ Optional(Any()): Any(), }), }), }), Optional(Any()): Any(), }) }, Optional(Any()): Any(), }, }, }