summaryrefslogtreecommitdiffstats
path: root/yang-compiler/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'yang-compiler/src/main/resources')
-rw-r--r--yang-compiler/src/main/resources/log4j.properties25
-rw-r--r--yang-compiler/src/main/resources/plugins.json60
-rw-r--r--yang-compiler/src/main/resources/yang-compiler.pngbin0 -> 146547 bytes
-rw-r--r--yang-compiler/src/main/resources/yc-build.yang54
-rw-r--r--yang-compiler/src/main/resources/yc-yang-compiler-settings.yang20
5 files changed, 159 insertions, 0 deletions
diff --git a/yang-compiler/src/main/resources/log4j.properties b/yang-compiler/src/main/resources/log4j.properties
new file mode 100644
index 0000000..7fae67c
--- /dev/null
+++ b/yang-compiler/src/main/resources/log4j.properties
@@ -0,0 +1,25 @@
+### settings###
+log4j.rootLogger = debug,stdout,D,E
+
+### output to console ###
+log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target = System.out
+log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
+log4j.appender.stdout.Threshold = INFO
+log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} %m%n
+### method:%l%n###
+### ??DEBUG ????????=logs/debug.log ###
+log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.D.File = logs/debug.log
+log4j.appender.D.Append = true
+log4j.appender.D.Threshold = DEBUG
+log4j.appender.D.layout = org.apache.log4j.PatternLayout
+log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
+
+### ??ERROR ????????=logs/error.log ###
+log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.E.File = logs/error.log
+log4j.appender.E.Append = true
+log4j.appender.E.Threshold = ERROR
+log4j.appender.E.layout = org.apache.log4j.PatternLayout
+log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
diff --git a/yang-compiler/src/main/resources/plugins.json b/yang-compiler/src/main/resources/plugins.json
new file mode 100644
index 0000000..afd32f0
--- /dev/null
+++ b/yang-compiler/src/main/resources/plugins.json
@@ -0,0 +1,60 @@
+{
+ "plugins": {
+ "plugin": [
+ {
+ "name": "schema_validator",
+ "class-path": "",
+ "class": "org.yangcentral.yangkit.compiler.plugin.validator.YangValidator",
+ "description": "a plugin for validating yang files",
+ "parameter": [
+ {
+ "name": "output",
+ "description": "the output directory."
+ }
+ ]
+ },
+ {
+ "name": "yang_statistics",
+ "class-path": "",
+ "class": "org.yangcentral.yangkit.compiler.plugin.stat.YangStatistics",
+ "description": "a plugin for retrieving yang statistics",
+ "parameter": [
+ {
+ "name": "output",
+ "description": "the output file."
+ }
+ ]
+ },
+ {
+ "name": "yangtree_generator",
+ "class": "org.yangcentral.yangkit.compiler.plugin.yangtree.YangTreeGenerator",
+ "description": "a plugin for generating yang tree",
+ "parameter": [
+ {
+ "name": "output",
+ "description": "the output directory for generated yang tree."
+ },
+ {
+ "name": "line-length",
+ "description": "integer,default is 72, a line max length."
+ },
+ {
+ "name": "expand-grouping",
+ "description": "boolean,default is true,indicate whether expand grouping"
+ }
+ ]
+ },
+ {
+ "name": "yangpackage_generator",
+ "class": "org.yangcentral.yangkit.compiler.plugin.yangpackage.YangPackageGenerator",
+ "description": "a plugin for generating yang package",
+ "parameter": [
+ {
+ "name": "output",
+ "description": "string, the file name(include parent path) of yang package instance."
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/yang-compiler/src/main/resources/yang-compiler.png b/yang-compiler/src/main/resources/yang-compiler.png
new file mode 100644
index 0000000..2abbbb2
--- /dev/null
+++ b/yang-compiler/src/main/resources/yang-compiler.png
Binary files differ
diff --git a/yang-compiler/src/main/resources/yc-build.yang b/yang-compiler/src/main/resources/yc-build.yang
new file mode 100644
index 0000000..b8c2929
--- /dev/null
+++ b/yang-compiler/src/main/resources/yc-build.yang
@@ -0,0 +1,54 @@
+module yc-build {
+ namespace "urn:yangcentral:yang:yang-compiler-settings";
+ prefix "ycs";
+ yang-version "1.1";
+ import ietf-inet {
+ prefix inet;
+ }
+ description "The definition about yang compiler settings.";
+
+ revision 2022-09-02 {
+ description "init version.";
+ }
+ container yang {
+ leaf-list dir {
+ type string;
+ }
+ leaf-list file {
+ type string;
+ }
+ list module {
+ key "name revision";
+ leaf name {
+ type string;
+ }
+ leaf revision {
+ type string;
+ }
+ leaf organization {
+ type string;
+ }
+ leaf schema {
+ type inet:uri;
+ }
+ }
+ }
+ leaf settings {
+ type string;
+ description "the path of settings file.";
+ }
+ list plugin {
+ key name;
+ leaf name {
+ type string;
+ }
+ list parameter {
+ key name;
+ leaf name {
+ type string;
+ }
+ anydata value;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/yang-compiler/src/main/resources/yc-yang-compiler-settings.yang b/yang-compiler/src/main/resources/yc-yang-compiler-settings.yang
new file mode 100644
index 0000000..7fb3910
--- /dev/null
+++ b/yang-compiler/src/main/resources/yc-yang-compiler-settings.yang
@@ -0,0 +1,20 @@
+module yc-yang-compiler-settings {
+ namespace "urn:yangcentral:yang:yang-compiler-settings";
+ prefix "ycs";
+ import ietf-inet {
+ prefix inet;
+ }
+ description "The definition about yang compiler settings.";
+
+ revision 2022-09-02 {
+ description "init version.";
+ }
+
+ container settings {
+ leaf local-repository {
+ type string;
+ description "The definition of local repository. It should be a local directory.
+ if not present, the default is ${user.home}/.yang";
+ }
+ }
+}