#include "libfrr.h"
#include "linklist.h"
#include "log.h"
-#include "isisd/dict.h"
#include "isisd/isis_constants.h"
#include "isisd/isis_common.h"
#include "isisd/isis_flags.h"
area = isis_area_create(area_tag);
/* save area in dnode to avoid looking it up all the time */
- yang_dnode_set_entry(dnode, area);
+ nb_running_set_entry(dnode, area);
return NB_OK;
}
static int isis_instance_destroy(enum nb_event event,
const struct lyd_node *dnode)
{
- const char *area_tag;
+ struct isis_area *area;
if (event != NB_EV_APPLY)
return NB_OK;
- area_tag = yang_dnode_get_string(dnode, "./area-tag");
- isis_area_destroy(area_tag);
+ area = nb_running_unset_entry(dnode);
+ isis_area_destroy(area->area_tag);
return NB_OK;
}
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
type = yang_dnode_get_enum(dnode, NULL);
isis_area_is_type_set(area, type);
XFREE(MTYPE_ISIS_AREA_ADDR, resource->ptr);
break;
case NB_EV_APPLY:
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
addrr = resource->ptr;
if (isis->sysid_set == 0) {
net_title = yang_dnode_get_string(dnode, NULL);
addr.addr_len = dotformat2buff(buff, net_title);
memcpy(addr.area_addr, buff, (int)addr.addr_len);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
for (ALL_LIST_ELEMENTS_RO(area->area_addrs, node, addrp)) {
if ((addrp->addr_len + ISIS_SYS_ID_LEN + 1) == addr.addr_len
&& !memcmp(addrp->area_addr, addr.area_addr, addr.addr_len))
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_dynhostname_set(area, yang_dnode_get_bool(dnode, NULL));
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
attached = yang_dnode_get_bool(dnode, NULL);
isis_area_attached_bit_set(area, attached);
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
overload = yang_dnode_get_bool(dnode, NULL);
isis_area_overload_bit_set(area, overload);
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
old_metric = (metric_style == ISIS_WIDE_METRIC) ? false : true;
new_metric = (metric_style == ISIS_NARROW_METRIC) ? false : true;
isis_area_metricstyle_set(area, old_metric, new_metric);
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
area->purge_originator = yang_dnode_get_bool(dnode, NULL);
return NB_OK;
switch (event) {
case NB_EV_VALIDATE:
- area = yang_dnode_get_entry(dnode, false);
+ area = nb_running_get_entry(dnode, NULL, false);
if (!area)
break;
for (ALL_LIST_ELEMENTS_RO(area->circuit_list, node, circuit)) {
case NB_EV_ABORT:
break;
case NB_EV_APPLY:
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_lsp_mtu_set(area, lsp_mtu);
break;
}
return NB_OK;
refr_int = yang_dnode_get_uint16(dnode, NULL);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_lsp_refresh_set(area, IS_LEVEL_1, refr_int);
return NB_OK;
return NB_OK;
refr_int = yang_dnode_get_uint16(dnode, NULL);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_lsp_refresh_set(area, IS_LEVEL_2, refr_int);
return NB_OK;
return NB_OK;
max_lt = yang_dnode_get_uint16(dnode, NULL);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_max_lsp_lifetime_set(area, IS_LEVEL_1, max_lt);
return NB_OK;
return NB_OK;
max_lt = yang_dnode_get_uint16(dnode, NULL);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_max_lsp_lifetime_set(area, IS_LEVEL_2, max_lt);
return NB_OK;
return NB_OK;
gen_int = yang_dnode_get_uint16(dnode, NULL);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
area->lsp_gen_interval[0] = gen_int;
return NB_OK;
return NB_OK;
gen_int = yang_dnode_get_uint16(dnode, NULL);
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
area->lsp_gen_interval[1] = gen_int;
return NB_OK;
long long_delay = yang_dnode_get_uint16(dnode, "./long-delay");
long holddown = yang_dnode_get_uint16(dnode, "./hold-down");
long timetolearn = yang_dnode_get_uint16(dnode, "./time-to-learn");
- struct isis_area *area = yang_dnode_get_entry(dnode, true);
+ struct isis_area *area = nb_running_get_entry(dnode, NULL, true);
size_t bufsiz = strlen(area->area_tag) + sizeof("IS-IS Lx");
char *buf = XCALLOC(MTYPE_TMP, bufsiz);
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
spf_backoff_free(area->spf_delay_ietf[0]);
spf_backoff_free(area->spf_delay_ietf[1]);
area->spf_delay_ietf[0] = NULL;
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
area->min_spf_interval[0] = yang_dnode_get_uint16(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
area->min_spf_interval[1] = yang_dnode_get_uint16(dnode, NULL);
return NB_OK;
static void area_password_apply_finish(const struct lyd_node *dnode)
{
const char *password = yang_dnode_get_string(dnode, "./password");
- struct isis_area *area = yang_dnode_get_entry(dnode, true);
+ struct isis_area *area = nb_running_get_entry(dnode, NULL, true);
int pass_type = yang_dnode_get_enum(dnode, "./password-type");
uint8_t snp_auth = yang_dnode_get_enum(dnode, "./authenticate-snp");
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_passwd_unset(area, IS_LEVEL_1);
return NB_OK;
static void domain_password_apply_finish(const struct lyd_node *dnode)
{
const char *password = yang_dnode_get_string(dnode, "./password");
- struct isis_area *area = yang_dnode_get_entry(dnode, true);
+ struct isis_area *area = nb_running_get_entry(dnode, NULL, true);
int pass_type = yang_dnode_get_enum(dnode, "./password-type");
uint8_t snp_auth = yang_dnode_get_enum(dnode, "./authenticate-snp");
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
isis_area_passwd_unset(area, IS_LEVEL_2);
return NB_OK;
int originate_type = DEFAULT_ORIGINATE;
unsigned long metric = 0;
const char *routemap = NULL;
- struct isis_area *area = yang_dnode_get_entry(dnode, true);
+ struct isis_area *area = nb_running_get_entry(dnode, NULL, true);
int level = yang_dnode_get_enum(dnode, "./level");
if (yang_dnode_get_bool(dnode, "./always")) {
if (yang_dnode_exists(dnode, "./metric"))
metric = yang_dnode_get_uint32(dnode, "./metric");
- else if (yang_dnode_exists(dnode, "./route-map"))
+ if (yang_dnode_exists(dnode, "./route-map"))
routemap = yang_dnode_get_string(dnode, "./route-map");
isis_redist_set(area, level, family, DEFAULT_ROUTE, metric, routemap,
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
level = yang_dnode_get_enum(dnode, "./level");
isis_redist_unset(area, level, AF_INET, DEFAULT_ROUTE);
return NB_OK;
}
-static int isis_instance_default_information_originate_ipv4_metric_destroy(
- enum nb_event event, const struct lyd_node *dnode)
-{
- /* It's all done by default_info_origin_apply_finish */
- return NB_OK;
-}
-
/*
* XPath: /frr-isisd:isis/instance/default-information-originate/ipv6
*/
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
level = yang_dnode_get_enum(dnode, "./level");
isis_redist_unset(area, level, AF_INET6, DEFAULT_ROUTE);
return NB_OK;
}
-static int isis_instance_default_information_originate_ipv6_metric_destroy(
- enum nb_event event, const struct lyd_node *dnode)
-{
- /* It's all done by default_info_origin_apply_finish */
- return NB_OK;
-}
-
/*
* XPath: /frr-isisd:isis/instance/redistribute/ipv4
*/
type = yang_dnode_get_enum(dnode, "./protocol");
level = yang_dnode_get_enum(dnode, "./level");
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
if (yang_dnode_exists(dnode, "./metric"))
metric = yang_dnode_get_uint32(dnode, "./metric");
- else if (yang_dnode_exists(dnode, "./route-map"))
+ if (yang_dnode_exists(dnode, "./route-map"))
routemap = yang_dnode_get_string(dnode, "./route-map");
isis_redist_set(area, level, family, type, metric, routemap, 0);
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
level = yang_dnode_get_enum(dnode, "./level");
type = yang_dnode_get_enum(dnode, "./protocol");
isis_redist_unset(area, level, AF_INET, type);
return NB_OK;
}
-static int
-isis_instance_redistribute_ipv4_metric_destroy(enum nb_event event,
- const struct lyd_node *dnode)
-{
- /* It's all done by redistribute_apply_finish */
- return NB_OK;
-}
-
/*
* XPath: /frr-isisd:isis/instance/redistribute/ipv6
*/
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
level = yang_dnode_get_enum(dnode, "./level");
type = yang_dnode_get_enum(dnode, "./protocol");
isis_redist_unset(area, level, AF_INET6, type);
return NB_OK;
}
-static int
-isis_instance_redistribute_ipv6_metric_destroy(enum nb_event event,
- const struct lyd_node *dnode)
-{
- /* It's all done by redistribute_apply_finish */
- return NB_OK;
-}
-
/*
* XPath: /frr-isisd:isis/instance/multi-topology/ipv4-multicast
*/
case NB_EV_ABORT:
break;
case NB_EV_APPLY:
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
setting = area_get_mt_setting(area, mtid);
setting->enabled = create;
lsp_regenerate_schedule(area, IS_LEVEL_1 | IS_LEVEL_2, 0);
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
setting = area_get_mt_setting(area, mtid);
setting->overload = yang_dnode_get_bool(dnode, NULL);
if (setting->enabled)
if (event != NB_EV_APPLY)
return NB_OK;
- area = yang_dnode_get_entry(dnode, true);
+ area = nb_running_get_entry(dnode, NULL, true);
area->log_adj_changes = log ? 1 : 0;
return NB_OK;
}
/*
- * XPath: /frr-isisd:isis/mpls-te
+ * XPath: /frr-isisd:isis/instance/mpls-te
*/
-static int isis_mpls_te_create(enum nb_event event,
+static int isis_instance_mpls_te_create(enum nb_event event,
const struct lyd_node *dnode,
union nb_resource *resource)
{
struct listnode *node;
+ struct isis_area *area;
struct isis_circuit *circuit;
if (event != NB_EV_APPLY)
return NB_OK;
- isisMplsTE.status = enable;
+ area = nb_running_get_entry(dnode, NULL, true);
+ if (area->mta == NULL) {
+
+ struct mpls_te_area *new;
+
+ zlog_debug("ISIS MPLS-TE: Initialize area %s",
+ area->area_tag);
+
+ new = XCALLOC(MTYPE_ISIS_MPLS_TE, sizeof(struct mpls_te_area));
+
+ /* Initialize MPLS_TE structure */
+ new->status = enable;
+ new->level = 0;
+ new->inter_as = off;
+ new->interas_areaid.s_addr = 0;
+ new->router_id.s_addr = 0;
+
+ area->mta = new;
+ } else {
+ area->mta->status = enable;
+ }
/*
* Following code is intended to handle two cases;
* MPLS_TE flag
* 2) MPLS-TE was once enabled then disabled, and now enabled again.
*/
- for (ALL_LIST_ELEMENTS_RO(isisMplsTE.cir_list, node, circuit)) {
+ for (ALL_LIST_ELEMENTS_RO(area->circuit_list, node, circuit)) {
if (circuit->mtc == NULL || IS_FLOOD_AS(circuit->mtc->type))
continue;
- if ((circuit->mtc->status == disable)
+ if (!IS_MPLS_TE(circuit->mtc)
&& HAS_LINK_PARAMS(circuit->interface))
circuit->mtc->status = enable;
else
return NB_OK;
}
-static int isis_mpls_te_destroy(enum nb_event event,
+static int isis_instance_mpls_te_destroy(enum nb_event event,
const struct lyd_node *dnode)
{
struct listnode *node;
+ struct isis_area *area;
struct isis_circuit *circuit;
if (event != NB_EV_APPLY)
return NB_OK;
- isisMplsTE.status = disable;
+ area = nb_running_get_entry(dnode, NULL, true);
+ if (IS_MPLS_TE(area->mta))
+ area->mta->status = disable;
+ else
+ return NB_OK;
/* Flush LSP if circuit engage */
- for (ALL_LIST_ELEMENTS_RO(isisMplsTE.cir_list, node, circuit)) {
+ for (ALL_LIST_ELEMENTS_RO(area->circuit_list, node, circuit)) {
if (circuit->mtc == NULL || (circuit->mtc->status == disable))
continue;
}
/*
- * XPath: /frr-isisd:isis/mpls-te/router-address
+ * XPath: /frr-isisd:isis/instance/mpls-te/router-address
*/
-static int isis_mpls_te_router_address_modify(enum nb_event event,
+static int isis_instance_mpls_te_router_address_modify(enum nb_event event,
const struct lyd_node *dnode,
union nb_resource *resource)
{
struct in_addr value;
- struct listnode *node;
struct isis_area *area;
if (event != NB_EV_APPLY)
return NB_OK;
- yang_dnode_get_ipv4(&value, dnode, NULL);
- isisMplsTE.router_id.s_addr = value.s_addr;
+ area = nb_running_get_entry(dnode, NULL, true);
/* only proceed if MPLS-TE is enabled */
- if (isisMplsTE.status == disable)
+ if (!IS_MPLS_TE(area->mta))
return NB_OK;
- /* Update main Router ID in isis global structure */
- isis->router_id = value.s_addr;
+ /* Update Area Router ID */
+ yang_dnode_get_ipv4(&value, dnode, NULL);
+ area->mta->router_id.s_addr = value.s_addr;
+
/* And re-schedule LSP update */
- for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area))
- if (listcount(area->area_addrs) > 0)
- lsp_regenerate_schedule(area, area->is_type, 0);
+ if (listcount(area->area_addrs) > 0)
+ lsp_regenerate_schedule(area, area->is_type, 0);
return NB_OK;
}
-static int isis_mpls_te_router_address_destroy(enum nb_event event,
+static int isis_instance_mpls_te_router_address_destroy(enum nb_event event,
const struct lyd_node *dnode)
{
- struct listnode *node;
struct isis_area *area;
if (event != NB_EV_APPLY)
return NB_OK;
- isisMplsTE.router_id.s_addr = INADDR_ANY;
+ area = nb_running_get_entry(dnode, NULL, true);
/* only proceed if MPLS-TE is enabled */
- if (isisMplsTE.status == disable)
+ if (!IS_MPLS_TE(area->mta))
return NB_OK;
- /* Update main Router ID in isis global structure */
- isis->router_id = 0;
+ /* Reset Area Router ID */
+ area->mta->router_id.s_addr = INADDR_ANY;
+
/* And re-schedule LSP update */
- for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area))
- if (listcount(area->area_addrs) > 0)
- lsp_regenerate_schedule(area, area->is_type, 0);
+ if (listcount(area->area_addrs) > 0)
+ lsp_regenerate_schedule(area, area->is_type, 0);
return NB_OK;
}
abort();
}
- ifp = yang_dnode_get_entry(dnode, true);
+ ifp = nb_running_get_entry(dnode, NULL, true);
circuit = isis_circuit_create(area, ifp);
assert(circuit->state == C_STATE_CONF || circuit->state == C_STATE_UP);
- yang_dnode_set_entry(dnode, circuit);
+ nb_running_set_entry(dnode, circuit);
return NB_OK;
}
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_unset_entry(dnode);
if (!circuit)
return NB_ERR_INCONSISTENCY;
/* delete circuit through csm changes */
case NB_EV_ABORT:
break;
case NB_EV_APPLY:
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
isis_circuit_is_type_set(circuit, circ_type);
break;
}
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
ipv4 = yang_dnode_get_bool(dnode, NULL);
ipv6 = yang_dnode_get_bool(dnode, "../ipv6-routing");
isis_circuit_af_set(circuit, ipv4, ipv6);
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
ipv4 = yang_dnode_exists(dnode, "../ipv4-routing");
ipv6 = yang_dnode_get_bool(dnode, NULL);
isis_circuit_af_set(circuit, ipv4, ipv6);
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->csnp_interval[0] = yang_dnode_get_uint16(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->csnp_interval[1] = yang_dnode_get_uint16(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->psnp_interval[0] = yang_dnode_get_uint16(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->psnp_interval[1] = yang_dnode_get_uint16(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->pad_hellos = yang_dnode_get_bool(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
interval = yang_dnode_get_uint32(dnode, NULL);
circuit->hello_interval[0] = interval;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
interval = yang_dnode_get_uint32(dnode, NULL);
circuit->hello_interval[1] = interval;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
multi = yang_dnode_get_uint16(dnode, NULL);
circuit->hello_multiplier[0] = multi;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
multi = yang_dnode_get_uint16(dnode, NULL);
circuit->hello_multiplier[1] = multi;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
met = yang_dnode_get_uint32(dnode, NULL);
isis_circuit_metric_set(circuit, IS_LEVEL_1, met);
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
met = yang_dnode_get_uint32(dnode, NULL);
isis_circuit_metric_set(circuit, IS_LEVEL_2, met);
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->priority[0] = yang_dnode_get_uint8(dnode, NULL);
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->priority[1] = yang_dnode_get_uint8(dnode, NULL);
return NB_OK;
switch (event) {
case NB_EV_VALIDATE:
- circuit = yang_dnode_get_entry(dnode, false);
+ circuit = nb_running_get_entry(dnode, NULL, false);
if (!circuit)
break;
if (circuit->circ_type == CIRCUIT_T_LOOPBACK) {
case NB_EV_ABORT:
break;
case NB_EV_APPLY:
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
isis_circuit_circ_type_set(circuit, net_type);
break;
}
/* validation only applies if we are setting passive to false */
if (!passive && event == NB_EV_VALIDATE) {
- circuit = yang_dnode_get_entry(dnode, false);
+ circuit = nb_running_get_entry(dnode, NULL, false);
if (!circuit)
return NB_OK;
ifp = circuit->interface;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
if (circuit->state != C_STATE_UP) {
circuit->is_passive = passive;
} else {
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
isis_circuit_passwd_unset(circuit);
return NB_OK;
return NB_OK;
password = yang_dnode_get_string(dnode, NULL);
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
isis_circuit_passwd_set(circuit, circuit->passwd.type, password);
return NB_OK;
pass_type = yang_dnode_get_enum(dnode, NULL);
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->passwd.type = pass_type;
return NB_OK;
if (event != NB_EV_APPLY)
return NB_OK;
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
circuit->disable_threeway_adj = yang_dnode_get_bool(dnode, NULL);
return NB_OK;
switch (event) {
case NB_EV_VALIDATE:
- circuit = yang_dnode_get_entry(dnode, false);
+ circuit = nb_running_get_entry(dnode, NULL, false);
if (circuit && circuit->area && circuit->area->oldmetric) {
flog_warn(
EC_LIB_NB_CB_CONFIG_VALIDATE,
case NB_EV_ABORT:
break;
case NB_EV_APPLY:
- circuit = yang_dnode_get_entry(dnode, true);
+ circuit = nb_running_get_entry(dnode, NULL, true);
value = yang_dnode_get_bool(dnode, NULL);
isis_circuit_mt_enabled_set(circuit, mtid, value);
break;
{
.xpath = "/frr-isisd:isis/instance/default-information-originate/ipv4/metric",
.cbs.modify = isis_instance_default_information_originate_ipv4_metric_modify,
- .cbs.destroy = isis_instance_default_information_originate_ipv4_metric_destroy,
},
{
.xpath = "/frr-isisd:isis/instance/default-information-originate/ipv6",
{
.xpath = "/frr-isisd:isis/instance/default-information-originate/ipv6/metric",
.cbs.modify = isis_instance_default_information_originate_ipv6_metric_modify,
- .cbs.destroy = isis_instance_default_information_originate_ipv6_metric_destroy,
},
{
.xpath = "/frr-isisd:isis/instance/redistribute/ipv4",
{
.xpath = "/frr-isisd:isis/instance/redistribute/ipv4/metric",
.cbs.modify = isis_instance_redistribute_ipv4_metric_modify,
- .cbs.destroy = isis_instance_redistribute_ipv4_metric_destroy,
},
{
.xpath = "/frr-isisd:isis/instance/redistribute/ipv6",
{
.xpath = "/frr-isisd:isis/instance/redistribute/ipv6/metric",
.cbs.modify = isis_instance_redistribute_ipv6_metric_modify,
- .cbs.destroy = isis_instance_redistribute_ipv6_metric_destroy,
},
{
.xpath = "/frr-isisd:isis/instance/multi-topology/ipv4-multicast",
.cbs.cli_show = cli_show_isis_log_adjacency,
},
{
- .xpath = "/frr-isisd:isis/mpls-te",
- .cbs.create = isis_mpls_te_create,
- .cbs.destroy = isis_mpls_te_destroy,
+ .xpath = "/frr-isisd:isis/instance/mpls-te",
+ .cbs.create = isis_instance_mpls_te_create,
+ .cbs.destroy = isis_instance_mpls_te_destroy,
.cbs.cli_show = cli_show_isis_mpls_te,
},
{
- .xpath = "/frr-isisd:isis/mpls-te/router-address",
- .cbs.modify = isis_mpls_te_router_address_modify,
- .cbs.destroy = isis_mpls_te_router_address_destroy,
+ .xpath = "/frr-isisd:isis/instance/mpls-te/router-address",
+ .cbs.modify = isis_instance_mpls_te_router_address_modify,
+ .cbs.destroy = isis_instance_mpls_te_router_address_destroy,
.cbs.cli_show = cli_show_isis_mpls_te_router_addr,
},
{