123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <assert.h>
- #include <sysrepo.h>
- #include <sysrepo/xpath.h>
- #include "private.h"
- static int
- sr_ly_module_is_internal(const struct lys_module *ly_mod)
- {
- if (!ly_mod->revision) {
- return 0;
- }
- if (!strcmp(ly_mod->name, "ietf-yang-metadata") && !strcmp(ly_mod->revision, "2016-08-05")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "yang") && !strcmp(ly_mod->revision, "2021-04-07")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-inet-types") && !strcmp(ly_mod->revision, "2013-07-15")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-yang-types") && !strcmp(ly_mod->revision, "2013-07-15")) {
- return 1;
- }
- return 0;
- }
- int
- sr_module_is_internal(const struct lys_module *ly_mod)
- {
- if (!ly_mod->revision) {
- return 0;
- }
- if (sr_ly_module_is_internal(ly_mod)) {
- return 1;
- }
- if (!strcmp(ly_mod->name, "ietf-datastores") && !strcmp(ly_mod->revision, "2018-02-14")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-yang-schema-mount")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-yang-library")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-netconf")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-netconf-with-defaults") && !strcmp(ly_mod->revision, "2011-06-01")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-origin") && !strcmp(ly_mod->revision, "2018-02-14")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-netconf-notifications") && !strcmp(ly_mod->revision, "2012-02-06")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "sysrepo")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "sysrepo-monitoring")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "sysrepo-plugind")) {
- return 1;
- } else if (!strcmp(ly_mod->name, "ietf-netconf-acm")) {
- return 1;
- }
- return 0;
- }
|