class ShowControllersFiaDiagshellL2showLocationSchema(MetaParser): '''Schema for: * show controller fia diagshell {diagshell_unit} 'l2 show' location {location} ''' schema = { 'nodes': {Any(): {'vlan': {Any(): {'mac': {Any(): {'encap_id': str, 'gport': str, Optional('trunk'): int, Optional('static'): bool }, }, }, }, }, }, }
class ShowVrfSchema(MetaParser): ''' Schema for: show vrf show vrf {vrf} ''' schema = { 'vrf': { Any(): { Optional('route_distinguisher'): str, 'protocols': list, Optional('interfaces'): list } } }
class ShowSpanningTreeMstConfigurationSchema(MetaParser): """Schema for show spanning-tree mst configuration""" schema = { 'mstp': { 'name': str, 'revision': int, 'instances_configured': int, 'mst_instances': { Any(): { 'vlan_mapped': str, } } } }
class ShowArpApplicationSchema(MetaParser): """ Schema for show arp application """ schema = { 'num_of_clients_registered': int, 'applications': { Any(): { 'id': int, 'num_of_subblocks': int } } }
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 ShowMacsecSummarySchema(MetaParser): """ Schema for 'show macsec summary' """ schema = { 'interfaces': { Any(): { 'transmit_sc': str, 'receive_sc': str }, } }
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 ShowIsisLspLogSchema(MetaParser): """Schema for show isis lsp-log""" schema = { 'tag': { Any(): { 'lsp_log': { 'level': { Any(): { 'index': { Any(): { 'triggers': str, 'when': str, 'count': int, Optional('interface'): str, }, }, }, }, } }, } }
class ShowTenantOmpPeersSchema(MetaParser): ''' Schema for *'show tenant {tenant_name} omp peers' ''' schema = { 'tenant_name': { Any(): { 'peer': { Any(): { 'domain_id': int, 'overlay_id': int, 'routes_installed': int, 'routes_received': int, 'routes_sent': int, 'site_id': int, 'state': str, 'type': str, 'uptime': str }, }, }, }, }
class ShowWatchdogMemoryStateSchema(MetaParser): """ Schema for show watchdog memory-state """ schema = { 'node': { Any(): { 'physical_memory_mb': float, 'free_memory_mb': float, 'state': str } } }
class ShowSystemIntegrityAllMeasurementNonceSchema(MetaParser): """Schema for show system integrity all measurement nonce <nonce>""" schema = { "bay": str, "fru": str, "node": str, "slot": str, "chassis": { int: { "platform": str, "boot_hashes": {Any(): str}, "os": { "version": str, "hashes": { Any(): str, }, }, "registers": {"PCR0": str, "PCR8": str}, "signature": {"version": int, "value": str}, }, }, }
class ShowIpv6NeighborsSchema(MetaParser): """Schema for : 'show ipv6 neighbors detail' 'show ipv6 neighbors vrf <vrf>' """ schema = { 'interface': { Any(): { 'interface': str, 'neighbors': { Any(): { 'ip': str, # Conf/Ops Str '2001:db8:8548:1::1' 'link_layer_address': str, # Conf/Ops Str 'aaaa.beef.cccc' 'age': str, 'neighbor_state': str, Optional('trlv'): str, }, }, }, }, }
class ShowMacAddressTableDynamicSchema(MetaParser): """Schema for show mac address-table dynamic address {mac_address} show mac address-table dynamic vlan {vlan_id} """ schema = { 'ports': { Any(): { 'mac-address': str, 'port': str, 'type': str, 'vlan-id': int}, } }
class ShowFlowRecordSchema(MetaParser): schema = { 'flow_record_name': { Any(): { 'description': str, 'no_of_users': int, 'total_field_space': int, 'fields': { Optional('match_list'): ListOf(str), Optional('collect_list'): ListOf(str), } } } }
class ShowSdwanIpsecOutboundConnectionsSchema(MetaParser): """ Schema for "show sdwan ipsec outbound-connections" command """ schema = { "source_ip": { Any(): { 'destination_ip': { Any(): { "destination_port": int, "authentication": str, "remote_tloc_color": str, "key_hash": str, "spi": int, "source_port": int, "remote_tloc": str, "encryption_algorithm": str, "tunnel_mtu": int, "tc_spi": int, }, }, }, }, }
class ShowServiceGroupStatsSchema(MetaParser): """ Schema for show service-group stats """ schema = { 'service_group_statistics': { 'global': { 'num_of_groups': int, 'num_of_members': int }, Any(): { 'num_of_interfaces': int, 'num_of_members': { int: { Any(): int } }, 'members_joined': int, 'members_left': int } } }
class ShowMerakiCompatibilitySchema(MetaParser): "Schema for meraki compatibility" schema = { 'compatibility_check': { Any(): { 'status': str }, }, 'switch': { Any(): { 'skus': str, 'compatibility': str, 'bootloader_version': str, 'compatibility': str }, }, 'compatible_skus': { 'all_skus': list }, 'compatible_nms': { 'all_nms': list }, }
class ShowPlatformSoftwareFedActiveAclInfoSummarySchema(MetaParser): """Schema for 'show platform software fed active acl info summary """ schema = { 'acl_name': { Any(): { 'cg_id': int, 'protocol': str, 'no_of_aces': int, 'direction_ingress': str, 'direction_egress': str }, }, }
class ShowIpEigrpTopologySchema(MetaParser): ''' Schema for: * 'show ip eigrp topology' * 'show ip eigrp vrf <vrf> topology' * 'show ipv6 eigrp topology' * 'show ipv6 eigrp vrf <vrf> topology' ''' schema = { 'eigrp_instance': { Any(): { 'vrf': { Any(): { 'address_family': { Any(): { 'eigrp_id': { Any(): { 'eigrp_routes': { Any(): { 'route_code': str, 'route_type': str, 'route': str, 'successor_count': int, 'FD': int, 'known_via': str, Optional('outgoing_interface'): str, }, }, }, }, }, }, }, }, }, }, }
class ShowLldpEntrySchema(MetaParser): """Schema for show lldp entry [<WORD>|*]""" schema = { 'total_entries': int, Optional('interfaces'): { Any(): { 'if_name': str, 'port_id': { Any(): { 'neighbors': { Any(): { 'chassis_id': str, 'port_id': str, 'neighbor_id': str, Optional('port_description'): str, Optional('system_description'): str, Optional('system_name'): str, 'time_remaining': int, Optional('capabilities'): { Any(): { Optional('system'): bool, Optional('enabled'): bool, 'name': str, } }, Optional('management_address'): str, Optional('auto_negotiation'): str, Optional('physical_media_capabilities'): list, Optional('unit_type'): int, Optional('vlan_id'): int } } } } } } }
class ShowEigrpNeighborsSchema(MetaParser): ''' Schema for: * 'show ip eigrp neighbors' * 'show ip eigrp vrf <vrf> neighbors' * 'show ipv6 eigrp neighbors' * 'show ipv6 eigrp vrf <vrf> neighbors' ''' schema = { 'eigrp_instance': { Any(): { 'vrf': { Any(): { 'address_family': { Any(): { 'name': str, 'named_mode': bool, 'eigrp_interface': { Any(): { 'eigrp_nbr': { Any(): { 'peer_handle': int, 'hold': int, 'uptime': str, 'q_cnt': int, 'last_seq_number': int, 'srtt': float, 'rto': int, }, }, }, }, }, }, }, }, }, }, }
class ShowIpv6RoutersSchema(MetaParser): """Schema for: show ipv6 routers show ipv6 routers vrf all show ipv6 routers vrf <vrf>""" schema = { 'interfaces': { Any(): { 'interface': str, 'neighbors': { Any(): { 'ip': str, 'is_router': bool, 'last_update': str, 'current_hop_limit': int, 'addr_flag': int, 'other_flag': int, 'mtu': int, 'lifetime': int, 'preference': str, 'homeagent_flag': int, 'retransmission_time': int, 'reachable_time': int, Optional('prefix'): { Any(): { 'autonomous_flag': int, 'onlink_flag': int, 'preferred_lifetime': int, 'valid_lifetime': int, } } }, }, }, }, }
class ShowRipDatabaseSchema(MetaParser): """Schema for: show rip database show rip vrf {vrf} database""" schema = { 'vrf': { Any(): { 'address_family': { Any(): { 'instance': { Any(): { 'routes': { Any(): { 'index': { Any(): { Optional('route_type'): str, Optional('metric'): int, Optional('interface'): str, Optional('next_hop'): str, Optional('redistributed'): bool, Optional('summary_type'): str, Optional('up_time'): str, Optional('inactive'): bool, Optional('distance'): int } } } } } } } } } } }
class ShowMsdpSaCacheSchema(MetaParser): """ Schema for: * 'show msdp sa-cache' * 'show msdp vrf {vrf} sa-cache {group}' """ schema = { 'vrf': { Any(): { 'sa_cache': { Any(): { 'group': str, 'source_addr': str, Optional('peer_as'): int, Optional('peer_learned_from'): str, Optional('rpf_peer'): str, 'origin_rp': { Any(): { 'rp_address': str, }, }, 'flags': { 'grp': list, 'src': list, }, Optional('statistics'): { 'received': { 'sa': int, 'encapsulated_data_received': int, }, }, 'up_time': str, 'expire': str } } } } }
class ShowSpanningTreePvrstSchema(MetaParser): schema = { 'pvst': { Any(): { 'pvst_id': str, 'vlans': { Any(): { 'vlan_id': int, 'designated_root_priority': int, 'designated_root_address': str, 'designated_root_max_age': int, 'designated_root_forward_delay': int, 'bridge_priority': int, 'bridge_address': str, 'bridge_max_age': int, 'bridge_forward_delay': int, 'bridge_transmit_hold_count': int, 'sys_id_ext': int, 'interface': { Any(): { 'name': str, 'cost': int, 'port_priority': int, 'port_num': int, 'role': str, 'port_state': str, 'designated_bridge_priority': int, 'designated_bridge_address': str, 'designated_port_priority': int, 'designated_port_num': int, } } }, } } } }
class ShowStackPowerSchema(MetaParser): """Schema for * show stack-power * show stack-power budgeting """ schema = { 'power_stack': { Any(): { 'mode': str, 'topology': str, 'total_power': int, 'reserved_power': int, 'allocated_power': int, 'unused_power': int, 'switch_num': int, 'power_supply_num': int, Optional('switches'): { Any(): { 'power_supply_a': int, 'power_supply_b': int, 'power_budget': int, 'allocated_power': int, 'available_power': int, 'consumed_power_sys': int, 'consumed_power_poe': int, }, }, }, }, Optional('totals'): { 'total_allocated_power': int, 'total_available_power': int, 'total_consumed_power_sys': int, 'total_consumed_power_poe': int, }, }
class ShowPolicyMapInterfaceSchema(MetaParser): '''Schema for: * 'show policy-map interface {interface}' ''' schema = { 'interface': { Any(): { Optional('service_policy'): { Any(): { Optional('policy_status'): str, Optional('policy_name'): { Any(): { Optional('class'): { Optional(Any()): { Optional('classification_statistics'): { Optional('matched'): Any(), Optional('transmitted'): Any(), Optional('total_dropped'): Any() }, Optional('queueing_statistics'): { Optional('queue_id'): int, Optional('high_watermark'): str, Optional('inst_queue_len'): str, Optional('avg_queue_len'): str, Optional('taildropped'): str, Optional('queue_conform_packets'): int, Optional('queue_conform_bytes'): int, Optional('queue_conform_rate'): int, Optional('red_random_drops_packets'): int, Optional('red_random_drops_bytes'): int, }, } } } } } } } } }
class ShowMldInterfaceSchema(MetaParser): ''' Schema for: show mld interface show mld vrf {vrf} interface ''' schema = { 'vrf': { Any(): { Optional('max_groups'): int, Optional('active_groups'): int, 'interface': { Any(): { 'oper_status': str, 'interface_status': str, Optional('internet_address'): str, 'enable': bool, Optional('version'): int, Optional('query_interval'): int, Optional('querier_timeout'): int, Optional('query_max_response_time'): int, Optional('last_member_query_interval'): int, Optional('max_groups'): int, Optional('active_groups'): int, Optional('counters'): { 'joins': int, 'leaves': int, }, Optional('querier'): str, Optional('time_elapsed_since_last_query_sent'): str, Optional('time_elapsed_since_igmp_router_enabled'): str, Optional('time_elapsed_since_last_report_received'): str, }, } } }, }
class ShowOmpRoutesSchema(MetaParser): """ Schema for show omp routes * show omp routes <prefix> * show omp routes vpn <vpn> * show omp routes <prefix> vpn <vpn> * show omp routes family <af> vpn <vpn> """ schema = { 'vrf': { Any(): { 'prefixes': { Any(): { 'prefix': str, 'from_peer': { Any(): { 'peer': str, 'path_list': { Any(): { # index 'index': int, 'path_id': str, 'label': str, 'status': list, 'attr_type': str, 'tloc_ip': str, 'color': str, 'encap': str, 'preference': str } } } } } } } } }
class ShowSpanningTreeSummarySchema(MetaParser): """Schema for show spanning-tree summary""" schema = { 'etherchannel_misconfig_guard': bool, 'extended_system_id': bool, 'portfast_default': bool, 'bpdu_guard': bool, 'bpdu_filter': bool, 'loop_guard': bool, 'uplink_fast': bool, 'backbone_fast': bool, 'root_bridge_for': str, "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, } }