]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_cli.c
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / isisd / isis_cli.c
index 809e17d477af3f4ba68c486282c883451ff22cf3..c68f49f92dd89221d14f898b76f372357a1e1f2e 100644 (file)
@@ -82,14 +82,16 @@ DEFPY(no_router_isis, no_router_isis_cmd, "no router isis WORD$tag",
        struct isis_circuit *circuit = NULL;
        struct isis_area *area = NULL;
 
-       area = isis_area_lookup(tag);
-       if (!area) {
+       if (!yang_dnode_exists(vty->candidate_config->dnode,
+                              "/frr-isisd:isis/instance[area-tag='%s']",
+                              tag)) {
                vty_out(vty, "ISIS area %s not found.\n", tag);
                return CMD_ERR_NOTHING_TODO;
        }
 
        nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
-       if (area->circuit_list && listcount(area->circuit_list)) {
+       area = isis_area_lookup(tag);
+       if (area && area->circuit_list && listcount(area->circuit_list)) {
                for (ALL_LIST_ELEMENTS(area->circuit_list, node, nnode,
                                       circuit)) {
                        /* add callbacks to delete each of the circuits listed
@@ -133,6 +135,9 @@ DEFPY(ip_router_isis, ip_router_isis_cmd, "ip router isis WORD$tag",
        char temp_xpath[XPATH_MAXLEN];
        const char *circ_type;
        struct isis_area *area;
+       struct interface *ifp;
+       const struct lyd_node *dnode =
+               yang_dnode_get(running_config->dnode, VTY_CURR_XPATH);
 
        /* area will be created if it is not present. make sure the yang model
         * is synced with FRR and call the appropriate NB cb.
@@ -153,7 +158,7 @@ DEFPY(ip_router_isis, ip_router_isis_cmd, "ip router isis WORD$tag",
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/area-tag",
                                      NB_OP_MODIFY, tag);
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/ipv4-routing",
-                                     NB_OP_CREATE, NULL);
+                                     NB_OP_MODIFY, "true");
                nb_cli_enqueue_change(
                        vty, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY,
                        listcount(isis->area_list) == 0 ? "level-1-2"
@@ -170,17 +175,26 @@ DEFPY(ip_router_isis, ip_router_isis_cmd, "ip router isis WORD$tag",
                case IS_LEVEL_1_AND_2:
                        circ_type = "level-1-2";
                        break;
+               default:
+                       /* just to silence compiler warnings */
+                       return CMD_WARNING_CONFIG_FAILED;
                }
                nb_cli_enqueue_change(vty, "./frr-isisd:isis", NB_OP_CREATE,
                                      NULL);
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/area-tag",
                                      NB_OP_MODIFY, tag);
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/ipv4-routing",
-                                     NB_OP_CREATE, NULL);
+                                     NB_OP_MODIFY, "true");
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/circuit-type",
                                      NB_OP_MODIFY, circ_type);
        }
 
+       /* check if the interface is a loopback and if so set it as passive */
+       ifp = yang_dnode_get_entry(dnode, false);
+       if (ifp && if_is_loopback(ifp))
+               nb_cli_enqueue_change(vty, "./frr-isisd:isis/passive",
+                                     NB_OP_MODIFY, "true");
+
        return nb_cli_apply_changes(vty, NULL);
 }
 
@@ -193,6 +207,9 @@ DEFPY(ip6_router_isis, ip6_router_isis_cmd, "ipv6 router isis WORD$tag",
        char temp_xpath[XPATH_MAXLEN];
        const char *circ_type;
        struct isis_area *area;
+       struct interface *ifp;
+       const struct lyd_node *dnode =
+               yang_dnode_get(running_config->dnode, VTY_CURR_XPATH);
 
        /* area will be created if it is not present. make sure the yang model
         * is synced with FRR and call the appropriate NB cb.
@@ -213,7 +230,7 @@ DEFPY(ip6_router_isis, ip6_router_isis_cmd, "ipv6 router isis WORD$tag",
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/area-tag",
                                      NB_OP_MODIFY, tag);
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/ipv6-routing",
-                                     NB_OP_CREATE, NULL);
+                                     NB_OP_MODIFY, "true");
                nb_cli_enqueue_change(
                        vty, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY,
                        listcount(isis->area_list) == 0 ? "level-1-2"
@@ -230,17 +247,26 @@ DEFPY(ip6_router_isis, ip6_router_isis_cmd, "ipv6 router isis WORD$tag",
                case IS_LEVEL_1_AND_2:
                        circ_type = "level-1-2";
                        break;
+               default:
+                       /* just to silence compiler warnings */
+                       return CMD_WARNING_CONFIG_FAILED;
                }
                nb_cli_enqueue_change(vty, "./frr-isisd:isis", NB_OP_CREATE,
                                      NULL);
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/area-tag",
                                      NB_OP_MODIFY, tag);
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/ipv6-routing",
-                                     NB_OP_CREATE, NULL);
+                                     NB_OP_MODIFY, "true");
                nb_cli_enqueue_change(vty, "./frr-isisd:isis/circuit-type",
                                      NB_OP_MODIFY, circ_type);
        }
 
