-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ospf6d: Json support added for command "show ipv6 ospf6 redistribute [json]" #7455
Conversation
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15183/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc changes?
ospf6d/ospf6_asbr.c
Outdated
@@ -1374,25 +1377,52 @@ static void ospf6_redistribute_show_config(struct vty *vty, struct ospf6 *ospf6) | |||
nroute[info->type]++; | |||
total++; | |||
} | |||
if (use_json) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the if(use_json) to the interior of the for loop. I see absolutely no reason to have 2 separate for loops. Just complicates code and leads to problems in the future when the command is updated and one side is forgotten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
} | ||
|
||
DEFUN (show_ipv6_ospf6_redistribute, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this defun back to the same formatting as before. I know clang-format fucks it up, but I would prefer we keep the formatting the same here for the rest of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
ospf6d/ospf6d.h
Outdated
@@ -23,6 +23,7 @@ | |||
|
|||
#include "libospf.h" | |||
#include "thread.h" | |||
#include "lib/json.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe the entirety of ospfv3 needs json.h support. Please put this in the appropriate files only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
d9335a6
to
96a7226
Compare
There was a problem hiding this 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/1beb576b31d2665a93a9131e1561a1ba/raw/cd817c547c10f4423bc606706052543f606d4f6c/cr_7455_1604555666.diff | git apply
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 005002aa1..396b4a50a 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1936,14 +1936,10 @@ static void ospf6_asbr_external_route_show(struct vty *vty,
forwarding);
}
-DEFUN (show_ipv6_ospf6_redistribute,
- show_ipv6_ospf6_redistribute_cmd,
- "show ipv6 ospf6 redistribute [json]",
- SHOW_STR
- IP6_STR
- OSPF6_STR
- "redistributing External information\n"
- JSON_STR)
+DEFUN(show_ipv6_ospf6_redistribute, show_ipv6_ospf6_redistribute_cmd,
+ "show ipv6 ospf6 redistribute [json]",
+ SHOW_STR IP6_STR OSPF6_STR
+ "redistributing External information\n" JSON_STR)
{
struct ospf6_route *route;
struct ospf6 *ospf6 = NULL;
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 1 on Ubuntu 16.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1604AMD64-15204/test Topology Tests failed for Topo tests part 1 on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15204/artifact/TP1U1604AMD64/ErrorLog/log_topotests.txt Successful on other platforms/tests
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedIPv6 protocols on Ubuntu 18.04: Failed (click for details)Successful on other platforms/tests
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
There was a problem hiding this 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/bcb02cde816d3bd82a199418bda654e2/raw/cd817c547c10f4423bc606706052543f606d4f6c/cr_7455_1604636578.diff | git apply
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 005002aa1..396b4a50a 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1936,14 +1936,10 @@ static void ospf6_asbr_external_route_show(struct vty *vty,
forwarding);
}
-DEFUN (show_ipv6_ospf6_redistribute,
- show_ipv6_ospf6_redistribute_cmd,
- "show ipv6 ospf6 redistribute [json]",
- SHOW_STR
- IP6_STR
- OSPF6_STR
- "redistributing External information\n"
- JSON_STR)
+DEFUN(show_ipv6_ospf6_redistribute, show_ipv6_ospf6_redistribute_cmd,
+ "show ipv6 ospf6 redistribute [json]",
+ SHOW_STR IP6_STR OSPF6_STR
+ "redistributing External information\n" JSON_STR)
{
struct ospf6_route *route;
struct ospf6 *ospf6 = NULL;
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 1 on Ubuntu 16.04 i386: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1604I386-15242/test Topology Tests failed for Topo tests part 1 on Ubuntu 16.04 i386:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15242/artifact/TP1U1604I386/ErrorLog/log_topotests.txt Topo tests part 0 on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-15242/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15242/artifact/TOPOU1804/ErrorLog/log_topotests.txt IPv6 protocols on Ubuntu 18.04: Failed (click for details)Successful on other platforms/tests
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
There was a problem hiding this 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/613be84a1238bd847e651a6abdd1c826/raw/cd817c547c10f4423bc606706052543f606d4f6c/cr_7455_1605021113.diff | git apply
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 005002aa1..396b4a50a 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1936,14 +1936,10 @@ static void ospf6_asbr_external_route_show(struct vty *vty,
forwarding);
}
-DEFUN (show_ipv6_ospf6_redistribute,
- show_ipv6_ospf6_redistribute_cmd,
- "show ipv6 ospf6 redistribute [json]",
- SHOW_STR
- IP6_STR
- OSPF6_STR
- "redistributing External information\n"
- JSON_STR)
+DEFUN(show_ipv6_ospf6_redistribute, show_ipv6_ospf6_redistribute_cmd,
+ "show ipv6 ospf6 redistribute [json]",
+ SHOW_STR IP6_STR OSPF6_STR
+ "redistributing External information\n" JSON_STR)
{
struct ospf6_route *route;
struct ospf6 *ospf6 = NULL;
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 1 on Ubuntu 18.04 arm8: Failed (click for details)Topo tests part 1 on Ubuntu 18.04 arm8: No useful log foundIPv4 protocols on Ubuntu 18.04: Failed (click for details)Successful on other platforms/tests
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
ci: rerun |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedIPv4 protocols on Ubuntu 18.04: Failed (click for details)Topo tests part 1 on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1804AMD64-15350/test Topology Tests failed for Topo tests part 1 on Ubuntu 18.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15350/artifact/TP1U1804AMD64/ErrorLog/log_topotests.txt Successful on other platforms/tests
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
ci:rerun |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 0 on Ubuntu 16.04 i386: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-15430/test Topology Tests failed for Topo tests part 0 on Ubuntu 16.04 i386:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15430/artifact/TOPOI386/ErrorLog/log_topotests.txt Successful on other platforms/tests
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
…[json]" Modify code to add JSON format output in show command "show ipv6 ospf6 redistribute" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
There was a problem hiding this 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/3232cee8bf836cf2aa25c912b9c102f0/raw/cd817c547c10f4423bc606706052543f606d4f6c/cr_7455_1605503515.diff | git apply
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 005002aa1..396b4a50a 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1936,14 +1936,10 @@ static void ospf6_asbr_external_route_show(struct vty *vty,
forwarding);
}
-DEFUN (show_ipv6_ospf6_redistribute,
- show_ipv6_ospf6_redistribute_cmd,
- "show ipv6 ospf6 redistribute [json]",
- SHOW_STR
- IP6_STR
- OSPF6_STR
- "redistributing External information\n"
- JSON_STR)
+DEFUN(show_ipv6_ospf6_redistribute, show_ipv6_ospf6_redistribute_cmd,
+ "show ipv6 ospf6 redistribute [json]",
+ SHOW_STR IP6_STR OSPF6_STR
+ "redistributing External information\n" JSON_STR)
{
struct ospf6_route *route;
struct ospf6 *ospf6 = NULL;
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15436/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
Modify code to add JSON format output in show command
"show ipv6 ospf6 redistribute" with proper formating
Signed-off-by: Yash Ranjan ranjany@vmware.com