Browse Source

Merge branch 'master' of https://src.libcode.org/pkun/klish-plugin-sysrepo

Serj Kalichev 1 year ago
parent
commit
ef1d03df48
3 changed files with 16 additions and 16 deletions
  1. 9 9
      src/pline.c
  2. 3 3
      xml/sysrepo.xml
  3. 4 4
      yang/klish.yang

+ 9 - 9
src/pline.c

@@ -922,11 +922,15 @@ static void pline_print_type_help(const struct lysc_node *node,
 			break;
 
 		case LY_TYPE_UINT32:
-			printf("<uint32>\n");
+			uint_range(type, 0, UINT_MAX);
 			break;
 
 		case LY_TYPE_UINT64:
-			printf("<uint64>\n");
+			uint_range(type, 0, ULLONG_MAX);
+			break;
+
+		case LY_TYPE_DEC64:
+			uint_range(type, 0, ULLONG_MAX);
 			break;
 
 		case LY_TYPE_INT8:
@@ -934,15 +938,15 @@ static void pline_print_type_help(const struct lysc_node *node,
 			break;
 
 		case LY_TYPE_INT16:
-			printf("<int16>\n");
+			int_range(type, SHRT_MIN, SHRT_MAX);
 			break;
 
 		case LY_TYPE_INT32:
-			printf("<int32>\n");
+			int_range(type, INT_MIN, INT_MAX);
 			break;
 
 		case LY_TYPE_INT64:
-			printf("<int64>\n");
+			int_range(type, LLONG_MIN, LLONG_MAX);
 			break;
 
 		case LY_TYPE_STRING:
@@ -953,10 +957,6 @@ static void pline_print_type_help(const struct lysc_node *node,
 			printf("<true/false>\n");
 			break;
 
-		case LY_TYPE_DEC64:
-			printf("<number>\n");
-			break;
-
 		case LY_TYPE_ENUM:
 			printf("Enumerated choice\n");
 			break;

+ 3 - 3
xml/sysrepo.xml

@@ -102,12 +102,12 @@
 		<VIEW name="operational" ref="/main"/>
 	</COMMAND>
 
-	<COMMAND name="set" help="Set data to database">
+	<COMMAND name="set" help="Set data to configuration">
 		<PARAM name="path" ptype="/PLINE_SET" max="100"/>
 		<ACTION sym="srp_set@sysrepo"/>
 	</COMMAND>
 
-	<COMMAND name="del" help="Delete data from database">
+	<COMMAND name="del" help="Delete data from configuration">
 		<PARAM name="path" ptype="/PLINE_DEL" max="100"/>
 		<ACTION sym="srp_del@sysrepo"/>
 	</COMMAND>
@@ -158,7 +158,7 @@
 		<ACTION sym="srp_show@sysrepo"/>
 	</COMMAND>
 
-	<COMMAND name="diff" help="Show diff to running-config">
+	<COMMAND name="diff" help="Show diff relative running-config">
 		<PARAM name="path" ptype="/PLINE_EDIT" min="0" max="100"/>
 		<ACTION sym="srp_diff@sysrepo"/>
 	</COMMAND>

+ 4 - 4
yang/klish.yang

@@ -1,21 +1,21 @@
 module klish {
   namespace "http://klish.libcode.org/yang/klish";
   prefix "klish";
-  description "Klish extensions. The klish-plugin-sysrepo can use it.";
+  description "Klish extensions. The klish-plugin-sysrepo can use it";
 
   extension completion {
     argument "xpath";
-    description "XPath for autocompletion.";
+    description "XPath for autocompletion";
   }
 
   extension password {
     argument "algo";
-    description "Leaf element contains password.";
+    description "Leaf element contains password";
   }
 
   extension default {
     argument "default";
-    description "Default value for list's key to make it optional.";
+    description "Default value for list's key to make it optional";
   }
 
 }