+       /* check if the interface is a loopback and if so set it as passive */
+       ifp = yang_dnode_get_entry(dnode, false);
+       if (ifp && if_is_loopback(ifp))
+               nb_cli_enqueue_change(vty, "./frr-isisd:isis/passive",
+                                     NB_OP_MODIFY, "true");
+
        return nb_cli_apply_changes(vty, NULL);
 }
 
@@ -255,34 +281,29 @@ DEFPY(no_ip_router_isis, no_ip_router_isis_cmd,
 {
        const struct lyd_node *dnode =
                yang_dnode_get(running_config->dnode, VTY_CURR_XPATH);
-       struct interface *ifp;
-       struct isis_circuit *circuit = NULL;
-
-       /* check for the existance of a circuit */
-       if (dnode) {
-               ifp = yang_dnode_get_entry(dnode, false);
-               if (ifp)
-                       circuit = circuit_scan_by_ifp(ifp);
-       }
 
        /* if both ipv4 and ipv6 are off delete the interface isis container too
         */
        if (!strncmp(ip, "ipv6", strlen("ipv6"))) {
-               if (circuit && !circuit->ip_router)
+               if (dnode
+                   && !yang_dnode_get_bool(dnode,
+                                           "./frr-isisd:isis/ipv4-routing"))
                        nb_cli_enqueue_change(vty, "./frr-isisd:isis",
                                              NB_OP_DELETE, NULL);
                else
                        nb_cli_enqueue_change(vty,
                                              "./frr-isisd:isis/ipv6-routing",
-                                             NB_OP_DELETE, NULL);
+                                             NB_OP_MODIFY, "false");
        } else { /* no ipv4  */
-               if (circuit && !circuit->ipv6_router)
+               if (dnode
+                   && !yang_dnode_get_bool(dnode,
+                                           "./frr-isisd:isis/ipv6-routing"))
                        nb_cli_enqueue_change(vty, "./frr-isisd:isis",
                                              NB_OP_DELETE, NULL);
                else
                        nb_cli_enqueue_change(vty,
                                              "./frr-isisd:isis/ipv4-routing",
-                                             NB_OP_DELETE, NULL);
+                                             NB_OP_MODIFY, "false");
        }
 
        return nb_cli_apply_changes(vty, NULL);
