reverted internal-rpc nacm rule

This commit is contained in:
Olof Hagsand 2019-03-26 16:26:07 +01:00
parent 3f3f70dfd6
commit 5fd092b785
5 changed files with 7 additions and 24 deletions

View file

@ -51,7 +51,6 @@
### Minor changes
* Added synatctic check for yang status: current, deprectated or obsolete.
* Added CLICON_NACM_MODE "internal-rpc" which is for RPC functionality only, ie no module or data-node read-write functionality. This is for backward compatibility with Clixon 3. (A reduced-functionality "internal")
* Made Makefile concurrent so that it can be compiled with -jN
* Added flags to example backend to control its behaviour:
* Start with `-- -r` to run the reset plugin

View file

@ -409,16 +409,16 @@ Step have the following mandatory arguments:
* when - A boolean XPath determining if the step should be evaluated for that (target) node.
Extended arguments:
* string - XPath string argument (rename)
* xml - XML expression for a new or transformed node (replace, insert)
* node - XPath node expression (move)
* tag - XPath string argument (rename)
* new - XML expression for a new or transformed node (replace, insert)
* dst - XPath node expression (move)
Step summary:
* rename(where:targets, when:bool, tag:string)
* replace(where:targets, when:bool, new:xml)
* insert(where:parents, when:bool, new:xml)
* delete(where:parents, when:bool)
* move(where:parents, when:bool, to:node)
* move(where:parents, when:bool, dst:node)
## Flowcharts

View file

@ -808,7 +808,7 @@ nacm_access(char *mode,
goto permit;
/* 0. If nacm-mode is external, get NACM defintion from separet tree,
otherwise get it from internal configuration */
if (strcmp(mode, "external") && strcmp(mode, "internal") && strcmp(mode, "internal-rpc")){
if (strcmp(mode, "external") && strcmp(mode, "internal")){
clicon_err(OE_XML, 0, "Invalid NACM mode: %s", mode);
goto done;
}
@ -884,15 +884,6 @@ nacm_access_pre(clicon_handle h,
if (xmldb_get(h, "running", "nacm", 0, &xnacm0, NULL) < 0)
goto done;
}
else if (strcmp(mode, "internal-rpc")==0){
/* Special mode only implemet exec rpc access point */
if (point == NACM_RPC){
if (xmldb_get(h, "running", "nacm", 0, &xnacm0, NULL) < 0)
goto done;
}
else
goto permit;
}
}
/* If config does not exist then the operation is permitted(?) */
if (xnacm0 == NULL)

View file

@ -216,8 +216,8 @@ xml_cmp(const void* arg1,
char *keyname;
cg_var *cv1;
cg_var *cv2;
int nr1;
int nr2;
int nr1 = 0;
int nr2 = 0;
cxobj *x1b;
cxobj *x2b;
int e;

View file

@ -121,13 +121,6 @@ module clixon-config {
enum internal{
description "NACM is enabled and available in the regular config";
}
enum internal-rpc{
description
"NACM is enabled and available in the regular config.
But only for RPC functionality, ie no module or data-node
read-write functionality.
This is for backward compatibility with Clixon 3.8.";
}
enum external{
description "NACM is enabled and available in a separate config";
}