class ShowPimVrfMstaticSchema(MetaParser): """Schema for show pim vrf <vrf> <address_family> mstatic""" schema = { 'vrf': {Any(): {'address_family': {Any(): {'mroute': {Any(): {'path': {Any(): {'neighbor_address': str, 'interface_name': str, 'admin_distance': int, }, }, }, }, }, }, }, }, }
class VimCmdVmsvcGetAllVmsSchema(MetaParser): """Schema for vim-cmd vmsvc/getallvms""" schema = { 'vmid': { Any(): { 'vmid': str, 'name': str, 'file': str, 'guest_os': str, 'version': str, Optional('annotation'): str, } } }
class ShowIpStaticRouteSchema(MetaParser): """Schema for show ip static-route""" schema = { 'vrf': { Any(): { Optional('address_family'): { Any(): { Optional('routes'): { Any(): { Optional('route'): str, Optional('next_hop'): { Optional('outgoing_interface'): { Any(): { # interface if there is no next_hop Optional('outgoing_interface'): str, Optional('active'): bool, Optional('rnh_active'): bool, }, }, Optional('next_hop_list'): { Any(): { # index Optional('index'): int, Optional('active'): bool, Optional('next_hop'): str, Optional('next_hop_netmask'): str, Optional('outgoing_interface'): str, Optional('rnh_active'): bool, }, }, }, }, }, }, }, }, }, }
class ShowPortChannelDatabaseSchema(MetaParser): """ schema for : show post-channel database""" schema = { 'interfaces': { Any(): { 'last_update_success': bool, # successful => True, else False 'total_ports': int, 'up_ports': int, 'port_channel_age': str, 'time_last_bundle': str, 'last_bundled_member': str, Optional('first_oper_port'): str, Optional('time_last_unbundle'): str, Optional('last_unbundled_member'): str, 'members': { Any(): { 'activity': str, 'status': str, 'is_first_oper_port': bool } } } } }
class ShowMPLSLSPSchema(MetaParser): """Schema for show mpls lsp""" schema = { 'lsps': { Any(): { 'destination': str, 'admin': str, 'operational': str, 'flap_count': int, 'retry_count': int, Optional('tunnel_interface'): str, Optional('path'): str } } }
class ShowMacAddressTableBaseSchema(MetaParser): """Schema for: 'show mac address-table vni <WORD> | grep <WORD>' 'show mac address-table local vni <WORD>' 'show mac address-table' 'show system internal l2fwder mac'""" schema = { 'mac_table': { 'vlans': { Any(): { 'vlan': str, 'mac_addresses': { Any(): { 'mac_address': str, Optional('entry'): str, 'secure': str, 'ntfy': str, Optional('drop'): { 'drop': bool, 'age': str, 'mac_type': str, }, Optional('interfaces'): { Any(): { 'interface': str, 'age': str, 'mac_type': str, }, }, }, }, }, }, }, }
class ShowRouterIsisAdjacencySchema(MetaParser): """Schema for show router isis adjacency""" schema = { 'instance': { Any(): { 'level': { Any(): { 'total_adjacency_count': int, 'interfaces': { Any(): { 'system_id': { Any(): { 'hold_time': int, 'state': str, 'mt_id': int, } } } } } } } } }
class ShowMemoryStatisticsSchema(MetaParser): """Schema for show memory statistics""" schema = { Optional('tracekey'): str, 'name': { Any(): { 'head': str, 'total': int, 'used': int, 'free': int, 'lowest': int, 'largest': int, } } }
class ShowSnmpUserSchema(MetaParser): """Schema for show snmp user.""" schema = { "user_name": { Any(): { Optional("access_list"): str, "auth_protocol": str, "engine_id": str, "group_name": str, "priv_protocol": str, "storage_type": str } } }
class ShowNtpAssociationsSchema(MetaParser): """Schema for show ntp associations""" schema = { 'peer': { Any(): { 'local_mode': { Any(): { 'remote': str, 'configured': bool, Optional('refid'): str, Optional('local_mode'): str, Optional('stratum'): int, Optional('receive_time'): Or(str, int), Optional('poll'): int, Optional('reach'): int, Optional('delay'): float, Optional('offset'): float, Optional('jitter'): float, 'mode': str, }, } }, }, 'clock_state': { 'system_status': { 'clock_state': str, Optional('clock_stratum'): int, Optional('associations_address'): str, Optional('root_delay'): float, Optional('clock_offset'): float, Optional('clock_refid'): str, Optional('associations_local_mode'): str, } } }
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 ShowPagpCountersSchema(MetaParser): """Schema for: show pagp counters""" schema = { 'interfaces': { Any(): { 'name': str, 'protocol': str, 'members': { Any(): { 'interface': str, 'counters': { 'information_in_pkts': int, 'information_out_pkts': int, 'pagp_errors': int, 'flush_in_pkts': int, 'flush_out_pkts': 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 ShowArchiveSchema(MetaParser): """ Schema for show archive """ schema = { 'archive': { 'total': int, Optional('max_archive_configurations'): int, 'most_recent_file': str, Any(): { 'file': str, }, } }
class ShowRipSchema(MetaParser): """Schema for: * show rip * show rip vrf {vrf}""" schema = { 'vrf': { Any(): { 'address_family': { Any(): { 'instance': { Any(): { 'active': str, 'added_to_socket': str, 'out_of_memory_state': str, 'version': int, 'default_metric': str, 'maximum_paths': int, 'auto_summarize': str, 'broadcast_for_v2': str, 'packet_source_validation': str, 'nsf': str, 'timers': { 'until_next_update': int, 'update_interval': int, 'invalid_interval': int, 'holddown_interval': int, 'flush_interval': int } } } } } } } }
class ShowPceIPV4PeerDetailSchema(MetaParser): ''' Schema for: * show pce ipv4 peer detail ''' schema = { 'pce_peer_database': { Any(): { 'state': str, 'capabilities': { 'stateful': bool, 'segment-routing': bool, 'update': bool }, 'pcep': { 'uptime': str, 'session_id_local': int, 'session_id_remote': int, }, 'ka': { 'sending_intervals': int, 'minimum_acceptable_inteval': int, }, 'peer_timeout': int, 'statistics': { 'rx': { 'keepalive_messages': int, 'request_messages': int, 'reply_messages': int, 'error_messages': int, 'open_messages': int, 'report_messages': int, 'update_messages': int, 'initiate_messages': int, }, 'tx': { 'keepalive_messages': int, 'request_messages': int, 'reply_messages': int, 'error_messages': int, 'open_messages': int, 'report_messages': int, 'update_messages': int, 'initiate_messages': int, }, } } } }
class PsSchema(MetaParser): ''' Schema for "ps -ef" ''' schema = { 'pid': { Any(): { 'uid': str, 'ppid': str, 'c': str, 'stime': str, 'tty': str, 'time': str, 'cmd': str } } }
class ShowStackPowerSchema(MetaParser): """Schema for show stack-power""" 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 }, } }
class ShowServiceSapUsingSchema(MetaParser): """schema for show service sap-using""" schema = { 'total': int, 'sap': { Any(): { 'service_id': int, 'ingress_qos': int, 'egress_qos': int, 'ingress_filter': str, 'egress_filter': str, 'admin_state': str, 'oper_state': str, } } }
class ShowIpMulticastMplsvifSchema(MetaParser): """Schema for: show ip multicast mpls vif """ schema = { 'interfaces': { Any(): { 'next_hop': str, 'application': str, 'ref_count': str, 'table': int, 'vrf': str, 'flags': str, }, }, }
class ShowPceIPV4PeerprefixSchema(MetaParser): ''' Schema for: * show pce ipv4 prefix ''' schema = { 'nodes': { Any(): { 'te_router_id': str, 'host_name': str, 'isis_system_id': list, Optional('asn'): list, Optional('domain_id'): list, 'advertised_prefixes': list, }, } }
class ShowPceIPV4PeerSchema(MetaParser): ''' Schema for: * show pce ipv4 peer ''' schema = { 'pce_peer_database': { Any(): { 'state': str, 'capabilities': { Optional('stateful'): bool, Optional('segment-routing'): bool, Optional('update'): bool } }, } }
class ShowPortSecuritySchema(MetaParser): """Schema for show port-security """ schema = { Optional('interfaces'): { Any(): { 'max_secure_addr_cnt': int, 'current_addr_cnt': int, 'security_violation_cnt': int, 'security_action': str, } }, 'total_addr_in_system': int, 'max_addr_limit_in_system': int }
class ShowUdldNeighborSchema(MetaParser): """Schema for * show udld neighbor """ schema = { 'interfaces': { Any(): { 'device_name': str, 'device_id': str, 'port_id': str, 'neighbor_state': str, }, }, 'total_number_of_bidirectional_entries_displayed': int, }
class ShowVirtualServiceCoreSchema(MetaParser): """Schema for: * show virtual-service core * show virtual-service core name <name> """ schema = { 'cores': { Any(): { 'virtual_service': str, 'process_name': str, 'pid': int, 'date': str, } } }
class ShowL2fibBdPortSchema(MetaParser): """ Schema for show l2fib bridge-domain {bd-id} port """ schema = { Any(): { 'type': str, 'is_path_list': bool, Optional('port'): str, Optional('path_list'): { 'id': int, 'path_count': int, 'type': str, 'description': str } } }
class ShowInventoryRawSchema(MetaParser): """Schema for * show inventory Raw """ schema = { 'name': { Any(): { 'description': str, Optional('pid'): str, Optional('vid'): str, Optional('sn'): str, Optional('oid'): str } } }
class ShowInventorySchema(MetaParser): ''' Schema for: * 'show inventory' ''' schema = { 'index': { Any(): { 'name': str, 'descr': str, Optional('pid'): str, Optional('vid'): str, Optional('sn'): str, }, } }
class ShowIPRouteSchema(MetaParser): schema = { 'routes': { Any(): { 'source_proto': str, 'is_preferred': bool, 'prefix': str, 'subnet': str, 'mask': str, 'admin_dist': int, 'metric': int, 'next_hop': str, 'vlan': str } } }
class ShowStandbyBriefSchema(MetaParser): """Schema for show standby brief:""" schema = { 'interface': { Any(): { 'grp': int, 'priority': int, Optional('is_preempt_enabled'): bool, 'state': str, 'active': str, 'standby': str, 'virtual_ip': str, }, }, }