@@ -291,6 +312,8 @@ DEFPY(no_ip_router_isis, no_ip_router_isis_cmd,
 void cli_show_ip_isis_ipv4(struct vty *vty, struct lyd_node *dnode,
                           bool show_defaults)
 {
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
        vty_out(vty, " ip router isis %s\n",
                yang_dnode_get_string(dnode, "../area-tag"));
 }
@@ -298,6 +321,8 @@ void cli_show_ip_isis_ipv4(struct vty *vty, struct lyd_node *dnode,
 void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
                           bool show_defaults)
 {
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
        vty_out(vty, " ipv6 router isis %s\n",
                yang_dnode_get_string(dnode, "../area-tag"));
 }
@@ -413,8 +438,8 @@ DEFPY(set_overload_bit, set_overload_bit_cmd, "[no] set-overload-bit",
       "Reset overload bit to accept transit traffic\n"
       "Set overload bit to avoid any transit traffic\n")
 {
-       nb_cli_enqueue_change(vty, "./overload",
-                             no ? NB_OP_DELETE : NB_OP_CREATE, NULL);
+       nb_cli_enqueue_change(vty, "./overload", NB_OP_MODIFY,
+                             no ? "false" : "true");
 
        return nb_cli_apply_changes(vty, NULL);
 }
@@ -422,6 +447,8 @@ DEFPY(set_overload_bit, set_overload_bit_cmd, "[no] set-overload-bit",
 void cli_show_isis_overload(struct vty *vty, struct lyd_node *dnode,
                            bool show_defaults)
 {
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
        vty_out(vty, " set-overload-bit\n");
 }
 
@@ -432,8 +459,8 @@ DEFPY(set_attached_bit, set_attached_bit_cmd, "[no] set-attached-bit",
       "Reset attached bit\n"
       "Set attached bit to identify as L1/L2 router for inter-area traffic\n")
 {
-       nb_cli_enqueue_change(vty, "./attached",
-                             no ? NB_OP_DELETE : NB_OP_CREATE, NULL);
+       nb_cli_enqueue_change(vty, "./attached", NB_OP_MODIFY,
+                             no ? "false" : "true");
 
        return nb_cli_apply_changes(vty, NULL);
 }
@@ -441,6 +468,8 @@ DEFPY(set_attached_bit, set_attached_bit_cmd, "[no] set-attached-bit",
 void cli_show_isis_attached(struct vty *vty, struct lyd_node *dnode,
                            bool show_defaults)
 {
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
        vty_out(vty, " set-attached-bit\n");
 }
 
@@ -448,7 +477,7 @@ void cli_show_isis_attached(struct vty *vty, struct lyd_node *dnode,
  * XPath: /frr-isisd:isis/instance/metric-style
  */
 DEFPY(metric_style, metric_style_cmd,
-         "metric-style <narrow|transition|wide>$style",
+      "metric-style <narrow|transition|wide>$style",
       "Use old-style (ISO 10589) or new-style packet formats\n"
       "Use old style of TLVs with narrow metric\n"
       "Send and accept both styles of TLVs during transition\n"
@@ -460,9 +489,9 @@ DEFPY(metric_style, metric_style_cmd,
 }
 
 DEFPY(no_metric_style, no_metric_style_cmd,
-         "no metric-style [narrow|transition|wide]",
-         NO_STR
-         "Use old-style (ISO 10589) or new-style packet formats\n"
+      "no metric-style [narrow|transition|wide]",
+      NO_STR
+      "Use old-style (ISO 10589) or new-style packet formats\n"
       "Use old style of TLVs with narrow metric\n"
       "Send and accept both styles of TLVs during transition\n"
       "Use new style of TLVs to carry wider metric\n")
@@ -851,7 +880,7 @@ DEFPY(spf_delay_ietf, spf_delay_ietf_cmd,
 DEFPY(no_spf_delay_ietf, no_spf_delay_ietf_cmd,
       "no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]",
       NO_STR
-         "IETF SPF delay algorithm\n"
+      "IETF SPF delay algorithm\n"
       "Delay used while in QUIET state\n"
       "Delay used while in QUIET state in milliseconds\n"
       "Delay used while in SHORT_WAIT state\n"
@@ -887,8 +916,8 @@ void cli_show_isis_spf_ietf_backoff(struct vty *vty, struct lyd_node *dnode,
 DEFPY(area_purge_originator, area_purge_originator_cmd, "[no] purge-originator",
       NO_STR "Use the RFC 6232 purge-originator\n")
 {
-       nb_cli_enqueue_change(vty, "./purge-originator",
-                             no ? NB_OP_DELETE : NB_OP_CREATE, NULL);
+       nb_cli_enqueue_change(vty, "./purge-originator", NB_OP_MODIFY,
+                             no ? "false" : "true");
 
        return nb_cli_apply_changes(vty, NULL);
 }
@@ -896,6 +925,8 @@ DEFPY(area_purge_originator, area_purge_originator_cmd, "[no] purge-originator",
 void cli_show_isis_purge_origin(struct vty *vty, struct lyd_node *dnode,
                                bool show_defaults)
 {
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
        vty_out(vty, " purge-originator\n");
 }
 
@@ -986,9 +1017,8 @@ DEFPY(isis_default_originate, isis_default_originate_cmd,
                nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
        else {
                nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-               nb_cli_enqueue_change(vty, "./always",
-                                     always ? NB_OP_CREATE : NB_OP_DELETE,
-                                     NULL);
+               nb_cli_enqueue_change(vty, "./always", NB_OP_MODIFY,
+                                     always ? "true" : "false");
                nb_cli_enqueue_change(vty, "./route-map",
                                      rmap ? NB_OP_MODIFY : NB_OP_DELETE,
                                      rmap ? rmap : NULL);
@@ -1009,12 +1039,13 @@ DEFPY(isis_default_originate, isis_default_originate_cmd,
 }
 
 static void vty_print_def_origin(struct vty *vty, struct lyd_node *dnode,
-                                const char *family, const char *level, bool show_defaults)
+                                const char *family, const char *level,
+                                bool show_defaults)
 {
        const char *metric;
 
        vty_out(vty, " default-information originate %s %s", family, level);
-       if (yang_dnode_exists(dnode, "./always"))
+       if (yang_dnode_get_bool(dnode, "./always"))
                vty_out(vty, " always");
 
        if (yang_dnode_exists(dnode, "./route-map"))
@@ -1154,9 +1185,8 @@ DEFPY(isis_topology, isis_topology_cmd,
                nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
        else {
                nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-               nb_cli_enqueue_change(vty, "./overload",
-                                     overload ? NB_OP_CREATE : NB_OP_DELETE,
-                                     NULL);
+               nb_cli_enqueue_change(vty, "./overload", NB_OP_MODIFY,
+                                     overload ? "true" : "false");
        }
 
        return nb_cli_apply_changes(vty, base_xpath);
@@ -1166,7 +1196,7 @@ void cli_show_isis_mt_ipv4_multicast(struct vty *vty, struct lyd_node *dnode,
                                     bool show_defaults)
 {
        vty_out(vty, " topology ipv4-multicast");
-       if (yang_dnode_exists(dnode, "./overload"))
+       if (yang_dnode_get_bool(dnode, "./overload"))
                vty_out(vty, " overload");
        vty_out(vty, "\n");
 }
@@ -1175,7 +1205,7 @@ void cli_show_isis_mt_ipv4_mgmt(struct vty *vty, struct lyd_node *dnode,
                                bool show_defaults)
 {
        vty_out(vty, " topology ipv4-mgmt");
-       if (yang_dnode_exists(dnode, "./overload"))
+       if (yang_dnode_get_bool(dnode, "./overload"))
                vty_out(vty, " overload");
        vty_out(vty, "\n");
 }
@@ -1184,7 +1214,7 @@ void cli_show_isis_mt_ipv6_unicast(struct vty *vty, struct lyd_node *dnode,
                                   bool show_defaults)
 {
        vty_out(vty, " topology ipv6-unicast");
-       if (yang_dnode_exists(dnode, "./overload"))
+       if (yang_dnode_get_bool(dnode, "./overload"))
                vty_out(vty, " overload");
        vty_out(vty, "\n");
 }
@@ -1193,7 +1223,7 @@ void cli_show_isis_mt_ipv6_multicast(struct vty *vty, struct lyd_node *dnode,
                                     bool show_defaults)
 {
        vty_out(vty, " topology ipv6-multicast");
-       if (yang_dnode_exists(dnode, "./overload"))
+       if (yang_dnode_get_bool(dnode, "./overload"))
                vty_out(vty, " overload");
        vty_out(vty, "\n");
 }
@@ -1202,7 +1232,7 @@ void cli_show_isis_mt_ipv6_mgmt(struct vty *vty, struct lyd_node *dnode,
                                bool show_defaults)
 {
        vty_out(vty, " topology ipv6-mgmt");
-       if (yang_dnode_exists(dnode, "./overload"))
+       if (yang_dnode_get_bool(dnode, "./overload"))
                vty_out(vty, " overload");
        vty_out(vty, "\n");
 }
@@ -1211,7 +1241,7 @@ void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
                                  bool show_defaults)
 {
        vty_out(vty, " topology ipv6-dstsrc");
-       if (yang_dnode_exists(dnode, "./overload"))
+       if (yang_dnode_get_bool(dnode, "./overload"))
                vty_out(vty, " overload");
        vty_out(vty, "\n");
 }
@@ -1224,8 +1254,8 @@ DEFPY(isis_passive, isis_passive_cmd, "[no] isis passive",
       "IS-IS routing protocol\n"
       "Configure the passive mode for interface\n")
 {
-       nb_cli_enqueue_change(vty, "./frr-isisd:isis/passive",
-                             no ? NB_OP_DELETE : NB_OP_CREATE, NULL);
+       nb_cli_enqueue_change(vty, "./frr-isisd:isis/passive", NB_OP_MODIFY,
+                             no ? "false" : "true");
 
        return nb_cli_apply_changes(vty, NULL);
 }
@@ -1233,6 +1263,8 @@ DEFPY(isis_passive, isis_passive_cmd, "[no] isis passive",
 void cli_show_ip_isis_passive(struct vty *vty, struct lyd_node *dnode,
                              bool show_defaults)
 {
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
        vty_out(vty, " isis passive\n");
 }
 
@@ -1460,7 +1492,7 @@ DEFPY(isis_threeway_adj, isis_threeway_adj_cmd, "[no] isis three-way-handshake",
 {
        nb_cli_enqueue_change(vty,
                              "./frr-isisd:isis/disable-three-way-handshake",
-                             no ? NB_OP_CREATE : NB_OP_DELETE, NULL);
+                             NB_OP_MODIFY, no ? "true" : "false");
 
        return nb_cli_apply_changes(vty, NULL);
 }
@@ -1468,7 +1500,9 @@ DEFPY(isis_threeway_adj, isis_threeway_adj_cmd, "[no] isis three-way-handshake",
 void cli_show_ip_isis_threeway_shake(struct vty *vty, struct lyd_node *dnode,
                                     bool show_defaults)
 {
-       vty_out(vty, " no isis three-way-handshake\n");
+       if (yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
+       vty_out(vty, " isis three-way-handshake\n");
 }
 
 /*
@@ -1704,6 +1738,200 @@ void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
        vty_out(vty, " isis topology ipv6-dstsrc\n");
 }
 
+/*
+ * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type
+ */
+DEFPY(isis_circuit_type, isis_circuit_type_cmd,
+      "isis circuit-type <level-1|level-1-2|level-2-only>$type",
+      "IS-IS routing protocol\n"
+      "Configure circuit type for interface\n"
+      "Level-1 only adjacencies are formed\n"
+      "Level-1-2 adjacencies are formed\n"
+      "Level-2 only adjacencies are formed\n")
+{
+       nb_cli_enqueue_change(
+               vty, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY,
+               strmatch(type, "level-2-only") ? "level-2" : type);
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+DEFPY(no_isis_circuit_type, no_isis_circuit_type_cmd,
+      "no isis circuit-type [level-1|level-1-2|level-2-only]",
+      NO_STR
+      "IS-IS routing protocol\n"
+      "Configure circuit type for interface\n"
+      "Level-1 only adjacencies are formed\n"
+      "Level-1-2 adjacencies are formed\n"
+      "Level-2 only adjacencies are formed\n")
+{
+       const struct lyd_node *dnode;
+       struct interface *ifp;
+       struct isis_circuit *circuit;
+       int is_type;
+       const char *circ_type;
+
+       /*
+        * Default value depends on whether the circuit is part of an area,
+        * and the is-type of the area if there is one. So we need to do this
+        * here.
+        */
+       dnode = yang_dnode_get(running_config->dnode, VTY_CURR_XPATH);
+       ifp = yang_dnode_get_entry(dnode, false);
+       if (!ifp)
+               goto def_val;
+
+       circuit = circuit_scan_by_ifp(ifp);
+       if (!circuit)
+               goto def_val;
+
+       if (circuit->state == C_STATE_UP)
+               is_type = circuit->area->is_type;
+       else
+               goto def_val;
+
+       switch (is_type) {
+       case IS_LEVEL_1:
+               circ_type = "level-1";
+               break;
+       case IS_LEVEL_2:
+               circ_type = "level-2";
+               break;
+       case IS_LEVEL_1_AND_2:
+               circ_type = "level-1-2";
+               break;
+       default:
+               return CMD_ERR_NO_MATCH;
+       }
+       nb_cli_enqueue_change(vty, "./frr-isisd:isis/circuit-type",
+                             NB_OP_MODIFY, circ_type);
+
+       return nb_cli_apply_changes(vty, NULL);
+
+def_val:
+       nb_cli_enqueue_change(vty, "./frr-isisd:isis/circuit-type",
+                             NB_OP_MODIFY, NULL);
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ip_isis_circ_type(struct vty *vty, struct lyd_node *dnode,
+                               bool show_defaults)
+{
+       int level = yang_dnode_get_enum(dnode, NULL);
+
+       switch (level) {
+       case IS_LEVEL_1:
+               vty_out(vty, " isis circuit-type level-1\n");
+               break;
+       case IS_LEVEL_2:
+               vty_out(vty, " isis circuit-type level-2-only\n");
+               break;
+       case IS_LEVEL_1_AND_2:
+               vty_out(vty, " isis circuit-type level-1-2\n");
+               break;
+       }
+}
+
+/*
+ * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type
+ */
+DEFPY(isis_network, isis_network_cmd, "[no] isis network point-to-point",
+      NO_STR
+      "IS-IS routing protocol\n"
+      "Set network type\n"
+      "point-to-point network type\n")
+{
+       nb_cli_enqueue_change(vty, "./frr-isisd:isis/network-type",
+                             NB_OP_MODIFY,
+                             no ? "broadcast" : "point-to-point");
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode,
+                                  bool show_defaults)
+{
+       if (yang_dnode_get_enum(dnode, NULL) != CIRCUIT_T_P2P)
+               vty_out(vty, " no");
+
+       vty_out(vty, " isis network point-to-point\n");
+}
+
+/*
+ * XPath: /frr-interface:lib/interface/frr-isisd:isis/priority
+ */
+DEFPY(isis_priority, isis_priority_cmd,
+      "isis priority (0-127)$prio [level-1|level-2]$level",
+      "IS-IS routing protocol\n"
+      "Set priority for Designated Router election\n"
+      "Priority value\n"
+      "Specify priority for level-1 routing\n"
+      "Specify priority for level-2 routing\n")
+{
+       if (!level || strmatch(level, "level-1"))
+               nb_cli_enqueue_change(vty, "./frr-isisd:isis/priority/level-1",
+                                     NB_OP_MODIFY, prio_str);
+       if (!level || strmatch(level, "level-2"))
+               nb_cli_enqueue_change(vty, "./frr-isisd:isis/priority/level-2",
+                                     NB_OP_MODIFY, prio_str);
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+DEFPY(no_isis_priority, no_isis_priority_cmd,
+      "no isis priority [(0-127)] [level-1|level-2]$level",
+      NO_STR
+      "IS-IS routing protocol\n"
+      "Set priority for Designated Router election\n"
+      "Priority value\n"
+      "Specify priority for level-1 routing\n"
+      "Specify priority for level-2 routing\n")
+{
+       if (!level || strmatch(level, "level-1"))
+               nb_cli_enqueue_change(vty, "./frr-isisd:isis/priority/level-1",
+                                     NB_OP_MODIFY, NULL);
+       if (!level || strmatch(level, "level-2"))
+               nb_cli_enqueue_change(vty, "./frr-isisd:isis/priority/level-2",
+                                     NB_OP_MODIFY, NULL);
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
+                              bool show_defaults)
+{
+       const char *l1 = yang_dnode_get_string(dnode, "./level-1");
+       const char *l2 = yang_dnode_get_string(dnode, "./level-2");
+
+       if (strmatch(l1, l2))
+               vty_out(vty, " isis priority %s\n", l1);
+       else {
+               vty_out(vty, " isis priority %s level-1\n", l1);
+               vty_out(vty, " isis priority %s level-2\n", l2);
+       }
+}
+
+/*
+ * XPath: /frr-isisd:isis/instance/log-adjacency-changes
+ */
+DEFPY(log_adj_changes, log_adj_changes_cmd, "[no] log-adjacency-changes",
+      NO_STR "Log changes in adjacency state\n")
+{
+       nb_cli_enqueue_change(vty, "./log-adjacency-changes", NB_OP_MODIFY,
+                             no ? "false" : "true");
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_isis_log_adjacency(struct vty *vty, struct lyd_node *dnode,
+                                bool show_defaults)
+{
+       if (!yang_dnode_get_bool(dnode, NULL))
+               vty_out(vty, " no");
+       vty_out(vty, " log-adjacency-changes\n");
+}
+
 void isis_cli_init(void)
 {
        install_element(CONFIG_NODE, &router_isis_cmd);
@@ -1781,6 +2009,16 @@ void isis_cli_init(void)
        install_element(INTERFACE_NODE, &no_psnp_interval_cmd);
 
        install_element(INTERFACE_NODE, &circuit_topology_cmd);
+
+       install_element(INTERFACE_NODE, &isis_circuit_type_cmd);
+       install_element(INTERFACE_NODE, &no_isis_circuit_type_cmd);
+
+       install_element(INTERFACE_NODE, &isis_network_cmd);
+
+       install_element(INTERFACE_NODE, &isis_priority_cmd);
+       install_element(INTERFACE_NODE, &no_isis_priority_cmd);
+
+       install_element(ISIS_NODE, &log_adj_changes_cmd);
 }
 
 #endif /* ifndef FABRICD */