1
1
#include "cli_service.h"
2
2
#include "service_manager.h"
3
+ #include "builtin_service_manager.h"
3
4
#include "vty.h"
4
5
5
6
cli_node_t * service_node ;
@@ -13,6 +14,8 @@ bool cmd_show_service_methods(vty_t* vty, variant_stack_t* params);
13
14
bool cmd_show_service_config (vty_t * vty , variant_stack_t * params );
14
15
15
16
void show_service_helper (service_t * service , void * arg );
17
+ void show_builtin_service_helper (builtin_service_t * service , void * arg );
18
+
16
19
void show_service_method_helper (service_method_t * method , void * arg );
17
20
void show_service_config_helper (service_t * service , void * arg );
18
21
@@ -67,12 +70,15 @@ bool cmd_list_service_classes(vty_t* vty, variant_stack_t* params)
67
70
{
68
71
vty_write (vty , "%-20s%s\n" , "Name" , "Description" );
69
72
service_manager_for_each_class (show_service_helper , vty );
73
+ builtin_service_manager_for_each_class (show_builtin_service_helper , vty );
70
74
}
71
75
72
76
bool cmd_show_service_methods (vty_t * vty , variant_stack_t * params )
73
77
{
74
78
vty_write (vty , "%-20s%s\n" , "Name" , "Description" );
79
+
75
80
service_manager_for_each_method (variant_get_string (stack_peek_at (params , 3 )), show_service_method_helper , vty );
81
+ builtin_service_manager_for_each_method (variant_get_string (stack_peek_at (params , 3 )), show_service_method_helper , vty );
76
82
}
77
83
78
84
bool cmd_show_service_config (vty_t * vty , variant_stack_t * params )
@@ -87,6 +93,13 @@ void show_service_helper(service_t* service, void* arg)
87
93
vty_write (vty , "%-20s%s\n" , service -> service_name , service -> description );
88
94
}
89
95
96
+ void show_builtin_service_helper (builtin_service_t * service , void * arg )
97
+ {
98
+ vty_t * vty = (vty_t * )arg ;
99
+
100
+ vty_write (vty , "%-20s%s\n" , service -> service_name , service -> description );
101
+ }
102
+
90
103
void show_service_method_helper (service_method_t * method , void * arg )
91
104
{
92
105
vty_t * vty = (vty_t * )arg ;
0 commit comments