Merge pull request #8266 from idryzhov/eigrp-cli-fixes

eigrp cli fixes
This commit is contained in:
Donald Sharp 2021-03-16 14:47:00 -04:00 committed by GitHub
commit 9bc9a96069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -671,7 +671,7 @@ DEFPY_YANG(
as_str);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL);
snprintf(xpath_auth, sizeof(xpath_auth), "%s/summarize-address", xpath);
snprintf(xpath_auth, sizeof(xpath_auth), "%s/summarize-addresses", xpath);
nb_cli_enqueue_change(vty, xpath_auth, NB_OP_CREATE, prefix_str);
return nb_cli_apply_changes(vty, NULL);
@ -694,7 +694,7 @@ DEFPY_YANG(
as_str);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL);
snprintf(xpath_auth, sizeof(xpath_auth), "%s/summarize-address", xpath);
snprintf(xpath_auth, sizeof(xpath_auth), "%s/summarize-addresses", xpath);
nb_cli_enqueue_change(vty, xpath_auth, NB_OP_DESTROY, prefix_str);
return nb_cli_apply_changes(vty, NULL);
@ -703,12 +703,12 @@ DEFPY_YANG(
void eigrp_cli_show_summarize_address(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
const struct eigrp_interface *eif = nb_running_get_entry(dnode, NULL,
true);
const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance");
uint16_t asn = yang_dnode_get_uint16(instance, "./asn");
const char *summarize_address = yang_dnode_get_string(dnode, NULL);
vty_out(vty, " ip summary-address eigrp %d %s\n",
eif->eigrp->AS, summarize_address);
vty_out(vty, " ip summary-address eigrp %d %s\n", asn,
summarize_address);
}
/*
@ -767,12 +767,11 @@ DEFPY_YANG(
void eigrp_cli_show_authentication(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
const struct eigrp_interface *eif = nb_running_get_entry(dnode, NULL,
true);
const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance");
uint16_t asn = yang_dnode_get_uint16(instance, "./asn");
const char *crypt = yang_dnode_get_string(dnode, NULL);
vty_out(vty, " ip authentication mode eigrp %d %s\n",
eif->eigrp->AS, crypt);
vty_out(vty, " ip authentication mode eigrp %d %s\n", asn, crypt);
}
/*
@ -827,12 +826,12 @@ DEFPY_YANG(
void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
const struct eigrp_interface *eif = nb_running_get_entry(dnode, NULL,
true);
const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance");
uint16_t asn = yang_dnode_get_uint16(instance, "./asn");
const char *keychain = yang_dnode_get_string(dnode, NULL);
vty_out(vty, " ip authentication key-chain eigrp %d %s\n",
eif->eigrp->AS, keychain);
vty_out(vty, " ip authentication key-chain eigrp %d %s\n", asn,
keychain);
}