static const struct frr_yang_module_info *babeld_yang_modules[] =
{
+ &frr_interface_info,
};
FRR_DAEMON_INFO(babeld, BABELD,
};
static const struct frr_yang_module_info *eigrpd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(eigrpd, EIGRP, .vty_port = EIGRP_VTY_PORT,
};
static const struct frr_yang_module_info *isisd_yang_modules[] = {
+ &frr_interface_info,
};
#ifdef FABRICD
XFREE(MTYPE_IF_LINK_PARAMS, ifp->link_params);
ifp->link_params = NULL;
}
+
+/* ------- Northbound callbacks ------- */
+
+/*
+ * XPath: /frr-interface:lib/interface
+ */
+static int lib_interface_create(enum nb_event event,
+ const struct lyd_node *dnode,
+ union nb_resource *resource)
+{
+ /* TODO: implement me. */
+ return NB_OK;
+}
+
+static int lib_interface_delete(enum nb_event event,
+ const struct lyd_node *dnode)
+{
+ /* TODO: implement me. */
+ return NB_OK;
+}
+
+/*
+ * XPath: /frr-interface:lib/interface/description
+ */
+static int lib_interface_description_modify(enum nb_event event,
+ const struct lyd_node *dnode,
+ union nb_resource *resource)
+{
+ /* TODO: implement me. */
+ return NB_OK;
+}
+
+static int lib_interface_description_delete(enum nb_event event,
+ const struct lyd_node *dnode)
+{
+ /* TODO: implement me. */
+ return NB_OK;
+}
+
+/* clang-format off */
+const struct frr_yang_module_info frr_interface_info = {
+ .name = "frr-interface",
+ .nodes = {
+ {
+ .xpath = "/frr-interface:lib/interface",
+ .cbs.create = lib_interface_create,
+ .cbs.delete = lib_interface_delete,
+ },
+ {
+ .xpath = "/frr-interface:lib/interface/description",
+ .cbs.modify = lib_interface_description_modify,
+ .cbs.delete = lib_interface_description_delete,
+ },
+ {
+ .xpath = NULL,
+ },
+ }
+};
extern int if_is_broadcast(struct interface *);
extern int if_is_pointopoint(struct interface *);
extern int if_is_multicast(struct interface *);
-extern void if_cmd_init(void);
struct vrf;
extern void if_terminate(struct vrf *vrf);
extern void if_dump_all(void);
struct if_link_params *if_link_params_get(struct interface *);
void if_link_params_free(struct interface *);
+/* Northbound. */
+extern void if_cmd_init(void);
+extern const struct frr_yang_module_info frr_interface_info;
+
#endif /* _ZEBRA_IF_H */
};
static const struct frr_yang_module_info *nhrpd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(nhrpd, NHRP, .vty_port = NHRP_VTY_PORT,
};
static const struct frr_yang_module_info *ospf6d_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(ospf6d, OSPF6, .vty_port = OSPF6_VTY_PORT,
};
static const struct frr_yang_module_info *ospfd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(ospfd, OSPF, .vty_port = OSPF_VTY_PORT,
#define PBR_VTY_PORT 2615
static const struct frr_yang_module_info *pbrd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(pbrd, PBR, .vty_port = PBR_VTY_PORT,
.cap_num_i = 0};
static const struct frr_yang_module_info *pimd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(pimd, PIM, .vty_port = PIMD_VTY_PORT,
};
static const struct frr_yang_module_info *ripd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(ripd, RIP, .vty_port = RIP_VTY_PORT,
};
static const struct frr_yang_module_info *ripngd_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(ripngd, RIPNG, .vty_port = RIPNG_VTY_PORT,
--- /dev/null
+module frr-interface {
+ yang-version 1.1;
+ namespace "http://frrouting.org/yang/interface";
+ prefix frr-interface;
+
+ organization
+ "Free Range Routing";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org>
+ FRR Development List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module defines a model for managing FRR interfaces.";
+
+ revision 2018-03-28 {
+ description
+ "Initial revision.";
+ }
+
+ container lib {
+ list interface {
+ key "name vrf";
+ description
+ "Interface.";
+
+ leaf name {
+ type string {
+ length "1..16";
+ }
+ description
+ "Interface name.";
+ }
+ leaf vrf {
+ type string {
+ length "1..36";
+ }
+ description
+ "VRF this interface is associated with.";
+ }
+ leaf description {
+ type string;
+ description
+ "Interface description.";
+ }
+ }
+ }
+}
dist_yangmodels_DATA += yang/frr-module-translator.yang
+dist_yangmodels_DATA += yang/frr-interface.yang
};
static const struct frr_yang_module_info *zebra_yang_modules[] = {
+ &frr_interface_info,
};
FRR_DAEMON_INFO(