From 6f4c741079d30b9fdfb9dec2aa47bbc1715c9e17 Mon Sep 17 00:00:00 2001 From: Jan Krupa Date: Mon, 29 Apr 2024 13:12:46 +0200 Subject: [PATCH] Add available commands to docs --- sdk_generator/outputs/github_parser.json | 10 +++++----- src/genie/libs/parser/iosxr/show_bgp.py | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk_generator/outputs/github_parser.json b/sdk_generator/outputs/github_parser.json index cd1ab042a8..7a6bbd42eb 100644 --- a/sdk_generator/outputs/github_parser.json +++ b/sdk_generator/outputs/github_parser.json @@ -10630,7 +10630,7 @@ "show bgp": { "iosxr": { "class": "ShowBgpAddressFamily", - "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n ", + "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n 'show bgp {address_family} community {community}'\n 'show bgp {address_family} community {community} {exact_match}'\n ", "module_name": "show_bgp", "package": "genie.libs.parser", "schema": "{\n'address_family': {\n Any (str) *: {\n Optional (str) router_identifier: ,\n Optional (str) local_as: Or (, ),\n Optional (str) generic_scan_interval: ,\n Optional (str) non_stop_routing: ,\n Optional (str) table_state: ,\n Optional (str) table_id: ,\n Optional (str) rd_version: ,\n Optional (str) bgp_table_version: ,\n Optional (str) dampening_status: ,\n Optional (str) nsr_initial_initsync_version: ,\n Optional (str) nsr_issu_sync_group_versions: ,\n Optional (str) nsr_initial_init_ver_status: ,\n Optional (str) scan_interval: ,\n Optional (str) processed_prefix: ,\n Optional (str) processed_paths: ,\n Optional (str) route_distinguisher: {\n Any (str) *: {\n Optional (str) default_vrf: ,\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n },\n },\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n Optional (str) operation_mode: ,\n Optional (str) process: {\n Any (str) *: {\n 'rcvtblver': ,\n 'brib_rib': ,\n 'labelver': ,\n 'importver': ,\n 'sendtblver': ,\n 'standbyver': ,\n },\n },\n Optional (str) neighbor: {\n Any (str) *: {\n 'remote_as': Or (, ),\n 'tbl_ver': ,\n 'spk': ,\n 'msg_rcvd': ,\n 'msg_sent': ,\n 'input_queue': ,\n 'output_queue': ,\n 'up_down': ,\n 'state_pfxrcd': ,\n },\n },\n },\n },\n}", @@ -12050,7 +12050,7 @@ }, "iosxr": { "class": "ShowBgpAddressFamily", - "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n ", + "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n 'show bgp {address_family} community {community}'\n 'show bgp {address_family} community {community} {exact_match}'\n ", "module_name": "show_bgp", "package": "genie.libs.parser", "schema": "{\n'address_family': {\n Any (str) *: {\n Optional (str) router_identifier: ,\n Optional (str) local_as: Or (, ),\n Optional (str) generic_scan_interval: ,\n Optional (str) non_stop_routing: ,\n Optional (str) table_state: ,\n Optional (str) table_id: ,\n Optional (str) rd_version: ,\n Optional (str) bgp_table_version: ,\n Optional (str) dampening_status: ,\n Optional (str) nsr_initial_initsync_version: ,\n Optional (str) nsr_issu_sync_group_versions: ,\n Optional (str) nsr_initial_init_ver_status: ,\n Optional (str) scan_interval: ,\n Optional (str) processed_prefix: ,\n Optional (str) processed_paths: ,\n Optional (str) route_distinguisher: {\n Any (str) *: {\n Optional (str) default_vrf: ,\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n },\n },\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n Optional (str) operation_mode: ,\n Optional (str) process: {\n Any (str) *: {\n 'rcvtblver': ,\n 'brib_rib': ,\n 'labelver': ,\n 'importver': ,\n 'sendtblver': ,\n 'standbyver': ,\n },\n },\n Optional (str) neighbor: {\n Any (str) *: {\n 'remote_as': Or (, ),\n 'tbl_ver': ,\n 'spk': ,\n 'msg_rcvd': ,\n 'msg_sent': ,\n 'input_queue': ,\n 'output_queue': ,\n 'up_down': ,\n 'state_pfxrcd': ,\n },\n },\n },\n },\n}", @@ -12201,7 +12201,7 @@ "show bgp {address_family} community {community}": { "iosxr": { "class": "ShowBgpAddressFamily", - "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n ", + "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n 'show bgp {address_family} community {community}'\n 'show bgp {address_family} community {community} {exact_match}'\n ", "module_name": "show_bgp", "package": "genie.libs.parser", "schema": "{\n'address_family': {\n Any (str) *: {\n Optional (str) router_identifier: ,\n Optional (str) local_as: Or (, ),\n Optional (str) generic_scan_interval: ,\n Optional (str) non_stop_routing: ,\n Optional (str) table_state: ,\n Optional (str) table_id: ,\n Optional (str) rd_version: ,\n Optional (str) bgp_table_version: ,\n Optional (str) dampening_status: ,\n Optional (str) nsr_initial_initsync_version: ,\n Optional (str) nsr_issu_sync_group_versions: ,\n Optional (str) nsr_initial_init_ver_status: ,\n Optional (str) scan_interval: ,\n Optional (str) processed_prefix: ,\n Optional (str) processed_paths: ,\n Optional (str) route_distinguisher: {\n Any (str) *: {\n Optional (str) default_vrf: ,\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n },\n },\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n Optional (str) operation_mode: ,\n Optional (str) process: {\n Any (str) *: {\n 'rcvtblver': ,\n 'brib_rib': ,\n 'labelver': ,\n 'importver': ,\n 'sendtblver': ,\n 'standbyver': ,\n },\n },\n Optional (str) neighbor: {\n Any (str) *: {\n 'remote_as': Or (, ),\n 'tbl_ver': ,\n 'spk': ,\n 'msg_rcvd': ,\n 'msg_sent': ,\n 'input_queue': ,\n 'output_queue': ,\n 'up_down': ,\n 'state_pfxrcd': ,\n },\n },\n },\n },\n}", @@ -12212,7 +12212,7 @@ "show bgp {address_family} community {community} {exact_match}": { "iosxr": { "class": "ShowBgpAddressFamily", - "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n ", + "doc": "Parser for:\n 'show bgp'\n 'show bgp {address_family}'\n 'show bgp {address_family} community {community}'\n 'show bgp {address_family} community {community} {exact_match}'\n ", "module_name": "show_bgp", "package": "genie.libs.parser", "schema": "{\n'address_family': {\n Any (str) *: {\n Optional (str) router_identifier: ,\n Optional (str) local_as: Or (, ),\n Optional (str) generic_scan_interval: ,\n Optional (str) non_stop_routing: ,\n Optional (str) table_state: ,\n Optional (str) table_id: ,\n Optional (str) rd_version: ,\n Optional (str) bgp_table_version: ,\n Optional (str) dampening_status: ,\n Optional (str) nsr_initial_initsync_version: ,\n Optional (str) nsr_issu_sync_group_versions: ,\n Optional (str) nsr_initial_init_ver_status: ,\n Optional (str) scan_interval: ,\n Optional (str) processed_prefix: ,\n Optional (str) processed_paths: ,\n Optional (str) route_distinguisher: {\n Any (str) *: {\n Optional (str) default_vrf: ,\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n },\n },\n Optional (str) prefix: {\n Any (str) *: {\n Optional (str) index: {\n Any (str) *: {\n Optional (str) next_hop: ,\n Optional (str) status_codes: ,\n Optional (str) metric: ,\n Optional (str) locprf: ,\n Optional (str) weight: ,\n Optional (str) path: ,\n Optional (str) origin_codes: ,\n },\n },\n },\n },\n Optional (str) operation_mode: ,\n Optional (str) process: {\n Any (str) *: {\n 'rcvtblver': ,\n 'brib_rib': ,\n 'labelver': ,\n 'importver': ,\n 'sendtblver': ,\n 'standbyver': ,\n },\n },\n Optional (str) neighbor: {\n Any (str) *: {\n 'remote_as': Or (, ),\n 'tbl_ver': ,\n 'spk': ,\n 'msg_rcvd': ,\n 'msg_sent': ,\n 'input_queue': ,\n 'output_queue': ,\n 'up_down': ,\n 'state_pfxrcd': ,\n },\n },\n },\n },\n}", @@ -12588,7 +12588,7 @@ "package": "genie.libs.parser", "schema": "{\n'address_family': {\n Any (str) *: {\n 'prefix': ,\n 'last_modified': ,\n 'paths': {\n 'total_available_paths': ,\n 'best_path': ,\n 'path': {\n Any (str) *: {\n Optional (str) advertised_peer_pe: ,\n Optional (str) advertised_peer_ce: ,\n 'as_path': {\n Any (str) *: {\n 'bgp_peer_neighbor_ip': {\n Any (str) *: {\n Optional (str) metric: ,\n 'origin_neighbors_ip': ,\n 'origin_router_id': ,\n 'bgp_peer_neighbor_ip': ,\n Optional (str) originator: ,\n Optional (str) received_label: ,\n 'origin_metric': ,\n Optional (str) weight: ,\n 'localpref': ,\n 'origin_codes': ,\n 'status_codes': ,\n 'received_path_id': ,\n 'local_path_id': ,\n 'version': ,\n Optional (str) cluster_list: ListOf (type) ,\n Optional (str) source_afi: ,\n Optional (str) source_vrf: ,\n Optional (str) source_rd: ,\n Optional (str) psid_type: {\n Any (str) *: {\n 'psid_type': ,\n 'subtlv_count': ,\n 'subtlv': {\n 't_value': ,\n 'sid_value': ,\n 'behaviour': ,\n 'sstlv_count': ,\n Optional (str) subsubtlv: {\n 't_value': ,\n },\n },\n },\n },\n },\n },\n },\n },\n },\n },\n },\n },\n },\n}", "uid": "show_bgp_address_family_bgp_prefix", - "url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxr/show_bgp.py#L9496" + "url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxr/show_bgp.py#L9498" } }, "show bgp {address_family} {ip_address} bestpath-compare": { diff --git a/src/genie/libs/parser/iosxr/show_bgp.py b/src/genie/libs/parser/iosxr/show_bgp.py index 4e4e4f6217..089ebec5b8 100644 --- a/src/genie/libs/parser/iosxr/show_bgp.py +++ b/src/genie/libs/parser/iosxr/show_bgp.py @@ -9122,6 +9122,8 @@ class ShowBgpAddressFamily(ShowBgpAddressFamilySchema): '''Parser for: 'show bgp' 'show bgp {address_family}' + 'show bgp {address_family} community {community}' + 'show bgp {address_family} community {community} {exact_match}' ''' cli_command = [ 'show bgp',