Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: Support output for "show [ipv4|ipv6] interface" #6014

Closed

Conversation

ak1ra24
Copy link

@ak1ra24 ak1ra24 commented Mar 17, 2020

Support filter to show only ipv4, only ipv6, and both ipv4/ipv6
in show interface brief, show interface IFNAME commands, etc.

An example of the command is as follows:
show <ipv4 | ipv6> interface brief
show <ipv4|ipv6> interface IFNAME

Resolves: #325

Signed-off-by: ak1ra24 [email protected]

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/1434ae70218ef8a8ea931f3eca01802b/raw/a5f71253817c6b7da1fbca472519861d3472b52b/cr_6014_1584430386.diff | git apply

diff --git a/zebra/interface.c b/zebra/interface.c
index 36afc7b74..c889dbeac 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1272,7 +1272,7 @@ static const char *zebra_ziftype_2str(zebra_iftype_t zif_type)
 }
 
 static void if_status_brief_vty(struct vty *vty, struct interface *ifp,
-				  struct vrf *vrf, bool first_pfx_printed)
+				struct vrf *vrf, bool first_pfx_printed)
 {
 	if (first_pfx_printed) {
 		vty_out(vty, "%-16s", "");
@@ -1312,7 +1312,7 @@ static void if_status_brief_vty(struct vty *vty, struct interface *ifp,
 }
 
 static void ifs_ip_dump_brief_vty(struct vty *vty, struct interface *ifp,
-				    struct vrf *vrf, enum ipaddr_type_t ipa_type)
+				  struct vrf *vrf, enum ipaddr_type_t ipa_type)
 {
 	struct connected *connected;
 	struct listnode *node;
@@ -1331,15 +1331,15 @@ static void ifs_ip_dump_brief_vty(struct vty *vty, struct interface *ifp,
 			if (!rn->info)
 				continue;
 
-			for (ALL_LIST_ELEMENTS_RO((struct list *)rn->info,
-						  node, connected)) {
+			for (ALL_LIST_ELEMENTS_RO((struct list *)rn->info, node,
+						  connected)) {
 				if (!CHECK_FLAG(connected->flags,
 						ZEBRA_IFA_SECONDARY)) {
 					p = connected->address;
 					prefix2str(p, buf, sizeof(buf));
 					if (first_pfx_printed) {
-						if_status_brief_vty(vty,
-							ifp, vrf,
+						if_status_brief_vty(
+							vty, ifp, vrf,
 							first_pfx_printed);
 
 						vty_out(vty, "%s\n", buf);
@@ -1352,21 +1352,19 @@ static void ifs_ip_dump_brief_vty(struct vty *vty, struct interface *ifp,
 			}
 		}
 	} else if (ipa_type == IPADDR_V6) {
-		for (ALL_LIST_ELEMENTS_RO(ifp->connected, node,
-			connected)) {
+		for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
 			if (CHECK_FLAG(connected->conf, ZEBRA_IFC_REAL)
-				&& !CHECK_FLAG(connected->flags,
-					       ZEBRA_IFA_SECONDARY)
-				&& (connected->address->family == AF_INET6)) {
+			    && !CHECK_FLAG(connected->flags,
+					   ZEBRA_IFA_SECONDARY)
+			    && (connected->address->family == AF_INET6)) {
 				p = connected->address;
 				/* Don't print link local pfx */
-				if (!IN6_IS_ADDR_LINKLOCAL
-					(&p->u.prefix6)) {
+				if (!IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6)) {
 					prefix2str(p, global_pfx,
-							PREFIX_STRLEN);
+						   PREFIX_STRLEN);
 					if (first_pfx_printed) {
-						if_status_brief_vty(vty,
-							ifp, vrf,
+						if_status_brief_vty(
+							vty, ifp, vrf,
 							first_pfx_printed);
 
 						vty_out(vty, "%s\n",
@@ -1386,15 +1384,15 @@ static void ifs_ip_dump_brief_vty(struct vty *vty, struct interface *ifp,
 			if (!rn->info)
 				continue;
 
-			for (ALL_LIST_ELEMENTS_RO((struct list *)rn->info,
-						  node, connected)) {
+			for (ALL_LIST_ELEMENTS_RO((struct list *)rn->info, node,
+						  connected)) {
 				if (!CHECK_FLAG(connected->flags,
 						ZEBRA_IFA_SECONDARY)) {
 					p = connected->address;
 					prefix2str(p, buf, sizeof(buf));
 					if (first_pfx_printed) {
-						if_status_brief_vty(vty,
-							ifp, vrf,
+						if_status_brief_vty(
+							vty, ifp, vrf,
 							first_pfx_printed);
 
 						vty_out(vty, "%s\n", buf);
@@ -1424,8 +1422,9 @@ static void ifs_ip_dump_brief_vty(struct vty *vty, struct interface *ifp,
 					prefix2str(p, global_pfx,
 						   PREFIX_STRLEN);
 					if (first_pfx_printed) {
-						if_status_brief_vty(vty, ifp,
-						       vrf, first_pfx_printed);
+						if_status_brief_vty(
+							vty, ifp, vrf,
+							first_pfx_printed);
 
 						vty_out(vty, "%s\n",
 							global_pfx);
@@ -1444,7 +1443,8 @@ static void ifs_ip_dump_brief_vty(struct vty *vty, struct interface *ifp,
 }
 
 /* Interface's brief information print out to vty interface. */
-static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf, enum ipaddr_type_t ipa_type)
+static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf,
+			       enum ipaddr_type_t ipa_type)
 {
 	struct interface *ifp;
 	bool print_header = true;
@@ -1468,7 +1468,7 @@ static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf, enum ipaddr_typ
 
 /* Interface's information print out to vty interface. */
 static void if_dump_vty(struct vty *vty, struct interface *ifp,
-			  enum ipaddr_type_t ipa_type)
+			enum ipaddr_type_t ipa_type)
 {
 	struct connected *connected;
 	struct nbr_connected *nbr_connected;
@@ -1543,7 +1543,8 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp,
 	}
 
 	if (ipa_type == IPADDR_V4) {
-		for (rn = route_top(zebra_if->ipv4_subnets); rn; rn = route_next(rn)) {
+		for (rn = route_top(zebra_if->ipv4_subnets); rn;
+		     rn = route_next(rn)) {
 			if (!rn->info)
 				continue;
 
@@ -1557,7 +1558,8 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp,
 			    && (connected->address->family == AF_INET6))
 				connected_dump_vty(vty, connected);
 	} else if (ipa_type == IPADDR_NONE) {
-		for (rn = route_top(zebra_if->ipv4_subnets); rn; rn = route_next(rn)) {
+		for (rn = route_top(zebra_if->ipv4_subnets); rn;
+		     rn = route_next(rn)) {
 			if (!rn->info)
 				continue;
 
@@ -1568,7 +1570,7 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp,
 
 		for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
 			if (CHECK_FLAG(connected->conf, ZEBRA_IFC_REAL)
-			&& (connected->address->family == AF_INET6))
+			    && (connected->address->family == AF_INET6))
 				connected_dump_vty(vty, connected);
 		}
 	}
@@ -1798,11 +1800,8 @@ struct cmd_node interface_node = {INTERFACE_NODE, "%s(config-if)# ", 1};
 /* Show all interfaces to vty. */
 DEFPY(show_interface, show_interface_cmd,
       "show [<ipv4|ipv6>$ip_version] interface [vrf NAME$vrf_name] [brief$brief]",
-      SHOW_STR
-      IP_STR
-      IPV6_STR
-      "Interface status and configuration\n"
-      VRF_CMD_HELP_STR
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n" VRF_CMD_HELP_STR
       "Interface status and configuration summary\n")
 {
 	int ipa_type;
@@ -1831,15 +1830,11 @@ DEFPY(show_interface, show_interface_cmd,
 
 
 /* Show all interfaces to vty. */
-DEFPY (show_interface_vrf_all,
-       show_interface_vrf_all_cmd,
-       "show [<ipv4|ipv6>$ip_version] interface vrf all [brief$brief]",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       VRF_ALL_CMD_HELP_STR
-       "Interface status and configuration summary\n")
+DEFPY(show_interface_vrf_all, show_interface_vrf_all_cmd,
+      "show [<ipv4|ipv6>$ip_version] interface vrf all [brief$brief]",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n" VRF_ALL_CMD_HELP_STR
+      "Interface status and configuration summary\n")
 {
 	int ipa_type;
 	struct vrf *vrf;
@@ -1864,15 +1859,11 @@ DEFPY (show_interface_vrf_all,
 
 /* Show specified interface to vty. */
 
-DEFPY (show_interface_name_vrf,
-       show_interface_name_vrf_cmd,
-       "show [<ipv4|ipv6>$ip_version] interface [IFNAME$if_name] [vrf NAME$vrf_name]",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_CMD_HELP_STR)
+DEFPY(show_interface_name_vrf, show_interface_name_vrf_cmd,
+      "show [<ipv4|ipv6>$ip_version] interface [IFNAME$if_name] [vrf NAME$vrf_name]",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_CMD_HELP_STR)
 {
 	int ipa_type;
 	struct interface *ifp;
@@ -1897,15 +1888,11 @@ DEFPY (show_interface_name_vrf,
 }
 
 /* Show specified interface to vty. */
-DEFPY (show_interface_name_vrf_all,
-       show_interface_name_vrf_all_cmd,
-       "show [<ipv4|ipv6>$ip_version] interface [IFNAME$if_name] vrf all",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_ALL_CMD_HELP_STR)
+DEFPY(show_interface_name_vrf_all, show_interface_name_vrf_all_cmd,
+      "show [<ipv4|ipv6>$ip_version] interface [IFNAME$if_name] vrf all",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_ALL_CMD_HELP_STR)
 {
 	int ipa_type;
 	struct vrf *vrf;

If you are a new contributor to FRR, please see our contributing guidelines.

@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from 8306a82 to efe2e97 Compare March 17, 2020 07:36
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 17, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6014 8306a82
Date 03/17/2020
Start 03:35:30
Finish 04:01:16
Run-Time 25:46
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-17-03:35:30.txt
Log autoscript-2020-03-17-03:36:27.log.bz2
Memory 489 487 410

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 17, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6014 efe2e97
Date 03/17/2020
Start 04:05:30
Finish 04:31:17
Run-Time 25:47
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-17-04:05:30.txt
Log autoscript-2020-03-17-04:06:26.log.bz2
Memory 480 493 418

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 17, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11197/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11197/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-g8306a8252-0 (missing) -> 7.4-dev-20200317-00-g8306a8252-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-g8306a8252-0 (missing) -> 7.4-dev-20200317-00-g8306a8252-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-g8306a8252-0 (missing) -> 7.4-dev-20200317-00-g8306a8252-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-g8306a8252-0 (missing) -> 7.4-dev-20200317-00-g8306a8252-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-g8306a8252-0 (missing) -> 7.4-dev-20200317-00-g8306a8252-0~deb10u1

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 17, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11198/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11198/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-gefe2e9776-0 (missing) -> 7.4-dev-20200317-00-gefe2e9776-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-gefe2e9776-0 (missing) -> 7.4-dev-20200317-00-gefe2e9776-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-gefe2e9776-0 (missing) -> 7.4-dev-20200317-00-gefe2e9776-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-gefe2e9776-0 (missing) -> 7.4-dev-20200317-00-gefe2e9776-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200317-00-gefe2e9776-0 (missing) -> 7.4-dev-20200317-00-gefe2e9776-0~deb10u1

Copy link
Contributor

@srimohans srimohans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the existing commands are broken with this PR.

Also, this command proposes to add ipv4|ipv6 before the interface.
i.e. show ipv4|ipv6 interface

In my opinion it would be better if it is in the form of show interface ipv4|ipv6.

@@ -1664,19 +1778,33 @@ static void interface_update_stats(void)
#endif /* HAVE_NET_RT_IFLIST */
}

static int parse_ipa_type(const char *ip_version)
{
int ipa_type = IPADDR_NONE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be of type enum ipaddr_type_t;

This comment applies to ipa_type all over this PR.

Copy link
Author

@ak1ra24 ak1ra24 Mar 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for review.
Fixed it.

@@ -1664,19 +1778,33 @@ static void interface_update_stats(void)
#endif /* HAVE_NET_RT_IFLIST */
}

static int parse_ipa_type(const char *ip_version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return should be of type enum ipaddr_type_t;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it.

"Interface status and configuration\n"
"Interface name\n"
VRF_ALL_CMD_HELP_STR)
DEFPY(show_interface_name_vrf_all, show_interface_name_vrf_all_cmd,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I integrated this PR and tried testing. It looks like all of the below command are broken.

image

Copy link
Author

@ak1ra24 ak1ra24 Mar 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your testing and result.
I think it could be solved by changing DEFPY to DEFUN.

@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from efe2e97 to 9d2530e Compare March 21, 2020 08:50
Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/48fea421008534891ef06c6700d86f70/raw/90c5ef8e68d2da56c59d9eca1ce3d1b925b74338/cr_6014_1584780631.diff | git apply

diff --git a/zebra/interface.c b/zebra/interface.c
index 5fbacbd34..8cb01a368 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1859,15 +1859,11 @@ DEFPY(show_interface_vrf_all, show_interface_vrf_all_cmd,
 
 /* Show specified interface to vty. */
 
-DEFUN (show_interface_name_vrf,
-       show_interface_name_vrf_cmd,
-       "show [ipv4|ipv6] interface IFNAME vrf NAME",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_CMD_HELP_STR)
+DEFUN(show_interface_name_vrf, show_interface_name_vrf_cmd,
+      "show [ipv4|ipv6] interface IFNAME vrf NAME",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_CMD_HELP_STR)
 {
 	int idx_ipatype = 1;
 	int idx_ifname = 3;
@@ -1895,15 +1891,11 @@ DEFUN (show_interface_name_vrf,
 }
 
 /* Show specified interface to vty. */
-DEFUN (show_interface_name_vrf_all,
-       show_interface_name_vrf_all_cmd,
-       "show [ipv4|ipv6] interface IFNAME [vrf all]",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_ALL_CMD_HELP_STR)
+DEFUN(show_interface_name_vrf_all, show_interface_name_vrf_all_cmd,
+      "show [ipv4|ipv6] interface IFNAME [vrf all]",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_ALL_CMD_HELP_STR)
 {
 	int idx_ipatype = 1;
 	int idx_ifname = 3;

If you are a new contributor to FRR, please see our contributing guidelines.

@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from 9d2530e to 28f63bd Compare March 21, 2020 08:51
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 21, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6014 28f63bd
Date 03/21/2020
Start 04:55:28
Finish 05:21:12
Run-Time 25:44
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-21-04:55:28.txt
Log autoscript-2020-03-21-04:56:24.log.bz2
Memory 484 491 418

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 21, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

Test incomplete. See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11360/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Incomplete

IPv6 protocols on Ubuntu 14.04: Failed (click for details)
IPv6 protocols on Ubuntu 14.04: Failed (click for details)
Addresssanitizer topotest: Incomplete (check logs for details)
IPv4 protocols on Ubuntu 14.04: Failed (click for details)
Successful on other platforms/tests
  • Fedora 29 rpm pkg check
  • Debian 9 deb pkg check
  • Ubuntu 12.04 deb pkg check
  • Static analyzer (clang)
  • Ubuntu 16.04 deb pkg check
  • Topology tests on Ubuntu 18.04 amd64
  • Topotest tests on Ubuntu 16.04 i386
  • CentOS 7 rpm pkg check
  • Debian 10 deb pkg check
  • IPv4 ldp protocol on Ubuntu 16.04
  • Ubuntu 14.04 deb pkg check
  • Debian 8 deb pkg check
  • Topology tests on Ubuntu 16.04 amd64

@ak1ra24
Copy link
Author

ak1ra24 commented Mar 21, 2020

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 21, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11361/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

IPv4 protocols on Ubuntu 14.04: Failed (click for details)
IPv6 protocols on Ubuntu 14.04: Failed (click for details)
Successful on other platforms/tests
  • Fedora 29 rpm pkg check
  • Debian 9 deb pkg check
  • Ubuntu 12.04 deb pkg check
  • Static analyzer (clang)
  • Topology tests on Ubuntu 18.04 amd64
  • Ubuntu 16.04 deb pkg check
  • Topotest tests on Ubuntu 16.04 i386
  • Debian 10 deb pkg check
  • CentOS 7 rpm pkg check
  • IPv4 ldp protocol on Ubuntu 16.04
  • Ubuntu 14.04 deb pkg check
  • Addresssanitizer topotest
  • Debian 8 deb pkg check
  • Topology tests on Ubuntu 16.04 amd64

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 21, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11363/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

IPv4 protocols on Ubuntu 14.04: Failed (click for details)
IPv6 protocols on Ubuntu 14.04: Failed (click for details)
Successful on other platforms/tests
  • Topology tests on Ubuntu 16.04 amd64
  • Debian 9 deb pkg check
  • Fedora 29 rpm pkg check
  • IPv4 ldp protocol on Ubuntu 16.04
  • Ubuntu 14.04 deb pkg check
  • Ubuntu 12.04 deb pkg check
  • Static analyzer (clang)
  • Topology tests on Ubuntu 18.04 amd64
  • Ubuntu 16.04 deb pkg check
  • Topotest tests on Ubuntu 16.04 i386
  • Debian 10 deb pkg check
  • CentOS 7 rpm pkg check
  • Addresssanitizer topotest
  • Debian 8 deb pkg check

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11363/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200321-00-g28f63bdd9-0 (missing) -> 7.4-dev-20200321-00-g28f63bdd9-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200321-00-g28f63bdd9-0 (missing) -> 7.4-dev-20200321-00-g28f63bdd9-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200321-00-g28f63bdd9-0 (missing) -> 7.4-dev-20200321-00-g28f63bdd9-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200321-00-g28f63bdd9-0 (missing) -> 7.4-dev-20200321-00-g28f63bdd9-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200321-00-g28f63bdd9-0 (missing) -> 7.4-dev-20200321-00-g28f63bdd9-0~deb10u1

@ak1ra24
Copy link
Author

ak1ra24 commented Mar 22, 2020

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 22, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

Test incomplete. See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11370/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Incomplete

Topology tests on Ubuntu 16.04 amd64: Incomplete (check logs for details)
IPv4 protocols on Ubuntu 14.04: Failed (click for details)
IPv6 protocols on Ubuntu 14.04: Failed (click for details)
Successful on other platforms/tests
  • IPv4 ldp protocol on Ubuntu 16.04
  • Ubuntu 14.04 deb pkg check
  • Addresssanitizer topotest
  • Debian 8 deb pkg check
  • Debian 9 deb pkg check
  • CentOS 7 rpm pkg check
  • Topotest tests on Ubuntu 16.04 i386
  • Debian 10 deb pkg check
  • Static analyzer (clang)
  • Topology tests on Ubuntu 18.04 amd64
  • Ubuntu 16.04 deb pkg check
  • Fedora 29 rpm pkg check
  • Ubuntu 12.04 deb pkg check

@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from 28f63bd to 1099785 Compare March 23, 2020 05:43
Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/ab3cb4d283bf0ff94c01aff6e5f3100e/raw/fbc981cb8a9acf0647d73a55c4ccdccb62eb3d0e/cr_6014_1584942206.diff | git apply

diff --git a/zebra/interface.c b/zebra/interface.c
index 4d6b29a42..01e0f0735 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1801,8 +1801,7 @@ struct cmd_node interface_node = {INTERFACE_NODE, "%s(config-if)# ", 1};
 DEFPY(show_interface, show_interface_cmd,
       "show [<ipv4|ipv6>$ip_version] interface [vrf NAME$vrf_name] [brief$brief]",
       SHOW_STR IP_STR IPV6_STR
-      "Interface status and configuration\n"
-	  VRF_CMD_HELP_STR
+      "Interface status and configuration\n" VRF_CMD_HELP_STR
       "Interface status and configuration summary\n")
 {
 	enum ipaddr_type_t ipa_type;
@@ -1860,15 +1859,11 @@ DEFPY(show_interface_vrf_all, show_interface_vrf_all_cmd,
 
 /* Show specified interface to vty. */
 
-DEFUN (show_interface_name_vrf,
-       show_interface_name_vrf_cmd,
-       "show [<ipv4|ipv6>] interface IFNAME vrf NAME",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_CMD_HELP_STR)
+DEFUN(show_interface_name_vrf, show_interface_name_vrf_cmd,
+      "show [<ipv4|ipv6>] interface IFNAME vrf NAME",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_CMD_HELP_STR)
 {
 	int idx_ipatype = 1;
 	int idx_ifname;
@@ -1879,8 +1874,8 @@ DEFUN (show_interface_name_vrf,
 
 	interface_update_stats();
 
-	if (argv_find(argv, argc, "ipv4", &idx_ipatype) ||
-	    argv_find(argv, argc, "ipv6", &idx_ipatype)) {
+	if (argv_find(argv, argc, "ipv4", &idx_ipatype)
+	    || argv_find(argv, argc, "ipv6", &idx_ipatype)) {
 		idx_ifname = 3;
 		idx_name = 5;
 	} else {
@@ -1905,15 +1900,11 @@ DEFUN (show_interface_name_vrf,
 }
 
 /* Show specified interface to vty. */
-DEFUN (show_interface_name_vrf_all,
-       show_interface_name_vrf_all_cmd,
-       "show [ipv4|ipv6] interface IFNAME [vrf all]",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_ALL_CMD_HELP_STR)
+DEFUN(show_interface_name_vrf_all, show_interface_name_vrf_all_cmd,
+      "show [ipv4|ipv6] interface IFNAME [vrf all]",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_ALL_CMD_HELP_STR)
 {
 	int idx_ipatype = 1;
 	int idx_ifname = 3;
@@ -1924,8 +1915,8 @@ DEFUN (show_interface_name_vrf_all,
 
 	interface_update_stats();
 
-	if (argv_find(argv, argc, "ipv4", &idx_ipatype) ||
-	    argv_find(argv, argc, "ipv6", &idx_ipatype))
+	if (argv_find(argv, argc, "ipv4", &idx_ipatype)
+	    || argv_find(argv, argc, "ipv6", &idx_ipatype))
 		idx_ifname = 3;
 	else
 		idx_ifname = 2;

If you are a new contributor to FRR, please see our contributing guidelines.

@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from 1099785 to ce81e45 Compare March 23, 2020 05:44
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 23, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result 0
Date 0
Start 0
Finish vncregress-2020-03-23-01:45:28.txt
Run-Time autoscript-2020-03-23-01:46:22.log.bz2
Total 487 464 418
Pass FAILURE git merge/5197 6d050b7 frr.github Build
Fail 10/23/2019
Valgrind-Errors 01:45:23
Valgrind-Loss 01:45:41
Details 00:18
Log
Memory
SUCCESS git merge/6014 ce81e45
03/23/2020
01:45:28
02:11:23 vncregress-2019-10-23-01:45:23.txt
25:55 make-2019-10-23-01:45:23.out.bz2
1815
1815

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 23, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11375/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11375/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-gce81e45f3-0 (missing) -> 7.4-dev-20200323-00-gce81e45f3-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-gce81e45f3-0 (missing) -> 7.4-dev-20200323-00-gce81e45f3-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-gce81e45f3-0 (missing) -> 7.4-dev-20200323-00-gce81e45f3-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-gce81e45f3-0 (missing) -> 7.4-dev-20200323-00-gce81e45f3-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-gce81e45f3-0 (missing) -> 7.4-dev-20200323-00-gce81e45f3-0~deb10u1

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 23, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11374/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from ce81e45 to 36f7018 Compare March 23, 2020 09:39
Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/bcbf8a71bd66d4409caa417250774853/raw/3da708b2df568370cee023b0d037a17b2f759214/cr_6014_1584956365.diff | git apply

diff --git a/zebra/interface.c b/zebra/interface.c
index 628d27925..f3d711faf 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1801,8 +1801,7 @@ struct cmd_node interface_node = {INTERFACE_NODE, "%s(config-if)# ", 1};
 DEFPY(show_interface, show_interface_cmd,
       "show [<ipv4|ipv6>$ip_version] interface [vrf NAME$vrf_name] [brief$brief]",
       SHOW_STR IP_STR IPV6_STR
-      "Interface status and configuration\n"
-	  VRF_CMD_HELP_STR
+      "Interface status and configuration\n" VRF_CMD_HELP_STR
       "Interface status and configuration summary\n")
 {
 	enum ipaddr_type_t ipa_type;
@@ -1860,15 +1859,11 @@ DEFPY(show_interface_vrf_all, show_interface_vrf_all_cmd,
 
 /* Show specified interface to vty. */
 
-DEFUN (show_interface_name_vrf,
-       show_interface_name_vrf_cmd,
-       "show [<ipv4|ipv6>] interface IFNAME vrf NAME",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_CMD_HELP_STR)
+DEFUN(show_interface_name_vrf, show_interface_name_vrf_cmd,
+      "show [<ipv4|ipv6>] interface IFNAME vrf NAME",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_CMD_HELP_STR)
 {
 	int idx_ipatype = 1;
 	int idx_ifname = 3;
@@ -1879,8 +1874,8 @@ DEFUN (show_interface_name_vrf,
 
 	interface_update_stats();
 
-	if (!(argv_find(argv, argc, "ipv4", &idx_ipatype)) &&
-	    !(argv_find(argv, argc, "ipv6", &idx_ipatype))) {
+	if (!(argv_find(argv, argc, "ipv4", &idx_ipatype))
+	    && !(argv_find(argv, argc, "ipv6", &idx_ipatype))) {
 		idx_ifname = 2;
 		idx_name = 4;
 	}
@@ -1904,15 +1899,11 @@ DEFUN (show_interface_name_vrf,
 }
 
 /* Show specified interface to vty. */
-DEFUN (show_interface_name_vrf_all,
-       show_interface_name_vrf_all_cmd,
-       "show [ipv4|ipv6] interface IFNAME [vrf all]",
-       SHOW_STR
-       IP_STR
-       IPV6_STR
-       "Interface status and configuration\n"
-       "Interface name\n"
-       VRF_ALL_CMD_HELP_STR)
+DEFUN(show_interface_name_vrf_all, show_interface_name_vrf_all_cmd,
+      "show [ipv4|ipv6] interface IFNAME [vrf all]",
+      SHOW_STR IP_STR IPV6_STR
+      "Interface status and configuration\n"
+      "Interface name\n" VRF_ALL_CMD_HELP_STR)
 {
 	int idx_ipatype = 1;
 	int idx_ifname = 3;
@@ -1923,8 +1914,8 @@ DEFUN (show_interface_name_vrf_all,
 
 	interface_update_stats();
 
-	if (!(argv_find(argv, argc, "ipv4", &idx_ipatype)) &&
-	    !(argv_find(argv, argc, "ipv6", &idx_ipatype))) {
+	if (!(argv_find(argv, argc, "ipv4", &idx_ipatype))
+	    && !(argv_find(argv, argc, "ipv6", &idx_ipatype))) {
 		idx_ifname = 2;
 	}
 

If you are a new contributor to FRR, please see our contributing guidelines.

Added a filter to show only ipv4, only ipv6, and both ipv4/ipv6
in show interface brief, show interface IFNAME commands, etc.

An example of the command is as follows:
`show <ipv4 | ipv6> interface brief`

Resolves: # 325

Signed-off-by: ak1ra24 <[email protected]>
@ak1ra24 ak1ra24 force-pushed the add_filter_ipv4_ipv6_show_intf branch from 36f7018 to 981a278 Compare March 23, 2020 09:40
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 23, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6014 36f7018
Date 03/23/2020
Start 05:40:28
Finish 06:06:22
Run-Time 25:54
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-23-05:40:28.txt
Log autoscript-2020-03-23-05:41:24.log.bz2
Memory 472 468 418

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 23, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6014 981a278
Date 03/23/2020
Start 06:10:32
Finish 06:36:20
Run-Time 25:48
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-23-06:10:32.txt
Log autoscript-2020-03-23-06:11:26.log.bz2
Memory 463 459 418

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 23, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

Test incomplete. See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11380/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Incomplete

Addresssanitizer topotest: Incomplete (check logs for details)
Successful on other platforms/tests
  • CentOS 7 rpm pkg check
  • Ubuntu 16.04 deb pkg check
  • Topology tests on Ubuntu 18.04 amd64
  • IPv6 protocols on Ubuntu 14.04
  • Debian 10 deb pkg check
  • Topotest tests on Ubuntu 16.04 i386
  • Fedora 29 rpm pkg check
  • Debian 8 deb pkg check
  • IPv4 protocols on Ubuntu 14.04
  • Topology tests on Ubuntu 16.04 amd64
  • IPv4 ldp protocol on Ubuntu 16.04
  • Ubuntu 14.04 deb pkg check
  • Debian 9 deb pkg check
  • Ubuntu 12.04 deb pkg check
  • Static analyzer (clang)

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 23, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11379/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11379/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-g36f7018ad-0 (missing) -> 7.4-dev-20200323-00-g36f7018ad-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-g36f7018ad-0 (missing) -> 7.4-dev-20200323-00-g36f7018ad-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-g36f7018ad-0 (missing) -> 7.4-dev-20200323-00-g36f7018ad-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-g36f7018ad-0 (missing) -> 7.4-dev-20200323-00-g36f7018ad-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200323-00-g36f7018ad-0 (missing) -> 7.4-dev-20200323-00-g36f7018ad-0~deb10u1

@ak1ra24
Copy link
Author

ak1ra24 commented Mar 23, 2020

ci:rerun

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11382/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@ak1ra24 ak1ra24 requested a review from srimohans March 25, 2020 05:09
@donaldsharp
Copy link
Member

@polychaeta autoclose in 1 week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement - "show interface description" alias change
6 participants