}
if (type != show_peer && !nbr_output && !use_json)
- vty_out(vty, "%% No BGP neighbors found \n");
+ vty_out(vty, "%% No BGP neighbors found\n");
if (use_json) {
vty_out(vty, "%s\n", json_object_to_json_string_ext(
json_object_free(json);
return CMD_WARNING;
- } else {
- /* Provide context for the block */
- json_object_string_add(json, "vrf",
- name ? name : "default");
- json_object_string_add(json, "afiSafi",
- afi_safi_print(afi, safi));
}
+ /* Provide context for the block */
+ json_object_string_add(json, "vrf", name ? name : "default");
+ json_object_string_add(json, "afiSafi",
+ afi_safi_print(afi, safi));
+
if (!CHECK_FLAG(bgp->af_flags[afi][safi],
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
json_object_string_add(json, "importFromVrfs", "none");
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
+
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else if (!ospf)
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return ret;
}
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
+
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
ret = (show_ip_ospf_database_common(
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if ((ospf == NULL) || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
return CMD_NOT_MY_INSTANCE;
if (!ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
if (ospf == NULL)
return CMD_NOT_MY_INSTANCE;
if (!ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
+
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if ((ospf == NULL) || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
+
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
}
if (!ospf_output)
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
+
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}